@felloh-org/lambda-wrapper 1.3.5 → 1.3.7
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.
|
@@ -29,9 +29,11 @@ var _transactionBatch = _interopRequireDefault(require("../../bank/transaction-b
|
|
|
29
29
|
|
|
30
30
|
var _transactionSource = _interopRequireDefault(require("../transaction-source"));
|
|
31
31
|
|
|
32
|
+
var _ecommerce = _interopRequireDefault(require("../ecommerce"));
|
|
33
|
+
|
|
32
34
|
var _currency = require("../../bank/currency");
|
|
33
35
|
|
|
34
|
-
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20;
|
|
36
|
+
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
|
|
35
37
|
|
|
36
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
39
|
|
|
@@ -73,36 +75,41 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
73
75
|
}), _dec17 = (0, _typeorm.JoinColumn)({
|
|
74
76
|
name: 'payment_link_id',
|
|
75
77
|
referencedColumnName: 'id'
|
|
76
|
-
}), _dec18 = (0, _typeorm.
|
|
78
|
+
}), _dec18 = (0, _typeorm.ManyToOne)(() => _ecommerce.default, {
|
|
79
|
+
nullable: true
|
|
80
|
+
}), _dec19 = (0, _typeorm.JoinColumn)({
|
|
81
|
+
name: 'ecommerce_id',
|
|
82
|
+
referencedColumnName: 'id'
|
|
83
|
+
}), _dec20 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec21 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec22 = (0, _typeorm.JoinColumn)({
|
|
77
84
|
name: 'payment_provider_id',
|
|
78
85
|
referencedColumnName: 'id'
|
|
79
|
-
}),
|
|
86
|
+
}), _dec23 = (0, _typeorm.ManyToOne)(() => _organisationPaymentProvider.default, {
|
|
80
87
|
nullable: true
|
|
81
|
-
}),
|
|
88
|
+
}), _dec24 = (0, _typeorm.JoinColumn)({
|
|
82
89
|
name: 'organisation_payment_provider_id',
|
|
83
90
|
referencedColumnName: 'id'
|
|
84
|
-
}),
|
|
91
|
+
}), _dec25 = (0, _typeorm.Column)({
|
|
85
92
|
type: "varchar",
|
|
86
93
|
length: "250",
|
|
87
94
|
nullable: true
|
|
88
|
-
}),
|
|
95
|
+
}), _dec26 = (0, _typeorm.Column)({
|
|
89
96
|
type: "varchar",
|
|
90
97
|
length: "3",
|
|
91
98
|
default: _currency.DEFAULT_CURRENCY
|
|
92
|
-
}),
|
|
99
|
+
}), _dec27 = (0, _typeorm.Column)({
|
|
93
100
|
type: "json",
|
|
94
101
|
nullable: true
|
|
95
|
-
}),
|
|
102
|
+
}), _dec28 = (0, _typeorm.Column)({
|
|
96
103
|
type: "timestamp with time zone",
|
|
97
104
|
nullable: true
|
|
98
|
-
}),
|
|
105
|
+
}), _dec29 = (0, _typeorm.Column)({
|
|
99
106
|
type: "text",
|
|
100
107
|
nullable: true
|
|
101
|
-
}),
|
|
108
|
+
}), _dec30 = (0, _typeorm.CreateDateColumn)({
|
|
102
109
|
type: 'timestamp with time zone'
|
|
103
|
-
}),
|
|
110
|
+
}), _dec31 = (0, _typeorm.UpdateDateColumn)({
|
|
104
111
|
type: 'timestamp with time zone'
|
|
105
|
-
}),
|
|
112
|
+
}), _dec32 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.transaction), _dec(_class = (_class2 = class Transaction {
|
|
106
113
|
constructor() {
|
|
107
114
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
108
115
|
|
|
@@ -122,27 +129,29 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
122
129
|
|
|
123
130
|
_initializerDefineProperty(this, "payment_link", _descriptor9, this);
|
|
124
131
|
|
|
125
|
-
_initializerDefineProperty(this, "
|
|
132
|
+
_initializerDefineProperty(this, "ecommerce", _descriptor10, this);
|
|
133
|
+
|
|
134
|
+
_initializerDefineProperty(this, "metadata", _descriptor11, this);
|
|
126
135
|
|
|
127
|
-
_initializerDefineProperty(this, "payment_provider",
|
|
136
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor12, this);
|
|
128
137
|
|
|
129
|
-
_initializerDefineProperty(this, "organisation_payment_provider",
|
|
138
|
+
_initializerDefineProperty(this, "organisation_payment_provider", _descriptor13, this);
|
|
130
139
|
|
|
131
|
-
_initializerDefineProperty(this, "provider_reference",
|
|
140
|
+
_initializerDefineProperty(this, "provider_reference", _descriptor14, this);
|
|
132
141
|
|
|
133
|
-
_initializerDefineProperty(this, "currency",
|
|
142
|
+
_initializerDefineProperty(this, "currency", _descriptor15, this);
|
|
134
143
|
|
|
135
|
-
_initializerDefineProperty(this, "provider_metadata",
|
|
144
|
+
_initializerDefineProperty(this, "provider_metadata", _descriptor16, this);
|
|
136
145
|
|
|
137
|
-
_initializerDefineProperty(this, "completed_at",
|
|
146
|
+
_initializerDefineProperty(this, "completed_at", _descriptor17, this);
|
|
138
147
|
|
|
139
|
-
_initializerDefineProperty(this, "message",
|
|
148
|
+
_initializerDefineProperty(this, "message", _descriptor18, this);
|
|
140
149
|
|
|
141
|
-
_initializerDefineProperty(this, "created_at",
|
|
150
|
+
_initializerDefineProperty(this, "created_at", _descriptor19, this);
|
|
142
151
|
|
|
143
|
-
_initializerDefineProperty(this, "updated_at",
|
|
152
|
+
_initializerDefineProperty(this, "updated_at", _descriptor20, this);
|
|
144
153
|
|
|
145
|
-
_initializerDefineProperty(this, "batch",
|
|
154
|
+
_initializerDefineProperty(this, "batch", _descriptor21, this);
|
|
146
155
|
}
|
|
147
156
|
|
|
148
157
|
getPublicData() {
|
|
@@ -159,6 +168,7 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
159
168
|
provider_reference: this.provider_reference,
|
|
160
169
|
booking: null,
|
|
161
170
|
payment_link: null,
|
|
171
|
+
ecommerce: null,
|
|
162
172
|
metadata: null,
|
|
163
173
|
organisation: null
|
|
164
174
|
};
|
|
@@ -171,6 +181,10 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
171
181
|
response.payment_link = this.payment_link.getPublicData();
|
|
172
182
|
}
|
|
173
183
|
|
|
184
|
+
if (this.ecommerce !== null && typeof this.ecommerce !== 'undefined' && typeof this.ecommerce.getPublicData === 'function') {
|
|
185
|
+
response.ecommerce = this.ecommerce.getPublicData();
|
|
186
|
+
}
|
|
187
|
+
|
|
174
188
|
if (this.metadata !== null) {
|
|
175
189
|
response.metadata = this.metadata;
|
|
176
190
|
}
|
|
@@ -203,6 +217,10 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
203
217
|
response.payment_link = this.payment_link.getPublicUltraCompactData();
|
|
204
218
|
}
|
|
205
219
|
|
|
220
|
+
if (this.ecommerce !== null && typeof this.ecommerce !== 'undefined' && typeof this.ecommerce.getPublicData === 'function') {
|
|
221
|
+
response.ecommerce = this.ecommerce.getPublicUltraCompactData();
|
|
222
|
+
}
|
|
223
|
+
|
|
206
224
|
if (this.metadata !== null) {
|
|
207
225
|
response.metadata = this.metadata;
|
|
208
226
|
}
|
|
@@ -275,65 +293,72 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
275
293
|
initializer: function () {
|
|
276
294
|
return _paymentLink.default;
|
|
277
295
|
}
|
|
278
|
-
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
296
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "ecommerce", [_dec18, _dec19], {
|
|
297
|
+
configurable: true,
|
|
298
|
+
enumerable: true,
|
|
299
|
+
writable: true,
|
|
300
|
+
initializer: function () {
|
|
301
|
+
return _ecommerce.default;
|
|
302
|
+
}
|
|
303
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "metadata", [_dec20], {
|
|
279
304
|
configurable: true,
|
|
280
305
|
enumerable: true,
|
|
281
306
|
writable: true,
|
|
282
307
|
initializer: null
|
|
283
|
-
}),
|
|
308
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec21, _dec22], {
|
|
284
309
|
configurable: true,
|
|
285
310
|
enumerable: true,
|
|
286
311
|
writable: true,
|
|
287
312
|
initializer: function () {
|
|
288
313
|
return _paymentProvider.default;
|
|
289
314
|
}
|
|
290
|
-
}),
|
|
315
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "organisation_payment_provider", [_dec23, _dec24], {
|
|
291
316
|
configurable: true,
|
|
292
317
|
enumerable: true,
|
|
293
318
|
writable: true,
|
|
294
319
|
initializer: function () {
|
|
295
320
|
return _organisationPaymentProvider.default;
|
|
296
321
|
}
|
|
297
|
-
}),
|
|
322
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec25], {
|
|
298
323
|
configurable: true,
|
|
299
324
|
enumerable: true,
|
|
300
325
|
writable: true,
|
|
301
326
|
initializer: function () {
|
|
302
327
|
return "";
|
|
303
328
|
}
|
|
304
|
-
}),
|
|
329
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec26], {
|
|
305
330
|
configurable: true,
|
|
306
331
|
enumerable: true,
|
|
307
332
|
writable: true,
|
|
308
333
|
initializer: function () {
|
|
309
334
|
return _currency.DEFAULT_CURRENCY;
|
|
310
335
|
}
|
|
311
|
-
}),
|
|
336
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "provider_metadata", [_dec27], {
|
|
312
337
|
configurable: true,
|
|
313
338
|
enumerable: true,
|
|
314
339
|
writable: true,
|
|
315
340
|
initializer: null
|
|
316
|
-
}),
|
|
341
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec28], {
|
|
317
342
|
configurable: true,
|
|
318
343
|
enumerable: true,
|
|
319
344
|
writable: true,
|
|
320
345
|
initializer: null
|
|
321
|
-
}),
|
|
346
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec29], {
|
|
322
347
|
configurable: true,
|
|
323
348
|
enumerable: true,
|
|
324
349
|
writable: true,
|
|
325
350
|
initializer: null
|
|
326
|
-
}),
|
|
351
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec30], {
|
|
327
352
|
configurable: true,
|
|
328
353
|
enumerable: true,
|
|
329
354
|
writable: true,
|
|
330
355
|
initializer: null
|
|
331
|
-
}),
|
|
356
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec31], {
|
|
332
357
|
configurable: true,
|
|
333
358
|
enumerable: true,
|
|
334
359
|
writable: true,
|
|
335
360
|
initializer: null
|
|
336
|
-
}),
|
|
361
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec32], {
|
|
337
362
|
configurable: true,
|
|
338
363
|
enumerable: true,
|
|
339
364
|
writable: true,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class ecommerceTransaction1669040104944 {
|
|
4
|
+
name = 'ecommerceTransaction1669040104944'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "ecommerce_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_9647a5fc7819bebf68c045b1f0c" FOREIGN KEY ("ecommerce_id") REFERENCES "payment"."ecommerce"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_9647a5fc7819bebf68c045b1f0c"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "ecommerce_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|