@felloh-org/lambda-wrapper 1.1.7 → 1.1.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/bank/disbursal/index.js +11 -2
- package/dist/entity/bank/index.js +3 -1
- package/dist/entity/bank/transaction-batch/index.js +94 -0
- package/dist/entity/payment/transaction/index.js +11 -2
- package/dist/index.js +8 -0
- package/dist/migration/bank/1651658976210-batches.js +17 -0
- package/dist/migration/bank/1651659772400-batches_id_chage.js +25 -0
- package/dist/migration/bank/1651660836295-batches_completed_at.js +13 -0
- package/package.json +1 -1
|
@@ -11,7 +11,9 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
11
11
|
|
|
12
12
|
var _account = _interopRequireDefault(require("../account"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _transactionBatch = _interopRequireDefault(require("../transaction-batch"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
@@ -37,7 +39,7 @@ let Disbursal = (_dec = (0, _typeorm.Entity)({
|
|
|
37
39
|
}), _dec8 = (0, _typeorm.Column)({
|
|
38
40
|
type: "varchar",
|
|
39
41
|
length: "50"
|
|
40
|
-
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Disbursal {
|
|
42
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec10 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.disbursal), _dec(_class = (_class2 = class Disbursal {
|
|
41
43
|
constructor() {
|
|
42
44
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
43
45
|
|
|
@@ -50,6 +52,8 @@ let Disbursal = (_dec = (0, _typeorm.Entity)({
|
|
|
50
52
|
_initializerDefineProperty(this, "bank_reference", _descriptor5, this);
|
|
51
53
|
|
|
52
54
|
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
55
|
+
|
|
56
|
+
_initializerDefineProperty(this, "batch", _descriptor7, this);
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
getPublicData() {
|
|
@@ -98,5 +102,10 @@ let Disbursal = (_dec = (0, _typeorm.Entity)({
|
|
|
98
102
|
enumerable: true,
|
|
99
103
|
writable: true,
|
|
100
104
|
initializer: null
|
|
105
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec10], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: null
|
|
101
110
|
})), _class2)) || _class);
|
|
102
111
|
exports.default = Disbursal;
|
|
@@ -13,8 +13,10 @@ var _ledger = _interopRequireDefault(require("./ledger"));
|
|
|
13
13
|
|
|
14
14
|
var _settledTransaction = _interopRequireDefault(require("./settled-transaction"));
|
|
15
15
|
|
|
16
|
+
var _transactionBatch = _interopRequireDefault(require("./transaction-batch"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
const ENTITIES = [_account.default, _disbursal.default, _ledger.default, _settledTransaction.default];
|
|
20
|
+
const ENTITIES = [_account.default, _disbursal.default, _ledger.default, _settledTransaction.default, _transactionBatch.default];
|
|
19
21
|
var _default = ENTITIES;
|
|
20
22
|
exports.default = _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
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 _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
11
|
+
|
|
12
|
+
var _disbursal = _interopRequireDefault(require("../disbursal"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
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 }); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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.'); }
|
|
23
|
+
|
|
24
|
+
let TransactionBatch = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'transaction_batch',
|
|
26
|
+
schema: 'bank'
|
|
27
|
+
}), _dec2 = (0, _typeorm.ManyToOne)(() => _transaction.default, {
|
|
28
|
+
primary: true
|
|
29
|
+
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'transaction_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _disbursal.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
33
|
+
name: 'disbursal_id',
|
|
34
|
+
referencedColumnName: 'id'
|
|
35
|
+
}), _dec6 = (0, _typeorm.CreateDateColumn)({
|
|
36
|
+
type: 'timestamp with time zone'
|
|
37
|
+
}), _dec7 = (0, _typeorm.UpdateDateColumn)({
|
|
38
|
+
type: 'timestamp with time zone'
|
|
39
|
+
}), _dec8 = (0, _typeorm.DeleteDateColumn)({
|
|
40
|
+
type: 'timestamp with time zone'
|
|
41
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
42
|
+
type: "timestamp with time zone",
|
|
43
|
+
nullable: true
|
|
44
|
+
}), _dec(_class = (_class2 = class TransactionBatch {
|
|
45
|
+
constructor() {
|
|
46
|
+
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
47
|
+
|
|
48
|
+
_initializerDefineProperty(this, "disbursal", _descriptor2, this);
|
|
49
|
+
|
|
50
|
+
_initializerDefineProperty(this, "created_at", _descriptor3, this);
|
|
51
|
+
|
|
52
|
+
_initializerDefineProperty(this, "updated_at", _descriptor4, this);
|
|
53
|
+
|
|
54
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor5, this);
|
|
55
|
+
|
|
56
|
+
_initializerDefineProperty(this, "completed_at", _descriptor6, this);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
60
|
+
configurable: true,
|
|
61
|
+
enumerable: true,
|
|
62
|
+
writable: true,
|
|
63
|
+
initializer: function () {
|
|
64
|
+
return _transaction.default;
|
|
65
|
+
}
|
|
66
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "disbursal", [_dec4, _dec5], {
|
|
67
|
+
configurable: true,
|
|
68
|
+
enumerable: true,
|
|
69
|
+
writable: true,
|
|
70
|
+
initializer: function () {
|
|
71
|
+
return _disbursal.default;
|
|
72
|
+
}
|
|
73
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
|
|
74
|
+
configurable: true,
|
|
75
|
+
enumerable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
initializer: null
|
|
78
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec7], {
|
|
79
|
+
configurable: true,
|
|
80
|
+
enumerable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
initializer: null
|
|
83
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec8], {
|
|
84
|
+
configurable: true,
|
|
85
|
+
enumerable: true,
|
|
86
|
+
writable: true,
|
|
87
|
+
initializer: null
|
|
88
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec9], {
|
|
89
|
+
configurable: true,
|
|
90
|
+
enumerable: true,
|
|
91
|
+
writable: true,
|
|
92
|
+
initializer: null
|
|
93
|
+
})), _class2)) || _class);
|
|
94
|
+
exports.default = TransactionBatch;
|
|
@@ -25,7 +25,9 @@ var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
|
25
25
|
|
|
26
26
|
var _organisationPaymentProvider = _interopRequireDefault(require("../organisation-payment-provider"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _transactionBatch = _interopRequireDefault(require("../../bank/transaction-batch"));
|
|
29
|
+
|
|
30
|
+
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
@@ -84,7 +86,7 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
84
86
|
type: 'timestamp with time zone'
|
|
85
87
|
}), _dec25 = (0, _typeorm.UpdateDateColumn)({
|
|
86
88
|
type: 'timestamp with time zone'
|
|
87
|
-
}), _dec(_class = (_class2 = class Transaction {
|
|
89
|
+
}), _dec26 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.transaction), _dec(_class = (_class2 = class Transaction {
|
|
88
90
|
constructor() {
|
|
89
91
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
90
92
|
|
|
@@ -117,6 +119,8 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
117
119
|
_initializerDefineProperty(this, "created_at", _descriptor15, this);
|
|
118
120
|
|
|
119
121
|
_initializerDefineProperty(this, "updated_at", _descriptor16, this);
|
|
122
|
+
|
|
123
|
+
_initializerDefineProperty(this, "batch", _descriptor17, this);
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
getPublicData() {
|
|
@@ -249,5 +253,10 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
249
253
|
enumerable: true,
|
|
250
254
|
writable: true,
|
|
251
255
|
initializer: null
|
|
256
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec26], {
|
|
257
|
+
configurable: true,
|
|
258
|
+
enumerable: true,
|
|
259
|
+
writable: true,
|
|
260
|
+
initializer: null
|
|
252
261
|
})), _class2)) || _class);
|
|
253
262
|
exports.default = Transaction;
|
package/dist/index.js
CHANGED
|
@@ -285,6 +285,12 @@ Object.defineProperty(exports, "TokenEntity", {
|
|
|
285
285
|
return _token.default;
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
|
+
Object.defineProperty(exports, "TransactionBatchEntity", {
|
|
289
|
+
enumerable: true,
|
|
290
|
+
get: function () {
|
|
291
|
+
return _transactionBatch.default;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
288
294
|
Object.defineProperty(exports, "TransactionEntity", {
|
|
289
295
|
enumerable: true,
|
|
290
296
|
get: function () {
|
|
@@ -400,6 +406,8 @@ var _ledger = _interopRequireDefault(require("./entity/bank/ledger"));
|
|
|
400
406
|
|
|
401
407
|
var _settledTransaction = _interopRequireDefault(require("./entity/bank/settled-transaction"));
|
|
402
408
|
|
|
409
|
+
var _transactionBatch = _interopRequireDefault(require("./entity/bank/transaction-batch"));
|
|
410
|
+
|
|
403
411
|
var _account2 = _interopRequireDefault(require("./entity/nuapay/account"));
|
|
404
412
|
|
|
405
413
|
var _balance = _interopRequireDefault(require("./entity/nuapay/balance"));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class batches1651658976210 {
|
|
4
|
+
name = 'batches1651658976210'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "bank"."transaction_batch" ("id" character varying NOT NULL, "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, "transaction_id" character varying, "disbursal_id" character varying, CONSTRAINT "PK_28b5ba6c2707e3c245748be801d" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "FK_e37fb3179be38490e78f27319ea" FOREIGN KEY ("transaction_id") REFERENCES "payment"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "FK_88458491934d1cdc2f34a0834dc" FOREIGN KEY ("disbursal_id") REFERENCES "bank"."disbursal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "FK_88458491934d1cdc2f34a0834dc"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "FK_e37fb3179be38490e78f27319ea"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "bank"."transaction_batch"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class batchesIdChage1651659772400 {
|
|
4
|
+
name = 'batchesIdChage1651659772400'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user_organisation" DROP CONSTRAINT "FK_81c4608739c8cf71fa1f96e11ae"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "user"."user_organisation" DROP CONSTRAINT "FK_d9628e009b6d71bf677c04f8494"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "PK_28b5ba6c2707e3c245748be801d"`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP COLUMN "id"`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "FK_e37fb3179be38490e78f27319ea"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ALTER COLUMN "transaction_id" SET NOT NULL`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "PK_e37fb3179be38490e78f27319ea" PRIMARY KEY ("transaction_id")`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "FK_e37fb3179be38490e78f27319ea" FOREIGN KEY ("transaction_id") REFERENCES "payment"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async down(queryRunner) {
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "FK_e37fb3179be38490e78f27319ea"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP CONSTRAINT "PK_e37fb3179be38490e78f27319ea"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ALTER COLUMN "transaction_id" DROP NOT NULL`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "FK_e37fb3179be38490e78f27319ea" FOREIGN KEY ("transaction_id") REFERENCES "bank"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD "id" character varying NOT NULL`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD CONSTRAINT "PK_28b5ba6c2707e3c245748be801d" PRIMARY KEY ("id")`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class batchesCompletedAt1651660836295 {
|
|
4
|
+
name = 'batchesCompletedAt1651660836295'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" ADD "completed_at" TIMESTAMP WITH TIME ZONE`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "bank"."transaction_batch" DROP COLUMN "completed_at"`);
|
|
12
|
+
}
|
|
13
|
+
}
|