@felloh-org/lambda-wrapper 1.11.73 → 1.11.75

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.
@@ -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: 2,
40
+ nullable: true
41
+ }), _dec8 = (0, _typeorm.Column)('decimal', {
42
+ precision: 6,
43
+ scale: 2,
44
+ nullable: true
45
+ }), _dec9 = (0, _typeorm.Column)('decimal', {
46
+ precision: 6,
47
+ scale: 2,
48
+ nullable: true
49
+ }), _dec10 = (0, _typeorm.Column)('decimal', {
50
+ precision: 6,
51
+ scale: 2,
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: "20",
46
+ length: "50",
47
47
  nullable: true
48
48
  }), _dec9 = (0, _typeorm.CreateDateColumn)({
49
49
  type: 'timestamp with time zone'
@@ -21,6 +21,8 @@ var _paymentLink = _interopRequireDefault(require("../payment-link"));
21
21
 
22
22
  var _transactionMetadata = _interopRequireDefault(require("../transaction-metadata"));
23
23
 
24
+ var _transactionRisk = _interopRequireDefault(require("../transaction-risk"));
25
+
24
26
  var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
25
27
 
26
28
  var _organisationPaymentProvider = _interopRequireDefault(require("../organisation-payment-provider"));
@@ -43,7 +45,7 @@ var _refund = _interopRequireDefault(require("../refund"));
43
45
 
44
46
  var _customer = _interopRequireDefault(require("../customer"));
45
47
 
46
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30;
48
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31;
47
49
 
48
50
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49
51
 
@@ -90,60 +92,60 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
90
92
  }), _dec19 = (0, _typeorm.JoinColumn)({
91
93
  name: 'ecommerce_id',
92
94
  referencedColumnName: 'id'
93
- }), _dec20 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec21 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec22 = (0, _typeorm.JoinColumn)({
95
+ }), _dec20 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec21 = (0, _typeorm.OneToOne)(() => _transactionRisk.default, transactionRisk => transactionRisk.transaction), _dec22 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec23 = (0, _typeorm.JoinColumn)({
94
96
  name: 'payment_provider_id',
95
97
  referencedColumnName: 'id'
96
- }), _dec23 = (0, _typeorm.ManyToOne)(() => _organisationPaymentProvider.default, {
98
+ }), _dec24 = (0, _typeorm.ManyToOne)(() => _organisationPaymentProvider.default, {
97
99
  nullable: true
98
- }), _dec24 = (0, _typeorm.JoinColumn)({
100
+ }), _dec25 = (0, _typeorm.JoinColumn)({
99
101
  name: 'organisation_payment_provider_id',
100
102
  referencedColumnName: 'id'
101
- }), _dec25 = (0, _typeorm.ManyToOne)(() => _tokenisationProvider.default, {
103
+ }), _dec26 = (0, _typeorm.ManyToOne)(() => _tokenisationProvider.default, {
102
104
  nullable: true
103
- }), _dec26 = (0, _typeorm.JoinColumn)({
105
+ }), _dec27 = (0, _typeorm.JoinColumn)({
104
106
  name: 'tokenisation_provider_id',
105
107
  referencedColumnName: 'id'
106
- }), _dec27 = (0, _typeorm.OneToMany)(() => _refund.default, refund => refund.transaction, {
108
+ }), _dec28 = (0, _typeorm.OneToMany)(() => _refund.default, refund => refund.transaction, {
107
109
  nullable: true
108
- }), _dec28 = (0, _typeorm.OneToOne)(() => _transactionSurcharge.default, transactionSurcharge => transactionSurcharge.transaction, {
110
+ }), _dec29 = (0, _typeorm.OneToOne)(() => _transactionSurcharge.default, transactionSurcharge => transactionSurcharge.transaction, {
109
111
  nullable: true
110
- }), _dec29 = (0, _typeorm.Column)({
112
+ }), _dec30 = (0, _typeorm.Column)({
111
113
  type: "varchar",
112
114
  length: "250",
113
115
  nullable: true
114
- }), _dec30 = (0, _typeorm.Column)({
116
+ }), _dec31 = (0, _typeorm.Column)({
115
117
  type: "varchar",
116
118
  length: "3",
117
119
  default: _currency.DEFAULT_CURRENCY
118
- }), _dec31 = (0, _typeorm.Column)({
119
- type: "json",
120
- nullable: true
121
120
  }), _dec32 = (0, _typeorm.Column)({
122
- type: "timestamp with time zone",
121
+ type: "json",
123
122
  nullable: true
124
123
  }), _dec33 = (0, _typeorm.Column)({
125
- type: "text",
124
+ type: "timestamp with time zone",
126
125
  nullable: true
127
126
  }), _dec34 = (0, _typeorm.Column)({
128
127
  type: "text",
129
128
  nullable: true
130
129
  }), _dec35 = (0, _typeorm.Column)({
130
+ type: "text",
131
+ nullable: true
132
+ }), _dec36 = (0, _typeorm.Column)({
131
133
  type: "varchar",
132
134
  length: "15",
133
135
  nullable: true
134
- }), _dec36 = (0, _typeorm.Column)({
136
+ }), _dec37 = (0, _typeorm.Column)({
135
137
  type: "varchar",
136
138
  nullable: true
137
- }), _dec37 = (0, _typeorm.CreateDateColumn)({
139
+ }), _dec38 = (0, _typeorm.CreateDateColumn)({
138
140
  type: 'timestamp with time zone'
139
- }), _dec38 = (0, _typeorm.UpdateDateColumn)({
141
+ }), _dec39 = (0, _typeorm.UpdateDateColumn)({
140
142
  type: 'timestamp with time zone'
141
- }), _dec39 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.transaction), _dec40 = (0, _typeorm.Column)({
143
+ }), _dec40 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.transaction), _dec41 = (0, _typeorm.Column)({
142
144
  type: "timestamp with time zone",
143
145
  nullable: true
144
- }), _dec41 = (0, _typeorm.OneToOne)(() => _transactionSettlement.default, transactionSettlement => transactionSettlement.transaction), _dec42 = (0, _typeorm.ManyToOne)(() => _customer.default, {
146
+ }), _dec42 = (0, _typeorm.OneToOne)(() => _transactionSettlement.default, transactionSettlement => transactionSettlement.transaction), _dec43 = (0, _typeorm.ManyToOne)(() => _customer.default, {
145
147
  nullable: true
146
- }), _dec43 = (0, _typeorm.JoinColumn)({
148
+ }), _dec44 = (0, _typeorm.JoinColumn)({
147
149
  name: 'customer_id',
148
150
  referencedColumnName: 'id'
149
151
  }), _dec(_class = (_class2 = class Transaction {
@@ -170,43 +172,45 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
170
172
 
171
173
  _initializerDefineProperty(this, "metadata", _descriptor11, this);
172
174
 
173
- _initializerDefineProperty(this, "payment_provider", _descriptor12, this);
175
+ _initializerDefineProperty(this, "risk", _descriptor12, this);
174
176
 
175
- _initializerDefineProperty(this, "organisation_payment_provider", _descriptor13, this);
177
+ _initializerDefineProperty(this, "payment_provider", _descriptor13, this);
176
178
 
177
- _initializerDefineProperty(this, "tokenisation_provider", _descriptor14, this);
179
+ _initializerDefineProperty(this, "organisation_payment_provider", _descriptor14, this);
178
180
 
179
- _initializerDefineProperty(this, "refund", _descriptor15, this);
181
+ _initializerDefineProperty(this, "tokenisation_provider", _descriptor15, this);
180
182
 
181
- _initializerDefineProperty(this, "surcharge", _descriptor16, this);
183
+ _initializerDefineProperty(this, "refund", _descriptor16, this);
182
184
 
183
- _initializerDefineProperty(this, "provider_reference", _descriptor17, this);
185
+ _initializerDefineProperty(this, "surcharge", _descriptor17, this);
184
186
 
185
- _initializerDefineProperty(this, "currency", _descriptor18, this);
187
+ _initializerDefineProperty(this, "provider_reference", _descriptor18, this);
186
188
 
187
- _initializerDefineProperty(this, "provider_metadata", _descriptor19, this);
189
+ _initializerDefineProperty(this, "currency", _descriptor19, this);
188
190
 
189
- _initializerDefineProperty(this, "completed_at", _descriptor20, this);
191
+ _initializerDefineProperty(this, "provider_metadata", _descriptor20, this);
190
192
 
191
- _initializerDefineProperty(this, "message", _descriptor21, this);
193
+ _initializerDefineProperty(this, "completed_at", _descriptor21, this);
192
194
 
193
- _initializerDefineProperty(this, "user_agent", _descriptor22, this);
195
+ _initializerDefineProperty(this, "message", _descriptor22, this);
194
196
 
195
- _initializerDefineProperty(this, "ip_address", _descriptor23, this);
197
+ _initializerDefineProperty(this, "user_agent", _descriptor23, this);
196
198
 
197
- _initializerDefineProperty(this, "fingerprint", _descriptor24, this);
199
+ _initializerDefineProperty(this, "ip_address", _descriptor24, this);
198
200
 
199
- _initializerDefineProperty(this, "created_at", _descriptor25, this);
201
+ _initializerDefineProperty(this, "fingerprint", _descriptor25, this);
200
202
 
201
- _initializerDefineProperty(this, "updated_at", _descriptor26, this);
203
+ _initializerDefineProperty(this, "created_at", _descriptor26, this);
202
204
 
203
- _initializerDefineProperty(this, "batch", _descriptor27, this);
205
+ _initializerDefineProperty(this, "updated_at", _descriptor27, this);
204
206
 
205
- _initializerDefineProperty(this, "assigned_at", _descriptor28, this);
207
+ _initializerDefineProperty(this, "batch", _descriptor28, this);
206
208
 
207
- _initializerDefineProperty(this, "settlement", _descriptor29, this);
209
+ _initializerDefineProperty(this, "assigned_at", _descriptor29, this);
208
210
 
209
- _initializerDefineProperty(this, "customer", _descriptor30, this);
211
+ _initializerDefineProperty(this, "settlement", _descriptor30, this);
212
+
213
+ _initializerDefineProperty(this, "customer", _descriptor31, this);
210
214
  }
211
215
 
212
216
  getPublicData() {
@@ -227,6 +231,7 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
227
231
  payment_link: null,
228
232
  ecommerce: null,
229
233
  metadata: null,
234
+ risk: null,
230
235
  organisation: null,
231
236
  assigned_at: this.assigned_at
232
237
  };
@@ -259,6 +264,10 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
259
264
  response.metadata = this.metadata;
260
265
  }
261
266
 
267
+ if (this.risk !== null) {
268
+ response.risk = this.risk;
269
+ }
270
+
262
271
  if (this.organisation !== null && typeof this.organisation.id !== 'undefined' && typeof this.organisation.getPublicCompactData === 'function') {
263
272
  response.organisation = this.organisation.getPublicCompactData();
264
273
  }
@@ -322,6 +331,10 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
322
331
  response.metadata = this.metadata;
323
332
  }
324
333
 
334
+ if (this.risk !== null) {
335
+ response.risk = this.risk;
336
+ }
337
+
325
338
  if (this.organisation !== null && typeof this.organisation.id !== 'undefined' && typeof this.organisation.getPublicCompactData === 'function') {
326
339
  response.organisation = this.organisation.getPublicCompactData();
327
340
  }
@@ -406,111 +419,116 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
406
419
  enumerable: true,
407
420
  writable: true,
408
421
  initializer: null
409
- }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec21, _dec22], {
422
+ }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "risk", [_dec21], {
423
+ configurable: true,
424
+ enumerable: true,
425
+ writable: true,
426
+ initializer: null
427
+ }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec22, _dec23], {
410
428
  configurable: true,
411
429
  enumerable: true,
412
430
  writable: true,
413
431
  initializer: function () {
414
432
  return _paymentProvider.default;
415
433
  }
416
- }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "organisation_payment_provider", [_dec23, _dec24], {
434
+ }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "organisation_payment_provider", [_dec24, _dec25], {
417
435
  configurable: true,
418
436
  enumerable: true,
419
437
  writable: true,
420
438
  initializer: function () {
421
439
  return _organisationPaymentProvider.default;
422
440
  }
423
- }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "tokenisation_provider", [_dec25, _dec26], {
441
+ }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "tokenisation_provider", [_dec26, _dec27], {
424
442
  configurable: true,
425
443
  enumerable: true,
426
444
  writable: true,
427
445
  initializer: function () {
428
446
  return _tokenisationProvider.default;
429
447
  }
430
- }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "refund", [_dec27], {
448
+ }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "refund", [_dec28], {
431
449
  configurable: true,
432
450
  enumerable: true,
433
451
  writable: true,
434
452
  initializer: null
435
- }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "surcharge", [_dec28], {
453
+ }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "surcharge", [_dec29], {
436
454
  configurable: true,
437
455
  enumerable: true,
438
456
  writable: true,
439
457
  initializer: null
440
- }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec29], {
458
+ }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec30], {
441
459
  configurable: true,
442
460
  enumerable: true,
443
461
  writable: true,
444
462
  initializer: function () {
445
463
  return "";
446
464
  }
447
- }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec30], {
465
+ }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec31], {
448
466
  configurable: true,
449
467
  enumerable: true,
450
468
  writable: true,
451
469
  initializer: function () {
452
470
  return _currency.DEFAULT_CURRENCY;
453
471
  }
454
- }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "provider_metadata", [_dec31], {
472
+ }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "provider_metadata", [_dec32], {
455
473
  configurable: true,
456
474
  enumerable: true,
457
475
  writable: true,
458
476
  initializer: null
459
- }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec32], {
477
+ }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec33], {
460
478
  configurable: true,
461
479
  enumerable: true,
462
480
  writable: true,
463
481
  initializer: null
464
- }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec33], {
482
+ }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec34], {
465
483
  configurable: true,
466
484
  enumerable: true,
467
485
  writable: true,
468
486
  initializer: null
469
- }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "user_agent", [_dec34], {
487
+ }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "user_agent", [_dec35], {
470
488
  configurable: true,
471
489
  enumerable: true,
472
490
  writable: true,
473
491
  initializer: null
474
- }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "ip_address", [_dec35], {
492
+ }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "ip_address", [_dec36], {
475
493
  configurable: true,
476
494
  enumerable: true,
477
495
  writable: true,
478
496
  initializer: function () {
479
497
  return "";
480
498
  }
481
- }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "fingerprint", [_dec36], {
499
+ }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "fingerprint", [_dec37], {
482
500
  configurable: true,
483
501
  enumerable: true,
484
502
  writable: true,
485
503
  initializer: function () {
486
504
  return "";
487
505
  }
488
- }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec37], {
506
+ }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec38], {
489
507
  configurable: true,
490
508
  enumerable: true,
491
509
  writable: true,
492
510
  initializer: null
493
- }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec38], {
511
+ }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec39], {
494
512
  configurable: true,
495
513
  enumerable: true,
496
514
  writable: true,
497
515
  initializer: null
498
- }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec39], {
516
+ }), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec40], {
499
517
  configurable: true,
500
518
  enumerable: true,
501
519
  writable: true,
502
520
  initializer: null
503
- }), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "assigned_at", [_dec40], {
521
+ }), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "assigned_at", [_dec41], {
504
522
  configurable: true,
505
523
  enumerable: true,
506
524
  writable: true,
507
525
  initializer: null
508
- }), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "settlement", [_dec41], {
526
+ }), _descriptor30 = _applyDecoratedDescriptor(_class2.prototype, "settlement", [_dec42], {
509
527
  configurable: true,
510
528
  enumerable: true,
511
529
  writable: true,
512
530
  initializer: null
513
- }), _descriptor30 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec42, _dec43], {
531
+ }), _descriptor31 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec43, _dec44], {
514
532
  configurable: true,
515
533
  enumerable: true,
516
534
  writable: true,
@@ -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: 20
33
+ length: 50
34
34
  }), _dec5 = (0, _typeorm.Column)({
35
35
  type: "varchar",
36
36
  nullable: true,
37
- length: 20
37
+ length: 50
38
38
  }), _dec6 = (0, _typeorm.Column)({
39
39
  type: "varchar",
40
40
  nullable: true,
41
- length: 20
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: 20
33
+ length: 50
34
34
  }), _dec5 = (0, _typeorm.Column)({
35
35
  type: "varchar",
36
36
  nullable: true,
37
- length: 20
37
+ length: 50
38
38
  }), _dec6 = (0, _typeorm.Column)({
39
39
  type: "varchar",
40
40
  nullable: true,
41
- length: 20
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 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,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
+ }
@@ -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
- return {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.73",
3
+ "version": "1.11.75",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {