@felloh-org/lambda-wrapper 1.0.17 → 1.0.18
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/cli/seed/create-schema.js +2 -0
- package/dist/entity/bank/disbursal/index.js +59 -6
- package/dist/entity/bank/index.js +3 -3
- package/dist/entity/bank/ledger/index.js +125 -0
- package/dist/entity/bank/settled-transaction/index.js +97 -0
- package/dist/entity/index.js +5 -1
- package/dist/entity/payment/index.js +5 -1
- package/dist/entity/payment/organisation-payment-provider/index.js +131 -0
- package/dist/entity/{bank/beneficiary-organisation → payment/payment-provider}/index.js +17 -30
- package/dist/entity/payment/transaction/index.js +34 -7
- package/dist/entity/total-processing/index.js +16 -0
- package/dist/entity/total-processing/transaction/index.js +126 -0
- package/dist/entity/total-processing/transaction-metadata/index.js +138 -0
- package/dist/entity/trust-payments/batch/index.js +85 -0
- package/dist/entity/trust-payments/chargeback/index.js +128 -0
- package/dist/entity/trust-payments/index.js +20 -0
- package/dist/entity/{bank/beneficiary-provider → trust-payments/merchant}/index.js +28 -27
- package/dist/entity/trust-payments/transaction/index.js +152 -0
- package/dist/entity/user/organisation/index.js +2 -6
- package/dist/entity/user/user/index.js +1 -3
- package/dist/index.js +100 -36
- package/dist/migration/bank/1642313073694-bank-initial.js +0 -10
- package/dist/migration/bank/1645101410250-bank_disbursal.js +28 -0
- package/dist/migration/bank/1645102501719-bank_disbursal_unique.js +17 -0
- package/dist/migration/bank/1645103420324-ledger.js +19 -0
- package/dist/migration/bank/1645103864454-ledger-defaults.js +15 -0
- package/dist/migration/bank/1645108723739-bank-settled-transaction.js +19 -0
- package/dist/migration/payment/1643717852114-payment-providers.js +19 -0
- package/dist/migration/payment/1643718714719-payment-providers-method.js +15 -0
- package/dist/migration/payment/1643719203328-payment-providers-method.js +22 -0
- package/dist/migration/payment/1644395533722-transaction_provider.js +15 -0
- package/dist/migration/payment/1644396011044-transaction_provider_ref.js +13 -0
- package/dist/migration/total-processing/1644309449035-tpro_transactions.js +13 -0
- package/dist/migration/total-processing/1644411639660-total_processing_entity.js +13 -0
- package/dist/migration/total-processing/1644842797566-relations.js +19 -0
- package/dist/migration/total-processing/1644926407236-tp_rec_nullable.js +13 -0
- package/dist/migration/total-processing/1644933594682-tp_rec_status.js +13 -0
- package/dist/migration/total-processing/1645010756173-tp_transaction_metadata.js +15 -0
- package/dist/migration/trust-payments/1644016335590-tp_merchants.js +13 -0
- package/dist/migration/trust-payments/1644018105481-tp_add_batch.js +15 -0
- package/dist/migration/trust-payments/1644020330502-tp_transaction.js +17 -0
- package/dist/migration/trust-payments/1644791277717-chargeback.js +15 -0
- package/package.json +2 -1
|
@@ -12,11 +12,13 @@ const run = async () => {
|
|
|
12
12
|
const queryRunner = await connection.createQueryRunner();
|
|
13
13
|
await queryRunner.createDatabase('felloh', true);
|
|
14
14
|
|
|
15
|
+
await queryRunner.createSchema('trust_payments', true);
|
|
15
16
|
await queryRunner.createSchema('nuapay', true);
|
|
16
17
|
await queryRunner.createSchema('agent_data', true);
|
|
17
18
|
await queryRunner.createSchema('payment', true);
|
|
18
19
|
await queryRunner.createSchema('bank', true);
|
|
19
20
|
await queryRunner.createSchema('user', true);
|
|
21
|
+
await queryRunner.createSchema('total_processing', true);
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
run();
|
|
@@ -7,7 +7,13 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
|
+
|
|
12
|
+
var _account = _interopRequireDefault(require("../account"));
|
|
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 }; }
|
|
11
17
|
|
|
12
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 }); }
|
|
13
19
|
|
|
@@ -15,25 +21,72 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
15
21
|
|
|
16
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.'); }
|
|
17
23
|
|
|
18
|
-
let
|
|
24
|
+
let Disbursal = (_dec = (0, _typeorm.Entity)({
|
|
19
25
|
name: 'disbursal',
|
|
20
26
|
schema: 'bank'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar", {
|
|
28
|
+
unique: true
|
|
29
|
+
}), _dec3 = (0, _typeorm.Column)({
|
|
30
|
+
type: "int"
|
|
31
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
32
|
+
name: 'organisation_id',
|
|
33
|
+
referencedColumnName: 'id'
|
|
34
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _account.default), _dec7 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
name: 'iban',
|
|
36
|
+
referencedColumnName: 'iban'
|
|
37
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: "50"
|
|
40
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Disbursal {
|
|
22
41
|
constructor() {
|
|
23
42
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
43
|
|
|
25
|
-
_initializerDefineProperty(this, "
|
|
44
|
+
_initializerDefineProperty(this, "amount", _descriptor2, this);
|
|
45
|
+
|
|
46
|
+
_initializerDefineProperty(this, "organisation", _descriptor3, this);
|
|
47
|
+
|
|
48
|
+
_initializerDefineProperty(this, "iban", _descriptor4, this);
|
|
49
|
+
|
|
50
|
+
_initializerDefineProperty(this, "bank_reference", _descriptor5, this);
|
|
51
|
+
|
|
52
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
26
53
|
}
|
|
27
54
|
|
|
28
55
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
56
|
+
configurable: true,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
initializer: function () {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec3], {
|
|
63
|
+
configurable: true,
|
|
64
|
+
enumerable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
initializer: null
|
|
67
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec4, _dec5], {
|
|
68
|
+
configurable: true,
|
|
69
|
+
enumerable: true,
|
|
70
|
+
writable: true,
|
|
71
|
+
initializer: function () {
|
|
72
|
+
return _organisation.default;
|
|
73
|
+
}
|
|
74
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec6, _dec7], {
|
|
75
|
+
configurable: true,
|
|
76
|
+
enumerable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
initializer: function () {
|
|
79
|
+
return _account.default;
|
|
80
|
+
}
|
|
81
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "bank_reference", [_dec8], {
|
|
29
82
|
configurable: true,
|
|
30
83
|
enumerable: true,
|
|
31
84
|
writable: true,
|
|
32
85
|
initializer: null
|
|
33
|
-
}),
|
|
86
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
|
|
34
87
|
configurable: true,
|
|
35
88
|
enumerable: true,
|
|
36
89
|
writable: true,
|
|
37
90
|
initializer: null
|
|
38
91
|
})), _class2)) || _class);
|
|
39
|
-
exports.default =
|
|
92
|
+
exports.default = Disbursal;
|
|
@@ -9,12 +9,12 @@ var _account = _interopRequireDefault(require("./account"));
|
|
|
9
9
|
|
|
10
10
|
var _disbursal = _interopRequireDefault(require("./disbursal"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _ledger = _interopRequireDefault(require("./ledger"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _settledTransaction = _interopRequireDefault(require("./settled-transaction"));
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const ENTITIES = [_account.default, _disbursal.default,
|
|
18
|
+
const ENTITIES = [_account.default, _disbursal.default, _ledger.default, _settledTransaction.default];
|
|
19
19
|
var _default = ENTITIES;
|
|
20
20
|
exports.default = _default;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
|
+
|
|
12
|
+
var _disbursal = _interopRequireDefault(require("../disbursal"));
|
|
13
|
+
|
|
14
|
+
var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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 }); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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.'); }
|
|
25
|
+
|
|
26
|
+
let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
27
|
+
name: 'ledger',
|
|
28
|
+
schema: 'bank'
|
|
29
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "50"
|
|
32
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
33
|
+
name: 'organisation_id',
|
|
34
|
+
referencedColumnName: 'id'
|
|
35
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
36
|
+
type: "boolean",
|
|
37
|
+
default: false
|
|
38
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
39
|
+
type: "boolean",
|
|
40
|
+
default: false
|
|
41
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _transaction.default, {
|
|
42
|
+
nullable: true
|
|
43
|
+
}), _dec8 = (0, _typeorm.JoinColumn)({
|
|
44
|
+
name: 'transaction_id',
|
|
45
|
+
referencedColumnName: 'id'
|
|
46
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _disbursal.default, {
|
|
47
|
+
nullable: true
|
|
48
|
+
}), _dec10 = (0, _typeorm.JoinColumn)({
|
|
49
|
+
name: 'disbursal_id',
|
|
50
|
+
referencedColumnName: 'id'
|
|
51
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
52
|
+
type: "int"
|
|
53
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Ledger {
|
|
54
|
+
constructor() {
|
|
55
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "is_credit", _descriptor3, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "is_debit", _descriptor4, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "transaction", _descriptor5, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "disbursal", _descriptor6, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "amount", _descriptor7, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
73
|
+
configurable: true,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
initializer: function () {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
80
|
+
configurable: true,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
initializer: function () {
|
|
84
|
+
return _organisation.default;
|
|
85
|
+
}
|
|
86
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "is_credit", [_dec5], {
|
|
87
|
+
configurable: true,
|
|
88
|
+
enumerable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
initializer: function () {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "is_debit", [_dec6], {
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
initializer: function () {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec7, _dec8], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: function () {
|
|
105
|
+
return _transaction.default;
|
|
106
|
+
}
|
|
107
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "disbursal", [_dec9, _dec10], {
|
|
108
|
+
configurable: true,
|
|
109
|
+
enumerable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
initializer: function () {
|
|
112
|
+
return _disbursal.default;
|
|
113
|
+
}
|
|
114
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec11], {
|
|
115
|
+
configurable: true,
|
|
116
|
+
enumerable: true,
|
|
117
|
+
writable: true,
|
|
118
|
+
initializer: null
|
|
119
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
120
|
+
configurable: true,
|
|
121
|
+
enumerable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
initializer: null
|
|
124
|
+
})), _class2)) || _class);
|
|
125
|
+
exports.default = Ledger;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _account = _interopRequireDefault(require("../account"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _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 SettledTransaction = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'settled_transaction',
|
|
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.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: "50"
|
|
35
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
36
|
+
type: "date"
|
|
37
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _account.default), _dec7 = (0, _typeorm.JoinColumn)({
|
|
38
|
+
name: 'iban',
|
|
39
|
+
referencedColumnName: 'iban'
|
|
40
|
+
}), _dec8 = (0, _typeorm.ManyToOne)(() => _account.default), _dec9 = (0, _typeorm.JoinColumn)({
|
|
41
|
+
name: 'counterparty_iban',
|
|
42
|
+
referencedColumnName: 'iban'
|
|
43
|
+
}), _dec10 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class SettledTransaction {
|
|
44
|
+
constructor() {
|
|
45
|
+
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
46
|
+
|
|
47
|
+
_initializerDefineProperty(this, "bank_reference", _descriptor2, this);
|
|
48
|
+
|
|
49
|
+
_initializerDefineProperty(this, "posting_date", _descriptor3, this);
|
|
50
|
+
|
|
51
|
+
_initializerDefineProperty(this, "iban", _descriptor4, this);
|
|
52
|
+
|
|
53
|
+
_initializerDefineProperty(this, "counterparty_iban", _descriptor5, this);
|
|
54
|
+
|
|
55
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
59
|
+
configurable: true,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
initializer: function () {
|
|
63
|
+
return _transaction.default;
|
|
64
|
+
}
|
|
65
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bank_reference", [_dec4], {
|
|
66
|
+
configurable: true,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
writable: true,
|
|
69
|
+
initializer: function () {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "posting_date", [_dec5], {
|
|
73
|
+
configurable: true,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
initializer: null
|
|
77
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec6, _dec7], {
|
|
78
|
+
configurable: true,
|
|
79
|
+
enumerable: true,
|
|
80
|
+
writable: true,
|
|
81
|
+
initializer: function () {
|
|
82
|
+
return _account.default;
|
|
83
|
+
}
|
|
84
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "counterparty_iban", [_dec8, _dec9], {
|
|
85
|
+
configurable: true,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
initializer: function () {
|
|
89
|
+
return _account.default;
|
|
90
|
+
}
|
|
91
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
|
|
92
|
+
configurable: true,
|
|
93
|
+
enumerable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
initializer: null
|
|
96
|
+
})), _class2)) || _class);
|
|
97
|
+
exports.default = SettledTransaction;
|
package/dist/entity/index.js
CHANGED
|
@@ -15,8 +15,12 @@ var _bank = _interopRequireDefault(require("./bank"));
|
|
|
15
15
|
|
|
16
16
|
var _user = _interopRequireDefault(require("./user"));
|
|
17
17
|
|
|
18
|
+
var _trustPayments = _interopRequireDefault(require("./trust-payments"));
|
|
19
|
+
|
|
20
|
+
var _totalProcessing = _interopRequireDefault(require("./total-processing"));
|
|
21
|
+
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
23
|
|
|
20
|
-
const ENTITIES = [..._agentData.default, ..._nuapay.default, ..._payment.default, ...
|
|
24
|
+
const ENTITIES = [..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
|
|
21
25
|
var _default = ENTITIES;
|
|
22
26
|
exports.default = _default;
|
|
@@ -21,8 +21,12 @@ var _transactionType = _interopRequireDefault(require("./transaction-type"));
|
|
|
21
21
|
|
|
22
22
|
var _transactionMetadata = _interopRequireDefault(require("./transaction-metadata"));
|
|
23
23
|
|
|
24
|
+
var _organisationPaymentProvider = _interopRequireDefault(require("./organisation-payment-provider"));
|
|
25
|
+
|
|
26
|
+
var _paymentProvider = _interopRequireDefault(require("./payment-provider"));
|
|
27
|
+
|
|
24
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
29
|
|
|
26
|
-
const ENTITIES = [_paymentLink.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionType.default, _transactionMetadata.default];
|
|
30
|
+
const ENTITIES = [_organisationPaymentProvider.default, _paymentLink.default, _paymentProvider.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionType.default, _transactionMetadata.default];
|
|
27
31
|
var _default = ENTITIES;
|
|
28
32
|
exports.default = _default;
|
|
@@ -0,0 +1,131 @@
|
|
|
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 _uuid = require("uuid");
|
|
11
|
+
|
|
12
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
13
|
+
|
|
14
|
+
var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
15
|
+
|
|
16
|
+
var _transactionMethod = _interopRequireDefault(require("../transaction-method"));
|
|
17
|
+
|
|
18
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
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 }); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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.'); }
|
|
27
|
+
|
|
28
|
+
let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
29
|
+
name: 'organisation_payment_provider',
|
|
30
|
+
schema: 'payment'
|
|
31
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
32
|
+
name: 'organisation_id',
|
|
33
|
+
referencedColumnName: 'id'
|
|
34
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
name: 'payment_provider_id',
|
|
36
|
+
referencedColumnName: 'id'
|
|
37
|
+
}), _dec7 = (0, _typeorm.ManyToMany)(() => _transactionMethod.default, () => {}, {
|
|
38
|
+
cascade: true
|
|
39
|
+
}), _dec8 = (0, _typeorm.JoinTable)({
|
|
40
|
+
name: "organisation_payment_provider_method",
|
|
41
|
+
schema: "payment",
|
|
42
|
+
joinColumn: {
|
|
43
|
+
name: "organisation_payment_provider_id",
|
|
44
|
+
referencedColumnName: "id"
|
|
45
|
+
},
|
|
46
|
+
inverseJoinColumn: {
|
|
47
|
+
name: "transaction_method_id",
|
|
48
|
+
referencedColumnName: "id"
|
|
49
|
+
}
|
|
50
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
51
|
+
type: "varchar",
|
|
52
|
+
length: "150"
|
|
53
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
54
|
+
type: "varchar",
|
|
55
|
+
length: "150"
|
|
56
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
57
|
+
type: "varchar",
|
|
58
|
+
length: "4"
|
|
59
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationPaymentProvider {
|
|
60
|
+
constructor() {
|
|
61
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor3, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "transaction_methods", _descriptor4, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "public_key", _descriptor5, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "secret_key", _descriptor6, this);
|
|
72
|
+
|
|
73
|
+
_initializerDefineProperty(this, "secret_key_last_four", _descriptor7, this);
|
|
74
|
+
|
|
75
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
79
|
+
configurable: true,
|
|
80
|
+
enumerable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
initializer: function () {
|
|
83
|
+
return (0, _uuid.v4)();
|
|
84
|
+
}
|
|
85
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
86
|
+
configurable: true,
|
|
87
|
+
enumerable: true,
|
|
88
|
+
writable: true,
|
|
89
|
+
initializer: function () {
|
|
90
|
+
return _organisation.default;
|
|
91
|
+
}
|
|
92
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec5, _dec6], {
|
|
93
|
+
configurable: true,
|
|
94
|
+
enumerable: true,
|
|
95
|
+
writable: true,
|
|
96
|
+
initializer: function () {
|
|
97
|
+
return _paymentProvider.default;
|
|
98
|
+
}
|
|
99
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "transaction_methods", [_dec7, _dec8], {
|
|
100
|
+
configurable: true,
|
|
101
|
+
enumerable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
initializer: null
|
|
104
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "public_key", [_dec9], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: function () {
|
|
109
|
+
return "";
|
|
110
|
+
}
|
|
111
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "secret_key", [_dec10], {
|
|
112
|
+
configurable: true,
|
|
113
|
+
enumerable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
initializer: function () {
|
|
116
|
+
return "";
|
|
117
|
+
}
|
|
118
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "secret_key_last_four", [_dec11], {
|
|
119
|
+
configurable: true,
|
|
120
|
+
enumerable: true,
|
|
121
|
+
writable: true,
|
|
122
|
+
initializer: function () {
|
|
123
|
+
return "";
|
|
124
|
+
}
|
|
125
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
126
|
+
configurable: true,
|
|
127
|
+
enumerable: true,
|
|
128
|
+
writable: true,
|
|
129
|
+
initializer: null
|
|
130
|
+
})), _class2)) || _class);
|
|
131
|
+
exports.default = OrganisationPaymentProvider;
|
|
@@ -7,13 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
17
13
|
|
|
18
14
|
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
15
|
|
|
@@ -21,49 +17,40 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
21
17
|
|
|
22
18
|
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
19
|
|
|
24
|
-
let
|
|
25
|
-
name: '
|
|
26
|
-
schema: '
|
|
27
|
-
}), _dec2 = (0, _typeorm.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
referencedColumnName: 'iban'
|
|
33
|
-
}), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryOrganisation {
|
|
20
|
+
let PaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
21
|
+
name: 'payment_provider',
|
|
22
|
+
schema: 'payment'
|
|
23
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
24
|
+
type: "varchar",
|
|
25
|
+
length: "150",
|
|
26
|
+
nullable: true
|
|
27
|
+
}), _dec4 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentProvider {
|
|
34
28
|
constructor() {
|
|
35
29
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
36
30
|
|
|
37
|
-
_initializerDefineProperty(this, "
|
|
31
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
38
32
|
|
|
39
|
-
_initializerDefineProperty(this, "
|
|
40
|
-
|
|
41
|
-
_initializerDefineProperty(this, "created_at", _descriptor4, this);
|
|
33
|
+
_initializerDefineProperty(this, "created_at", _descriptor3, this);
|
|
42
34
|
}
|
|
43
35
|
|
|
44
36
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
45
|
-
configurable: true,
|
|
46
|
-
enumerable: true,
|
|
47
|
-
writable: true,
|
|
48
|
-
initializer: null
|
|
49
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
50
37
|
configurable: true,
|
|
51
38
|
enumerable: true,
|
|
52
39
|
writable: true,
|
|
53
40
|
initializer: function () {
|
|
54
|
-
return
|
|
41
|
+
return (0, _uuid.v4)();
|
|
55
42
|
}
|
|
56
|
-
}),
|
|
43
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
57
44
|
configurable: true,
|
|
58
45
|
enumerable: true,
|
|
59
46
|
writable: true,
|
|
60
47
|
initializer: function () {
|
|
61
|
-
return
|
|
48
|
+
return "";
|
|
62
49
|
}
|
|
63
|
-
}),
|
|
50
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec4], {
|
|
64
51
|
configurable: true,
|
|
65
52
|
enumerable: true,
|
|
66
53
|
writable: true,
|
|
67
54
|
initializer: null
|
|
68
55
|
})), _class2)) || _class);
|
|
69
|
-
exports.default =
|
|
56
|
+
exports.default = PaymentProvider;
|
|
@@ -21,7 +21,9 @@ var _paymentLink = _interopRequireDefault(require("../payment-link"));
|
|
|
21
21
|
|
|
22
22
|
var _transactionMetadata = _interopRequireDefault(require("../transaction-metadata"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
25
|
+
|
|
26
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
@@ -58,10 +60,17 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
58
60
|
}), _dec15 = (0, _typeorm.JoinColumn)({
|
|
59
61
|
name: 'payment_link_id',
|
|
60
62
|
referencedColumnName: 'id'
|
|
61
|
-
}), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.
|
|
63
|
+
}), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec18 = (0, _typeorm.JoinColumn)({
|
|
64
|
+
name: 'payment_provider_id',
|
|
65
|
+
referencedColumnName: 'id'
|
|
66
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
67
|
+
type: "varchar",
|
|
68
|
+
length: "250",
|
|
69
|
+
nullable: true
|
|
70
|
+
}), _dec20 = (0, _typeorm.Column)({
|
|
62
71
|
type: "timestamp with time zone",
|
|
63
72
|
nullable: true
|
|
64
|
-
}),
|
|
73
|
+
}), _dec21 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Transaction {
|
|
65
74
|
constructor() {
|
|
66
75
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
67
76
|
|
|
@@ -81,9 +90,13 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
81
90
|
|
|
82
91
|
_initializerDefineProperty(this, "metadata", _descriptor9, this);
|
|
83
92
|
|
|
84
|
-
_initializerDefineProperty(this, "
|
|
93
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor10, this);
|
|
94
|
+
|
|
95
|
+
_initializerDefineProperty(this, "provider_reference", _descriptor11, this);
|
|
85
96
|
|
|
86
|
-
_initializerDefineProperty(this, "
|
|
97
|
+
_initializerDefineProperty(this, "completed_at", _descriptor12, this);
|
|
98
|
+
|
|
99
|
+
_initializerDefineProperty(this, "created_at", _descriptor13, this);
|
|
87
100
|
}
|
|
88
101
|
|
|
89
102
|
getPublicData() {
|
|
@@ -175,12 +188,26 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
175
188
|
enumerable: true,
|
|
176
189
|
writable: true,
|
|
177
190
|
initializer: null
|
|
178
|
-
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
191
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec17, _dec18], {
|
|
192
|
+
configurable: true,
|
|
193
|
+
enumerable: true,
|
|
194
|
+
writable: true,
|
|
195
|
+
initializer: function () {
|
|
196
|
+
return _paymentProvider.default;
|
|
197
|
+
}
|
|
198
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec19], {
|
|
199
|
+
configurable: true,
|
|
200
|
+
enumerable: true,
|
|
201
|
+
writable: true,
|
|
202
|
+
initializer: function () {
|
|
203
|
+
return "";
|
|
204
|
+
}
|
|
205
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec20], {
|
|
179
206
|
configurable: true,
|
|
180
207
|
enumerable: true,
|
|
181
208
|
writable: true,
|
|
182
209
|
initializer: null
|
|
183
|
-
}),
|
|
210
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec21], {
|
|
184
211
|
configurable: true,
|
|
185
212
|
enumerable: true,
|
|
186
213
|
writable: true,
|