@felloh-org/lambda-wrapper 1.0.15 → 1.0.19

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.
Files changed (50) hide show
  1. package/cli/seed/create-schema.js +2 -0
  2. package/dist/entity/agent-data/booking/index.js +26 -0
  3. package/dist/entity/agent-data/supplier/index.js +8 -0
  4. package/dist/entity/bank/account/index.js +10 -0
  5. package/dist/entity/bank/disbursal/index.js +69 -6
  6. package/dist/entity/bank/index.js +3 -3
  7. package/dist/entity/bank/ledger/index.js +151 -0
  8. package/dist/entity/bank/settled-transaction/index.js +97 -0
  9. package/dist/entity/index.js +5 -1
  10. package/dist/entity/payment/index.js +5 -1
  11. package/dist/entity/payment/organisation-payment-provider/index.js +131 -0
  12. package/dist/entity/payment/payment-link/index.js +38 -0
  13. package/dist/entity/{bank/beneficiary-organisation → payment/payment-provider}/index.js +17 -30
  14. package/dist/entity/payment/transaction/index.js +64 -7
  15. package/dist/entity/total-processing/index.js +16 -0
  16. package/dist/entity/total-processing/transaction/index.js +126 -0
  17. package/dist/entity/total-processing/transaction-metadata/index.js +138 -0
  18. package/dist/entity/trust-payments/batch/index.js +85 -0
  19. package/dist/entity/trust-payments/chargeback/index.js +128 -0
  20. package/dist/entity/trust-payments/index.js +20 -0
  21. package/dist/entity/{bank/beneficiary-provider → trust-payments/merchant}/index.js +28 -27
  22. package/dist/entity/trust-payments/transaction/index.js +152 -0
  23. package/dist/entity/user/organisation/index.js +9 -6
  24. package/dist/entity/user/user/index.js +21 -3
  25. package/dist/index.js +100 -36
  26. package/dist/migration/bank/1642313073694-bank-initial.js +0 -10
  27. package/dist/migration/bank/1645101410250-bank_disbursal.js +28 -0
  28. package/dist/migration/bank/1645102501719-bank_disbursal_unique.js +17 -0
  29. package/dist/migration/bank/1645103420324-ledger.js +19 -0
  30. package/dist/migration/bank/1645103864454-ledger-defaults.js +15 -0
  31. package/dist/migration/bank/1645108723739-bank-settled-transaction.js +19 -0
  32. package/dist/migration/payment/1643717852114-payment-providers.js +19 -0
  33. package/dist/migration/payment/1643718714719-payment-providers-method.js +15 -0
  34. package/dist/migration/payment/1643719203328-payment-providers-method.js +22 -0
  35. package/dist/migration/payment/1644395533722-transaction_provider.js +15 -0
  36. package/dist/migration/payment/1644396011044-transaction_provider_ref.js +13 -0
  37. package/dist/migration/total-processing/1644309449035-tpro_transactions.js +13 -0
  38. package/dist/migration/total-processing/1644411639660-total_processing_entity.js +13 -0
  39. package/dist/migration/total-processing/1644842797566-relations.js +19 -0
  40. package/dist/migration/total-processing/1644926407236-tp_rec_nullable.js +13 -0
  41. package/dist/migration/total-processing/1644933594682-tp_rec_status.js +13 -0
  42. package/dist/migration/total-processing/1645010756173-tp_transaction_metadata.js +15 -0
  43. package/dist/migration/trust-payments/1644016335590-tp_merchants.js +13 -0
  44. package/dist/migration/trust-payments/1644018105481-tp_add_batch.js +15 -0
  45. package/dist/migration/trust-payments/1644020330502-tp_transaction.js +17 -0
  46. package/dist/migration/trust-payments/1644791277717-chargeback.js +15 -0
  47. package/dist/model/response/index.js +26 -32
  48. package/dist/model/response/status-codes.js +66 -0
  49. package/dist/wrapper/index.js +9 -1
  50. package/package.json +2 -1
@@ -7,13 +7,9 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _account = _interopRequireDefault(require("../account"));
10
+ var _uuid = require("uuid");
11
11
 
12
- var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
-
14
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
17
13
 
18
14
  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
15
 
@@ -21,49 +17,40 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
21
17
 
22
18
  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
19
 
24
- let BeneficiaryOrganisation = (_dec = (0, _typeorm.Entity)({
25
- name: 'beneficiary_organisation',
26
- schema: 'bank'
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)(() => _account.default), _dec6 = (0, _typeorm.JoinColumn)({
31
- name: 'account_iban',
32
- referencedColumnName: 'iban'
33
- }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryOrganisation {
20
+ let PaymentProvider = (_dec = (0, _typeorm.Entity)({
21
+ name: 'payment_provider',
22
+ schema: 'payment'
23
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
24
+ type: "varchar",
25
+ length: "150",
26
+ nullable: true
27
+ }), _dec4 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentProvider {
34
28
  constructor() {
35
29
  _initializerDefineProperty(this, "id", _descriptor, this);
36
30
 
37
- _initializerDefineProperty(this, "organisation", _descriptor2, this);
31
+ _initializerDefineProperty(this, "name", _descriptor2, this);
38
32
 
39
- _initializerDefineProperty(this, "account", _descriptor3, this);
40
-
41
- _initializerDefineProperty(this, "created_at", _descriptor4, this);
33
+ _initializerDefineProperty(this, "created_at", _descriptor3, this);
42
34
  }
43
35
 
44
36
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
45
- configurable: true,
46
- enumerable: true,
47
- writable: true,
48
- initializer: null
49
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
50
37
  configurable: true,
51
38
  enumerable: true,
52
39
  writable: true,
53
40
  initializer: function () {
54
- return _organisation.default;
41
+ return (0, _uuid.v4)();
55
42
  }
56
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "account", [_dec5, _dec6], {
43
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
57
44
  configurable: true,
58
45
  enumerable: true,
59
46
  writable: true,
60
47
  initializer: function () {
61
- return _account.default;
48
+ return "";
62
49
  }
63
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
50
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec4], {
64
51
  configurable: true,
65
52
  enumerable: true,
66
53
  writable: true,
67
54
  initializer: null
68
55
  })), _class2)) || _class);
69
- exports.default = BeneficiaryOrganisation;
56
+ exports.default = PaymentProvider;
@@ -21,7 +21,9 @@ var _paymentLink = _interopRequireDefault(require("../payment-link"));
21
21
 
22
22
  var _transactionMetadata = _interopRequireDefault(require("../transaction-metadata"));
23
23
 
24
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
24
+ var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
25
+
26
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
25
27
 
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
@@ -58,10 +60,17 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
58
60
  }), _dec15 = (0, _typeorm.JoinColumn)({
59
61
  name: 'payment_link_id',
60
62
  referencedColumnName: 'id'
61
- }), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.Column)({
63
+ }), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec18 = (0, _typeorm.JoinColumn)({
64
+ name: 'payment_provider_id',
65
+ referencedColumnName: 'id'
66
+ }), _dec19 = (0, _typeorm.Column)({
67
+ type: "varchar",
68
+ length: "250",
69
+ nullable: true
70
+ }), _dec20 = (0, _typeorm.Column)({
62
71
  type: "timestamp with time zone",
63
72
  nullable: true
64
- }), _dec18 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Transaction {
73
+ }), _dec21 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Transaction {
65
74
  constructor() {
66
75
  _initializerDefineProperty(this, "id", _descriptor, this);
67
76
 
@@ -81,9 +90,43 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
81
90
 
82
91
  _initializerDefineProperty(this, "metadata", _descriptor9, this);
83
92
 
84
- _initializerDefineProperty(this, "completed_at", _descriptor10, this);
93
+ _initializerDefineProperty(this, "payment_provider", _descriptor10, this);
94
+
95
+ _initializerDefineProperty(this, "provider_reference", _descriptor11, this);
96
+
97
+ _initializerDefineProperty(this, "completed_at", _descriptor12, this);
85
98
 
86
- _initializerDefineProperty(this, "created_at", _descriptor11, this);
99
+ _initializerDefineProperty(this, "created_at", _descriptor13, this);
100
+ }
101
+
102
+ getPublicData() {
103
+ const response = {
104
+ id: this.id,
105
+ amount: this.amount,
106
+ status: this.status.id,
107
+ method: this.method.id,
108
+ type: this.type.id,
109
+ created_at: this.created_at,
110
+ completed_at: this.completed_at
111
+ };
112
+
113
+ if (this.booking !== null) {
114
+ response.booking = this.booking.getPublicData();
115
+ }
116
+
117
+ return response;
118
+ }
119
+
120
+ getPublicCompactData() {
121
+ return {
122
+ id: this.id,
123
+ amount: this.amount,
124
+ status: this.status.id,
125
+ method: this.method.id,
126
+ type: this.type.id,
127
+ created_at: this.created_at,
128
+ completed_at: this.completed_at
129
+ };
87
130
  }
88
131
 
89
132
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -145,12 +188,26 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
145
188
  enumerable: true,
146
189
  writable: true,
147
190
  initializer: null
148
- }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec17], {
191
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec17, _dec18], {
192
+ configurable: true,
193
+ enumerable: true,
194
+ writable: true,
195
+ initializer: function () {
196
+ return _paymentProvider.default;
197
+ }
198
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec19], {
199
+ configurable: true,
200
+ enumerable: true,
201
+ writable: true,
202
+ initializer: function () {
203
+ return "";
204
+ }
205
+ }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec20], {
149
206
  configurable: true,
150
207
  enumerable: true,
151
208
  writable: true,
152
209
  initializer: null
153
- }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec18], {
210
+ }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec21], {
154
211
  configurable: true,
155
212
  enumerable: true,
156
213
  writable: true,
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _transaction = _interopRequireDefault(require("./transaction"));
9
+
10
+ var _transactionMetadata = _interopRequireDefault(require("./transaction-metadata"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ const ENTITIES = [_transaction.default, _transactionMetadata.default];
15
+ var _default = ENTITIES;
16
+ exports.default = _default;
@@ -0,0 +1,126 @@
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, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
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 Transaction = (_dec = (0, _typeorm.Entity)({
19
+ name: 'transaction',
20
+ schema: 'total_processing'
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
22
+ type: "varchar",
23
+ length: 2
24
+ }), _dec4 = (0, _typeorm.Column)({
25
+ type: "int"
26
+ }), _dec5 = (0, _typeorm.Column)({
27
+ type: "varchar",
28
+ length: 5
29
+ }), _dec6 = (0, _typeorm.Column)({
30
+ type: "varchar",
31
+ length: 50,
32
+ nullable: true
33
+ }), _dec7 = (0, _typeorm.Column)({
34
+ type: "varchar",
35
+ length: 30,
36
+ nullable: true
37
+ }), _dec8 = (0, _typeorm.Column)({
38
+ type: "varchar",
39
+ length: 50
40
+ }), _dec9 = (0, _typeorm.Column)({
41
+ type: "int",
42
+ nullable: true
43
+ }), _dec10 = (0, _typeorm.Column)({
44
+ type: "timestamp without time zone"
45
+ }), _dec11 = (0, _typeorm.Column)({
46
+ type: "varchar",
47
+ length: 1500
48
+ }), _dec(_class = (_class2 = class Transaction {
49
+ constructor() {
50
+ _initializerDefineProperty(this, "ndc", _descriptor, this);
51
+
52
+ _initializerDefineProperty(this, "risk_score", _descriptor2, this);
53
+
54
+ _initializerDefineProperty(this, "amount", _descriptor3, this);
55
+
56
+ _initializerDefineProperty(this, "currency", _descriptor4, this);
57
+
58
+ _initializerDefineProperty(this, "entity_id", _descriptor5, this);
59
+
60
+ _initializerDefineProperty(this, "reconciliation_id", _descriptor6, this);
61
+
62
+ _initializerDefineProperty(this, "merchant_account_id", _descriptor7, this);
63
+
64
+ _initializerDefineProperty(this, "status", _descriptor8, this);
65
+
66
+ _initializerDefineProperty(this, "processing_time", _descriptor9, this);
67
+
68
+ _initializerDefineProperty(this, "merchant_name", _descriptor10, this);
69
+ }
70
+
71
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "ndc", [_dec2], {
72
+ configurable: true,
73
+ enumerable: true,
74
+ writable: true,
75
+ initializer: function () {
76
+ return undefined;
77
+ }
78
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "risk_score", [_dec3], {
79
+ configurable: true,
80
+ enumerable: true,
81
+ writable: true,
82
+ initializer: null
83
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec4], {
84
+ configurable: true,
85
+ enumerable: true,
86
+ writable: true,
87
+ initializer: null
88
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec5], {
89
+ configurable: true,
90
+ enumerable: true,
91
+ writable: true,
92
+ initializer: null
93
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "entity_id", [_dec6], {
94
+ configurable: true,
95
+ enumerable: true,
96
+ writable: true,
97
+ initializer: null
98
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "reconciliation_id", [_dec7], {
99
+ configurable: true,
100
+ enumerable: true,
101
+ writable: true,
102
+ initializer: null
103
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "merchant_account_id", [_dec8], {
104
+ configurable: true,
105
+ enumerable: true,
106
+ writable: true,
107
+ initializer: null
108
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec9], {
109
+ configurable: true,
110
+ enumerable: true,
111
+ writable: true,
112
+ initializer: null
113
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "processing_time", [_dec10], {
114
+ configurable: true,
115
+ enumerable: true,
116
+ writable: true,
117
+ initializer: function () {
118
+ return null;
119
+ }
120
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "merchant_name", [_dec11], {
121
+ configurable: true,
122
+ enumerable: true,
123
+ writable: true,
124
+ initializer: null
125
+ })), _class2)) || _class);
126
+ exports.default = Transaction;
@@ -0,0 +1,138 @@
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 _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
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 TransactionMetadata = (_dec = (0, _typeorm.Entity)({
23
+ name: 'transaction_metadata',
24
+ schema: 'total_processing'
25
+ }), _dec2 = (0, _typeorm.ManyToOne)(() => _transaction.default, {
26
+ primary: true
27
+ }), _dec3 = (0, _typeorm.JoinColumn)({
28
+ name: 'ndc',
29
+ referencedColumnName: 'ndc'
30
+ }), _dec4 = (0, _typeorm.Column)({
31
+ type: "varchar",
32
+ nullable: true,
33
+ length: 20
34
+ }), _dec5 = (0, _typeorm.Column)({
35
+ type: "varchar",
36
+ nullable: true,
37
+ length: 20
38
+ }), _dec6 = (0, _typeorm.Column)({
39
+ type: "varchar",
40
+ nullable: true,
41
+ length: 20
42
+ }), _dec7 = (0, _typeorm.Column)({
43
+ type: "varchar",
44
+ nullable: true,
45
+ length: 10
46
+ }), _dec8 = (0, _typeorm.Column)({
47
+ type: "varchar",
48
+ nullable: true,
49
+ length: 10
50
+ }), _dec9 = (0, _typeorm.Column)({
51
+ type: "varchar",
52
+ nullable: true,
53
+ length: 10
54
+ }), _dec10 = (0, _typeorm.Column)({
55
+ type: "varchar",
56
+ nullable: true,
57
+ length: 4
58
+ }), _dec11 = (0, _typeorm.Column)({
59
+ type: "varchar",
60
+ nullable: true,
61
+ length: 150
62
+ }), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionMetadata {
63
+ constructor() {
64
+ _initializerDefineProperty(this, "ndc", _descriptor, this);
65
+
66
+ _initializerDefineProperty(this, "card_type", _descriptor2, this);
67
+
68
+ _initializerDefineProperty(this, "bin_type", _descriptor3, this);
69
+
70
+ _initializerDefineProperty(this, "payment_brand", _descriptor4, this);
71
+
72
+ _initializerDefineProperty(this, "payment_type", _descriptor5, this);
73
+
74
+ _initializerDefineProperty(this, "issuing_country", _descriptor6, this);
75
+
76
+ _initializerDefineProperty(this, "currency", _descriptor7, this);
77
+
78
+ _initializerDefineProperty(this, "last_four_digits", _descriptor8, this);
79
+
80
+ _initializerDefineProperty(this, "cardholder_name", _descriptor9, this);
81
+
82
+ _initializerDefineProperty(this, "created_at", _descriptor10, this);
83
+ }
84
+
85
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "ndc", [_dec2, _dec3], {
86
+ configurable: true,
87
+ enumerable: true,
88
+ writable: true,
89
+ initializer: function () {
90
+ return _transaction.default;
91
+ }
92
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "card_type", [_dec4], {
93
+ configurable: true,
94
+ enumerable: true,
95
+ writable: true,
96
+ initializer: null
97
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "bin_type", [_dec5], {
98
+ configurable: true,
99
+ enumerable: true,
100
+ writable: true,
101
+ initializer: null
102
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "payment_brand", [_dec6], {
103
+ configurable: true,
104
+ enumerable: true,
105
+ writable: true,
106
+ initializer: null
107
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "payment_type", [_dec7], {
108
+ configurable: true,
109
+ enumerable: true,
110
+ writable: true,
111
+ initializer: null
112
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "issuing_country", [_dec8], {
113
+ configurable: true,
114
+ enumerable: true,
115
+ writable: true,
116
+ initializer: null
117
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec9], {
118
+ configurable: true,
119
+ enumerable: true,
120
+ writable: true,
121
+ initializer: null
122
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "last_four_digits", [_dec10], {
123
+ configurable: true,
124
+ enumerable: true,
125
+ writable: true,
126
+ initializer: null
127
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "cardholder_name", [_dec11], {
128
+ configurable: true,
129
+ enumerable: true,
130
+ writable: true,
131
+ initializer: null
132
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
133
+ configurable: true,
134
+ enumerable: true,
135
+ writable: true,
136
+ initializer: null
137
+ })), _class2)) || _class);
138
+ exports.default = TransactionMetadata;
@@ -0,0 +1,85 @@
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 _merchant = _interopRequireDefault(require("../merchant"));
11
+
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
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 Batch = (_dec = (0, _typeorm.Entity)({
23
+ name: 'batch',
24
+ schema: 'trust_payments'
25
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _merchant.default), _dec4 = (0, _typeorm.JoinColumn)({
26
+ name: 'merchant_number',
27
+ referencedColumnName: 'merchant_number'
28
+ }), _dec5 = (0, _typeorm.Column)({
29
+ type: "int"
30
+ }), _dec6 = (0, _typeorm.Column)({
31
+ type: "date"
32
+ }), _dec7 = (0, _typeorm.Column)({
33
+ type: "varchar",
34
+ length: "5"
35
+ }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Batch {
36
+ constructor() {
37
+ _initializerDefineProperty(this, "bank_reference", _descriptor, this);
38
+
39
+ _initializerDefineProperty(this, "merchant_number", _descriptor2, this);
40
+
41
+ _initializerDefineProperty(this, "amount", _descriptor3, this);
42
+
43
+ _initializerDefineProperty(this, "posting_date", _descriptor4, this);
44
+
45
+ _initializerDefineProperty(this, "currency", _descriptor5, this);
46
+
47
+ _initializerDefineProperty(this, "created_at", _descriptor6, this);
48
+ }
49
+
50
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bank_reference", [_dec2], {
51
+ configurable: true,
52
+ enumerable: true,
53
+ writable: true,
54
+ initializer: function () {
55
+ return undefined;
56
+ }
57
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "merchant_number", [_dec3, _dec4], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: function () {
62
+ return _merchant.default;
63
+ }
64
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec5], {
65
+ configurable: true,
66
+ enumerable: true,
67
+ writable: true,
68
+ initializer: null
69
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "posting_date", [_dec6], {
70
+ configurable: true,
71
+ enumerable: true,
72
+ writable: true,
73
+ initializer: null
74
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec7], {
75
+ configurable: true,
76
+ enumerable: true,
77
+ writable: true,
78
+ initializer: null
79
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
80
+ configurable: true,
81
+ enumerable: true,
82
+ writable: true,
83
+ initializer: null
84
+ })), _class2)) || _class);
85
+ exports.default = Batch;