@felloh-org/lambda-wrapper 1.0.25 → 1.0.26
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/organisation-payment-provider/index.js +1 -1
- package/dist/entity/payment/payment-link/index.js +47 -9
- package/dist/entity/payment/transaction/index.js +43 -10
- package/dist/migration/payment/1647251762169-payment_link_methods.js +15 -0
- package/dist/migration/payment/1647271619083-payment_link_moto.js +13 -0
- package/dist/migration/payment/1647292573651-provider_secret_length.js +15 -0
- package/dist/migration/payment/1647294601399-provider_secret_length.js +15 -0
- package/dist/migration/payment/1647428635630-transaction_organisation_payment_provider.js +15 -0
- package/dist/migration/payment/1647437109221-transaction_message.js +13 -0
- package/dist/migration/payment/1647437500834-transaction_updated_at.js +13 -0
- package/package.json +1 -1
|
@@ -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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
18
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -58,8 +58,17 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
58
58
|
type: "varchar",
|
|
59
59
|
length: "200"
|
|
60
60
|
}), _dec15 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec16 = (0, _typeorm.Column)({
|
|
61
|
+
type: "boolean",
|
|
62
|
+
default: true
|
|
63
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
64
|
+
type: "boolean",
|
|
65
|
+
default: true
|
|
66
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
67
|
+
type: "boolean",
|
|
68
|
+
default: false
|
|
69
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
61
70
|
type: "timestamp with time zone"
|
|
62
|
-
}),
|
|
71
|
+
}), _dec20 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
|
|
63
72
|
constructor() {
|
|
64
73
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
65
74
|
|
|
@@ -83,9 +92,15 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
83
92
|
|
|
84
93
|
_initializerDefineProperty(this, "transactions", _descriptor11, this);
|
|
85
94
|
|
|
86
|
-
_initializerDefineProperty(this, "
|
|
95
|
+
_initializerDefineProperty(this, "open_banking_enabled", _descriptor12, this);
|
|
87
96
|
|
|
88
|
-
_initializerDefineProperty(this, "
|
|
97
|
+
_initializerDefineProperty(this, "card_enabled", _descriptor13, this);
|
|
98
|
+
|
|
99
|
+
_initializerDefineProperty(this, "moto", _descriptor14, this);
|
|
100
|
+
|
|
101
|
+
_initializerDefineProperty(this, "expires_at", _descriptor15, this);
|
|
102
|
+
|
|
103
|
+
_initializerDefineProperty(this, "created_at", _descriptor16, this);
|
|
89
104
|
}
|
|
90
105
|
|
|
91
106
|
generateExpiryDate() {
|
|
@@ -104,7 +119,11 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
104
119
|
cancel_url: this.cancel_url,
|
|
105
120
|
customer_name: this.customer_name,
|
|
106
121
|
expires_at: this.expires_at,
|
|
107
|
-
created_at: this.created_at
|
|
122
|
+
created_at: this.created_at,
|
|
123
|
+
methods: {
|
|
124
|
+
open_banking: this.open_banking_enabled,
|
|
125
|
+
card: this.card_enabled
|
|
126
|
+
}
|
|
108
127
|
};
|
|
109
128
|
|
|
110
129
|
if (this.booking !== null) {
|
|
@@ -128,8 +147,12 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
128
147
|
amount: this.amount,
|
|
129
148
|
description: this.description,
|
|
130
149
|
expires_at: this.expires_at,
|
|
131
|
-
created_at: this.created_at
|
|
132
|
-
|
|
150
|
+
created_at: this.created_at,
|
|
151
|
+
methods: {
|
|
152
|
+
open_banking: this.open_banking_enabled,
|
|
153
|
+
card: this.card_enabled
|
|
154
|
+
}
|
|
155
|
+
};
|
|
133
156
|
}
|
|
134
157
|
|
|
135
158
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -205,14 +228,29 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
205
228
|
enumerable: true,
|
|
206
229
|
writable: true,
|
|
207
230
|
initializer: null
|
|
208
|
-
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
231
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "open_banking_enabled", [_dec16], {
|
|
232
|
+
configurable: true,
|
|
233
|
+
enumerable: true,
|
|
234
|
+
writable: true,
|
|
235
|
+
initializer: null
|
|
236
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "card_enabled", [_dec17], {
|
|
237
|
+
configurable: true,
|
|
238
|
+
enumerable: true,
|
|
239
|
+
writable: true,
|
|
240
|
+
initializer: null
|
|
241
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "moto", [_dec18], {
|
|
242
|
+
configurable: true,
|
|
243
|
+
enumerable: true,
|
|
244
|
+
writable: true,
|
|
245
|
+
initializer: null
|
|
246
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec19], {
|
|
209
247
|
configurable: true,
|
|
210
248
|
enumerable: true,
|
|
211
249
|
writable: true,
|
|
212
250
|
initializer: function () {
|
|
213
251
|
return this.generateExpiryDate();
|
|
214
252
|
}
|
|
215
|
-
}),
|
|
253
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec20], {
|
|
216
254
|
configurable: true,
|
|
217
255
|
enumerable: true,
|
|
218
256
|
writable: true,
|
|
@@ -23,7 +23,9 @@ var _transactionMetadata = _interopRequireDefault(require("../transaction-metada
|
|
|
23
23
|
|
|
24
24
|
var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _organisationPaymentProvider = _interopRequireDefault(require("../organisation-payment-provider"));
|
|
27
|
+
|
|
28
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
@@ -63,14 +65,22 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
63
65
|
}), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec18 = (0, _typeorm.JoinColumn)({
|
|
64
66
|
name: 'payment_provider_id',
|
|
65
67
|
referencedColumnName: 'id'
|
|
66
|
-
}), _dec19 = (0, _typeorm.
|
|
68
|
+
}), _dec19 = (0, _typeorm.ManyToOne)(() => _organisationPaymentProvider.default, {
|
|
69
|
+
nullable: true
|
|
70
|
+
}), _dec20 = (0, _typeorm.JoinColumn)({
|
|
71
|
+
name: 'organisation_payment_provider_id',
|
|
72
|
+
referencedColumnName: 'id'
|
|
73
|
+
}), _dec21 = (0, _typeorm.Column)({
|
|
67
74
|
type: "varchar",
|
|
68
75
|
length: "250",
|
|
69
76
|
nullable: true
|
|
70
|
-
}),
|
|
77
|
+
}), _dec22 = (0, _typeorm.Column)({
|
|
71
78
|
type: "timestamp with time zone",
|
|
72
79
|
nullable: true
|
|
73
|
-
}),
|
|
80
|
+
}), _dec23 = (0, _typeorm.CreateDateColumn)(), _dec24 = (0, _typeorm.Column)({
|
|
81
|
+
type: "text",
|
|
82
|
+
nullable: true
|
|
83
|
+
}), _dec25 = (0, _typeorm.UpdateDateColumn)(), _dec(_class = (_class2 = class Transaction {
|
|
74
84
|
constructor() {
|
|
75
85
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
76
86
|
|
|
@@ -92,11 +102,17 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
92
102
|
|
|
93
103
|
_initializerDefineProperty(this, "payment_provider", _descriptor10, this);
|
|
94
104
|
|
|
95
|
-
_initializerDefineProperty(this, "
|
|
105
|
+
_initializerDefineProperty(this, "organisation_payment_provider", _descriptor11, this);
|
|
106
|
+
|
|
107
|
+
_initializerDefineProperty(this, "provider_reference", _descriptor12, this);
|
|
96
108
|
|
|
97
|
-
_initializerDefineProperty(this, "completed_at",
|
|
109
|
+
_initializerDefineProperty(this, "completed_at", _descriptor13, this);
|
|
98
110
|
|
|
99
|
-
_initializerDefineProperty(this, "created_at",
|
|
111
|
+
_initializerDefineProperty(this, "created_at", _descriptor14, this);
|
|
112
|
+
|
|
113
|
+
_initializerDefineProperty(this, "message", _descriptor15, this);
|
|
114
|
+
|
|
115
|
+
_initializerDefineProperty(this, "updated_at", _descriptor16, this);
|
|
100
116
|
}
|
|
101
117
|
|
|
102
118
|
getPublicData() {
|
|
@@ -195,19 +211,36 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
195
211
|
initializer: function () {
|
|
196
212
|
return _paymentProvider.default;
|
|
197
213
|
}
|
|
198
|
-
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
214
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "organisation_payment_provider", [_dec19, _dec20], {
|
|
215
|
+
configurable: true,
|
|
216
|
+
enumerable: true,
|
|
217
|
+
writable: true,
|
|
218
|
+
initializer: function () {
|
|
219
|
+
return _organisationPaymentProvider.default;
|
|
220
|
+
}
|
|
221
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec21], {
|
|
199
222
|
configurable: true,
|
|
200
223
|
enumerable: true,
|
|
201
224
|
writable: true,
|
|
202
225
|
initializer: function () {
|
|
203
226
|
return "";
|
|
204
227
|
}
|
|
205
|
-
}),
|
|
228
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec22], {
|
|
229
|
+
configurable: true,
|
|
230
|
+
enumerable: true,
|
|
231
|
+
writable: true,
|
|
232
|
+
initializer: null
|
|
233
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec23], {
|
|
234
|
+
configurable: true,
|
|
235
|
+
enumerable: true,
|
|
236
|
+
writable: true,
|
|
237
|
+
initializer: null
|
|
238
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec24], {
|
|
206
239
|
configurable: true,
|
|
207
240
|
enumerable: true,
|
|
208
241
|
writable: true,
|
|
209
242
|
initializer: null
|
|
210
|
-
}),
|
|
243
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec25], {
|
|
211
244
|
configurable: true,
|
|
212
245
|
enumerable: true,
|
|
213
246
|
writable: true,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkMethods1647251762169 {
|
|
4
|
+
name = 'paymentLinkMethods1647251762169'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "open_banking_enabled" boolean NOT NULL DEFAULT true`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "card_enabled" boolean NOT NULL DEFAULT true`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "card_enabled"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "open_banking_enabled"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkMoto1647271619083 {
|
|
4
|
+
name = 'paymentLinkMoto1647271619083'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "moto" boolean NOT NULL DEFAULT false`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "moto"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class providerSecretLength1647292573651 {
|
|
4
|
+
name = 'providerSecretLength1647292573651'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(512) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(150) NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class providerSecretLength1647294601399 {
|
|
4
|
+
name = 'providerSecretLength1647294601399'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(256) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(250) NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionOrganisationPaymentProvider1647428635630 {
|
|
4
|
+
name = 'transactionOrganisationPaymentProvider1647428635630'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "organisation_payment_provider_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_750e63e5ad1c7c9a3f742b043dc" FOREIGN KEY ("organisation_payment_provider_id") REFERENCES "payment"."organisation_payment_provider"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_750e63e5ad1c7c9a3f742b043dc"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "organisation_payment_provider_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionMessage1647437109221 {
|
|
4
|
+
name = 'transactionMessage1647437109221'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "message" text`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "message"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionUpdatedAt1647437500834 {
|
|
4
|
+
name = 'transactionUpdatedAt1647437500834'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIMESTAMP NOT NULL DEFAULT now()`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
|
|
12
|
+
}
|
|
13
|
+
}
|