@felloh-org/lambda-wrapper 1.1.4 → 1.1.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.
Files changed (27) hide show
  1. package/.concourse/private.yml +0 -0
  2. package/cli/seed/create-schema.js +1 -0
  3. package/dist/entity/agent-data/booking/index.js +13 -2
  4. package/dist/entity/index.js +3 -1
  5. package/dist/entity/payment/payment-link/index.js +13 -2
  6. package/dist/entity/payment/transaction/index.js +10 -6
  7. package/dist/entity/payment/transaction-event/index.js +13 -2
  8. package/dist/entity/payment/transaction-event-type/index.js +13 -2
  9. package/dist/entity/payment/transaction-metadata/index.js +13 -2
  10. package/dist/entity/scratch/abta-members/index.js +283 -0
  11. package/dist/entity/scratch/index.js +14 -0
  12. package/dist/entity/user/organisation/index.js +28 -16
  13. package/dist/index.js +8 -0
  14. package/dist/migration/payment/1650974827938-update_to_with_timezones.js +49 -0
  15. package/dist/migration/payment/1651050178971-update_to_with_timestamp.js +59 -0
  16. package/dist/migration/scratch/1651181353263-scratch_abta_members.js +13 -0
  17. package/dist/migration/scratch/1651183064044-scratch_abta_members_fix.js +19 -0
  18. package/dist/migration/scratch/1651183188924-scratch_abta_members_length_fix.js +19 -0
  19. package/dist/migration/scratch/1651187490208-scratch_abta_members_financials.js +23 -0
  20. package/dist/migration/scratch/1651223911459-scratch_abta_members_company_number.js +13 -0
  21. package/dist/migration/scratch/1651225059114-scratch_abta_members_atol.js +14 -0
  22. package/dist/migration/scratch/1651225316981-scratch_abta_members_atol_fix.js +15 -0
  23. package/dist/migration/scratch/1651241112556-scratch_abta_members_atol_group.js +13 -0
  24. package/dist/migration/scratch/1651241351537-scratch_abta_members_atol_tta_id.js +15 -0
  25. package/dist/migration/user/1651582800086-organisation_image.js +13 -0
  26. package/ormconfig.js +1 -1
  27. package/package.json +1 -2
Binary file
@@ -20,6 +20,7 @@ const run = async () => {
20
20
  await queryRunner.createSchema('user', true);
21
21
  await queryRunner.createSchema('total_processing', true);
22
22
  await queryRunner.createSchema('token', true);
23
+ await queryRunner.createSchema('scratch', true);
23
24
  };
24
25
 
25
26
  run();
@@ -15,7 +15,7 @@ var _transaction = _interopRequireDefault(require("../../payment/transaction"));
15
15
 
16
16
  var _uuid = require("uuid");
17
17
 
18
- 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;
18
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
@@ -49,7 +49,11 @@ let Booking = (_dec = (0, _typeorm.Entity)({
49
49
  }), _dec12 = (0, _typeorm.Column)({
50
50
  type: "date",
51
51
  nullable: true
52
- }), _dec13 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
52
+ }), _dec13 = (0, _typeorm.CreateDateColumn)({
53
+ type: 'timestamp with time zone'
54
+ }), _dec14 = (0, _typeorm.UpdateDateColumn)({
55
+ type: 'timestamp with time zone'
56
+ }), _dec(_class = (_class2 = class Booking {
53
57
  constructor() {
54
58
  _initializerDefineProperty(this, "id", _descriptor, this);
55
59
 
@@ -70,6 +74,8 @@ let Booking = (_dec = (0, _typeorm.Entity)({
70
74
  _initializerDefineProperty(this, "return_date", _descriptor9, this);
71
75
 
72
76
  _initializerDefineProperty(this, "created_at", _descriptor10, this);
77
+
78
+ _initializerDefineProperty(this, "updated_at", _descriptor11, this);
73
79
  }
74
80
 
75
81
  /**
@@ -160,5 +166,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
160
166
  enumerable: true,
161
167
  writable: true,
162
168
  initializer: null
169
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec14], {
170
+ configurable: true,
171
+ enumerable: true,
172
+ writable: true,
173
+ initializer: null
163
174
  })), _class2)) || _class);
164
175
  exports.default = Booking;
@@ -21,8 +21,10 @@ var _totalProcessing = _interopRequireDefault(require("./total-processing"));
21
21
 
22
22
  var _token = _interopRequireDefault(require("./token"));
23
23
 
24
+ var _scratch = _interopRequireDefault(require("./scratch"));
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- const ENTITIES = [..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
28
+ const ENTITIES = [..._scratch.default, ..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
27
29
  var _default = ENTITIES;
28
30
  exports.default = _default;
@@ -15,7 +15,7 @@ var _booking = _interopRequireDefault(require("../../agent-data/booking"));
15
15
 
16
16
  var _transaction = _interopRequireDefault(require("../transaction"));
17
17
 
18
- 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, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
18
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18;
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
@@ -72,7 +72,11 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
72
72
  type: "varchar",
73
73
  length: "50",
74
74
  default: 'active'
75
- }), _dec21 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
75
+ }), _dec21 = (0, _typeorm.CreateDateColumn)({
76
+ type: 'timestamp with time zone'
77
+ }), _dec22 = (0, _typeorm.UpdateDateColumn)({
78
+ type: 'timestamp with time zone'
79
+ }), _dec(_class = (_class2 = class PaymentLink {
76
80
  constructor() {
77
81
  _initializerDefineProperty(this, "id", _descriptor, this);
78
82
 
@@ -107,6 +111,8 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
107
111
  _initializerDefineProperty(this, "status", _descriptor16, this);
108
112
 
109
113
  _initializerDefineProperty(this, "created_at", _descriptor17, this);
114
+
115
+ _initializerDefineProperty(this, "updated_at", _descriptor18, this);
110
116
  }
111
117
 
112
118
  generateExpiryDate() {
@@ -268,5 +274,10 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
268
274
  enumerable: true,
269
275
  writable: true,
270
276
  initializer: null
277
+ }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec22], {
278
+ configurable: true,
279
+ enumerable: true,
280
+ writable: true,
281
+ initializer: null
271
282
  })), _class2)) || _class);
272
283
  exports.default = PaymentLink;
@@ -77,10 +77,14 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
77
77
  }), _dec22 = (0, _typeorm.Column)({
78
78
  type: "timestamp with time zone",
79
79
  nullable: true
80
- }), _dec23 = (0, _typeorm.CreateDateColumn)(), _dec24 = (0, _typeorm.Column)({
80
+ }), _dec23 = (0, _typeorm.Column)({
81
81
  type: "text",
82
82
  nullable: true
83
- }), _dec25 = (0, _typeorm.UpdateDateColumn)(), _dec(_class = (_class2 = class Transaction {
83
+ }), _dec24 = (0, _typeorm.CreateDateColumn)({
84
+ type: 'timestamp with time zone'
85
+ }), _dec25 = (0, _typeorm.UpdateDateColumn)({
86
+ type: 'timestamp with time zone'
87
+ }), _dec(_class = (_class2 = class Transaction {
84
88
  constructor() {
85
89
  _initializerDefineProperty(this, "id", _descriptor, this);
86
90
 
@@ -108,9 +112,9 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
108
112
 
109
113
  _initializerDefineProperty(this, "completed_at", _descriptor13, this);
110
114
 
111
- _initializerDefineProperty(this, "created_at", _descriptor14, this);
115
+ _initializerDefineProperty(this, "message", _descriptor14, this);
112
116
 
113
- _initializerDefineProperty(this, "message", _descriptor15, this);
117
+ _initializerDefineProperty(this, "created_at", _descriptor15, this);
114
118
 
115
119
  _initializerDefineProperty(this, "updated_at", _descriptor16, this);
116
120
  }
@@ -230,12 +234,12 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
230
234
  enumerable: true,
231
235
  writable: true,
232
236
  initializer: null
233
- }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec23], {
237
+ }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec23], {
234
238
  configurable: true,
235
239
  enumerable: true,
236
240
  writable: true,
237
241
  initializer: null
238
- }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec24], {
242
+ }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec24], {
239
243
  configurable: true,
240
244
  enumerable: true,
241
245
  writable: true,
@@ -11,7 +11,7 @@ var _transactionEventType = _interopRequireDefault(require("../transaction-event
11
11
 
12
12
  var _transaction = _interopRequireDefault(require("../transaction"));
13
13
 
14
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
@@ -30,7 +30,11 @@ let TransactionEvent = (_dec = (0, _typeorm.Entity)({
30
30
  }), _dec5 = (0, _typeorm.ManyToOne)(() => _transactionEventType.default), _dec6 = (0, _typeorm.JoinColumn)({
31
31
  name: 'event_type_id',
32
32
  referencedColumnName: 'id'
33
- }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionEvent {
33
+ }), _dec7 = (0, _typeorm.CreateDateColumn)({
34
+ type: 'timestamp with time zone'
35
+ }), _dec8 = (0, _typeorm.UpdateDateColumn)({
36
+ type: 'timestamp with time zone'
37
+ }), _dec(_class = (_class2 = class TransactionEvent {
34
38
  constructor() {
35
39
  _initializerDefineProperty(this, "id", _descriptor, this);
36
40
 
@@ -39,6 +43,8 @@ let TransactionEvent = (_dec = (0, _typeorm.Entity)({
39
43
  _initializerDefineProperty(this, "event_type", _descriptor3, this);
40
44
 
41
45
  _initializerDefineProperty(this, "created_at", _descriptor4, this);
46
+
47
+ _initializerDefineProperty(this, "updated_at", _descriptor5, this);
42
48
  }
43
49
 
44
50
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -67,5 +73,10 @@ let TransactionEvent = (_dec = (0, _typeorm.Entity)({
67
73
  enumerable: true,
68
74
  writable: true,
69
75
  initializer: null
76
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec8], {
77
+ configurable: true,
78
+ enumerable: true,
79
+ writable: true,
80
+ initializer: null
70
81
  })), _class2)) || _class);
71
82
  exports.default = TransactionEvent;
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
11
11
 
12
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
13
 
@@ -18,11 +18,17 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
18
  let TransactionEventType = (_dec = (0, _typeorm.Entity)({
19
19
  name: 'transaction_event_type',
20
20
  schema: 'payment'
21
- }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionEventType {
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)({
22
+ type: 'timestamp with time zone'
23
+ }), _dec4 = (0, _typeorm.UpdateDateColumn)({
24
+ type: 'timestamp with time zone'
25
+ }), _dec(_class = (_class2 = class TransactionEventType {
22
26
  constructor() {
23
27
  _initializerDefineProperty(this, "id", _descriptor, this);
24
28
 
25
29
  _initializerDefineProperty(this, "created_at", _descriptor2, this);
30
+
31
+ _initializerDefineProperty(this, "updated_at", _descriptor3, this);
26
32
  }
27
33
 
28
34
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -35,5 +41,10 @@ let TransactionEventType = (_dec = (0, _typeorm.Entity)({
35
41
  enumerable: true,
36
42
  writable: true,
37
43
  initializer: null
44
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec4], {
45
+ configurable: true,
46
+ enumerable: true,
47
+ writable: true,
48
+ initializer: null
38
49
  })), _class2)) || _class);
39
50
  exports.default = TransactionEventType;
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
9
9
 
10
10
  var _transaction = _interopRequireDefault(require("../transaction"));
11
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;
12
+ 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, _descriptor11;
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
@@ -59,7 +59,11 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
59
59
  type: "varchar",
60
60
  nullable: true,
61
61
  length: 150
62
- }), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionMetadata {
62
+ }), _dec12 = (0, _typeorm.CreateDateColumn)({
63
+ type: 'timestamp with time zone'
64
+ }), _dec13 = (0, _typeorm.UpdateDateColumn)({
65
+ type: 'timestamp with time zone'
66
+ }), _dec(_class = (_class2 = class TransactionMetadata {
63
67
  constructor() {
64
68
  _initializerDefineProperty(this, "transaction", _descriptor, this);
65
69
 
@@ -80,6 +84,8 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
80
84
  _initializerDefineProperty(this, "cardholder_name", _descriptor9, this);
81
85
 
82
86
  _initializerDefineProperty(this, "created_at", _descriptor10, this);
87
+
88
+ _initializerDefineProperty(this, "updated_at", _descriptor11, this);
83
89
  }
84
90
 
85
91
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
@@ -134,5 +140,10 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
134
140
  enumerable: true,
135
141
  writable: true,
136
142
  initializer: null
143
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
144
+ configurable: true,
145
+ enumerable: true,
146
+ writable: true,
147
+ initializer: null
137
148
  })), _class2)) || _class);
138
149
  exports.default = TransactionMetadata;
@@ -0,0 +1,283 @@
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, _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, _descriptor20, _descriptor21, _descriptor22, _descriptor23;
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 ABTAMembers = (_dec = (0, _typeorm.Entity)({
19
+ name: 'abta_members',
20
+ schema: 'scratch'
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
22
+ type: "varchar",
23
+ length: "250",
24
+ nullable: true
25
+ }), _dec4 = (0, _typeorm.Column)({
26
+ type: "varchar",
27
+ length: "250",
28
+ nullable: true
29
+ }), _dec5 = (0, _typeorm.Column)({
30
+ type: "varchar",
31
+ length: "250",
32
+ nullable: true
33
+ }), _dec6 = (0, _typeorm.Column)({
34
+ type: "varchar",
35
+ length: "250",
36
+ nullable: true
37
+ }), _dec7 = (0, _typeorm.Column)({
38
+ type: "varchar",
39
+ length: "250",
40
+ nullable: true
41
+ }), _dec8 = (0, _typeorm.Column)({
42
+ type: "varchar",
43
+ length: "250",
44
+ nullable: true
45
+ }), _dec9 = (0, _typeorm.Column)({
46
+ type: "varchar",
47
+ length: "20",
48
+ nullable: true
49
+ }), _dec10 = (0, _typeorm.Column)({
50
+ type: "varchar",
51
+ length: "100",
52
+ nullable: true
53
+ }), _dec11 = (0, _typeorm.Column)({
54
+ type: "varchar",
55
+ length: "50",
56
+ nullable: true
57
+ }), _dec12 = (0, _typeorm.Column)('json', {
58
+ nullable: true
59
+ }), _dec13 = (0, _typeorm.Column)({
60
+ type: "varchar",
61
+ length: "150",
62
+ nullable: true
63
+ }), _dec14 = (0, _typeorm.Column)({
64
+ type: "varchar",
65
+ length: "150",
66
+ nullable: true
67
+ }), _dec15 = (0, _typeorm.Column)({
68
+ type: "varchar",
69
+ length: "50",
70
+ nullable: true
71
+ }), _dec16 = (0, _typeorm.Column)({
72
+ type: "varchar",
73
+ length: "250",
74
+ nullable: true
75
+ }), _dec17 = (0, _typeorm.Column)({
76
+ type: "int",
77
+ nullable: true
78
+ }), _dec18 = (0, _typeorm.Column)('json', {
79
+ nullable: true
80
+ }), _dec19 = (0, _typeorm.Column)({
81
+ type: "int",
82
+ nullable: true
83
+ }), _dec20 = (0, _typeorm.Column)({
84
+ type: "int",
85
+ nullable: true
86
+ }), _dec21 = (0, _typeorm.Column)({
87
+ type: "int",
88
+ nullable: true
89
+ }), _dec22 = (0, _typeorm.Column)({
90
+ type: "int",
91
+ nullable: true
92
+ }), _dec23 = (0, _typeorm.Column)({
93
+ type: "int",
94
+ nullable: true
95
+ }), _dec24 = (0, _typeorm.Column)({
96
+ type: "int",
97
+ nullable: true
98
+ }), _dec(_class = (_class2 = class ABTAMembers {
99
+ constructor() {
100
+ _initializerDefineProperty(this, "id", _descriptor, this);
101
+
102
+ _initializerDefineProperty(this, "company_name", _descriptor2, this);
103
+
104
+ _initializerDefineProperty(this, "company_number", _descriptor3, this);
105
+
106
+ _initializerDefineProperty(this, "address_1", _descriptor4, this);
107
+
108
+ _initializerDefineProperty(this, "address_2", _descriptor5, this);
109
+
110
+ _initializerDefineProperty(this, "address_3", _descriptor6, this);
111
+
112
+ _initializerDefineProperty(this, "city", _descriptor7, this);
113
+
114
+ _initializerDefineProperty(this, "postcode", _descriptor8, this);
115
+
116
+ _initializerDefineProperty(this, "website", _descriptor9, this);
117
+
118
+ _initializerDefineProperty(this, "telephone", _descriptor10, this);
119
+
120
+ _initializerDefineProperty(this, "abta_number", _descriptor11, this);
121
+
122
+ _initializerDefineProperty(this, "atol_number", _descriptor12, this);
123
+
124
+ _initializerDefineProperty(this, "group", _descriptor13, this);
125
+
126
+ _initializerDefineProperty(this, "tta_id", _descriptor14, this);
127
+
128
+ _initializerDefineProperty(this, "email", _descriptor15, this);
129
+
130
+ _initializerDefineProperty(this, "atol_volume", _descriptor16, this);
131
+
132
+ _initializerDefineProperty(this, "brands", _descriptor17, this);
133
+
134
+ _initializerDefineProperty(this, "totalAssets", _descriptor18, this);
135
+
136
+ _initializerDefineProperty(this, "netWorth", _descriptor19, this);
137
+
138
+ _initializerDefineProperty(this, "totalLiabilities", _descriptor20, this);
139
+
140
+ _initializerDefineProperty(this, "turnover", _descriptor21, this);
141
+
142
+ _initializerDefineProperty(this, "grossProfit", _descriptor22, this);
143
+
144
+ _initializerDefineProperty(this, "numberOfEmployees", _descriptor23, this);
145
+ }
146
+
147
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
148
+ configurable: true,
149
+ enumerable: true,
150
+ writable: true,
151
+ initializer: function () {
152
+ return undefined;
153
+ }
154
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "company_name", [_dec3], {
155
+ configurable: true,
156
+ enumerable: true,
157
+ writable: true,
158
+ initializer: function () {
159
+ return "";
160
+ }
161
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "company_number", [_dec4], {
162
+ configurable: true,
163
+ enumerable: true,
164
+ writable: true,
165
+ initializer: function () {
166
+ return "";
167
+ }
168
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "address_1", [_dec5], {
169
+ configurable: true,
170
+ enumerable: true,
171
+ writable: true,
172
+ initializer: function () {
173
+ return "";
174
+ }
175
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "address_2", [_dec6], {
176
+ configurable: true,
177
+ enumerable: true,
178
+ writable: true,
179
+ initializer: function () {
180
+ return "";
181
+ }
182
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "address_3", [_dec7], {
183
+ configurable: true,
184
+ enumerable: true,
185
+ writable: true,
186
+ initializer: function () {
187
+ return "";
188
+ }
189
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "city", [_dec8], {
190
+ configurable: true,
191
+ enumerable: true,
192
+ writable: true,
193
+ initializer: function () {
194
+ return "";
195
+ }
196
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "postcode", [_dec9], {
197
+ configurable: true,
198
+ enumerable: true,
199
+ writable: true,
200
+ initializer: function () {
201
+ return "";
202
+ }
203
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "website", [_dec10], {
204
+ configurable: true,
205
+ enumerable: true,
206
+ writable: true,
207
+ initializer: function () {
208
+ return "";
209
+ }
210
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "telephone", [_dec11], {
211
+ configurable: true,
212
+ enumerable: true,
213
+ writable: true,
214
+ initializer: function () {
215
+ return "";
216
+ }
217
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "abta_number", [_dec12], {
218
+ configurable: true,
219
+ enumerable: true,
220
+ writable: true,
221
+ initializer: null
222
+ }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "atol_number", [_dec13], {
223
+ configurable: true,
224
+ enumerable: true,
225
+ writable: true,
226
+ initializer: null
227
+ }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "group", [_dec14], {
228
+ configurable: true,
229
+ enumerable: true,
230
+ writable: true,
231
+ initializer: null
232
+ }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "tta_id", [_dec15], {
233
+ configurable: true,
234
+ enumerable: true,
235
+ writable: true,
236
+ initializer: null
237
+ }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec16], {
238
+ configurable: true,
239
+ enumerable: true,
240
+ writable: true,
241
+ initializer: null
242
+ }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "atol_volume", [_dec17], {
243
+ configurable: true,
244
+ enumerable: true,
245
+ writable: true,
246
+ initializer: null
247
+ }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "brands", [_dec18], {
248
+ configurable: true,
249
+ enumerable: true,
250
+ writable: true,
251
+ initializer: null
252
+ }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "totalAssets", [_dec19], {
253
+ configurable: true,
254
+ enumerable: true,
255
+ writable: true,
256
+ initializer: null
257
+ }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "netWorth", [_dec20], {
258
+ configurable: true,
259
+ enumerable: true,
260
+ writable: true,
261
+ initializer: null
262
+ }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "totalLiabilities", [_dec21], {
263
+ configurable: true,
264
+ enumerable: true,
265
+ writable: true,
266
+ initializer: null
267
+ }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "turnover", [_dec22], {
268
+ configurable: true,
269
+ enumerable: true,
270
+ writable: true,
271
+ initializer: null
272
+ }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "grossProfit", [_dec23], {
273
+ configurable: true,
274
+ enumerable: true,
275
+ writable: true,
276
+ initializer: null
277
+ }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "numberOfEmployees", [_dec24], {
278
+ configurable: true,
279
+ enumerable: true,
280
+ writable: true,
281
+ initializer: null
282
+ })), _class2)) || _class);
283
+ exports.default = ABTAMembers;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _abtaMembers = _interopRequireDefault(require("./abta-members"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const ENTITIES = [_abtaMembers.default];
13
+ var _default = ENTITIES;
14
+ exports.default = _default;
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
9
9
 
10
10
  var _user = _interopRequireDefault(require("../user"));
11
11
 
12
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
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;
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
@@ -28,7 +28,11 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
28
28
  }), _dec4 = (0, _typeorm.Column)({
29
29
  type: "varchar",
30
30
  length: "150"
31
- }), _dec5 = (0, _typeorm.CreateDateColumn)(), _dec6 = (0, _typeorm.UpdateDateColumn)(), _dec7 = (0, _typeorm.DeleteDateColumn)(), _dec8 = (0, _typeorm.ManyToMany)(() => _user.default, users => users.organisations), _dec9 = (0, _typeorm.JoinTable)({
31
+ }), _dec5 = (0, _typeorm.Column)({
32
+ type: "varchar",
33
+ length: "250",
34
+ nullable: true
35
+ }), _dec6 = (0, _typeorm.CreateDateColumn)(), _dec7 = (0, _typeorm.UpdateDateColumn)(), _dec8 = (0, _typeorm.DeleteDateColumn)(), _dec9 = (0, _typeorm.ManyToMany)(() => _user.default, users => users.organisations), _dec10 = (0, _typeorm.JoinTable)({
32
36
  name: "user_organisation",
33
37
  schema: "user",
34
38
  joinColumn: {
@@ -39,23 +43,25 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
39
43
  name: "user_id",
40
44
  referencedColumnName: "id"
41
45
  }
42
- }), _dec10 = (0, _typeorm.TreeParent)(), _dec11 = (0, _typeorm.TreeChildren)(), _dec(_class = _dec2(_class = (_class2 = class Organisation {
46
+ }), _dec11 = (0, _typeorm.TreeParent)(), _dec12 = (0, _typeorm.TreeChildren)(), _dec(_class = _dec2(_class = (_class2 = class Organisation {
43
47
  constructor() {
44
48
  _initializerDefineProperty(this, "id", _descriptor, this);
45
49
 
46
50
  _initializerDefineProperty(this, "name", _descriptor2, this);
47
51
 
48
- _initializerDefineProperty(this, "created_at", _descriptor3, this);
52
+ _initializerDefineProperty(this, "image", _descriptor3, this);
53
+
54
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
49
55
 
50
- _initializerDefineProperty(this, "updated_at", _descriptor4, this);
56
+ _initializerDefineProperty(this, "updated_at", _descriptor5, this);
51
57
 
52
- _initializerDefineProperty(this, "deleted_at", _descriptor5, this);
58
+ _initializerDefineProperty(this, "deleted_at", _descriptor6, this);
53
59
 
54
- _initializerDefineProperty(this, "users", _descriptor6, this);
60
+ _initializerDefineProperty(this, "users", _descriptor7, this);
55
61
 
56
- _initializerDefineProperty(this, "parent", _descriptor7, this);
62
+ _initializerDefineProperty(this, "parent", _descriptor8, this);
57
63
 
58
- _initializerDefineProperty(this, "children", _descriptor8, this);
64
+ _initializerDefineProperty(this, "children", _descriptor9, this);
59
65
  }
60
66
 
61
67
  propgate(id, name) {
@@ -66,7 +72,8 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
66
72
  getPublicCompactData() {
67
73
  return {
68
74
  id: this.id,
69
- name: this.name
75
+ name: this.name,
76
+ image: this.image
70
77
  };
71
78
  }
72
79
 
@@ -80,32 +87,37 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
80
87
  enumerable: true,
81
88
  writable: true,
82
89
  initializer: null
83
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
90
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "image", [_dec5], {
91
+ configurable: true,
92
+ enumerable: true,
93
+ writable: true,
94
+ initializer: null
95
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
84
96
  configurable: true,
85
97
  enumerable: true,
86
98
  writable: true,
87
99
  initializer: null
88
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec6], {
100
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec7], {
89
101
  configurable: true,
90
102
  enumerable: true,
91
103
  writable: true,
92
104
  initializer: null
93
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec7], {
105
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec8], {
94
106
  configurable: true,
95
107
  enumerable: true,
96
108
  writable: true,
97
109
  initializer: null
98
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "users", [_dec8, _dec9], {
110
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "users", [_dec9, _dec10], {
99
111
  configurable: true,
100
112
  enumerable: true,
101
113
  writable: true,
102
114
  initializer: null
103
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "parent", [_dec10], {
115
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "parent", [_dec11], {
104
116
  configurable: true,
105
117
  enumerable: true,
106
118
  writable: true,
107
119
  initializer: null
108
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "children", [_dec11], {
120
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "children", [_dec12], {
109
121
  configurable: true,
110
122
  enumerable: true,
111
123
  writable: true,
package/dist/index.js CHANGED
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "ABTAMembersEntity", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _abtaMembers.default;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "AccountEntity", {
7
13
  enumerable: true,
8
14
  get: function () {
@@ -374,6 +380,8 @@ var _dependencyInjection = _interopRequireDefault(require("./dependency-injectio
374
380
 
375
381
  var _entity = _interopRequireDefault(require("./entity"));
376
382
 
383
+ var _abtaMembers = _interopRequireDefault(require("./entity/scratch/abta-members"));
384
+
377
385
  var _booking = _interopRequireDefault(require("./entity/agent-data/booking"));
378
386
 
379
387
  var _bookingComponent = _interopRequireDefault(require("./entity/agent-data/booking-component"));
@@ -0,0 +1,49 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class updateToWithTimezones1650974827938 {
4
+ name = 'updateToWithTimezones1650974827938'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
8
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
9
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
10
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
11
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
12
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "created_at"`);
13
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
14
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "created_at"`);
15
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
16
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "created_at"`);
17
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
18
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
19
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
20
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "created_at"`);
21
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
22
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "created_at"`);
23
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
24
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "created_at"`);
25
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
26
+ }
27
+
28
+ async down(queryRunner) {
29
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "created_at"`);
30
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
31
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "created_at"`);
32
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
33
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "created_at"`);
34
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
35
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
36
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIMESTAMP NOT NULL DEFAULT now()`);
37
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "created_at"`);
38
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
39
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "created_at"`);
40
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
41
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "created_at"`);
42
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
43
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "updated_at"`);
44
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "updated_at"`);
45
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "updated_at"`);
46
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "updated_at"`);
47
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "updated_at"`);
48
+ }
49
+ }
@@ -0,0 +1,59 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class updateToWithTimestamp1651050178971 {
4
+ name = 'updateToWithTimestamp1651050178971'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "created_at"`);
8
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
9
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "updated_at"`);
10
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
11
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "created_at"`);
12
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
13
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "updated_at"`);
14
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
15
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "created_at"`);
16
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
17
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
18
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
19
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "created_at"`);
20
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
21
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "updated_at"`);
22
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
23
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "created_at"`);
24
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
25
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "updated_at"`);
26
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
27
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "created_at"`);
28
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
29
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "updated_at"`);
30
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
31
+ }
32
+
33
+ async down(queryRunner) {
34
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "updated_at"`);
35
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
36
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" DROP COLUMN "created_at"`);
37
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
38
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "updated_at"`);
39
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
40
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" DROP COLUMN "created_at"`);
41
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_event_type" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
42
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "updated_at"`);
43
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
44
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "created_at"`);
45
+ await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
46
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
47
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
48
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "created_at"`);
49
+ await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
50
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "updated_at"`);
51
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
52
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "created_at"`);
53
+ await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
54
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "updated_at"`);
55
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "updated_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
56
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "created_at"`);
57
+ await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "created_at" TIME WITH TIME ZONE NOT NULL DEFAULT now()`);
58
+ }
59
+ }
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembers1651181353263 {
4
+ name = 'scratchAbtaMembers1651181353263'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "scratch"."abta_members" ("id" character varying NOT NULL, "company_name" character varying(250), "address_1" character varying(250), "address_2" character varying(250), "address_3" character varying(250), "city" character varying(250), "postcode" character varying(20), "website" character varying(20), "telephone" character varying(20), "abta_number" text array, "brands" text array, CONSTRAINT "PK_ae0535efeb66d199afbb74d48d3" PRIMARY KEY ("id"))`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`DROP TABLE "scratch"."abta_members"`);
12
+ }
13
+ }
@@ -0,0 +1,19 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersFix1651183064044 {
4
+ name = 'scratchAbtaMembersFix1651183064044'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "abta_number"`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "abta_number" json`);
9
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "brands"`);
10
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "brands" json`);
11
+ }
12
+
13
+ async down(queryRunner) {
14
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "brands"`);
15
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "brands" text array`);
16
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "abta_number"`);
17
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "abta_number" text array`);
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersLengthFix1651183188924 {
4
+ name = 'scratchAbtaMembersLengthFix1651183188924'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "website"`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "website" character varying(100)`);
9
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "telephone"`);
10
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "telephone" character varying(50)`);
11
+ }
12
+
13
+ async down(queryRunner) {
14
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "telephone"`);
15
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "telephone" character varying(20)`);
16
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "website"`);
17
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "website" character varying(20)`);
18
+ }
19
+ }
@@ -0,0 +1,23 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersFinancials1651187490208 {
4
+ name = 'scratchAbtaMembersFinancials1651187490208'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "totalAssets" integer`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "netWorth" integer`);
9
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "totalLiabilities" integer`);
10
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "turnover" integer`);
11
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "grossProfit" integer`);
12
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "numberOfEmployees" integer`);
13
+ }
14
+
15
+ async down(queryRunner) {
16
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "numberOfEmployees"`);
17
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "grossProfit"`);
18
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "turnover"`);
19
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "totalLiabilities"`);
20
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "netWorth"`);
21
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "totalAssets"`);
22
+ }
23
+ }
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersCompanyNumber1651223911459 {
4
+ name = 'scratchAbtaMembersCompanyNumber1651223911459'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "company_number" character varying(250)`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "company_number"`);
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersAtol1651225059114 {
4
+ name = 'scratchAbtaMembersAtol1651225059114'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "atol_number" integer`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "atol_volume" integer`);}
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "atol_volume"`);
12
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "atol_number"`);
13
+ }
14
+ }
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersAtolFix1651225316981 {
4
+ name = 'scratchAbtaMembersAtolFix1651225316981'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "atol_number"`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "atol_number" character varying(150)`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "atol_number"`);
13
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "atol_number" integer`);
14
+ }
15
+ }
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersAtolGroup1651241112556 {
4
+ name = 'scratchAbtaMembersAtolGroup1651241112556'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "group" character varying(150)`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "group"`);
12
+ }
13
+ }
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class scratchAbtaMembersAtolTtaId1651241351537 {
4
+ name = 'scratchAbtaMembersAtolTtaId1651241351537'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "tta_id" character varying(50)`);
8
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" ADD "email" character varying(250)`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "email"`);
13
+ await queryRunner.query(`ALTER TABLE "scratch"."abta_members" DROP COLUMN "tta_id"`);
14
+ }
15
+ }
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class organisationImage1651582800086 {
4
+ name = 'organisationImage1651582800086'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "user"."organisation" ADD "image" character varying(250)`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "user"."organisation" DROP COLUMN "image"`);
12
+ }
13
+ }
package/ormconfig.js CHANGED
@@ -20,6 +20,6 @@ module.exports = {
20
20
  __dirname + '/dist/migration/**/*.js'
21
21
  ],
22
22
  "cli": {
23
- "migrationsDir": __dirname + '/src/migration'
23
+ "migrationsDir": __dirname + '/src/migration',
24
24
  },
25
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.1.4",
3
+ "version": "1.1.7",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -14,7 +14,6 @@
14
14
  "orm:migration:run": "rm -rf dist && yarn build:orm && ./node_modules/.bin/typeorm migration:run",
15
15
  "orm:schema:create": "babel-node ./cli/seed/create-schema.js",
16
16
  "orm:revert": "rm -rf dist && yarn build:orm && ./node_modules/.bin/typeorm migration:revert",
17
- "orm:seed": "babel-node ./cli/seed/index.js",
18
17
  "start": "yarn build -w",
19
18
  "test": "jest --coverage"
20
19
  },