@felloh-org/lambda-wrapper 1.11.0 → 1.11.2
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/acquirer/batch/index.js +2 -0
- package/dist/entity/acquirer/transaction-settlement/index.js +44 -16
- package/dist/migration/acquirer/1686833169652-acquirer_batch_relation.js +23 -0
- package/dist/migration/acquirer/1686834512382-acquirer_batch_remove_organisation.js +14 -0
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _paymentProvider = _interopRequireDefault(require("../../payment/payment-provider"));
|
|
11
11
|
|
|
12
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
13
|
+
|
|
12
14
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -11,7 +11,11 @@ var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
|
11
11
|
|
|
12
12
|
var _paymentProvider = _interopRequireDefault(require("../../payment/payment-provider"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _batch = _interopRequireDefault(require("../batch"));
|
|
15
|
+
|
|
16
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
17
|
+
|
|
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;
|
|
15
19
|
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
21
|
|
|
@@ -29,33 +33,43 @@ let TransactionSettlement = (_dec = (0, _typeorm.Entity)({
|
|
|
29
33
|
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
34
|
name: 'transaction_id',
|
|
31
35
|
referencedColumnName: 'id'
|
|
32
|
-
}), _dec4 = (0, _typeorm.
|
|
36
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _batch.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
37
|
+
name: 'batch_id',
|
|
38
|
+
referencedColumnName: 'id'
|
|
39
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
33
40
|
type: "int",
|
|
34
41
|
nullable: true
|
|
35
|
-
}),
|
|
42
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
36
43
|
type: "varchar",
|
|
37
44
|
length: "5",
|
|
38
45
|
nullable: true
|
|
39
|
-
}),
|
|
46
|
+
}), _dec8 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec9 = (0, _typeorm.JoinColumn)({
|
|
40
47
|
name: 'payment_provider_id',
|
|
41
48
|
referencedColumnName: 'id'
|
|
42
|
-
}),
|
|
49
|
+
}), _dec10 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec11 = (0, _typeorm.JoinColumn)({
|
|
50
|
+
name: 'organisation_id',
|
|
51
|
+
referencedColumnName: 'id'
|
|
52
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)({
|
|
43
53
|
type: 'timestamp with time zone'
|
|
44
|
-
}),
|
|
54
|
+
}), _dec13 = (0, _typeorm.UpdateDateColumn)({
|
|
45
55
|
type: 'timestamp with time zone'
|
|
46
56
|
}), _dec(_class = (_class2 = class TransactionSettlement {
|
|
47
57
|
constructor() {
|
|
48
58
|
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
49
59
|
|
|
50
|
-
_initializerDefineProperty(this, "
|
|
60
|
+
_initializerDefineProperty(this, "batch_id", _descriptor2, this);
|
|
51
61
|
|
|
52
|
-
_initializerDefineProperty(this, "
|
|
62
|
+
_initializerDefineProperty(this, "amount", _descriptor3, this);
|
|
53
63
|
|
|
54
|
-
_initializerDefineProperty(this, "
|
|
64
|
+
_initializerDefineProperty(this, "currency", _descriptor4, this);
|
|
55
65
|
|
|
56
|
-
_initializerDefineProperty(this, "
|
|
66
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor5, this);
|
|
57
67
|
|
|
58
|
-
_initializerDefineProperty(this, "
|
|
68
|
+
_initializerDefineProperty(this, "organisation", _descriptor6, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
71
|
+
|
|
72
|
+
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
@@ -65,29 +79,43 @@ let TransactionSettlement = (_dec = (0, _typeorm.Entity)({
|
|
|
65
79
|
initializer: function () {
|
|
66
80
|
return _transaction.default;
|
|
67
81
|
}
|
|
68
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
82
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "batch_id", [_dec4, _dec5], {
|
|
83
|
+
configurable: true,
|
|
84
|
+
enumerable: true,
|
|
85
|
+
writable: true,
|
|
86
|
+
initializer: function () {
|
|
87
|
+
return _batch.default;
|
|
88
|
+
}
|
|
89
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec6], {
|
|
69
90
|
configurable: true,
|
|
70
91
|
enumerable: true,
|
|
71
92
|
writable: true,
|
|
72
93
|
initializer: null
|
|
73
|
-
}),
|
|
94
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec7], {
|
|
74
95
|
configurable: true,
|
|
75
96
|
enumerable: true,
|
|
76
97
|
writable: true,
|
|
77
98
|
initializer: null
|
|
78
|
-
}),
|
|
99
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec8, _dec9], {
|
|
79
100
|
configurable: true,
|
|
80
101
|
enumerable: true,
|
|
81
102
|
writable: true,
|
|
82
103
|
initializer: function () {
|
|
83
104
|
return _paymentProvider.default;
|
|
84
105
|
}
|
|
85
|
-
}),
|
|
106
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec10, _dec11], {
|
|
107
|
+
configurable: true,
|
|
108
|
+
enumerable: true,
|
|
109
|
+
writable: true,
|
|
110
|
+
initializer: function () {
|
|
111
|
+
return _organisation.default;
|
|
112
|
+
}
|
|
113
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
86
114
|
configurable: true,
|
|
87
115
|
enumerable: true,
|
|
88
116
|
writable: true,
|
|
89
117
|
initializer: null
|
|
90
|
-
}),
|
|
118
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
|
|
91
119
|
configurable: true,
|
|
92
120
|
enumerable: true,
|
|
93
121
|
writable: true,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class acquirerBatchRelation1686833169652 {
|
|
4
|
+
name = 'acquirerBatchRelation1686833169652'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD "organisation_id" character varying(150)`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD "batch_id" character varying`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD "organisation_id" character varying(150)`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD CONSTRAINT "FK_be6ea19f24fb878c24f04043da0" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD CONSTRAINT "FK_e5f5c6ae81f4acd53677a6dd01c" FOREIGN KEY ("batch_id") REFERENCES "acquirer"."batch"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD CONSTRAINT "FK_e2bc1de8a9686ca4e34738fe429" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async down(queryRunner) {
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP CONSTRAINT "FK_e2bc1de8a9686ca4e34738fe429"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP CONSTRAINT "FK_e5f5c6ae81f4acd53677a6dd01c"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP CONSTRAINT "FK_be6ea19f24fb878c24f04043da0"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP COLUMN "organisation_id"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP COLUMN "batch_id"`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP COLUMN "organisation_id"`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class acquirerBatchRemoveOrganisation1686834512382 {
|
|
4
|
+
name = 'acquirerBatchRemoveOrganisation1686834512382'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP CONSTRAINT "FK_be6ea19f24fb878c24f04043da0"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP COLUMN "organisation_id"`);}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD "organisation_id" character varying(150)`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD CONSTRAINT "FK_be6ea19f24fb878c24f04043da0" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
}
|
|
14
|
+
}
|