@felloh-org/lambda-wrapper 1.0.8 → 1.0.12
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 +3 -1
- package/dist/entity/agent-data/booking-component/index.js +6 -2
- package/dist/entity/agent-data/booking-component-type/index.js +6 -2
- package/dist/entity/agent-data/supplier/index.js +37 -5
- package/dist/entity/agent-data/supplier-type/index.js +6 -2
- package/dist/entity/payment/payment-link/index.js +32 -19
- package/dist/entity/user/user/index.js +41 -27
- package/dist/migration/agent-data/1642771380681-add-supplier-detail.js +17 -0
- package/dist/migration/agent-data/1642771909248-swap-uuid.js +41 -0
- package/dist/migration/payment/1642805897210-payment-link-customer.js +13 -0
- package/dist/migration/user/1643154226214-user-cognito-sub.js +15 -0
- package/dist/migration/user/1643195417761-user-nullable-mobile.js +13 -0
- package/dist/service/warehouse.js +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,8 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
13
13
|
|
|
14
14
|
var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
15
15
|
|
|
16
|
+
var _uuid = require("uuid");
|
|
17
|
+
|
|
16
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;
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -75,7 +77,7 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
75
77
|
enumerable: true,
|
|
76
78
|
writable: true,
|
|
77
79
|
initializer: function () {
|
|
78
|
-
return
|
|
80
|
+
return (0, _uuid.v4)();
|
|
79
81
|
}
|
|
80
82
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec3], {
|
|
81
83
|
configurable: true,
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
|
+
|
|
10
12
|
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
13
|
|
|
12
14
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
@@ -18,7 +20,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
20
|
let BookingComponent = (_dec = (0, _typeorm.Entity)({
|
|
19
21
|
name: 'booking_component',
|
|
20
22
|
schema: 'agent_data'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
23
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BookingComponent {
|
|
22
24
|
constructor() {
|
|
23
25
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
26
|
|
|
@@ -29,7 +31,9 @@ let BookingComponent = (_dec = (0, _typeorm.Entity)({
|
|
|
29
31
|
configurable: true,
|
|
30
32
|
enumerable: true,
|
|
31
33
|
writable: true,
|
|
32
|
-
initializer:
|
|
34
|
+
initializer: function () {
|
|
35
|
+
return (0, _uuid.v4)();
|
|
36
|
+
}
|
|
33
37
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
38
|
configurable: true,
|
|
35
39
|
enumerable: true,
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
|
+
|
|
10
12
|
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
13
|
|
|
12
14
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
@@ -18,7 +20,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
20
|
let BookingComponentType = (_dec = (0, _typeorm.Entity)({
|
|
19
21
|
name: 'booking_component_type',
|
|
20
22
|
schema: 'agent_data'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
23
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BookingComponentType {
|
|
22
24
|
constructor() {
|
|
23
25
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
26
|
|
|
@@ -29,7 +31,9 @@ let BookingComponentType = (_dec = (0, _typeorm.Entity)({
|
|
|
29
31
|
configurable: true,
|
|
30
32
|
enumerable: true,
|
|
31
33
|
writable: true,
|
|
32
|
-
initializer:
|
|
34
|
+
initializer: function () {
|
|
35
|
+
return (0, _uuid.v4)();
|
|
36
|
+
}
|
|
33
37
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
38
|
configurable: true,
|
|
35
39
|
enumerable: true,
|
|
@@ -7,7 +7,13 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
|
+
|
|
12
|
+
var _uuid = require("uuid");
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
17
|
|
|
12
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 }); }
|
|
13
19
|
|
|
@@ -18,19 +24,45 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
24
|
let Supplier = (_dec = (0, _typeorm.Entity)({
|
|
19
25
|
name: 'supplier',
|
|
20
26
|
schema: 'agent_data'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
28
|
+
name: 'organisation_id',
|
|
29
|
+
referencedColumnName: 'id'
|
|
30
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
31
|
+
type: "varchar",
|
|
32
|
+
length: "150"
|
|
33
|
+
}), _dec6 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Supplier {
|
|
22
34
|
constructor() {
|
|
23
35
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
36
|
|
|
25
|
-
_initializerDefineProperty(this, "
|
|
37
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
38
|
+
|
|
39
|
+
_initializerDefineProperty(this, "name", _descriptor3, this);
|
|
40
|
+
|
|
41
|
+
_initializerDefineProperty(this, "created_at", _descriptor4, this);
|
|
26
42
|
}
|
|
27
43
|
|
|
28
44
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
45
|
configurable: true,
|
|
30
46
|
enumerable: true,
|
|
31
47
|
writable: true,
|
|
32
|
-
initializer:
|
|
33
|
-
|
|
48
|
+
initializer: function () {
|
|
49
|
+
return (0, _uuid.v4)();
|
|
50
|
+
}
|
|
51
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
52
|
+
configurable: true,
|
|
53
|
+
enumerable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
initializer: function () {
|
|
56
|
+
return _organisation.default;
|
|
57
|
+
}
|
|
58
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec5], {
|
|
59
|
+
configurable: true,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
initializer: function () {
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
|
|
34
66
|
configurable: true,
|
|
35
67
|
enumerable: true,
|
|
36
68
|
writable: true,
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
|
+
|
|
10
12
|
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
13
|
|
|
12
14
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
@@ -18,7 +20,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
20
|
let SupplierType = (_dec = (0, _typeorm.Entity)({
|
|
19
21
|
name: 'supplier_type',
|
|
20
22
|
schema: 'agent_data'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
23
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class SupplierType {
|
|
22
24
|
constructor() {
|
|
23
25
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
26
|
|
|
@@ -29,7 +31,9 @@ let SupplierType = (_dec = (0, _typeorm.Entity)({
|
|
|
29
31
|
configurable: true,
|
|
30
32
|
enumerable: true,
|
|
31
33
|
writable: true,
|
|
32
|
-
initializer:
|
|
34
|
+
initializer: function () {
|
|
35
|
+
return (0, _uuid.v4)();
|
|
36
|
+
}
|
|
33
37
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
38
|
configurable: true,
|
|
35
39
|
enumerable: true,
|
|
@@ -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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
|
|
18
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -43,19 +43,23 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
43
43
|
type: "int"
|
|
44
44
|
}), _dec10 = (0, _typeorm.Column)({
|
|
45
45
|
type: "varchar",
|
|
46
|
-
length: "
|
|
46
|
+
length: "150",
|
|
47
|
+
nullable: true
|
|
47
48
|
}), _dec11 = (0, _typeorm.Column)({
|
|
48
49
|
type: "varchar",
|
|
49
|
-
length: "
|
|
50
|
+
length: "250"
|
|
50
51
|
}), _dec12 = (0, _typeorm.Column)({
|
|
51
52
|
type: "varchar",
|
|
52
53
|
length: "200"
|
|
53
54
|
}), _dec13 = (0, _typeorm.Column)({
|
|
54
55
|
type: "varchar",
|
|
55
56
|
length: "200"
|
|
56
|
-
}), _dec14 = (0, _typeorm.
|
|
57
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
58
|
+
type: "varchar",
|
|
59
|
+
length: "200"
|
|
60
|
+
}), _dec15 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec16 = (0, _typeorm.Column)({
|
|
57
61
|
type: "timestamp with time zone"
|
|
58
|
-
}),
|
|
62
|
+
}), _dec17 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
|
|
59
63
|
constructor() {
|
|
60
64
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
61
65
|
|
|
@@ -67,19 +71,21 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
67
71
|
|
|
68
72
|
_initializerDefineProperty(this, "amount", _descriptor5, this);
|
|
69
73
|
|
|
70
|
-
_initializerDefineProperty(this, "
|
|
74
|
+
_initializerDefineProperty(this, "customer_name", _descriptor6, this);
|
|
75
|
+
|
|
76
|
+
_initializerDefineProperty(this, "description", _descriptor7, this);
|
|
71
77
|
|
|
72
|
-
_initializerDefineProperty(this, "success_url",
|
|
78
|
+
_initializerDefineProperty(this, "success_url", _descriptor8, this);
|
|
73
79
|
|
|
74
|
-
_initializerDefineProperty(this, "failure_url",
|
|
80
|
+
_initializerDefineProperty(this, "failure_url", _descriptor9, this);
|
|
75
81
|
|
|
76
|
-
_initializerDefineProperty(this, "cancel_url",
|
|
82
|
+
_initializerDefineProperty(this, "cancel_url", _descriptor10, this);
|
|
77
83
|
|
|
78
|
-
_initializerDefineProperty(this, "transactions",
|
|
84
|
+
_initializerDefineProperty(this, "transactions", _descriptor11, this);
|
|
79
85
|
|
|
80
|
-
_initializerDefineProperty(this, "expires_at",
|
|
86
|
+
_initializerDefineProperty(this, "expires_at", _descriptor12, this);
|
|
81
87
|
|
|
82
|
-
_initializerDefineProperty(this, "created_at",
|
|
88
|
+
_initializerDefineProperty(this, "created_at", _descriptor13, this);
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
generateExpiryDate() {
|
|
@@ -121,47 +127,54 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
121
127
|
enumerable: true,
|
|
122
128
|
writable: true,
|
|
123
129
|
initializer: null
|
|
124
|
-
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
130
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec10], {
|
|
131
|
+
configurable: true,
|
|
132
|
+
enumerable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
initializer: function () {
|
|
135
|
+
return "";
|
|
136
|
+
}
|
|
137
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec11], {
|
|
125
138
|
configurable: true,
|
|
126
139
|
enumerable: true,
|
|
127
140
|
writable: true,
|
|
128
141
|
initializer: function () {
|
|
129
142
|
return "";
|
|
130
143
|
}
|
|
131
|
-
}),
|
|
144
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "success_url", [_dec12], {
|
|
132
145
|
configurable: true,
|
|
133
146
|
enumerable: true,
|
|
134
147
|
writable: true,
|
|
135
148
|
initializer: function () {
|
|
136
149
|
return "";
|
|
137
150
|
}
|
|
138
|
-
}),
|
|
151
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "failure_url", [_dec13], {
|
|
139
152
|
configurable: true,
|
|
140
153
|
enumerable: true,
|
|
141
154
|
writable: true,
|
|
142
155
|
initializer: function () {
|
|
143
156
|
return "";
|
|
144
157
|
}
|
|
145
|
-
}),
|
|
158
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "cancel_url", [_dec14], {
|
|
146
159
|
configurable: true,
|
|
147
160
|
enumerable: true,
|
|
148
161
|
writable: true,
|
|
149
162
|
initializer: function () {
|
|
150
163
|
return "";
|
|
151
164
|
}
|
|
152
|
-
}),
|
|
165
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec15], {
|
|
153
166
|
configurable: true,
|
|
154
167
|
enumerable: true,
|
|
155
168
|
writable: true,
|
|
156
169
|
initializer: null
|
|
157
|
-
}),
|
|
170
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec16], {
|
|
158
171
|
configurable: true,
|
|
159
172
|
enumerable: true,
|
|
160
173
|
writable: true,
|
|
161
174
|
initializer: function () {
|
|
162
175
|
return this.generateExpiryDate();
|
|
163
176
|
}
|
|
164
|
-
}),
|
|
177
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec17], {
|
|
165
178
|
configurable: true,
|
|
166
179
|
enumerable: true,
|
|
167
180
|
writable: true,
|
|
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _organisation = _interopRequireDefault(require("../organisation"));
|
|
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, _dec14, _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
|
|
|
@@ -29,24 +29,29 @@ exports.USER_STATUS = USER_STATUS;
|
|
|
29
29
|
let User = (_dec = (0, _typeorm.Entity)({
|
|
30
30
|
name: 'user',
|
|
31
31
|
schema: 'user'
|
|
32
|
-
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
32
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Index)(), _dec4 = (0, _typeorm.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: "36",
|
|
35
|
+
nullable: true
|
|
36
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
33
37
|
type: "varchar",
|
|
34
38
|
length: "150"
|
|
35
|
-
}),
|
|
39
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
36
40
|
type: "varchar",
|
|
37
|
-
length: "50"
|
|
38
|
-
|
|
41
|
+
length: "50",
|
|
42
|
+
nullable: true
|
|
43
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
39
44
|
type: "varchar",
|
|
40
45
|
length: "20"
|
|
41
|
-
}),
|
|
46
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
42
47
|
type: "varchar",
|
|
43
48
|
length: "50"
|
|
44
|
-
}),
|
|
49
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
45
50
|
type: "varchar",
|
|
46
51
|
length: "50"
|
|
47
|
-
}),
|
|
52
|
+
}), _dec10 = (0, _typeorm.CreateDateColumn)(), _dec11 = (0, _typeorm.UpdateDateColumn)(), _dec12 = (0, _typeorm.DeleteDateColumn)(), _dec13 = (0, _typeorm.ManyToMany)(() => _organisation.default, organisation => organisation.users, {
|
|
48
53
|
cascade: true
|
|
49
|
-
}),
|
|
54
|
+
}), _dec14 = (0, _typeorm.JoinTable)({
|
|
50
55
|
name: "user_organisation",
|
|
51
56
|
schema: "user",
|
|
52
57
|
joinColumn: {
|
|
@@ -61,23 +66,25 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
61
66
|
constructor() {
|
|
62
67
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
63
68
|
|
|
64
|
-
_initializerDefineProperty(this, "
|
|
69
|
+
_initializerDefineProperty(this, "cognito_sub", _descriptor2, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "email", _descriptor3, this);
|
|
65
72
|
|
|
66
|
-
_initializerDefineProperty(this, "mobile",
|
|
73
|
+
_initializerDefineProperty(this, "mobile", _descriptor4, this);
|
|
67
74
|
|
|
68
|
-
_initializerDefineProperty(this, "status",
|
|
75
|
+
_initializerDefineProperty(this, "status", _descriptor5, this);
|
|
69
76
|
|
|
70
|
-
_initializerDefineProperty(this, "first_name",
|
|
77
|
+
_initializerDefineProperty(this, "first_name", _descriptor6, this);
|
|
71
78
|
|
|
72
|
-
_initializerDefineProperty(this, "last_name",
|
|
79
|
+
_initializerDefineProperty(this, "last_name", _descriptor7, this);
|
|
73
80
|
|
|
74
|
-
_initializerDefineProperty(this, "created_at",
|
|
81
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
75
82
|
|
|
76
|
-
_initializerDefineProperty(this, "updated_at",
|
|
83
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
77
84
|
|
|
78
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
85
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor10, this);
|
|
79
86
|
|
|
80
|
-
_initializerDefineProperty(this, "organisations",
|
|
87
|
+
_initializerDefineProperty(this, "organisations", _descriptor11, this);
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
propgate(email, mobile, status, firstName, lastName) {
|
|
@@ -95,57 +102,64 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
95
102
|
initializer: function () {
|
|
96
103
|
return undefined;
|
|
97
104
|
}
|
|
98
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
105
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "cognito_sub", [_dec3, _dec4], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: function () {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec5], {
|
|
99
113
|
configurable: true,
|
|
100
114
|
enumerable: true,
|
|
101
115
|
writable: true,
|
|
102
116
|
initializer: function () {
|
|
103
117
|
return "";
|
|
104
118
|
}
|
|
105
|
-
}),
|
|
119
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "mobile", [_dec6], {
|
|
106
120
|
configurable: true,
|
|
107
121
|
enumerable: true,
|
|
108
122
|
writable: true,
|
|
109
123
|
initializer: function () {
|
|
110
124
|
return "";
|
|
111
125
|
}
|
|
112
|
-
}),
|
|
126
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec7], {
|
|
113
127
|
configurable: true,
|
|
114
128
|
enumerable: true,
|
|
115
129
|
writable: true,
|
|
116
130
|
initializer: function () {
|
|
117
131
|
return "";
|
|
118
132
|
}
|
|
119
|
-
}),
|
|
133
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "first_name", [_dec8], {
|
|
120
134
|
configurable: true,
|
|
121
135
|
enumerable: true,
|
|
122
136
|
writable: true,
|
|
123
137
|
initializer: function () {
|
|
124
138
|
return "";
|
|
125
139
|
}
|
|
126
|
-
}),
|
|
140
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "last_name", [_dec9], {
|
|
127
141
|
configurable: true,
|
|
128
142
|
enumerable: true,
|
|
129
143
|
writable: true,
|
|
130
144
|
initializer: function () {
|
|
131
145
|
return "";
|
|
132
146
|
}
|
|
133
|
-
}),
|
|
147
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
|
|
134
148
|
configurable: true,
|
|
135
149
|
enumerable: true,
|
|
136
150
|
writable: true,
|
|
137
151
|
initializer: null
|
|
138
|
-
}),
|
|
152
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec11], {
|
|
139
153
|
configurable: true,
|
|
140
154
|
enumerable: true,
|
|
141
155
|
writable: true,
|
|
142
156
|
initializer: null
|
|
143
|
-
}),
|
|
157
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec12], {
|
|
144
158
|
configurable: true,
|
|
145
159
|
enumerable: true,
|
|
146
160
|
writable: true,
|
|
147
161
|
initializer: null
|
|
148
|
-
}),
|
|
162
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "organisations", [_dec13, _dec14], {
|
|
149
163
|
configurable: true,
|
|
150
164
|
enumerable: true,
|
|
151
165
|
writable: true,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class addSupplierDetail1642771380681 {
|
|
4
|
+
name = 'addSupplierDetail1642771380681'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD "name" character varying(150) NOT NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD "organisation_id" character varying(150)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD CONSTRAINT "FK_4b0eb422429dfbe15daa42def90" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP CONSTRAINT "FK_4b0eb422429dfbe15daa42def90"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP COLUMN "organisation_id"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP COLUMN "name"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class swapUuid1642771909248 {
|
|
4
|
+
name = 'swapUuid1642771909248'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" DROP CONSTRAINT "PK_31c60e2f5eb5eb274efbf1551cb"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" DROP COLUMN "id"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" ADD "id" character varying NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" ADD CONSTRAINT "PK_31c60e2f5eb5eb274efbf1551cb" PRIMARY KEY ("id")`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" DROP CONSTRAINT "PK_fde413f2d9d1e1377876431efaa"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" DROP COLUMN "id"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" ADD "id" character varying NOT NULL`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" ADD CONSTRAINT "PK_fde413f2d9d1e1377876431efaa" PRIMARY KEY ("id")`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP COLUMN "id"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD "id" character varying NOT NULL`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD CONSTRAINT "PK_2bc0d2cab6276144d2ff98a2828" PRIMARY KEY ("id")`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" DROP COLUMN "id"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" ADD "id" character varying NOT NULL`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" ADD CONSTRAINT "PK_682cd6e0ba8042baeb545fc12c7" PRIMARY KEY ("id")`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async down(queryRunner) {
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" DROP CONSTRAINT "PK_682cd6e0ba8042baeb545fc12c7"`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" DROP COLUMN "id"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier_type" ADD CONSTRAINT "PK_682cd6e0ba8042baeb545fc12c7" PRIMARY KEY ("id")`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP CONSTRAINT "PK_2bc0d2cab6276144d2ff98a2828"`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" DROP COLUMN "id"`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."supplier" ADD CONSTRAINT "PK_2bc0d2cab6276144d2ff98a2828" PRIMARY KEY ("id")`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" DROP CONSTRAINT "PK_fde413f2d9d1e1377876431efaa"`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" DROP COLUMN "id"`);
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component" ADD CONSTRAINT "PK_fde413f2d9d1e1377876431efaa" PRIMARY KEY ("id")`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" DROP CONSTRAINT "PK_31c60e2f5eb5eb274efbf1551cb"`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" DROP COLUMN "id"`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking_component_type" ADD CONSTRAINT "PK_31c60e2f5eb5eb274efbf1551cb" PRIMARY KEY ("id")`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkCustomer1642805897210 {
|
|
4
|
+
name = 'paymentLinkCustomer1642805897210'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "customer_name" character varying(150)`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "customer_name"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class userCognitoSub1643154226214 {
|
|
4
|
+
name = 'userCognitoSub1643154226214'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user" ADD "cognito_sub" character varying(36)`);
|
|
8
|
+
await queryRunner.query(`CREATE INDEX "IDX_1e75d2289be8e3905810ff9b10" ON "user"."user" ("cognito_sub") `);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_1e75d2289be8e3905810ff9b10"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "user"."user_role" ALTER COLUMN "user_id" SET NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class userNullableMobile1643195417761 {
|
|
4
|
+
name = 'userNullableMobile1643195417761'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user" ALTER COLUMN "mobile" DROP NOT NULL`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "user"."user" ALTER COLUMN "mobile" SET NOT NULL`);
|
|
12
|
+
}
|
|
13
|
+
}
|