@felloh-org/lambda-wrapper 1.1.67 → 1.1.70
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 +21 -3
- package/dist/entity/bank/ledger/index.js +5 -1
- package/dist/entity/payment/payment-link/index.js +5 -1
- package/dist/entity/payment/transaction/index.js +7 -2
- package/dist/entity/trust-payments/merchant/index.js +14 -4
- package/dist/migration/1660211087722-trust_in_omnipay.js +13 -0
- package/package.json +1 -1
|
@@ -17,7 +17,9 @@ var _uuid = require("uuid");
|
|
|
17
17
|
|
|
18
18
|
var _bookingComponent = _interopRequireDefault(require("../booking-component"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _paymentLink = _interopRequireDefault(require("../../payment/payment-link"));
|
|
21
|
+
|
|
22
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -64,7 +66,7 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
64
66
|
}), _dec18 = (0, _typeorm.DeleteDateColumn)({
|
|
65
67
|
type: 'timestamp with time zone',
|
|
66
68
|
nullable: true
|
|
67
|
-
}), _dec(_class = (_class2 = class Booking {
|
|
69
|
+
}), _dec19 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking), _dec(_class = (_class2 = class Booking {
|
|
68
70
|
constructor() {
|
|
69
71
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
70
72
|
|
|
@@ -93,6 +95,8 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
93
95
|
_initializerDefineProperty(this, "updated_at", _descriptor13, this);
|
|
94
96
|
|
|
95
97
|
_initializerDefineProperty(this, "deleted_at", _descriptor14, this);
|
|
98
|
+
|
|
99
|
+
_initializerDefineProperty(this, "payment_links", _descriptor15, this);
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
/**
|
|
@@ -108,7 +112,12 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
108
112
|
departure_date: this.departure_date,
|
|
109
113
|
return_date: this.return_date,
|
|
110
114
|
email: this.email,
|
|
111
|
-
gross_amount: this.gross_amount
|
|
115
|
+
gross_amount: this.gross_amount,
|
|
116
|
+
transactions: [],
|
|
117
|
+
components: [],
|
|
118
|
+
payment_links: [],
|
|
119
|
+
user: null,
|
|
120
|
+
organisation: null
|
|
112
121
|
};
|
|
113
122
|
|
|
114
123
|
if (typeof this.transactions !== 'undefined') {
|
|
@@ -119,6 +128,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
119
128
|
response.components = this.components.map(component => component.getPublicCompactData());
|
|
120
129
|
}
|
|
121
130
|
|
|
131
|
+
if (typeof this.payment_links !== 'undefined') {
|
|
132
|
+
response.payment_links = this.payment_links.map(paymentLink => paymentLink.getPublicCompactData());
|
|
133
|
+
}
|
|
134
|
+
|
|
122
135
|
if (this.user !== null && typeof this.user.id !== 'undefined') {
|
|
123
136
|
response.user = this.user.getPublicCompactData();
|
|
124
137
|
}
|
|
@@ -212,5 +225,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
212
225
|
enumerable: true,
|
|
213
226
|
writable: true,
|
|
214
227
|
initializer: null
|
|
228
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "payment_links", [_dec19], {
|
|
229
|
+
configurable: true,
|
|
230
|
+
enumerable: true,
|
|
231
|
+
writable: true,
|
|
232
|
+
initializer: null
|
|
215
233
|
})), _class2)) || _class);
|
|
216
234
|
exports.default = Booking;
|
|
@@ -108,7 +108,11 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
|
108
108
|
amount: this.amount,
|
|
109
109
|
source: this.getSource(),
|
|
110
110
|
created_at: this.created_at,
|
|
111
|
-
currency: this.currency
|
|
111
|
+
currency: this.currency,
|
|
112
|
+
disbursal: null,
|
|
113
|
+
amendment: null,
|
|
114
|
+
adjustment: null,
|
|
115
|
+
transaction: null
|
|
112
116
|
};
|
|
113
117
|
|
|
114
118
|
if (typeof this.disbursal !== 'undefined' && this.disbursal !== null) {
|
|
@@ -150,7 +150,11 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
150
150
|
methods: {
|
|
151
151
|
open_banking: this.open_banking_enabled,
|
|
152
152
|
card: this.card_enabled
|
|
153
|
-
}
|
|
153
|
+
},
|
|
154
|
+
booking: null,
|
|
155
|
+
transactions: {},
|
|
156
|
+
user: null,
|
|
157
|
+
organisation: null
|
|
154
158
|
};
|
|
155
159
|
|
|
156
160
|
if (this.booking !== null && typeof this.booking.id !== 'undefined') {
|
|
@@ -153,7 +153,11 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
153
153
|
created_at: this.created_at,
|
|
154
154
|
completed_at: this.completed_at,
|
|
155
155
|
currency: this.currency,
|
|
156
|
-
provider_reference: this.provider_reference
|
|
156
|
+
provider_reference: this.provider_reference,
|
|
157
|
+
booking: null,
|
|
158
|
+
payment_link: null,
|
|
159
|
+
metadata: null,
|
|
160
|
+
organisation: null
|
|
157
161
|
};
|
|
158
162
|
|
|
159
163
|
if (this.booking !== null && typeof this.booking.id !== 'undefined') {
|
|
@@ -184,7 +188,8 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
184
188
|
type: this.type.id,
|
|
185
189
|
created_at: this.created_at,
|
|
186
190
|
completed_at: this.completed_at,
|
|
187
|
-
currency: this.currency
|
|
191
|
+
currency: this.currency,
|
|
192
|
+
organisation: null
|
|
188
193
|
};
|
|
189
194
|
|
|
190
195
|
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
|
|
10
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
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
|
|
|
@@ -30,7 +30,10 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
|
|
|
30
30
|
}), _dec5 = (0, _typeorm.Column)({
|
|
31
31
|
type: "varchar",
|
|
32
32
|
length: "20"
|
|
33
|
-
}), _dec6 = (0, _typeorm.
|
|
33
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
34
|
+
type: "boolean",
|
|
35
|
+
default: false
|
|
36
|
+
}), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Merchant {
|
|
34
37
|
constructor() {
|
|
35
38
|
_initializerDefineProperty(this, "merchant_number", _descriptor, this);
|
|
36
39
|
|
|
@@ -40,7 +43,9 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
|
|
|
40
43
|
|
|
41
44
|
_initializerDefineProperty(this, "status", _descriptor4, this);
|
|
42
45
|
|
|
43
|
-
_initializerDefineProperty(this, "
|
|
46
|
+
_initializerDefineProperty(this, "in_omnipay", _descriptor5, this);
|
|
47
|
+
|
|
48
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "merchant_number", [_dec2], {
|
|
@@ -71,7 +76,12 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
|
|
|
71
76
|
initializer: function () {
|
|
72
77
|
return "";
|
|
73
78
|
}
|
|
74
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
79
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "in_omnipay", [_dec6], {
|
|
80
|
+
configurable: true,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
initializer: null
|
|
84
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
|
|
75
85
|
configurable: true,
|
|
76
86
|
enumerable: true,
|
|
77
87
|
writable: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class trustInOmnipay1660211087722 {
|
|
4
|
+
name = 'trustInOmnipay1660211087722'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" ADD "in_omnipay" boolean NOT NULL DEFAULT false`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" DROP COLUMN "in_omnipay"`);
|
|
12
|
+
}
|
|
13
|
+
}
|