@felloh-org/lambda-wrapper 1.11.8 → 1.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entity/payment/customer/index.js +166 -0
- package/dist/entity/payment/ecommerce/index.js +68 -48
- package/dist/entity/payment/index.js +3 -1
- package/dist/entity/payment/payment-link/index.js +86 -66
- package/dist/entity/total-processing/transaction/index.js +2 -1
- package/dist/index.js +10 -2
- package/dist/migration/payment/1689673317316-customer_entity.js +21 -0
- package/dist/migration/total-processing/1689161863334-total_nullable_merchant_account_number.js +12 -0
- package/package.json +1 -1
- /package/dist/migration/{1688040388864-org_billing_enabled.js → user/1688040388864-org_billing_enabled.js} +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
|
|
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 Customer = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'customer',
|
|
20
|
+
schema: 'payment'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "150",
|
|
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: "250",
|
|
48
|
+
nullable: true
|
|
49
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
50
|
+
type: "varchar",
|
|
51
|
+
length: "250",
|
|
52
|
+
nullable: true
|
|
53
|
+
}), _dec11 = (0, _typeorm.CreateDateColumn)({
|
|
54
|
+
type: 'timestamp with time zone'
|
|
55
|
+
}), _dec12 = (0, _typeorm.UpdateDateColumn)({
|
|
56
|
+
type: 'timestamp with time zone'
|
|
57
|
+
}), _dec13 = (0, _typeorm.DeleteDateColumn)({
|
|
58
|
+
type: 'timestamp with time zone',
|
|
59
|
+
nullable: true
|
|
60
|
+
}), _dec(_class = (_class2 = class Customer {
|
|
61
|
+
constructor() {
|
|
62
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
63
|
+
|
|
64
|
+
_initializerDefineProperty(this, "customer_name", _descriptor2, this);
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(this, "email", _descriptor3, this);
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(this, "address_1", _descriptor4, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "address_2", _descriptor5, this);
|
|
71
|
+
|
|
72
|
+
_initializerDefineProperty(this, "city", _descriptor6, this);
|
|
73
|
+
|
|
74
|
+
_initializerDefineProperty(this, "county", _descriptor7, this);
|
|
75
|
+
|
|
76
|
+
_initializerDefineProperty(this, "country", _descriptor8, this);
|
|
77
|
+
|
|
78
|
+
_initializerDefineProperty(this, "post_code", _descriptor9, this);
|
|
79
|
+
|
|
80
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
81
|
+
|
|
82
|
+
_initializerDefineProperty(this, "updated_at", _descriptor11, this);
|
|
83
|
+
|
|
84
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor12, this);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
88
|
+
configurable: true,
|
|
89
|
+
enumerable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
initializer: function () {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec3], {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
initializer: function () {
|
|
99
|
+
return "";
|
|
100
|
+
}
|
|
101
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec4], {
|
|
102
|
+
configurable: true,
|
|
103
|
+
enumerable: true,
|
|
104
|
+
writable: true,
|
|
105
|
+
initializer: function () {
|
|
106
|
+
return "";
|
|
107
|
+
}
|
|
108
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "address_1", [_dec5], {
|
|
109
|
+
configurable: true,
|
|
110
|
+
enumerable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
initializer: function () {
|
|
113
|
+
return "";
|
|
114
|
+
}
|
|
115
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "address_2", [_dec6], {
|
|
116
|
+
configurable: true,
|
|
117
|
+
enumerable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
initializer: function () {
|
|
120
|
+
return "";
|
|
121
|
+
}
|
|
122
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "city", [_dec7], {
|
|
123
|
+
configurable: true,
|
|
124
|
+
enumerable: true,
|
|
125
|
+
writable: true,
|
|
126
|
+
initializer: function () {
|
|
127
|
+
return "";
|
|
128
|
+
}
|
|
129
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "county", [_dec8], {
|
|
130
|
+
configurable: true,
|
|
131
|
+
enumerable: true,
|
|
132
|
+
writable: true,
|
|
133
|
+
initializer: function () {
|
|
134
|
+
return "";
|
|
135
|
+
}
|
|
136
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "country", [_dec9], {
|
|
137
|
+
configurable: true,
|
|
138
|
+
enumerable: true,
|
|
139
|
+
writable: true,
|
|
140
|
+
initializer: function () {
|
|
141
|
+
return "";
|
|
142
|
+
}
|
|
143
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "post_code", [_dec10], {
|
|
144
|
+
configurable: true,
|
|
145
|
+
enumerable: true,
|
|
146
|
+
writable: true,
|
|
147
|
+
initializer: function () {
|
|
148
|
+
return "";
|
|
149
|
+
}
|
|
150
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec11], {
|
|
151
|
+
configurable: true,
|
|
152
|
+
enumerable: true,
|
|
153
|
+
writable: true,
|
|
154
|
+
initializer: null
|
|
155
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec12], {
|
|
156
|
+
configurable: true,
|
|
157
|
+
enumerable: true,
|
|
158
|
+
writable: true,
|
|
159
|
+
initializer: null
|
|
160
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec13], {
|
|
161
|
+
configurable: true,
|
|
162
|
+
enumerable: true,
|
|
163
|
+
writable: true,
|
|
164
|
+
initializer: null
|
|
165
|
+
})), _class2)) || _class);
|
|
166
|
+
exports.default = Customer;
|
|
@@ -17,7 +17,9 @@ var _transaction = _interopRequireDefault(require("../transaction"));
|
|
|
17
17
|
|
|
18
18
|
var _currency = require("../../bank/currency");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _customer = _interopRequireDefault(require("../customer"));
|
|
21
|
+
|
|
22
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -35,49 +37,54 @@ let Ecommerce = (_dec = (0, _typeorm.Entity)({
|
|
|
35
37
|
}), _dec4 = (0, _typeorm.JoinColumn)({
|
|
36
38
|
name: 'booking_id',
|
|
37
39
|
referencedColumnName: 'id'
|
|
38
|
-
}), _dec5 = (0, _typeorm.ManyToOne)(() =>
|
|
40
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _customer.default, {
|
|
41
|
+
nullable: true
|
|
42
|
+
}), _dec6 = (0, _typeorm.JoinColumn)({
|
|
43
|
+
name: 'customer_id',
|
|
44
|
+
referencedColumnName: 'id'
|
|
45
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _user.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
39
46
|
name: 'user_id',
|
|
40
47
|
referencedColumnName: 'id'
|
|
41
|
-
}),
|
|
48
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
42
49
|
name: 'organisation_id',
|
|
43
50
|
referencedColumnName: 'id'
|
|
44
|
-
}),
|
|
51
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
45
52
|
type: "int"
|
|
46
|
-
}),
|
|
53
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
47
54
|
type: "varchar",
|
|
48
55
|
length: "150",
|
|
49
56
|
nullable: true
|
|
50
|
-
}),
|
|
57
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
51
58
|
type: "varchar",
|
|
52
59
|
length: "250",
|
|
53
60
|
nullable: true
|
|
54
|
-
}),
|
|
61
|
+
}), _dec14 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec15 = (0, _typeorm.Column)({
|
|
55
62
|
type: "boolean",
|
|
56
63
|
default: true
|
|
57
|
-
}),
|
|
64
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
58
65
|
type: "boolean",
|
|
59
66
|
default: true
|
|
60
|
-
}),
|
|
67
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
61
68
|
type: "boolean",
|
|
62
69
|
default: false
|
|
63
|
-
}),
|
|
70
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
64
71
|
type: "varchar",
|
|
65
72
|
length: "3",
|
|
66
73
|
default: _currency.DEFAULT_CURRENCY
|
|
67
|
-
}),
|
|
74
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
68
75
|
type: "timestamp with time zone"
|
|
69
|
-
}),
|
|
76
|
+
}), _dec20 = (0, _typeorm.Column)({
|
|
70
77
|
type: "varchar",
|
|
71
78
|
length: "50",
|
|
72
79
|
default: 'active'
|
|
73
|
-
}),
|
|
80
|
+
}), _dec21 = (0, _typeorm.CreateDateColumn)({
|
|
74
81
|
type: 'timestamp with time zone'
|
|
75
|
-
}),
|
|
82
|
+
}), _dec22 = (0, _typeorm.UpdateDateColumn)({
|
|
76
83
|
type: 'timestamp with time zone'
|
|
77
|
-
}),
|
|
84
|
+
}), _dec23 = (0, _typeorm.DeleteDateColumn)({
|
|
78
85
|
type: 'timestamp with time zone',
|
|
79
86
|
nullable: true
|
|
80
|
-
}),
|
|
87
|
+
}), _dec24 = (0, _typeorm.Column)({
|
|
81
88
|
type: "boolean",
|
|
82
89
|
default: false
|
|
83
90
|
}), _dec(_class = (_class2 = class Ecommerce {
|
|
@@ -86,37 +93,39 @@ let Ecommerce = (_dec = (0, _typeorm.Entity)({
|
|
|
86
93
|
|
|
87
94
|
_initializerDefineProperty(this, "booking", _descriptor2, this);
|
|
88
95
|
|
|
89
|
-
_initializerDefineProperty(this, "
|
|
96
|
+
_initializerDefineProperty(this, "customer", _descriptor3, this);
|
|
97
|
+
|
|
98
|
+
_initializerDefineProperty(this, "user", _descriptor4, this);
|
|
90
99
|
|
|
91
|
-
_initializerDefineProperty(this, "organisation",
|
|
100
|
+
_initializerDefineProperty(this, "organisation", _descriptor5, this);
|
|
92
101
|
|
|
93
|
-
_initializerDefineProperty(this, "amount",
|
|
102
|
+
_initializerDefineProperty(this, "amount", _descriptor6, this);
|
|
94
103
|
|
|
95
|
-
_initializerDefineProperty(this, "customer_name",
|
|
104
|
+
_initializerDefineProperty(this, "customer_name", _descriptor7, this);
|
|
96
105
|
|
|
97
|
-
_initializerDefineProperty(this, "email",
|
|
106
|
+
_initializerDefineProperty(this, "email", _descriptor8, this);
|
|
98
107
|
|
|
99
|
-
_initializerDefineProperty(this, "transactions",
|
|
108
|
+
_initializerDefineProperty(this, "transactions", _descriptor9, this);
|
|
100
109
|
|
|
101
|
-
_initializerDefineProperty(this, "open_banking_enabled",
|
|
110
|
+
_initializerDefineProperty(this, "open_banking_enabled", _descriptor10, this);
|
|
102
111
|
|
|
103
|
-
_initializerDefineProperty(this, "card_enabled",
|
|
112
|
+
_initializerDefineProperty(this, "card_enabled", _descriptor11, this);
|
|
104
113
|
|
|
105
|
-
_initializerDefineProperty(this, "moto",
|
|
114
|
+
_initializerDefineProperty(this, "moto", _descriptor12, this);
|
|
106
115
|
|
|
107
|
-
_initializerDefineProperty(this, "currency",
|
|
116
|
+
_initializerDefineProperty(this, "currency", _descriptor13, this);
|
|
108
117
|
|
|
109
|
-
_initializerDefineProperty(this, "expires_at",
|
|
118
|
+
_initializerDefineProperty(this, "expires_at", _descriptor14, this);
|
|
110
119
|
|
|
111
|
-
_initializerDefineProperty(this, "status",
|
|
120
|
+
_initializerDefineProperty(this, "status", _descriptor15, this);
|
|
112
121
|
|
|
113
|
-
_initializerDefineProperty(this, "created_at",
|
|
122
|
+
_initializerDefineProperty(this, "created_at", _descriptor16, this);
|
|
114
123
|
|
|
115
|
-
_initializerDefineProperty(this, "updated_at",
|
|
124
|
+
_initializerDefineProperty(this, "updated_at", _descriptor17, this);
|
|
116
125
|
|
|
117
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
126
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor18, this);
|
|
118
127
|
|
|
119
|
-
_initializerDefineProperty(this, "pre_authorized",
|
|
128
|
+
_initializerDefineProperty(this, "pre_authorized", _descriptor19, this);
|
|
120
129
|
}
|
|
121
130
|
|
|
122
131
|
generateExpiryDate() {
|
|
@@ -147,6 +156,10 @@ let Ecommerce = (_dec = (0, _typeorm.Entity)({
|
|
|
147
156
|
}
|
|
148
157
|
};
|
|
149
158
|
|
|
159
|
+
if (this.customer !== null && typeof this.customer.id !== 'undefined') {
|
|
160
|
+
response.customer = this.customer;
|
|
161
|
+
}
|
|
162
|
+
|
|
150
163
|
if (this.booking !== null && typeof this.booking.id !== 'undefined') {
|
|
151
164
|
response.booking = this.booking.getPublicData();
|
|
152
165
|
}
|
|
@@ -204,96 +217,103 @@ let Ecommerce = (_dec = (0, _typeorm.Entity)({
|
|
|
204
217
|
initializer: function () {
|
|
205
218
|
return _booking.default;
|
|
206
219
|
}
|
|
207
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
220
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec5, _dec6], {
|
|
221
|
+
configurable: true,
|
|
222
|
+
enumerable: true,
|
|
223
|
+
writable: true,
|
|
224
|
+
initializer: function () {
|
|
225
|
+
return _customer.default;
|
|
226
|
+
}
|
|
227
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec7, _dec8], {
|
|
208
228
|
configurable: true,
|
|
209
229
|
enumerable: true,
|
|
210
230
|
writable: true,
|
|
211
231
|
initializer: function () {
|
|
212
232
|
return _user.default;
|
|
213
233
|
}
|
|
214
|
-
}),
|
|
234
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec9, _dec10], {
|
|
215
235
|
configurable: true,
|
|
216
236
|
enumerable: true,
|
|
217
237
|
writable: true,
|
|
218
238
|
initializer: function () {
|
|
219
239
|
return _organisation.default;
|
|
220
240
|
}
|
|
221
|
-
}),
|
|
241
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec11], {
|
|
222
242
|
configurable: true,
|
|
223
243
|
enumerable: true,
|
|
224
244
|
writable: true,
|
|
225
245
|
initializer: null
|
|
226
|
-
}),
|
|
246
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec12], {
|
|
227
247
|
configurable: true,
|
|
228
248
|
enumerable: true,
|
|
229
249
|
writable: true,
|
|
230
250
|
initializer: function () {
|
|
231
251
|
return "";
|
|
232
252
|
}
|
|
233
|
-
}),
|
|
253
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec13], {
|
|
234
254
|
configurable: true,
|
|
235
255
|
enumerable: true,
|
|
236
256
|
writable: true,
|
|
237
257
|
initializer: function () {
|
|
238
258
|
return "";
|
|
239
259
|
}
|
|
240
|
-
}),
|
|
260
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec14], {
|
|
241
261
|
configurable: true,
|
|
242
262
|
enumerable: true,
|
|
243
263
|
writable: true,
|
|
244
264
|
initializer: null
|
|
245
|
-
}),
|
|
265
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "open_banking_enabled", [_dec15], {
|
|
246
266
|
configurable: true,
|
|
247
267
|
enumerable: true,
|
|
248
268
|
writable: true,
|
|
249
269
|
initializer: null
|
|
250
|
-
}),
|
|
270
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "card_enabled", [_dec16], {
|
|
251
271
|
configurable: true,
|
|
252
272
|
enumerable: true,
|
|
253
273
|
writable: true,
|
|
254
274
|
initializer: null
|
|
255
|
-
}),
|
|
275
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "moto", [_dec17], {
|
|
256
276
|
configurable: true,
|
|
257
277
|
enumerable: true,
|
|
258
278
|
writable: true,
|
|
259
279
|
initializer: null
|
|
260
|
-
}),
|
|
280
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec18], {
|
|
261
281
|
configurable: true,
|
|
262
282
|
enumerable: true,
|
|
263
283
|
writable: true,
|
|
264
284
|
initializer: function () {
|
|
265
285
|
return _currency.DEFAULT_CURRENCY;
|
|
266
286
|
}
|
|
267
|
-
}),
|
|
287
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec19], {
|
|
268
288
|
configurable: true,
|
|
269
289
|
enumerable: true,
|
|
270
290
|
writable: true,
|
|
271
291
|
initializer: function () {
|
|
272
292
|
return this.generateExpiryDate();
|
|
273
293
|
}
|
|
274
|
-
}),
|
|
294
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec20], {
|
|
275
295
|
configurable: true,
|
|
276
296
|
enumerable: true,
|
|
277
297
|
writable: true,
|
|
278
298
|
initializer: function () {
|
|
279
299
|
return "";
|
|
280
300
|
}
|
|
281
|
-
}),
|
|
301
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec21], {
|
|
282
302
|
configurable: true,
|
|
283
303
|
enumerable: true,
|
|
284
304
|
writable: true,
|
|
285
305
|
initializer: null
|
|
286
|
-
}),
|
|
306
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec22], {
|
|
287
307
|
configurable: true,
|
|
288
308
|
enumerable: true,
|
|
289
309
|
writable: true,
|
|
290
310
|
initializer: null
|
|
291
|
-
}),
|
|
311
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec23], {
|
|
292
312
|
configurable: true,
|
|
293
313
|
enumerable: true,
|
|
294
314
|
writable: true,
|
|
295
315
|
initializer: null
|
|
296
|
-
}),
|
|
316
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "pre_authorized", [_dec24], {
|
|
297
317
|
configurable: true,
|
|
298
318
|
enumerable: true,
|
|
299
319
|
writable: true,
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _chargeback = _interopRequireDefault(require("./chargeback"));
|
|
9
9
|
|
|
10
|
+
var _customer = _interopRequireDefault(require("./customer"));
|
|
11
|
+
|
|
10
12
|
var _paymentLink = _interopRequireDefault(require("./payment-link"));
|
|
11
13
|
|
|
12
14
|
var _transaction = _interopRequireDefault(require("./transaction"));
|
|
@@ -41,6 +43,6 @@ var _paymentLinkType = _interopRequireDefault(require("./payment-link-type"));
|
|
|
41
43
|
|
|
42
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
45
|
|
|
44
|
-
const ENTITIES = [_chargeback.default, _organisationPaymentProvider.default, _organisationPaymentProviderMethod.default, _paymentLink.default, _paymentProvider.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionSource.default, _transactionType.default, _transactionMetadata.default, _transactionReason.default, _creditNote.default, _ecommerce.default, _paymentLinkType.default];
|
|
46
|
+
const ENTITIES = [_chargeback.default, _customer.default, _organisationPaymentProvider.default, _organisationPaymentProviderMethod.default, _paymentLink.default, _paymentProvider.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionSource.default, _transactionType.default, _transactionMetadata.default, _transactionReason.default, _creditNote.default, _ecommerce.default, _paymentLinkType.default];
|
|
45
47
|
var _default = ENTITIES;
|
|
46
48
|
exports.default = _default;
|
|
@@ -19,7 +19,9 @@ var _paymentLinkType = _interopRequireDefault(require("../payment-link-type"));
|
|
|
19
19
|
|
|
20
20
|
var _currency = require("../../bank/currency");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _customer = _interopRequireDefault(require("../customer"));
|
|
23
|
+
|
|
24
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25;
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
@@ -37,71 +39,76 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
37
39
|
}), _dec4 = (0, _typeorm.JoinColumn)({
|
|
38
40
|
name: 'booking_id',
|
|
39
41
|
referencedColumnName: 'id'
|
|
40
|
-
}), _dec5 = (0, _typeorm.ManyToOne)(() =>
|
|
42
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _customer.default, {
|
|
43
|
+
nullable: true
|
|
44
|
+
}), _dec6 = (0, _typeorm.JoinColumn)({
|
|
45
|
+
name: 'customer_id',
|
|
46
|
+
referencedColumnName: 'id'
|
|
47
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _user.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
41
48
|
name: 'user_id',
|
|
42
49
|
referencedColumnName: 'id'
|
|
43
|
-
}),
|
|
50
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
44
51
|
name: 'organisation_id',
|
|
45
52
|
referencedColumnName: 'id'
|
|
46
|
-
}),
|
|
53
|
+
}), _dec11 = (0, _typeorm.ManyToOne)(() => _paymentLinkType.default), _dec12 = (0, _typeorm.JoinColumn)({
|
|
47
54
|
name: 'type_id',
|
|
48
55
|
referencedColumnName: 'id'
|
|
49
|
-
}),
|
|
56
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
50
57
|
type: "int"
|
|
51
|
-
}),
|
|
58
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
52
59
|
type: "varchar",
|
|
53
60
|
length: "150",
|
|
54
61
|
nullable: true
|
|
55
|
-
}),
|
|
62
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
56
63
|
type: "varchar",
|
|
57
64
|
length: "2048",
|
|
58
65
|
nullable: true
|
|
59
|
-
}),
|
|
66
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
60
67
|
type: "varchar",
|
|
61
68
|
length: "250",
|
|
62
69
|
nullable: true
|
|
63
|
-
}),
|
|
70
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
64
71
|
type: "varchar",
|
|
65
72
|
length: "200",
|
|
66
73
|
nullable: true
|
|
67
|
-
}),
|
|
74
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
68
75
|
type: "varchar",
|
|
69
76
|
length: "200",
|
|
70
77
|
nullable: true
|
|
71
|
-
}),
|
|
78
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
72
79
|
type: "varchar",
|
|
73
80
|
length: "200",
|
|
74
81
|
nullable: true
|
|
75
|
-
}),
|
|
82
|
+
}), _dec20 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec21 = (0, _typeorm.Column)({
|
|
76
83
|
type: "boolean",
|
|
77
84
|
default: true
|
|
78
|
-
}),
|
|
85
|
+
}), _dec22 = (0, _typeorm.Column)({
|
|
79
86
|
type: "boolean",
|
|
80
87
|
default: true
|
|
81
|
-
}),
|
|
88
|
+
}), _dec23 = (0, _typeorm.Column)({
|
|
82
89
|
type: "boolean",
|
|
83
90
|
default: false
|
|
84
|
-
}),
|
|
91
|
+
}), _dec24 = (0, _typeorm.Column)({
|
|
85
92
|
type: "varchar",
|
|
86
93
|
length: "3",
|
|
87
94
|
default: _currency.DEFAULT_CURRENCY
|
|
88
|
-
}),
|
|
95
|
+
}), _dec25 = (0, _typeorm.Column)({
|
|
89
96
|
type: "timestamp with time zone"
|
|
90
|
-
}),
|
|
97
|
+
}), _dec26 = (0, _typeorm.Column)({
|
|
91
98
|
type: "varchar",
|
|
92
99
|
length: "50",
|
|
93
100
|
default: 'active'
|
|
94
|
-
}),
|
|
101
|
+
}), _dec27 = (0, _typeorm.CreateDateColumn)({
|
|
95
102
|
type: 'timestamp with time zone'
|
|
96
|
-
}),
|
|
103
|
+
}), _dec28 = (0, _typeorm.UpdateDateColumn)({
|
|
97
104
|
type: 'timestamp with time zone'
|
|
98
|
-
}),
|
|
105
|
+
}), _dec29 = (0, _typeorm.DeleteDateColumn)({
|
|
99
106
|
type: 'timestamp with time zone',
|
|
100
107
|
nullable: true
|
|
101
|
-
}),
|
|
108
|
+
}), _dec30 = (0, _typeorm.Column)({
|
|
102
109
|
type: "boolean",
|
|
103
110
|
default: false
|
|
104
|
-
}),
|
|
111
|
+
}), _dec31 = (0, _typeorm.Column)({
|
|
105
112
|
type: "json",
|
|
106
113
|
nullable: true
|
|
107
114
|
}), _dec(_class = (_class2 = class PaymentLink {
|
|
@@ -110,49 +117,51 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
110
117
|
|
|
111
118
|
_initializerDefineProperty(this, "booking", _descriptor2, this);
|
|
112
119
|
|
|
113
|
-
_initializerDefineProperty(this, "
|
|
120
|
+
_initializerDefineProperty(this, "customer", _descriptor3, this);
|
|
121
|
+
|
|
122
|
+
_initializerDefineProperty(this, "user", _descriptor4, this);
|
|
114
123
|
|
|
115
|
-
_initializerDefineProperty(this, "organisation",
|
|
124
|
+
_initializerDefineProperty(this, "organisation", _descriptor5, this);
|
|
116
125
|
|
|
117
|
-
_initializerDefineProperty(this, "type",
|
|
126
|
+
_initializerDefineProperty(this, "type", _descriptor6, this);
|
|
118
127
|
|
|
119
|
-
_initializerDefineProperty(this, "amount",
|
|
128
|
+
_initializerDefineProperty(this, "amount", _descriptor7, this);
|
|
120
129
|
|
|
121
|
-
_initializerDefineProperty(this, "customer_name",
|
|
130
|
+
_initializerDefineProperty(this, "customer_name", _descriptor8, this);
|
|
122
131
|
|
|
123
|
-
_initializerDefineProperty(this, "description",
|
|
132
|
+
_initializerDefineProperty(this, "description", _descriptor9, this);
|
|
124
133
|
|
|
125
|
-
_initializerDefineProperty(this, "email",
|
|
134
|
+
_initializerDefineProperty(this, "email", _descriptor10, this);
|
|
126
135
|
|
|
127
|
-
_initializerDefineProperty(this, "success_url",
|
|
136
|
+
_initializerDefineProperty(this, "success_url", _descriptor11, this);
|
|
128
137
|
|
|
129
|
-
_initializerDefineProperty(this, "failure_url",
|
|
138
|
+
_initializerDefineProperty(this, "failure_url", _descriptor12, this);
|
|
130
139
|
|
|
131
|
-
_initializerDefineProperty(this, "cancel_url",
|
|
140
|
+
_initializerDefineProperty(this, "cancel_url", _descriptor13, this);
|
|
132
141
|
|
|
133
|
-
_initializerDefineProperty(this, "transactions",
|
|
142
|
+
_initializerDefineProperty(this, "transactions", _descriptor14, this);
|
|
134
143
|
|
|
135
|
-
_initializerDefineProperty(this, "open_banking_enabled",
|
|
144
|
+
_initializerDefineProperty(this, "open_banking_enabled", _descriptor15, this);
|
|
136
145
|
|
|
137
|
-
_initializerDefineProperty(this, "card_enabled",
|
|
146
|
+
_initializerDefineProperty(this, "card_enabled", _descriptor16, this);
|
|
138
147
|
|
|
139
|
-
_initializerDefineProperty(this, "moto",
|
|
148
|
+
_initializerDefineProperty(this, "moto", _descriptor17, this);
|
|
140
149
|
|
|
141
|
-
_initializerDefineProperty(this, "currency",
|
|
150
|
+
_initializerDefineProperty(this, "currency", _descriptor18, this);
|
|
142
151
|
|
|
143
|
-
_initializerDefineProperty(this, "expires_at",
|
|
152
|
+
_initializerDefineProperty(this, "expires_at", _descriptor19, this);
|
|
144
153
|
|
|
145
|
-
_initializerDefineProperty(this, "status",
|
|
154
|
+
_initializerDefineProperty(this, "status", _descriptor20, this);
|
|
146
155
|
|
|
147
|
-
_initializerDefineProperty(this, "created_at",
|
|
156
|
+
_initializerDefineProperty(this, "created_at", _descriptor21, this);
|
|
148
157
|
|
|
149
|
-
_initializerDefineProperty(this, "updated_at",
|
|
158
|
+
_initializerDefineProperty(this, "updated_at", _descriptor22, this);
|
|
150
159
|
|
|
151
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
160
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor23, this);
|
|
152
161
|
|
|
153
|
-
_initializerDefineProperty(this, "pre_authorized",
|
|
162
|
+
_initializerDefineProperty(this, "pre_authorized", _descriptor24, this);
|
|
154
163
|
|
|
155
|
-
_initializerDefineProperty(this, "metadata",
|
|
164
|
+
_initializerDefineProperty(this, "metadata", _descriptor25, this);
|
|
156
165
|
}
|
|
157
166
|
|
|
158
167
|
generateExpiryDate() {
|
|
@@ -188,6 +197,10 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
188
197
|
type_id: this.type_id
|
|
189
198
|
};
|
|
190
199
|
|
|
200
|
+
if (this.customer !== null && typeof this.customer.id !== 'undefined') {
|
|
201
|
+
response.customer = this.customer;
|
|
202
|
+
}
|
|
203
|
+
|
|
191
204
|
if (this.booking !== null && typeof this.booking.id !== 'undefined') {
|
|
192
205
|
response.booking = this.booking.getPublicData(showTemporaryFlag);
|
|
193
206
|
}
|
|
@@ -265,136 +278,143 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
265
278
|
initializer: function () {
|
|
266
279
|
return _booking.default;
|
|
267
280
|
}
|
|
268
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
281
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec5, _dec6], {
|
|
282
|
+
configurable: true,
|
|
283
|
+
enumerable: true,
|
|
284
|
+
writable: true,
|
|
285
|
+
initializer: function () {
|
|
286
|
+
return _customer.default;
|
|
287
|
+
}
|
|
288
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec7, _dec8], {
|
|
269
289
|
configurable: true,
|
|
270
290
|
enumerable: true,
|
|
271
291
|
writable: true,
|
|
272
292
|
initializer: function () {
|
|
273
293
|
return _user.default;
|
|
274
294
|
}
|
|
275
|
-
}),
|
|
295
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec9, _dec10], {
|
|
276
296
|
configurable: true,
|
|
277
297
|
enumerable: true,
|
|
278
298
|
writable: true,
|
|
279
299
|
initializer: function () {
|
|
280
300
|
return _organisation.default;
|
|
281
301
|
}
|
|
282
|
-
}),
|
|
302
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec11, _dec12], {
|
|
283
303
|
configurable: true,
|
|
284
304
|
enumerable: true,
|
|
285
305
|
writable: true,
|
|
286
306
|
initializer: function () {
|
|
287
307
|
return _paymentLinkType.default;
|
|
288
308
|
}
|
|
289
|
-
}),
|
|
309
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec13], {
|
|
290
310
|
configurable: true,
|
|
291
311
|
enumerable: true,
|
|
292
312
|
writable: true,
|
|
293
313
|
initializer: null
|
|
294
|
-
}),
|
|
314
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec14], {
|
|
295
315
|
configurable: true,
|
|
296
316
|
enumerable: true,
|
|
297
317
|
writable: true,
|
|
298
318
|
initializer: function () {
|
|
299
319
|
return "";
|
|
300
320
|
}
|
|
301
|
-
}),
|
|
321
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec15], {
|
|
302
322
|
configurable: true,
|
|
303
323
|
enumerable: true,
|
|
304
324
|
writable: true,
|
|
305
325
|
initializer: function () {
|
|
306
326
|
return "";
|
|
307
327
|
}
|
|
308
|
-
}),
|
|
328
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec16], {
|
|
309
329
|
configurable: true,
|
|
310
330
|
enumerable: true,
|
|
311
331
|
writable: true,
|
|
312
332
|
initializer: function () {
|
|
313
333
|
return "";
|
|
314
334
|
}
|
|
315
|
-
}),
|
|
335
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "success_url", [_dec17], {
|
|
316
336
|
configurable: true,
|
|
317
337
|
enumerable: true,
|
|
318
338
|
writable: true,
|
|
319
339
|
initializer: function () {
|
|
320
340
|
return "";
|
|
321
341
|
}
|
|
322
|
-
}),
|
|
342
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "failure_url", [_dec18], {
|
|
323
343
|
configurable: true,
|
|
324
344
|
enumerable: true,
|
|
325
345
|
writable: true,
|
|
326
346
|
initializer: function () {
|
|
327
347
|
return "";
|
|
328
348
|
}
|
|
329
|
-
}),
|
|
349
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "cancel_url", [_dec19], {
|
|
330
350
|
configurable: true,
|
|
331
351
|
enumerable: true,
|
|
332
352
|
writable: true,
|
|
333
353
|
initializer: function () {
|
|
334
354
|
return "";
|
|
335
355
|
}
|
|
336
|
-
}),
|
|
356
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec20], {
|
|
337
357
|
configurable: true,
|
|
338
358
|
enumerable: true,
|
|
339
359
|
writable: true,
|
|
340
360
|
initializer: null
|
|
341
|
-
}),
|
|
361
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "open_banking_enabled", [_dec21], {
|
|
342
362
|
configurable: true,
|
|
343
363
|
enumerable: true,
|
|
344
364
|
writable: true,
|
|
345
365
|
initializer: null
|
|
346
|
-
}),
|
|
366
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "card_enabled", [_dec22], {
|
|
347
367
|
configurable: true,
|
|
348
368
|
enumerable: true,
|
|
349
369
|
writable: true,
|
|
350
370
|
initializer: null
|
|
351
|
-
}),
|
|
371
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "moto", [_dec23], {
|
|
352
372
|
configurable: true,
|
|
353
373
|
enumerable: true,
|
|
354
374
|
writable: true,
|
|
355
375
|
initializer: null
|
|
356
|
-
}),
|
|
376
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec24], {
|
|
357
377
|
configurable: true,
|
|
358
378
|
enumerable: true,
|
|
359
379
|
writable: true,
|
|
360
380
|
initializer: function () {
|
|
361
381
|
return _currency.DEFAULT_CURRENCY;
|
|
362
382
|
}
|
|
363
|
-
}),
|
|
383
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec25], {
|
|
364
384
|
configurable: true,
|
|
365
385
|
enumerable: true,
|
|
366
386
|
writable: true,
|
|
367
387
|
initializer: function () {
|
|
368
388
|
return this.generateExpiryDate();
|
|
369
389
|
}
|
|
370
|
-
}),
|
|
390
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec26], {
|
|
371
391
|
configurable: true,
|
|
372
392
|
enumerable: true,
|
|
373
393
|
writable: true,
|
|
374
394
|
initializer: function () {
|
|
375
395
|
return "";
|
|
376
396
|
}
|
|
377
|
-
}),
|
|
397
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec27], {
|
|
378
398
|
configurable: true,
|
|
379
399
|
enumerable: true,
|
|
380
400
|
writable: true,
|
|
381
401
|
initializer: null
|
|
382
|
-
}),
|
|
402
|
+
}), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec28], {
|
|
383
403
|
configurable: true,
|
|
384
404
|
enumerable: true,
|
|
385
405
|
writable: true,
|
|
386
406
|
initializer: null
|
|
387
|
-
}),
|
|
407
|
+
}), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec29], {
|
|
388
408
|
configurable: true,
|
|
389
409
|
enumerable: true,
|
|
390
410
|
writable: true,
|
|
391
411
|
initializer: null
|
|
392
|
-
}),
|
|
412
|
+
}), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "pre_authorized", [_dec30], {
|
|
393
413
|
configurable: true,
|
|
394
414
|
enumerable: true,
|
|
395
415
|
writable: true,
|
|
396
416
|
initializer: null
|
|
397
|
-
}),
|
|
417
|
+
}), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "metadata", [_dec31], {
|
|
398
418
|
configurable: true,
|
|
399
419
|
enumerable: true,
|
|
400
420
|
writable: true,
|
package/dist/index.js
CHANGED
|
@@ -111,6 +111,12 @@ Object.defineProperty(exports, "CurrencyEntity", {
|
|
|
111
111
|
return _currency.default;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "Customer", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _customer.default;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
114
120
|
Object.defineProperty(exports, "DEFAULT_CURRENCY", {
|
|
115
121
|
enumerable: true,
|
|
116
122
|
get: function () {
|
|
@@ -372,7 +378,7 @@ Object.defineProperty(exports, "SaltedgeConnection", {
|
|
|
372
378
|
Object.defineProperty(exports, "SaltedgeCustomer", {
|
|
373
379
|
enumerable: true,
|
|
374
380
|
get: function () {
|
|
375
|
-
return
|
|
381
|
+
return _customer2.default;
|
|
376
382
|
}
|
|
377
383
|
});
|
|
378
384
|
Object.defineProperty(exports, "SaltedgeLead", {
|
|
@@ -682,6 +688,8 @@ var _transaction = _interopRequireDefault(require("./entity/nuapay/transaction")
|
|
|
682
688
|
|
|
683
689
|
var _chargeback = _interopRequireDefault(require("./entity/payment/chargeback"));
|
|
684
690
|
|
|
691
|
+
var _customer = _interopRequireDefault(require("./entity/payment/customer"));
|
|
692
|
+
|
|
685
693
|
var _organisationPaymentProviderMethod = _interopRequireDefault(require("./entity/payment/organisation-payment-provider-method"));
|
|
686
694
|
|
|
687
695
|
var _paymentLink = _interopRequireDefault(require("./entity/payment/payment-link"));
|
|
@@ -772,7 +780,7 @@ var _account3 = _interopRequireDefault(require("./entity/saltedge/account"));
|
|
|
772
780
|
|
|
773
781
|
var _connection = _interopRequireDefault(require("./entity/saltedge/connection"));
|
|
774
782
|
|
|
775
|
-
var
|
|
783
|
+
var _customer2 = _interopRequireDefault(require("./entity/saltedge/customer"));
|
|
776
784
|
|
|
777
785
|
var _transaction6 = _interopRequireDefault(require("./entity/saltedge/transaction"));
|
|
778
786
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class customerEntity1689673317316 {
|
|
4
|
+
name = 'customerEntity1689673317316'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."customer" ("id" character varying NOT NULL, "customer_name" character varying(150), "email" character varying(250), "address_1" character varying(250), "address_2" character varying(250), "city" character varying(250), "county" character varying(250), "country" character varying(250), "post_code" character varying(250), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deleted_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_a7a13f4cacb744524e44dfdad32" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "customer_id" character varying`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."ecommerce" ADD "customer_id" character varying`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "FK_74da10cfdb8fe899497f0eac990" FOREIGN KEY ("customer_id") REFERENCES "payment"."customer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."ecommerce" ADD CONSTRAINT "FK_18a0af47c1c38e07ceb25135db1" FOREIGN KEY ("customer_id") REFERENCES "payment"."customer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."ecommerce" DROP CONSTRAINT "FK_18a0af47c1c38e07ceb25135db1"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "FK_74da10cfdb8fe899497f0eac990"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."ecommerce" DROP COLUMN "customer_id"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "customer_id"`);
|
|
19
|
+
await queryRunner.query(`DROP TABLE "payment"."customer"`);
|
|
20
|
+
}
|
|
21
|
+
}
|
package/dist/migration/total-processing/1689161863334-total_nullable_merchant_account_number.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class totalNullableMerchantAccountNumber1689161863334 {
|
|
4
|
+
name = 'totalNullableMerchantAccountNumber1689161863334'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction" ALTER COLUMN "merchant_account_id" DROP NOT NULL`);}
|
|
8
|
+
|
|
9
|
+
async down(queryRunner) {
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "total_processing"."transaction" ALTER COLUMN "merchant_account_id" SET NOT NULL`);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
File without changes
|