@felloh-org/lambda-wrapper 1.10.1 → 1.10.3
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/agent-data/booking/index.js +55 -34
- package/dist/entity/agent-data/booking-bank-transaction/index.js +69 -0
- package/dist/migration/agent-data/1683899996464-booking_atol_receipt_number.js +13 -0
- package/dist/migration/agent-data/1684158044886-booking_bank_transaction.js +17 -0
- package/package.json +1 -1
- /package/dist/migration/{1676565874446-booking-currency.js → agent-data/1676565874446-booking-currency.js} +0 -0
|
@@ -17,6 +17,8 @@ var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
|
17
17
|
|
|
18
18
|
var _bookingComponent = _interopRequireDefault(require("../booking-component"));
|
|
19
19
|
|
|
20
|
+
var _bookingBankTransaction = _interopRequireDefault(require("../booking-bank-transaction"));
|
|
21
|
+
|
|
20
22
|
var _paymentLink = _interopRequireDefault(require("../../payment/payment-link"));
|
|
21
23
|
|
|
22
24
|
var _creditNote = _interopRequireDefault(require("../../payment/credit-note"));
|
|
@@ -25,7 +27,7 @@ var _currency = require("../../bank/currency");
|
|
|
25
27
|
|
|
26
28
|
var _bookingPackageType = _interopRequireDefault(require("../booking-package-type"));
|
|
27
29
|
|
|
28
|
-
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
30
|
+
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
@@ -54,34 +56,38 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
54
56
|
}), _dec7 = (0, _typeorm.JoinColumn)({
|
|
55
57
|
name: 'user_id',
|
|
56
58
|
referencedColumnName: 'id'
|
|
57
|
-
}), _dec8 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.booking), _dec9 = (0, _typeorm.OneToMany)(() => _creditNote.default, creditNote => creditNote.booking_applied_to), _dec10 = (0, _typeorm.OneToMany)(() => _bookingComponent.default, bookingComponent => bookingComponent.booking), _dec11 = (0, _typeorm.ManyToOne)(() => _organisation.default),
|
|
59
|
+
}), _dec8 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.booking), _dec9 = (0, _typeorm.OneToMany)(() => _creditNote.default, creditNote => creditNote.booking_applied_to), _dec10 = (0, _typeorm.OneToMany)(() => _bookingComponent.default, bookingComponent => bookingComponent.booking), _dec11 = (0, _typeorm.OneToMany)(() => _bookingBankTransaction.default, bankTransaction => _bookingBankTransaction.default.booking), _dec12 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec13 = (0, _typeorm.JoinColumn)({
|
|
58
60
|
name: 'organisation_id',
|
|
59
61
|
referencedColumnName: 'id'
|
|
60
|
-
}),
|
|
62
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
61
63
|
type: "varchar",
|
|
62
64
|
length: "150"
|
|
63
|
-
}),
|
|
65
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
64
66
|
type: "varchar",
|
|
65
67
|
length: "150"
|
|
66
|
-
}),
|
|
68
|
+
}), _dec16 = (0, _typeorm.Index)(), _dec17 = (0, _typeorm.Column)({
|
|
67
69
|
type: "date",
|
|
68
70
|
nullable: true
|
|
69
|
-
}),
|
|
71
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
70
72
|
type: "date",
|
|
71
73
|
nullable: true
|
|
72
|
-
}),
|
|
74
|
+
}), _dec19 = (0, _typeorm.CreateDateColumn)({
|
|
73
75
|
type: 'timestamp with time zone'
|
|
74
|
-
}),
|
|
76
|
+
}), _dec20 = (0, _typeorm.UpdateDateColumn)({
|
|
75
77
|
type: 'timestamp with time zone'
|
|
76
|
-
}),
|
|
78
|
+
}), _dec21 = (0, _typeorm.DeleteDateColumn)({
|
|
77
79
|
type: 'timestamp with time zone',
|
|
78
80
|
nullable: true
|
|
79
|
-
}),
|
|
81
|
+
}), _dec22 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking), _dec23 = (0, _typeorm.Column)({
|
|
80
82
|
type: "boolean",
|
|
81
83
|
default: false
|
|
82
|
-
}),
|
|
84
|
+
}), _dec24 = (0, _typeorm.ManyToOne)(() => _bookingPackageType.default), _dec25 = (0, _typeorm.JoinColumn)({
|
|
83
85
|
name: 'package_type_id',
|
|
84
86
|
referencedColumnName: 'id'
|
|
87
|
+
}), _dec26 = (0, _typeorm.Column)({
|
|
88
|
+
type: "varchar",
|
|
89
|
+
length: "50",
|
|
90
|
+
nullable: true
|
|
85
91
|
}), _dec(_class = (_class2 = class Booking {
|
|
86
92
|
constructor() {
|
|
87
93
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
@@ -100,27 +106,31 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
100
106
|
|
|
101
107
|
_initializerDefineProperty(this, "components", _descriptor8, this);
|
|
102
108
|
|
|
103
|
-
_initializerDefineProperty(this, "
|
|
109
|
+
_initializerDefineProperty(this, "bank_transactions", _descriptor9, this);
|
|
110
|
+
|
|
111
|
+
_initializerDefineProperty(this, "organisation", _descriptor10, this);
|
|
104
112
|
|
|
105
|
-
_initializerDefineProperty(this, "customer_name",
|
|
113
|
+
_initializerDefineProperty(this, "customer_name", _descriptor11, this);
|
|
106
114
|
|
|
107
|
-
_initializerDefineProperty(this, "booking_reference",
|
|
115
|
+
_initializerDefineProperty(this, "booking_reference", _descriptor12, this);
|
|
108
116
|
|
|
109
|
-
_initializerDefineProperty(this, "departure_date",
|
|
117
|
+
_initializerDefineProperty(this, "departure_date", _descriptor13, this);
|
|
110
118
|
|
|
111
|
-
_initializerDefineProperty(this, "return_date",
|
|
119
|
+
_initializerDefineProperty(this, "return_date", _descriptor14, this);
|
|
112
120
|
|
|
113
|
-
_initializerDefineProperty(this, "created_at",
|
|
121
|
+
_initializerDefineProperty(this, "created_at", _descriptor15, this);
|
|
114
122
|
|
|
115
|
-
_initializerDefineProperty(this, "updated_at",
|
|
123
|
+
_initializerDefineProperty(this, "updated_at", _descriptor16, this);
|
|
116
124
|
|
|
117
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
125
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor17, this);
|
|
118
126
|
|
|
119
|
-
_initializerDefineProperty(this, "payment_links",
|
|
127
|
+
_initializerDefineProperty(this, "payment_links", _descriptor18, this);
|
|
120
128
|
|
|
121
|
-
_initializerDefineProperty(this, "is_temporary",
|
|
129
|
+
_initializerDefineProperty(this, "is_temporary", _descriptor19, this);
|
|
122
130
|
|
|
123
|
-
_initializerDefineProperty(this, "package_type",
|
|
131
|
+
_initializerDefineProperty(this, "package_type", _descriptor20, this);
|
|
132
|
+
|
|
133
|
+
_initializerDefineProperty(this, "atol_receipt_number", _descriptor21, this);
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
/**
|
|
@@ -143,7 +153,8 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
143
153
|
components: [],
|
|
144
154
|
payment_links: [],
|
|
145
155
|
user: null,
|
|
146
|
-
organisation: null
|
|
156
|
+
organisation: null,
|
|
157
|
+
atol_receipt_number: this.atol_receipt_number
|
|
147
158
|
};
|
|
148
159
|
|
|
149
160
|
if (showTemporaryFlag === true) {
|
|
@@ -237,70 +248,80 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
237
248
|
enumerable: true,
|
|
238
249
|
writable: true,
|
|
239
250
|
initializer: null
|
|
240
|
-
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
251
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "bank_transactions", [_dec11], {
|
|
252
|
+
configurable: true,
|
|
253
|
+
enumerable: true,
|
|
254
|
+
writable: true,
|
|
255
|
+
initializer: null
|
|
256
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec12, _dec13], {
|
|
241
257
|
configurable: true,
|
|
242
258
|
enumerable: true,
|
|
243
259
|
writable: true,
|
|
244
260
|
initializer: function () {
|
|
245
261
|
return _organisation.default;
|
|
246
262
|
}
|
|
247
|
-
}),
|
|
263
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec14], {
|
|
248
264
|
configurable: true,
|
|
249
265
|
enumerable: true,
|
|
250
266
|
writable: true,
|
|
251
267
|
initializer: function () {
|
|
252
268
|
return "";
|
|
253
269
|
}
|
|
254
|
-
}),
|
|
270
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "booking_reference", [_dec15, _dec16], {
|
|
255
271
|
configurable: true,
|
|
256
272
|
enumerable: true,
|
|
257
273
|
writable: true,
|
|
258
274
|
initializer: function () {
|
|
259
275
|
return "";
|
|
260
276
|
}
|
|
261
|
-
}),
|
|
277
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "departure_date", [_dec17], {
|
|
262
278
|
configurable: true,
|
|
263
279
|
enumerable: true,
|
|
264
280
|
writable: true,
|
|
265
281
|
initializer: null
|
|
266
|
-
}),
|
|
282
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "return_date", [_dec18], {
|
|
267
283
|
configurable: true,
|
|
268
284
|
enumerable: true,
|
|
269
285
|
writable: true,
|
|
270
286
|
initializer: null
|
|
271
|
-
}),
|
|
287
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec19], {
|
|
272
288
|
configurable: true,
|
|
273
289
|
enumerable: true,
|
|
274
290
|
writable: true,
|
|
275
291
|
initializer: null
|
|
276
|
-
}),
|
|
292
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec20], {
|
|
277
293
|
configurable: true,
|
|
278
294
|
enumerable: true,
|
|
279
295
|
writable: true,
|
|
280
296
|
initializer: null
|
|
281
|
-
}),
|
|
297
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec21], {
|
|
282
298
|
configurable: true,
|
|
283
299
|
enumerable: true,
|
|
284
300
|
writable: true,
|
|
285
301
|
initializer: null
|
|
286
|
-
}),
|
|
302
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "payment_links", [_dec22], {
|
|
287
303
|
configurable: true,
|
|
288
304
|
enumerable: true,
|
|
289
305
|
writable: true,
|
|
290
306
|
initializer: null
|
|
291
|
-
}),
|
|
307
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "is_temporary", [_dec23], {
|
|
292
308
|
configurable: true,
|
|
293
309
|
enumerable: true,
|
|
294
310
|
writable: true,
|
|
295
311
|
initializer: function () {
|
|
296
312
|
return false;
|
|
297
313
|
}
|
|
298
|
-
}),
|
|
314
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "package_type", [_dec24, _dec25], {
|
|
299
315
|
configurable: true,
|
|
300
316
|
enumerable: true,
|
|
301
317
|
writable: true,
|
|
302
318
|
initializer: function () {
|
|
303
319
|
return _bookingPackageType.default;
|
|
304
320
|
}
|
|
321
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "atol_receipt_number", [_dec26], {
|
|
322
|
+
configurable: true,
|
|
323
|
+
enumerable: true,
|
|
324
|
+
writable: true,
|
|
325
|
+
initializer: null
|
|
305
326
|
})), _class2)) || _class);
|
|
306
327
|
exports.default = Booking;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 _booking = _interopRequireDefault(require("../booking"));
|
|
11
|
+
|
|
12
|
+
var _transaction = _interopRequireDefault(require("../../saltedge/transaction"));
|
|
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 }; }
|
|
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 BookingBankTransaction = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'booking_bank_transaction',
|
|
26
|
+
schema: 'agent_data'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _booking.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
28
|
+
name: 'booking_id',
|
|
29
|
+
referencedColumnName: 'id'
|
|
30
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _transaction.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
31
|
+
name: 'transaction_id',
|
|
32
|
+
referencedColumnName: 'id'
|
|
33
|
+
}), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BookingBankTransaction {
|
|
34
|
+
constructor() {
|
|
35
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
36
|
+
|
|
37
|
+
_initializerDefineProperty(this, "booking", _descriptor2, this);
|
|
38
|
+
|
|
39
|
+
_initializerDefineProperty(this, "transaction", _descriptor3, this);
|
|
40
|
+
|
|
41
|
+
_initializerDefineProperty(this, "created_at", _descriptor4, this);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
45
|
+
configurable: true,
|
|
46
|
+
enumerable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
initializer: null
|
|
49
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "booking", [_dec3, _dec4], {
|
|
50
|
+
configurable: true,
|
|
51
|
+
enumerable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
initializer: function () {
|
|
54
|
+
return _booking.default;
|
|
55
|
+
}
|
|
56
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec5, _dec6], {
|
|
57
|
+
configurable: true,
|
|
58
|
+
enumerable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
initializer: function () {
|
|
61
|
+
return _transaction.default;
|
|
62
|
+
}
|
|
63
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
|
|
64
|
+
configurable: true,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
initializer: null
|
|
68
|
+
})), _class2)) || _class);
|
|
69
|
+
exports.default = BookingBankTransaction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingAtolReceiptNumber1683899996464 {
|
|
4
|
+
name = 'bookingAtolReceiptNumber1683899996464'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "atol_receipt_number" character varying(50)`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "atol_receipt_number"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingBankTransaction1684158044886 {
|
|
4
|
+
name = 'bookingBankTransaction1684158044886'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."booking_bank_transaction" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "booking_id" character varying, "transaction_id" character varying(150), CONSTRAINT "PK_de71576b397aecd5503711ed5bc" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_bank_transaction" ADD CONSTRAINT "FK_65f6d33695b4d5cbd706f0e52f4" FOREIGN KEY ("booking_id") REFERENCES "agent_data"."booking"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_bank_transaction" ADD CONSTRAINT "FK_c55e855f2277c6e8da92f443823" FOREIGN KEY ("transaction_id") REFERENCES "saltedge"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_bank_transaction" DROP CONSTRAINT "FK_c55e855f2277c6e8da92f443823"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_bank_transaction" DROP CONSTRAINT "FK_65f6d33695b4d5cbd706f0e52f4"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "agent_data"."booking_bank_transaction"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
File without changes
|