@felloh-org/lambda-wrapper 1.11.74 → 1.11.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entity/acquirer/band/index.js +60 -0
- package/dist/entity/acquirer/band_rate/index.js +65 -0
- package/dist/entity/acquirer/bin-type-grouping/index.js +56 -0
- package/dist/entity/acquirer/country-type/index.js +44 -0
- package/dist/entity/acquirer/fee/index.js +127 -0
- package/dist/entity/acquirer/organisation-band/index.js +61 -0
- package/dist/entity/basis-theory/token/index.js +1 -1
- package/dist/entity/payment/transaction-metadata/index.js +3 -3
- package/dist/entity/payment/transaction-rate/index.js +140 -0
- package/dist/entity/total-processing/transaction-metadata/index.js +3 -3
- package/dist/migration/acquirer/1708596720562-bandings.js +25 -0
- package/dist/migration/acquirer/1708598335438-band_rate.js +17 -0
- package/dist/migration/acquirer/1708605040113-transaction_rate.js +19 -0
- package/dist/migration/acquirer/1708609916248-bin_type_grouping.js +13 -0
- package/dist/migration/acquirer/1708616903284-field_length.js +25 -0
- package/dist/migration/acquirer/1709030948477-update_precission_fee.js +19 -0
- package/dist/model/webhook/transaction/index.js +9 -2
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _paymentProvider = _interopRequireDefault(require("../../payment/payment-provider"));
|
|
11
|
+
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
17
|
+
|
|
18
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
19
|
+
|
|
20
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
21
|
+
|
|
22
|
+
let Band = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'band',
|
|
24
|
+
schema: 'acquirer'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "128",
|
|
28
|
+
nullable: true
|
|
29
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'payment_provider_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec(_class = (_class2 = class Band {
|
|
33
|
+
constructor() {
|
|
34
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
35
|
+
|
|
36
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
37
|
+
|
|
38
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor3, this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
42
|
+
configurable: true,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
initializer: null
|
|
46
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
initializer: function () {
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec4, _dec5], {
|
|
54
|
+
configurable: true,
|
|
55
|
+
enumerable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
initializer: function () {
|
|
58
|
+
return _paymentProvider.default;
|
|
59
|
+
}
|
|
60
|
+
})), _class2)) || _class);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _fee = _interopRequireDefault(require("../fee"));
|
|
11
|
+
|
|
12
|
+
var _band = _interopRequireDefault(require("../band"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
23
|
+
|
|
24
|
+
let BandRate = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'band_rate',
|
|
26
|
+
schema: 'acquirer'
|
|
27
|
+
}), _dec2 = (0, _typeorm.ManyToOne)(() => _fee.default, {
|
|
28
|
+
primary: true
|
|
29
|
+
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'fee_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _band.default, {
|
|
33
|
+
primary: true
|
|
34
|
+
}), _dec5 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
name: 'band_id',
|
|
36
|
+
referencedColumnName: 'id'
|
|
37
|
+
}), _dec6 = (0, _typeorm.Column)('decimal', {
|
|
38
|
+
precision: 6,
|
|
39
|
+
scale: 2,
|
|
40
|
+
nullable: true
|
|
41
|
+
}), _dec(_class = (_class2 = class BandRate {
|
|
42
|
+
constructor() {
|
|
43
|
+
_initializerDefineProperty(this, "fee", _descriptor, this);
|
|
44
|
+
|
|
45
|
+
_initializerDefineProperty(this, "band", _descriptor2, this);
|
|
46
|
+
|
|
47
|
+
_initializerDefineProperty(this, "rate", _descriptor3, this);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "fee", [_dec2, _dec3], {
|
|
51
|
+
configurable: true,
|
|
52
|
+
enumerable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
initializer: null
|
|
55
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "band", [_dec4, _dec5], {
|
|
56
|
+
configurable: true,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
initializer: null
|
|
60
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "rate", [_dec6], {
|
|
61
|
+
configurable: true,
|
|
62
|
+
enumerable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
initializer: null
|
|
65
|
+
})), _class2)) || _class);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
11
|
+
|
|
12
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
17
|
+
|
|
18
|
+
let BinTypeGrouping = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'bin_type_grouping',
|
|
20
|
+
schema: 'acquirer'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "128",
|
|
24
|
+
nullable: true
|
|
25
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "128"
|
|
28
|
+
}), _dec(_class = (_class2 = class BinTypeGrouping {
|
|
29
|
+
constructor() {
|
|
30
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
31
|
+
|
|
32
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
33
|
+
|
|
34
|
+
_initializerDefineProperty(this, "grouping", _descriptor3, this);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
38
|
+
configurable: true,
|
|
39
|
+
enumerable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
initializer: null
|
|
42
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
43
|
+
configurable: true,
|
|
44
|
+
enumerable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
initializer: function () {
|
|
47
|
+
return "";
|
|
48
|
+
}
|
|
49
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "grouping", [_dec4], {
|
|
50
|
+
configurable: true,
|
|
51
|
+
enumerable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
initializer: function () {
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
})), _class2)) || _class);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
17
|
+
|
|
18
|
+
let CountryType = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'country_type',
|
|
20
|
+
schema: 'acquirer'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "128",
|
|
24
|
+
nullable: true
|
|
25
|
+
}), _dec(_class = (_class2 = class CountryType {
|
|
26
|
+
constructor() {
|
|
27
|
+
_initializerDefineProperty(this, "country", _descriptor, this);
|
|
28
|
+
|
|
29
|
+
_initializerDefineProperty(this, "countryType", _descriptor2, this);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "country", [_dec2], {
|
|
33
|
+
configurable: true,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
initializer: null
|
|
37
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "countryType", [_dec3], {
|
|
38
|
+
configurable: true,
|
|
39
|
+
enumerable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
initializer: function () {
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
})), _class2)) || _class);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
11
|
+
|
|
12
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
17
|
+
|
|
18
|
+
let Fee = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'fee',
|
|
20
|
+
schema: 'acquirer'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "128",
|
|
24
|
+
nullable: true
|
|
25
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "128",
|
|
28
|
+
nullable: true
|
|
29
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "128",
|
|
32
|
+
nullable: true
|
|
33
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
34
|
+
type: "varchar",
|
|
35
|
+
length: "128",
|
|
36
|
+
nullable: true
|
|
37
|
+
}), _dec7 = (0, _typeorm.Column)('decimal', {
|
|
38
|
+
precision: 6,
|
|
39
|
+
scale: 3,
|
|
40
|
+
nullable: true
|
|
41
|
+
}), _dec8 = (0, _typeorm.Column)('decimal', {
|
|
42
|
+
precision: 6,
|
|
43
|
+
scale: 3,
|
|
44
|
+
nullable: true
|
|
45
|
+
}), _dec9 = (0, _typeorm.Column)('decimal', {
|
|
46
|
+
precision: 6,
|
|
47
|
+
scale: 3,
|
|
48
|
+
nullable: true
|
|
49
|
+
}), _dec10 = (0, _typeorm.Column)('decimal', {
|
|
50
|
+
precision: 6,
|
|
51
|
+
scale: 3,
|
|
52
|
+
nullable: true
|
|
53
|
+
}), _dec(_class = (_class2 = class Fee {
|
|
54
|
+
constructor() {
|
|
55
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "scheme", _descriptor2, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "type", _descriptor3, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "level", _descriptor4, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "countryType", _descriptor5, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "cost", _descriptor6, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "interchange", _descriptor7, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "scheme_fee", _descriptor8, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "acquirer", _descriptor9, this);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
75
|
+
configurable: true,
|
|
76
|
+
enumerable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
initializer: null
|
|
79
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "scheme", [_dec3], {
|
|
80
|
+
configurable: true,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
initializer: function () {
|
|
84
|
+
return "";
|
|
85
|
+
}
|
|
86
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec4], {
|
|
87
|
+
configurable: true,
|
|
88
|
+
enumerable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
initializer: function () {
|
|
91
|
+
return "";
|
|
92
|
+
}
|
|
93
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "level", [_dec5], {
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
initializer: function () {
|
|
98
|
+
return "";
|
|
99
|
+
}
|
|
100
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "countryType", [_dec6], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: function () {
|
|
105
|
+
return "";
|
|
106
|
+
}
|
|
107
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "cost", [_dec7], {
|
|
108
|
+
configurable: true,
|
|
109
|
+
enumerable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
initializer: null
|
|
112
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "interchange", [_dec8], {
|
|
113
|
+
configurable: true,
|
|
114
|
+
enumerable: true,
|
|
115
|
+
writable: true,
|
|
116
|
+
initializer: null
|
|
117
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "scheme_fee", [_dec9], {
|
|
118
|
+
configurable: true,
|
|
119
|
+
enumerable: true,
|
|
120
|
+
writable: true,
|
|
121
|
+
initializer: null
|
|
122
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "acquirer", [_dec10], {
|
|
123
|
+
configurable: true,
|
|
124
|
+
enumerable: true,
|
|
125
|
+
writable: true,
|
|
126
|
+
initializer: null
|
|
127
|
+
})), _class2)) || _class);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
|
+
|
|
12
|
+
var _band = _interopRequireDefault(require("../band"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
23
|
+
|
|
24
|
+
let OrganisationBand = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'organisation_band',
|
|
26
|
+
schema: 'acquirer'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
28
|
+
name: 'organisation_id',
|
|
29
|
+
referencedColumnName: 'id'
|
|
30
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _band.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
31
|
+
name: 'band_id',
|
|
32
|
+
referencedColumnName: 'id'
|
|
33
|
+
}), _dec(_class = (_class2 = class OrganisationBand {
|
|
34
|
+
constructor() {
|
|
35
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
36
|
+
|
|
37
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
38
|
+
|
|
39
|
+
_initializerDefineProperty(this, "band", _descriptor3, this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
43
|
+
configurable: true,
|
|
44
|
+
enumerable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
initializer: null
|
|
47
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
48
|
+
configurable: true,
|
|
49
|
+
enumerable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
initializer: function () {
|
|
52
|
+
return _organisation.default;
|
|
53
|
+
}
|
|
54
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "band", [_dec5, _dec6], {
|
|
55
|
+
configurable: true,
|
|
56
|
+
enumerable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
initializer: function () {
|
|
59
|
+
return _band.default;
|
|
60
|
+
}
|
|
61
|
+
})), _class2)) || _class);
|
|
@@ -43,7 +43,7 @@ let Token = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
43
43
|
nullable: true
|
|
44
44
|
}), _dec8 = (0, _typeorm.Column)({
|
|
45
45
|
type: "varchar",
|
|
46
|
-
length: "
|
|
46
|
+
length: "50",
|
|
47
47
|
nullable: true
|
|
48
48
|
}), _dec9 = (0, _typeorm.CreateDateColumn)({
|
|
49
49
|
type: 'timestamp with time zone'
|
|
@@ -30,15 +30,15 @@ let TransactionMetadata = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
30
30
|
}), _dec4 = (0, _typeorm.Column)({
|
|
31
31
|
type: "varchar",
|
|
32
32
|
nullable: true,
|
|
33
|
-
length:
|
|
33
|
+
length: 50
|
|
34
34
|
}), _dec5 = (0, _typeorm.Column)({
|
|
35
35
|
type: "varchar",
|
|
36
36
|
nullable: true,
|
|
37
|
-
length:
|
|
37
|
+
length: 50
|
|
38
38
|
}), _dec6 = (0, _typeorm.Column)({
|
|
39
39
|
type: "varchar",
|
|
40
40
|
nullable: true,
|
|
41
|
-
length:
|
|
41
|
+
length: 50
|
|
42
42
|
}), _dec7 = (0, _typeorm.Column)({
|
|
43
43
|
type: "varchar",
|
|
44
44
|
nullable: true,
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _transaction = _interopRequireDefault(require("../transaction"));
|
|
11
|
+
|
|
12
|
+
var _band = _interopRequireDefault(require("../../acquirer/band"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
23
|
+
|
|
24
|
+
let TransactionRate = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'transaction_rate',
|
|
26
|
+
schema: 'payment'
|
|
27
|
+
}), _dec2 = (0, _typeorm.ManyToOne)(() => _transaction.default, {
|
|
28
|
+
primary: true
|
|
29
|
+
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'transaction_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _band.default, {
|
|
33
|
+
primary: true
|
|
34
|
+
}), _dec5 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
name: 'band_id',
|
|
36
|
+
referencedColumnName: 'id'
|
|
37
|
+
}), _dec6 = (0, _typeorm.Column)('decimal', {
|
|
38
|
+
precision: 6,
|
|
39
|
+
scale: 2,
|
|
40
|
+
nullable: true
|
|
41
|
+
}), _dec7 = (0, _typeorm.Column)('decimal', {
|
|
42
|
+
precision: 6,
|
|
43
|
+
scale: 2,
|
|
44
|
+
nullable: true
|
|
45
|
+
}), _dec8 = (0, _typeorm.Column)('decimal', {
|
|
46
|
+
precision: 6,
|
|
47
|
+
scale: 2,
|
|
48
|
+
nullable: true
|
|
49
|
+
}), _dec9 = (0, _typeorm.Column)('decimal', {
|
|
50
|
+
precision: 6,
|
|
51
|
+
scale: 2,
|
|
52
|
+
nullable: true
|
|
53
|
+
}), _dec10 = (0, _typeorm.Column)('decimal', {
|
|
54
|
+
precision: 6,
|
|
55
|
+
scale: 2,
|
|
56
|
+
nullable: true
|
|
57
|
+
}), _dec11 = (0, _typeorm.Column)('decimal', {
|
|
58
|
+
precision: 6,
|
|
59
|
+
scale: 2,
|
|
60
|
+
nullable: true
|
|
61
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)({
|
|
62
|
+
type: 'timestamp with time zone'
|
|
63
|
+
}), _dec13 = (0, _typeorm.UpdateDateColumn)({
|
|
64
|
+
type: 'timestamp with time zone'
|
|
65
|
+
}), _dec(_class = (_class2 = class TransactionRate {
|
|
66
|
+
constructor() {
|
|
67
|
+
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "band", _descriptor2, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "cost", _descriptor3, this);
|
|
72
|
+
|
|
73
|
+
_initializerDefineProperty(this, "interchange", _descriptor4, this);
|
|
74
|
+
|
|
75
|
+
_initializerDefineProperty(this, "scheme_fee", _descriptor5, this);
|
|
76
|
+
|
|
77
|
+
_initializerDefineProperty(this, "acquirer", _descriptor6, this);
|
|
78
|
+
|
|
79
|
+
_initializerDefineProperty(this, "rate", _descriptor7, this);
|
|
80
|
+
|
|
81
|
+
_initializerDefineProperty(this, "revenue", _descriptor8, this);
|
|
82
|
+
|
|
83
|
+
_initializerDefineProperty(this, "created_at", _descriptor9, this);
|
|
84
|
+
|
|
85
|
+
_initializerDefineProperty(this, "updated_at", _descriptor10, this);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
89
|
+
configurable: true,
|
|
90
|
+
enumerable: true,
|
|
91
|
+
writable: true,
|
|
92
|
+
initializer: function () {
|
|
93
|
+
return _transaction.default;
|
|
94
|
+
}
|
|
95
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "band", [_dec4, _dec5], {
|
|
96
|
+
configurable: true,
|
|
97
|
+
enumerable: true,
|
|
98
|
+
writable: true,
|
|
99
|
+
initializer: null
|
|
100
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "cost", [_dec6], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: null
|
|
105
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "interchange", [_dec7], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: null
|
|
110
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "scheme_fee", [_dec8], {
|
|
111
|
+
configurable: true,
|
|
112
|
+
enumerable: true,
|
|
113
|
+
writable: true,
|
|
114
|
+
initializer: null
|
|
115
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "acquirer", [_dec9], {
|
|
116
|
+
configurable: true,
|
|
117
|
+
enumerable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
initializer: null
|
|
120
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "rate", [_dec10], {
|
|
121
|
+
configurable: true,
|
|
122
|
+
enumerable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
initializer: null
|
|
125
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "revenue", [_dec11], {
|
|
126
|
+
configurable: true,
|
|
127
|
+
enumerable: true,
|
|
128
|
+
writable: true,
|
|
129
|
+
initializer: null
|
|
130
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
131
|
+
configurable: true,
|
|
132
|
+
enumerable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
initializer: null
|
|
135
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
|
|
136
|
+
configurable: true,
|
|
137
|
+
enumerable: true,
|
|
138
|
+
writable: true,
|
|
139
|
+
initializer: null
|
|
140
|
+
})), _class2)) || _class);
|
|
@@ -30,15 +30,15 @@ let TransactionMetadata = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
30
30
|
}), _dec4 = (0, _typeorm.Column)({
|
|
31
31
|
type: "varchar",
|
|
32
32
|
nullable: true,
|
|
33
|
-
length:
|
|
33
|
+
length: 50
|
|
34
34
|
}), _dec5 = (0, _typeorm.Column)({
|
|
35
35
|
type: "varchar",
|
|
36
36
|
nullable: true,
|
|
37
|
-
length:
|
|
37
|
+
length: 50
|
|
38
38
|
}), _dec6 = (0, _typeorm.Column)({
|
|
39
39
|
type: "varchar",
|
|
40
40
|
nullable: true,
|
|
41
|
-
length:
|
|
41
|
+
length: 50
|
|
42
42
|
}), _dec7 = (0, _typeorm.Column)({
|
|
43
43
|
type: "varchar",
|
|
44
44
|
nullable: true,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bandings1708596720562 {
|
|
4
|
+
name = 'bandings1708596720562'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."band" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(128), "payment_provider_id" character varying, CONSTRAINT "PK_e808d7dacf72163737ce93d7b23" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."country_type" ("country" character varying NOT NULL, "countryType" character varying(128), CONSTRAINT "PK_110b468790a9079811ea1744d16" PRIMARY KEY ("country"))`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."fee" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "scheme" character varying(128), "type" character varying(128), "level" character varying(128), "countryType" character varying(128), "cost" numeric(6,2), "interchange" numeric(6,2), "acquirer" numeric(6,2), CONSTRAINT "PK_ee7e51cc563615bc60c2b234635" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."organisation_band" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "organisation_id" character varying(150), "band_id" uuid, CONSTRAINT "PK_83679d91b8540f2ad4a689cdc57" PRIMARY KEY ("id"))`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band" ADD CONSTRAINT "FK_254b07a193618f088fdc55ac837" FOREIGN KEY ("payment_provider_id") REFERENCES "payment"."payment_provider"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."organisation_band" ADD CONSTRAINT "FK_bbba1a7a059df2c33c0b23f3fd3" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."organisation_band" ADD CONSTRAINT "FK_f049d49c6cea81171ce3e2bf14f" FOREIGN KEY ("band_id") REFERENCES "acquirer"."band"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async down(queryRunner) {
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."organisation_band" DROP CONSTRAINT "FK_f049d49c6cea81171ce3e2bf14f"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."organisation_band" DROP CONSTRAINT "FK_bbba1a7a059df2c33c0b23f3fd3"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band" DROP CONSTRAINT "FK_254b07a193618f088fdc55ac837"`);
|
|
20
|
+
await queryRunner.query(`DROP TABLE "acquirer"."organisation_band"`);
|
|
21
|
+
await queryRunner.query(`DROP TABLE "acquirer"."fee"`);
|
|
22
|
+
await queryRunner.query(`DROP TABLE "acquirer"."country_type"`);
|
|
23
|
+
await queryRunner.query(`DROP TABLE "acquirer"."band"`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bandRate1708598335438 {
|
|
4
|
+
name = 'bandRate1708598335438'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."band_rate" ("rate" numeric(6,2), "fee_id" uuid NOT NULL, "band_id" uuid NOT NULL, CONSTRAINT "PK_cd3faacc49afa5e1442edc7dece" PRIMARY KEY ("fee_id", "band_id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band_rate" ADD CONSTRAINT "FK_556d96fed11cea7cf0ec75876f3" FOREIGN KEY ("fee_id") REFERENCES "acquirer"."fee"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band_rate" ADD CONSTRAINT "FK_22f9c83b6689a0d98e033e3caff" FOREIGN KEY ("band_id") REFERENCES "acquirer"."band"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band_rate" DROP CONSTRAINT "FK_22f9c83b6689a0d98e033e3caff"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."band_rate" DROP CONSTRAINT "FK_556d96fed11cea7cf0ec75876f3"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "acquirer"."band_rate"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionRate1708605040113 {
|
|
4
|
+
name = 'transactionRate1708605040113'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."transaction_rate" ("cost" numeric(6,2), "interchange" numeric(6,2), "scheme_fee" numeric(6,2), "acquirer" numeric(6,2), "rate" numeric(6,2), "revenue" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "transaction_id" character varying NOT NULL, "band_id" uuid NOT NULL, CONSTRAINT "PK_b9ac8df3ec24e4ac0211d62a5af" PRIMARY KEY ("transaction_id", "band_id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ADD "scheme_fee" numeric(6,2)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_rate" ADD CONSTRAINT "FK_18dc98f88049c6c88a1ebf5c258" FOREIGN KEY ("transaction_id") REFERENCES "payment"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_rate" ADD CONSTRAINT "FK_c4870d19ee78a089577675a5abd" FOREIGN KEY ("band_id") REFERENCES "acquirer"."band"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_rate" DROP CONSTRAINT "FK_c4870d19ee78a089577675a5abd"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_rate" DROP CONSTRAINT "FK_18dc98f88049c6c88a1ebf5c258"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" DROP COLUMN "scheme_fee"`);
|
|
17
|
+
await queryRunner.query(`DROP TABLE "payment"."transaction_rate"`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class binTypeGrouping1708609916248 {
|
|
4
|
+
name = 'binTypeGrouping1708609916248'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "acquirer"."bin_type_grouping" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(128), "grouping" character varying(128) NOT NULL, CONSTRAINT "PK_f813dfab182bf1188ba87a4e0f5" PRIMARY KEY ("id"))`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`DROP TABLE "acquirer"."bin_type_grouping"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class fieldLength1708616903284 {
|
|
4
|
+
name = 'fieldLength1708616903284'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "card_type" TYPE varchar(50)`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "bin_type" TYPE varchar(50)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "payment_brand" TYPE varchar(50)`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "card_type" TYPE varchar(50)`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "bin_type" TYPE varchar(50)`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "payment_brand" TYPE varchar(50)`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "basis_theory"."token" ALTER COLUMN "card_brand" TYPE varchar(50)`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async down(queryRunner) {
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "card_type" TYPE varchar(20)`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "bin_type" TYPE varchar(20)`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ALTER COLUMN "payment_brand" TYPE varchar(20)`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "card_type" TYPE varchar(20)`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "bin_type" TYPE varchar(20)`);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction_metadata" ALTER COLUMN "payment_brand" TYPE varchar(20)`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "basis_theory"."token" ALTER COLUMN "card_brand" TYPE varchar(20)`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class updatePrecissionFee1709030948477 {
|
|
4
|
+
name = 'updatePrecissionFee1709030948477'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "cost" TYPE numeric(6,3)`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "interchange" TYPE numeric(6,3)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "scheme_fee" TYPE numeric(6,3)`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "acquirer" TYPE numeric(6,3)`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "acquirer" TYPE numeric(6,2)`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "scheme_fee" TYPE numeric(6,2)`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "interchange" TYPE numeric(6,2)`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."fee" ALTER COLUMN "cost" TYPE numeric(6,2)`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -6,14 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
class TransactionWebhook {
|
|
9
|
-
constructor(transaction) {
|
|
9
|
+
constructor(transaction, narrative = null) {
|
|
10
10
|
this.transaction = transaction;
|
|
11
|
+
this.narrative = narrative;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
get() {
|
|
14
15
|
var _this$transaction, _this$transaction2, _this$transaction3, _this$transaction3$bo, _this$transaction4, _this$transaction4$bo, _this$transaction5, _this$transaction5$ec, _this$transaction6, _this$transaction6$pa, _this$transaction7, _this$transaction7$or, _this$transaction8, _this$transaction9, _this$transaction9$st, _this$transaction10, _this$transaction11;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
const data = {
|
|
17
18
|
transaction: {
|
|
18
19
|
id: (_this$transaction = this.transaction) === null || _this$transaction === void 0 ? void 0 : _this$transaction.id
|
|
19
20
|
},
|
|
@@ -36,6 +37,12 @@ class TransactionWebhook {
|
|
|
36
37
|
completed_at: (_this$transaction10 = this.transaction) === null || _this$transaction10 === void 0 ? void 0 : _this$transaction10.completed_at,
|
|
37
38
|
currency: (_this$transaction11 = this.transaction) === null || _this$transaction11 === void 0 ? void 0 : _this$transaction11.currency
|
|
38
39
|
};
|
|
40
|
+
|
|
41
|
+
if (this.narrative) {
|
|
42
|
+
data.transaction.narrative = this.narrative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return data;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
}
|