@felloh-org/lambda-wrapper 1.2.15 → 1.2.17
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.
|
@@ -15,9 +15,11 @@ var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
|
15
15
|
|
|
16
16
|
var _transactionMethod = _interopRequireDefault(require("../transaction-method"));
|
|
17
17
|
|
|
18
|
+
var _currency = _interopRequireDefault(require("../../bank/currency"));
|
|
19
|
+
|
|
18
20
|
var _organisationPaymentProviderMethod = _interopRequireDefault(require("../organisation-payment-provider-method"));
|
|
19
21
|
|
|
20
|
-
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, _descriptor13;
|
|
22
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -43,22 +45,35 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
43
45
|
cascade: true,
|
|
44
46
|
onDelete: 'CASCADE',
|
|
45
47
|
orphanedRowAction: 'delete'
|
|
46
|
-
}), _dec9 = (0, _typeorm.
|
|
48
|
+
}), _dec9 = (0, _typeorm.ManyToMany)(() => _currency.default, () => {}, {
|
|
49
|
+
cascade: true
|
|
50
|
+
}), _dec10 = (0, _typeorm.JoinTable)({
|
|
51
|
+
name: "organisation_payment_provider_currency",
|
|
52
|
+
schema: "payment",
|
|
53
|
+
joinColumn: {
|
|
54
|
+
name: "organisation_payment_provider_id",
|
|
55
|
+
referencedColumnName: "id"
|
|
56
|
+
},
|
|
57
|
+
inverseJoinColumn: {
|
|
58
|
+
name: "currency_id",
|
|
59
|
+
referencedColumnName: "id"
|
|
60
|
+
}
|
|
61
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
47
62
|
type: "varchar",
|
|
48
63
|
length: "150"
|
|
49
|
-
}),
|
|
64
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
50
65
|
type: "json",
|
|
51
66
|
nullable: true
|
|
52
|
-
}),
|
|
67
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
53
68
|
type: "varchar",
|
|
54
69
|
length: "512"
|
|
55
|
-
}),
|
|
70
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
56
71
|
type: "varchar",
|
|
57
72
|
length: "4"
|
|
58
|
-
}),
|
|
73
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
59
74
|
type: "boolean",
|
|
60
75
|
default: false
|
|
61
|
-
}),
|
|
76
|
+
}), _dec16 = (0, _typeorm.CreateDateColumn)(), _dec17 = (0, _typeorm.UpdateDateColumn)(), _dec18 = (0, _typeorm.DeleteDateColumn)(), _dec(_class = (_class2 = class OrganisationPaymentProvider {
|
|
62
77
|
constructor() {
|
|
63
78
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
64
79
|
|
|
@@ -70,21 +85,23 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
70
85
|
|
|
71
86
|
_initializerDefineProperty(this, "transaction_methods", _descriptor5, this);
|
|
72
87
|
|
|
73
|
-
_initializerDefineProperty(this, "
|
|
88
|
+
_initializerDefineProperty(this, "currencies", _descriptor6, this);
|
|
89
|
+
|
|
90
|
+
_initializerDefineProperty(this, "public_key", _descriptor7, this);
|
|
74
91
|
|
|
75
|
-
_initializerDefineProperty(this, "public_creds",
|
|
92
|
+
_initializerDefineProperty(this, "public_creds", _descriptor8, this);
|
|
76
93
|
|
|
77
|
-
_initializerDefineProperty(this, "secret_key",
|
|
94
|
+
_initializerDefineProperty(this, "secret_key", _descriptor9, this);
|
|
78
95
|
|
|
79
|
-
_initializerDefineProperty(this, "secret_key_last_four",
|
|
96
|
+
_initializerDefineProperty(this, "secret_key_last_four", _descriptor10, this);
|
|
80
97
|
|
|
81
|
-
_initializerDefineProperty(this, "is_active",
|
|
98
|
+
_initializerDefineProperty(this, "is_active", _descriptor11, this);
|
|
82
99
|
|
|
83
|
-
_initializerDefineProperty(this, "created_at",
|
|
100
|
+
_initializerDefineProperty(this, "created_at", _descriptor12, this);
|
|
84
101
|
|
|
85
|
-
_initializerDefineProperty(this, "updated_at",
|
|
102
|
+
_initializerDefineProperty(this, "updated_at", _descriptor13, this);
|
|
86
103
|
|
|
87
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
104
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor14, this);
|
|
88
105
|
}
|
|
89
106
|
|
|
90
107
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -120,50 +137,55 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
120
137
|
enumerable: true,
|
|
121
138
|
writable: true,
|
|
122
139
|
initializer: null
|
|
123
|
-
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
140
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "currencies", [_dec9, _dec10], {
|
|
141
|
+
configurable: true,
|
|
142
|
+
enumerable: true,
|
|
143
|
+
writable: true,
|
|
144
|
+
initializer: null
|
|
145
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "public_key", [_dec11], {
|
|
124
146
|
configurable: true,
|
|
125
147
|
enumerable: true,
|
|
126
148
|
writable: true,
|
|
127
149
|
initializer: function () {
|
|
128
150
|
return "";
|
|
129
151
|
}
|
|
130
|
-
}),
|
|
152
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "public_creds", [_dec12], {
|
|
131
153
|
configurable: true,
|
|
132
154
|
enumerable: true,
|
|
133
155
|
writable: true,
|
|
134
156
|
initializer: null
|
|
135
|
-
}),
|
|
157
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "secret_key", [_dec13], {
|
|
136
158
|
configurable: true,
|
|
137
159
|
enumerable: true,
|
|
138
160
|
writable: true,
|
|
139
161
|
initializer: function () {
|
|
140
162
|
return "";
|
|
141
163
|
}
|
|
142
|
-
}),
|
|
164
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "secret_key_last_four", [_dec14], {
|
|
143
165
|
configurable: true,
|
|
144
166
|
enumerable: true,
|
|
145
167
|
writable: true,
|
|
146
168
|
initializer: function () {
|
|
147
169
|
return "";
|
|
148
170
|
}
|
|
149
|
-
}),
|
|
171
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "is_active", [_dec15], {
|
|
150
172
|
configurable: true,
|
|
151
173
|
enumerable: true,
|
|
152
174
|
writable: true,
|
|
153
175
|
initializer: function () {
|
|
154
176
|
return false;
|
|
155
177
|
}
|
|
156
|
-
}),
|
|
178
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec16], {
|
|
157
179
|
configurable: true,
|
|
158
180
|
enumerable: true,
|
|
159
181
|
writable: true,
|
|
160
182
|
initializer: null
|
|
161
|
-
}),
|
|
183
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec17], {
|
|
162
184
|
configurable: true,
|
|
163
185
|
enumerable: true,
|
|
164
186
|
writable: true,
|
|
165
187
|
initializer: null
|
|
166
|
-
}),
|
|
188
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec18], {
|
|
167
189
|
configurable: true,
|
|
168
190
|
enumerable: true,
|
|
169
191
|
writable: true,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class organisationPaymentProviderCurrency1664283726285 {
|
|
4
|
+
name = 'organisationPaymentProviderCurrency1664283726285'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."organisation_payment_provider_currency" ("organisation_payment_provider_id" character varying NOT NULL, "currency_id" character varying(3) NOT NULL, CONSTRAINT "PK_93592fc140179188399267f45ef" PRIMARY KEY ("organisation_payment_provider_id", "currency_id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE INDEX "IDX_647a9d8b719919231fd33e8fab" ON "payment"."organisation_payment_provider_currency" ("organisation_payment_provider_id") `);
|
|
9
|
+
await queryRunner.query(`CREATE INDEX "IDX_5b2b3713403e458717cb47f9e4" ON "payment"."organisation_payment_provider_currency" ("currency_id") `);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider_currency" ADD CONSTRAINT "FK_647a9d8b719919231fd33e8fab7" FOREIGN KEY ("organisation_payment_provider_id") REFERENCES "payment"."organisation_payment_provider"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider_currency" ADD CONSTRAINT "FK_5b2b3713403e458717cb47f9e4f" FOREIGN KEY ("currency_id") REFERENCES "bank"."currency"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider_currency" DROP CONSTRAINT "FK_5b2b3713403e458717cb47f9e4f"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider_currency" DROP CONSTRAINT "FK_647a9d8b719919231fd33e8fab7"`);
|
|
17
|
+
await queryRunner.query(`DROP TABLE "payment"."organisation_payment_provider_currency"`);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/dist/migration/payment/1664285327423-organisation-payment-provider-currency-populate.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class organisationPaymentProviderCurrencyPopulate1664285327423 {
|
|
4
|
+
name = 'organisationPaymentProviderCurrencyPopulate1664285327423'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`
|
|
8
|
+
INSERT INTO "payment"."organisation_payment_provider_currency"
|
|
9
|
+
("organisation_payment_provider_id", "currency_id")
|
|
10
|
+
SELECT "id", 'GBX' FROM "payment"."organisation_payment_provider"
|
|
11
|
+
`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
// Do nothing
|
|
16
|
+
}
|
|
17
|
+
}
|