@felloh-org/lambda-wrapper 1.8.3 → 1.9.0
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/payment/index.js +3 -1
- package/dist/entity/payment/payment-link/index.js +83 -59
- package/dist/entity/payment/payment-link-type/index.js +39 -0
- package/dist/entity/saltedge/index.js +3 -1
- package/dist/index.js +16 -0
- package/dist/migration/payment/1676992104022-create-payment-link-type-table.js +21 -0
- package/package.json +1 -1
|
@@ -37,8 +37,10 @@ var _creditNote = _interopRequireDefault(require("./credit-note"));
|
|
|
37
37
|
|
|
38
38
|
var _ecommerce = _interopRequireDefault(require("./ecommerce"));
|
|
39
39
|
|
|
40
|
+
var _paymentLinkType = _interopRequireDefault(require("./payment-link-type"));
|
|
41
|
+
|
|
40
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
43
|
|
|
42
|
-
const ENTITIES = [_chargeback.default, _organisationPaymentProvider.default, _organisationPaymentProviderMethod.default, _paymentLink.default, _paymentProvider.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionSource.default, _transactionType.default, _transactionMetadata.default, _transactionReason.default, _creditNote.default, _ecommerce.default];
|
|
44
|
+
const ENTITIES = [_chargeback.default, _organisationPaymentProvider.default, _organisationPaymentProviderMethod.default, _paymentLink.default, _paymentProvider.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionSource.default, _transactionType.default, _transactionMetadata.default, _transactionReason.default, _creditNote.default, _ecommerce.default, _paymentLinkType.default];
|
|
43
45
|
var _default = ENTITIES;
|
|
44
46
|
exports.default = _default;
|
|
@@ -15,9 +15,11 @@ var _booking = _interopRequireDefault(require("../../agent-data/booking"));
|
|
|
15
15
|
|
|
16
16
|
var _transaction = _interopRequireDefault(require("../transaction"));
|
|
17
17
|
|
|
18
|
+
var _paymentLinkType = _interopRequireDefault(require("../payment-link-type"));
|
|
19
|
+
|
|
18
20
|
var _currency = require("../../bank/currency");
|
|
19
21
|
|
|
20
|
-
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, _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;
|
|
22
|
+
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, _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;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -41,62 +43,65 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
41
43
|
}), _dec7 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
42
44
|
name: 'organisation_id',
|
|
43
45
|
referencedColumnName: 'id'
|
|
44
|
-
}), _dec9 = (0, _typeorm.
|
|
46
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _paymentLinkType.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
47
|
+
name: 'type_id',
|
|
48
|
+
referencedColumnName: 'id'
|
|
49
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
45
50
|
type: "int"
|
|
46
|
-
}),
|
|
51
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
47
52
|
type: "varchar",
|
|
48
53
|
length: "150",
|
|
49
54
|
nullable: true
|
|
50
|
-
}),
|
|
55
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
51
56
|
type: "varchar",
|
|
52
57
|
length: "2048",
|
|
53
58
|
nullable: true
|
|
54
|
-
}),
|
|
59
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
55
60
|
type: "varchar",
|
|
56
61
|
length: "250",
|
|
57
62
|
nullable: true
|
|
58
|
-
}),
|
|
63
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
59
64
|
type: "varchar",
|
|
60
65
|
length: "200",
|
|
61
66
|
nullable: true
|
|
62
|
-
}),
|
|
67
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
63
68
|
type: "varchar",
|
|
64
69
|
length: "200",
|
|
65
70
|
nullable: true
|
|
66
|
-
}),
|
|
71
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
67
72
|
type: "varchar",
|
|
68
73
|
length: "200",
|
|
69
74
|
nullable: true
|
|
70
|
-
}),
|
|
75
|
+
}), _dec18 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec19 = (0, _typeorm.Column)({
|
|
71
76
|
type: "boolean",
|
|
72
77
|
default: true
|
|
73
|
-
}),
|
|
78
|
+
}), _dec20 = (0, _typeorm.Column)({
|
|
74
79
|
type: "boolean",
|
|
75
80
|
default: true
|
|
76
|
-
}),
|
|
81
|
+
}), _dec21 = (0, _typeorm.Column)({
|
|
77
82
|
type: "boolean",
|
|
78
83
|
default: false
|
|
79
|
-
}),
|
|
84
|
+
}), _dec22 = (0, _typeorm.Column)({
|
|
80
85
|
type: "varchar",
|
|
81
86
|
length: "3",
|
|
82
87
|
default: _currency.DEFAULT_CURRENCY
|
|
83
|
-
}),
|
|
88
|
+
}), _dec23 = (0, _typeorm.Column)({
|
|
84
89
|
type: "timestamp with time zone"
|
|
85
|
-
}),
|
|
90
|
+
}), _dec24 = (0, _typeorm.Column)({
|
|
86
91
|
type: "varchar",
|
|
87
92
|
length: "50",
|
|
88
93
|
default: 'active'
|
|
89
|
-
}),
|
|
94
|
+
}), _dec25 = (0, _typeorm.CreateDateColumn)({
|
|
90
95
|
type: 'timestamp with time zone'
|
|
91
|
-
}),
|
|
96
|
+
}), _dec26 = (0, _typeorm.UpdateDateColumn)({
|
|
92
97
|
type: 'timestamp with time zone'
|
|
93
|
-
}),
|
|
98
|
+
}), _dec27 = (0, _typeorm.DeleteDateColumn)({
|
|
94
99
|
type: 'timestamp with time zone',
|
|
95
100
|
nullable: true
|
|
96
|
-
}),
|
|
101
|
+
}), _dec28 = (0, _typeorm.Column)({
|
|
97
102
|
type: "boolean",
|
|
98
103
|
default: false
|
|
99
|
-
}),
|
|
104
|
+
}), _dec29 = (0, _typeorm.Column)({
|
|
100
105
|
type: "json",
|
|
101
106
|
nullable: true
|
|
102
107
|
}), _dec(_class = (_class2 = class PaymentLink {
|
|
@@ -109,43 +114,45 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
109
114
|
|
|
110
115
|
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
111
116
|
|
|
112
|
-
_initializerDefineProperty(this, "
|
|
117
|
+
_initializerDefineProperty(this, "type", _descriptor5, this);
|
|
118
|
+
|
|
119
|
+
_initializerDefineProperty(this, "amount", _descriptor6, this);
|
|
113
120
|
|
|
114
|
-
_initializerDefineProperty(this, "customer_name",
|
|
121
|
+
_initializerDefineProperty(this, "customer_name", _descriptor7, this);
|
|
115
122
|
|
|
116
|
-
_initializerDefineProperty(this, "description",
|
|
123
|
+
_initializerDefineProperty(this, "description", _descriptor8, this);
|
|
117
124
|
|
|
118
|
-
_initializerDefineProperty(this, "email",
|
|
125
|
+
_initializerDefineProperty(this, "email", _descriptor9, this);
|
|
119
126
|
|
|
120
|
-
_initializerDefineProperty(this, "success_url",
|
|
127
|
+
_initializerDefineProperty(this, "success_url", _descriptor10, this);
|
|
121
128
|
|
|
122
|
-
_initializerDefineProperty(this, "failure_url",
|
|
129
|
+
_initializerDefineProperty(this, "failure_url", _descriptor11, this);
|
|
123
130
|
|
|
124
|
-
_initializerDefineProperty(this, "cancel_url",
|
|
131
|
+
_initializerDefineProperty(this, "cancel_url", _descriptor12, this);
|
|
125
132
|
|
|
126
|
-
_initializerDefineProperty(this, "transactions",
|
|
133
|
+
_initializerDefineProperty(this, "transactions", _descriptor13, this);
|
|
127
134
|
|
|
128
|
-
_initializerDefineProperty(this, "open_banking_enabled",
|
|
135
|
+
_initializerDefineProperty(this, "open_banking_enabled", _descriptor14, this);
|
|
129
136
|
|
|
130
|
-
_initializerDefineProperty(this, "card_enabled",
|
|
137
|
+
_initializerDefineProperty(this, "card_enabled", _descriptor15, this);
|
|
131
138
|
|
|
132
|
-
_initializerDefineProperty(this, "moto",
|
|
139
|
+
_initializerDefineProperty(this, "moto", _descriptor16, this);
|
|
133
140
|
|
|
134
|
-
_initializerDefineProperty(this, "currency",
|
|
141
|
+
_initializerDefineProperty(this, "currency", _descriptor17, this);
|
|
135
142
|
|
|
136
|
-
_initializerDefineProperty(this, "expires_at",
|
|
143
|
+
_initializerDefineProperty(this, "expires_at", _descriptor18, this);
|
|
137
144
|
|
|
138
|
-
_initializerDefineProperty(this, "status",
|
|
145
|
+
_initializerDefineProperty(this, "status", _descriptor19, this);
|
|
139
146
|
|
|
140
|
-
_initializerDefineProperty(this, "created_at",
|
|
147
|
+
_initializerDefineProperty(this, "created_at", _descriptor20, this);
|
|
141
148
|
|
|
142
|
-
_initializerDefineProperty(this, "updated_at",
|
|
149
|
+
_initializerDefineProperty(this, "updated_at", _descriptor21, this);
|
|
143
150
|
|
|
144
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
151
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor22, this);
|
|
145
152
|
|
|
146
|
-
_initializerDefineProperty(this, "pre_authorized",
|
|
153
|
+
_initializerDefineProperty(this, "pre_authorized", _descriptor23, this);
|
|
147
154
|
|
|
148
|
-
_initializerDefineProperty(this, "metadata",
|
|
155
|
+
_initializerDefineProperty(this, "metadata", _descriptor24, this);
|
|
149
156
|
}
|
|
150
157
|
|
|
151
158
|
generateExpiryDate() {
|
|
@@ -177,7 +184,8 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
177
184
|
organisation: null,
|
|
178
185
|
options: {
|
|
179
186
|
pre_authorized: this.pre_authorized
|
|
180
|
-
}
|
|
187
|
+
},
|
|
188
|
+
type_id: this.type_id
|
|
181
189
|
};
|
|
182
190
|
|
|
183
191
|
if (this.booking !== null && typeof this.booking.id !== 'undefined') {
|
|
@@ -200,6 +208,10 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
200
208
|
response.metadata = this.metadata;
|
|
201
209
|
}
|
|
202
210
|
|
|
211
|
+
if (this.type !== null) {
|
|
212
|
+
response.type = this.type;
|
|
213
|
+
}
|
|
214
|
+
|
|
203
215
|
return response;
|
|
204
216
|
}
|
|
205
217
|
|
|
@@ -218,13 +230,18 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
218
230
|
},
|
|
219
231
|
options: {
|
|
220
232
|
pre_authorized: this.pre_authorized
|
|
221
|
-
}
|
|
233
|
+
},
|
|
234
|
+
type_id: this.type_id
|
|
222
235
|
};
|
|
223
236
|
|
|
224
237
|
if (this.metadata !== null) {
|
|
225
238
|
response.metadata = this.metadata;
|
|
226
239
|
}
|
|
227
240
|
|
|
241
|
+
if (this.type !== null) {
|
|
242
|
+
response.type = this.type;
|
|
243
|
+
}
|
|
244
|
+
|
|
228
245
|
return response;
|
|
229
246
|
}
|
|
230
247
|
|
|
@@ -262,115 +279,122 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
262
279
|
initializer: function () {
|
|
263
280
|
return _organisation.default;
|
|
264
281
|
}
|
|
265
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
282
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec9, _dec10], {
|
|
283
|
+
configurable: true,
|
|
284
|
+
enumerable: true,
|
|
285
|
+
writable: true,
|
|
286
|
+
initializer: function () {
|
|
287
|
+
return _paymentLinkType.default;
|
|
288
|
+
}
|
|
289
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec11], {
|
|
266
290
|
configurable: true,
|
|
267
291
|
enumerable: true,
|
|
268
292
|
writable: true,
|
|
269
293
|
initializer: null
|
|
270
|
-
}),
|
|
294
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec12], {
|
|
271
295
|
configurable: true,
|
|
272
296
|
enumerable: true,
|
|
273
297
|
writable: true,
|
|
274
298
|
initializer: function () {
|
|
275
299
|
return "";
|
|
276
300
|
}
|
|
277
|
-
}),
|
|
301
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec13], {
|
|
278
302
|
configurable: true,
|
|
279
303
|
enumerable: true,
|
|
280
304
|
writable: true,
|
|
281
305
|
initializer: function () {
|
|
282
306
|
return "";
|
|
283
307
|
}
|
|
284
|
-
}),
|
|
308
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec14], {
|
|
285
309
|
configurable: true,
|
|
286
310
|
enumerable: true,
|
|
287
311
|
writable: true,
|
|
288
312
|
initializer: function () {
|
|
289
313
|
return "";
|
|
290
314
|
}
|
|
291
|
-
}),
|
|
315
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "success_url", [_dec15], {
|
|
292
316
|
configurable: true,
|
|
293
317
|
enumerable: true,
|
|
294
318
|
writable: true,
|
|
295
319
|
initializer: function () {
|
|
296
320
|
return "";
|
|
297
321
|
}
|
|
298
|
-
}),
|
|
322
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "failure_url", [_dec16], {
|
|
299
323
|
configurable: true,
|
|
300
324
|
enumerable: true,
|
|
301
325
|
writable: true,
|
|
302
326
|
initializer: function () {
|
|
303
327
|
return "";
|
|
304
328
|
}
|
|
305
|
-
}),
|
|
329
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "cancel_url", [_dec17], {
|
|
306
330
|
configurable: true,
|
|
307
331
|
enumerable: true,
|
|
308
332
|
writable: true,
|
|
309
333
|
initializer: function () {
|
|
310
334
|
return "";
|
|
311
335
|
}
|
|
312
|
-
}),
|
|
336
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec18], {
|
|
313
337
|
configurable: true,
|
|
314
338
|
enumerable: true,
|
|
315
339
|
writable: true,
|
|
316
340
|
initializer: null
|
|
317
|
-
}),
|
|
341
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "open_banking_enabled", [_dec19], {
|
|
318
342
|
configurable: true,
|
|
319
343
|
enumerable: true,
|
|
320
344
|
writable: true,
|
|
321
345
|
initializer: null
|
|
322
|
-
}),
|
|
346
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "card_enabled", [_dec20], {
|
|
323
347
|
configurable: true,
|
|
324
348
|
enumerable: true,
|
|
325
349
|
writable: true,
|
|
326
350
|
initializer: null
|
|
327
|
-
}),
|
|
351
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "moto", [_dec21], {
|
|
328
352
|
configurable: true,
|
|
329
353
|
enumerable: true,
|
|
330
354
|
writable: true,
|
|
331
355
|
initializer: null
|
|
332
|
-
}),
|
|
356
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec22], {
|
|
333
357
|
configurable: true,
|
|
334
358
|
enumerable: true,
|
|
335
359
|
writable: true,
|
|
336
360
|
initializer: function () {
|
|
337
361
|
return _currency.DEFAULT_CURRENCY;
|
|
338
362
|
}
|
|
339
|
-
}),
|
|
363
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec23], {
|
|
340
364
|
configurable: true,
|
|
341
365
|
enumerable: true,
|
|
342
366
|
writable: true,
|
|
343
367
|
initializer: function () {
|
|
344
368
|
return this.generateExpiryDate();
|
|
345
369
|
}
|
|
346
|
-
}),
|
|
370
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec24], {
|
|
347
371
|
configurable: true,
|
|
348
372
|
enumerable: true,
|
|
349
373
|
writable: true,
|
|
350
374
|
initializer: function () {
|
|
351
375
|
return "";
|
|
352
376
|
}
|
|
353
|
-
}),
|
|
377
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec25], {
|
|
354
378
|
configurable: true,
|
|
355
379
|
enumerable: true,
|
|
356
380
|
writable: true,
|
|
357
381
|
initializer: null
|
|
358
|
-
}),
|
|
382
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec26], {
|
|
359
383
|
configurable: true,
|
|
360
384
|
enumerable: true,
|
|
361
385
|
writable: true,
|
|
362
386
|
initializer: null
|
|
363
|
-
}),
|
|
387
|
+
}), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec27], {
|
|
364
388
|
configurable: true,
|
|
365
389
|
enumerable: true,
|
|
366
390
|
writable: true,
|
|
367
391
|
initializer: null
|
|
368
|
-
}),
|
|
392
|
+
}), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "pre_authorized", [_dec28], {
|
|
369
393
|
configurable: true,
|
|
370
394
|
enumerable: true,
|
|
371
395
|
writable: true,
|
|
372
396
|
initializer: null
|
|
373
|
-
}),
|
|
397
|
+
}), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "metadata", [_dec29], {
|
|
374
398
|
configurable: true,
|
|
375
399
|
enumerable: true,
|
|
376
400
|
writable: true,
|
|
@@ -0,0 +1,39 @@
|
|
|
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 PaymentLinkType = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'payment_link_type',
|
|
20
|
+
schema: 'payment'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLinkType {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = PaymentLinkType;
|
|
@@ -13,8 +13,10 @@ var _customer = _interopRequireDefault(require("./customer"));
|
|
|
13
13
|
|
|
14
14
|
var _transaction = _interopRequireDefault(require("./transaction"));
|
|
15
15
|
|
|
16
|
+
var _lead = _interopRequireDefault(require("./lead"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
const ENTITIES = [_account.default, _connection.default, _customer.default, _transaction.default];
|
|
20
|
+
const ENTITIES = [_account.default, _connection.default, _customer.default, _transaction.default, _lead.default];
|
|
19
21
|
var _default = ENTITIES;
|
|
20
22
|
exports.default = _default;
|
package/dist/index.js
CHANGED
|
@@ -279,6 +279,12 @@ Object.defineProperty(exports, "PaymentLinkEntity", {
|
|
|
279
279
|
return _paymentLink.default;
|
|
280
280
|
}
|
|
281
281
|
});
|
|
282
|
+
Object.defineProperty(exports, "PaymentLinkTypeEntity", {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: function () {
|
|
285
|
+
return _paymentLinkType.default;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
282
288
|
Object.defineProperty(exports, "PaymentProviderEntity", {
|
|
283
289
|
enumerable: true,
|
|
284
290
|
get: function () {
|
|
@@ -339,6 +345,12 @@ Object.defineProperty(exports, "SaltedgeCustomer", {
|
|
|
339
345
|
return _customer.default;
|
|
340
346
|
}
|
|
341
347
|
});
|
|
348
|
+
Object.defineProperty(exports, "SaltedgeLead", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function () {
|
|
351
|
+
return _lead.default;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
342
354
|
Object.defineProperty(exports, "SaltedgeTransaction", {
|
|
343
355
|
enumerable: true,
|
|
344
356
|
get: function () {
|
|
@@ -636,6 +648,8 @@ var _organisationPaymentProviderMethod = _interopRequireDefault(require("./entit
|
|
|
636
648
|
|
|
637
649
|
var _paymentLink = _interopRequireDefault(require("./entity/payment/payment-link"));
|
|
638
650
|
|
|
651
|
+
var _paymentLinkType = _interopRequireDefault(require("./entity/payment/payment-link-type"));
|
|
652
|
+
|
|
639
653
|
var _paymentProvider = _interopRequireDefault(require("./entity/payment/payment-provider"));
|
|
640
654
|
|
|
641
655
|
var _transaction2 = _interopRequireDefault(require("./entity/payment/transaction"));
|
|
@@ -722,6 +736,8 @@ var _customer = _interopRequireDefault(require("./entity/saltedge/customer"));
|
|
|
722
736
|
|
|
723
737
|
var _transaction6 = _interopRequireDefault(require("./entity/saltedge/transaction"));
|
|
724
738
|
|
|
739
|
+
var _lead = _interopRequireDefault(require("./entity/saltedge/lead"));
|
|
740
|
+
|
|
725
741
|
var _paymentInitationTypes = _interopRequireDefault(require("./enums/payment-initation-types"));
|
|
726
742
|
|
|
727
743
|
var _baseEvent = _interopRequireDefault(require("./event/base-event"));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class createPaymentLinkType1676992104022 {
|
|
4
|
+
name = 'createPaymentLinkType1676992104022'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."payment_link_type" ("id" character varying NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_a96fb07f90b3283405f2a831788" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`INSERT INTO "payment"."payment_link_type" (id) VALUES ('FULL_PAYMENT'), ('DEPOSIT'), ('UNKNOWN')`);
|
|
9
|
+
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "type_id" character varying NOT NULL DEFAULT 'UNKNOWN'`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "FK_f9ea51f238332f09c993163ca83" FOREIGN KEY ("type_id") REFERENCES "payment"."payment_link_type"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async down(queryRunner) {
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "FK_f9ea51f238332f09c993163ca83"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "type_id"`);
|
|
18
|
+
|
|
19
|
+
await queryRunner.query(`DROP TABLE "payment"."payment_link_type"`);
|
|
20
|
+
}
|
|
21
|
+
}
|