@felloh-org/lambda-wrapper 1.6.5 → 1.6.6
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 +1 -0
- package/dist/entity/index.js +3 -1
- package/dist/entity/saltedge/account/index.js +126 -0
- package/dist/entity/saltedge/connection/index.js +111 -0
- package/dist/entity/saltedge/customer/index.js +71 -0
- package/dist/entity/saltedge/index.js +20 -0
- package/dist/entity/saltedge/transaction/index.js +158 -0
- package/dist/index.js +32 -0
- package/dist/migration/saltedge/1674567015124-saltedge_entities.js +41 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ const run = async () => {
|
|
|
24
24
|
await queryRunner.createSchema('scratch', true);
|
|
25
25
|
await queryRunner.createSchema('nuvei', true);
|
|
26
26
|
await queryRunner.createSchema('reference', true);
|
|
27
|
+
await queryRunner.createSchema('saltedge', true);
|
|
27
28
|
} catch (error) {
|
|
28
29
|
console.log(error);
|
|
29
30
|
|
package/dist/entity/index.js
CHANGED
|
@@ -27,8 +27,10 @@ var _nuvei = _interopRequireDefault(require("./nuvei"));
|
|
|
27
27
|
|
|
28
28
|
var _reference = _interopRequireDefault(require("./reference"));
|
|
29
29
|
|
|
30
|
+
var _saltedge = _interopRequireDefault(require("./saltedge"));
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
32
|
-
const ENTITIES = [..._scratch.default, ..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default, ..._nuvei.default, ..._reference.default];
|
|
34
|
+
const ENTITIES = [..._scratch.default, ..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default, ..._nuvei.default, ..._reference.default, ..._saltedge.default];
|
|
33
35
|
var _default = ENTITIES;
|
|
34
36
|
exports.default = _default;
|
|
@@ -0,0 +1,126 @@
|
|
|
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 _customer = _interopRequireDefault(require("../customer"));
|
|
13
|
+
|
|
14
|
+
var _connection = _interopRequireDefault(require("../connection"));
|
|
15
|
+
|
|
16
|
+
var _account = _interopRequireDefault(require("../../bank/account"));
|
|
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;
|
|
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 Account = (_dec = (0, _typeorm.Entity)({
|
|
29
|
+
name: 'account',
|
|
30
|
+
schema: 'saltedge'
|
|
31
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: "150"
|
|
34
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _connection.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
name: 'connection_id',
|
|
36
|
+
referencedColumnName: 'id'
|
|
37
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _customer.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
38
|
+
name: 'customer_id',
|
|
39
|
+
referencedColumnName: 'id'
|
|
40
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
41
|
+
name: 'organisation_id',
|
|
42
|
+
referencedColumnName: 'id'
|
|
43
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _account.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
44
|
+
name: 'iban',
|
|
45
|
+
referencedColumnName: 'iban'
|
|
46
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
47
|
+
type: "varchar",
|
|
48
|
+
length: "150",
|
|
49
|
+
nullable: true
|
|
50
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)({
|
|
51
|
+
type: 'timestamp with time zone'
|
|
52
|
+
}), _dec13 = (0, _typeorm.UpdateDateColumn)({
|
|
53
|
+
type: 'timestamp with time zone'
|
|
54
|
+
}), _dec(_class = (_class2 = class Account {
|
|
55
|
+
constructor() {
|
|
56
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
57
|
+
|
|
58
|
+
_initializerDefineProperty(this, "connection", _descriptor2, this);
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(this, "customer", _descriptor3, this);
|
|
61
|
+
|
|
62
|
+
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
63
|
+
|
|
64
|
+
_initializerDefineProperty(this, "iban", _descriptor5, this);
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(this, "name", _descriptor6, this);
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
74
|
+
configurable: true,
|
|
75
|
+
enumerable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
initializer: function () {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "connection", [_dec3, _dec4], {
|
|
81
|
+
configurable: true,
|
|
82
|
+
enumerable: true,
|
|
83
|
+
writable: true,
|
|
84
|
+
initializer: function () {
|
|
85
|
+
return _connection.default;
|
|
86
|
+
}
|
|
87
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec5, _dec6], {
|
|
88
|
+
configurable: true,
|
|
89
|
+
enumerable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
initializer: function () {
|
|
92
|
+
return _customer.default;
|
|
93
|
+
}
|
|
94
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec7, _dec8], {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
initializer: function () {
|
|
99
|
+
return _organisation.default;
|
|
100
|
+
}
|
|
101
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec9, _dec10], {
|
|
102
|
+
configurable: true,
|
|
103
|
+
enumerable: true,
|
|
104
|
+
writable: true,
|
|
105
|
+
initializer: function () {
|
|
106
|
+
return _account.default;
|
|
107
|
+
}
|
|
108
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec11], {
|
|
109
|
+
configurable: true,
|
|
110
|
+
enumerable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
initializer: function () {
|
|
113
|
+
return "";
|
|
114
|
+
}
|
|
115
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
116
|
+
configurable: true,
|
|
117
|
+
enumerable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
initializer: null
|
|
120
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
|
|
121
|
+
configurable: true,
|
|
122
|
+
enumerable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
initializer: null
|
|
125
|
+
})), _class2)) || _class);
|
|
126
|
+
exports.default = Account;
|
|
@@ -0,0 +1,111 @@
|
|
|
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 _customer = _interopRequireDefault(require("../customer"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
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 Connection = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'connection',
|
|
26
|
+
schema: 'saltedge'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
28
|
+
type: "varchar",
|
|
29
|
+
length: "150"
|
|
30
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _customer.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
31
|
+
name: 'customer_id',
|
|
32
|
+
referencedColumnName: 'id'
|
|
33
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
34
|
+
name: 'organisation_id',
|
|
35
|
+
referencedColumnName: 'id'
|
|
36
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: "150",
|
|
39
|
+
nullable: true
|
|
40
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
41
|
+
type: "varchar",
|
|
42
|
+
length: "150",
|
|
43
|
+
nullable: true
|
|
44
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)({
|
|
45
|
+
type: 'timestamp with time zone'
|
|
46
|
+
}), _dec10 = (0, _typeorm.UpdateDateColumn)({
|
|
47
|
+
type: 'timestamp with time zone'
|
|
48
|
+
}), _dec(_class = (_class2 = class Connection {
|
|
49
|
+
constructor() {
|
|
50
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
51
|
+
|
|
52
|
+
_initializerDefineProperty(this, "customer", _descriptor2, this);
|
|
53
|
+
|
|
54
|
+
_initializerDefineProperty(this, "organisation", _descriptor3, this);
|
|
55
|
+
|
|
56
|
+
_initializerDefineProperty(this, "provider_name", _descriptor4, this);
|
|
57
|
+
|
|
58
|
+
_initializerDefineProperty(this, "provider_code", _descriptor5, this);
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
61
|
+
|
|
62
|
+
_initializerDefineProperty(this, "updated_at", _descriptor7, this);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
66
|
+
configurable: true,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
writable: true,
|
|
69
|
+
initializer: function () {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec3, _dec4], {
|
|
73
|
+
configurable: true,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
initializer: function () {
|
|
77
|
+
return _customer.default;
|
|
78
|
+
}
|
|
79
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec5, _dec6], {
|
|
80
|
+
configurable: true,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
initializer: function () {
|
|
84
|
+
return _organisation.default;
|
|
85
|
+
}
|
|
86
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "provider_name", [_dec7], {
|
|
87
|
+
configurable: true,
|
|
88
|
+
enumerable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
initializer: function () {
|
|
91
|
+
return "";
|
|
92
|
+
}
|
|
93
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "provider_code", [_dec8], {
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
initializer: function () {
|
|
98
|
+
return "";
|
|
99
|
+
}
|
|
100
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: null
|
|
105
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec10], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: null
|
|
110
|
+
})), _class2)) || _class);
|
|
111
|
+
exports.default = Connection;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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 }); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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.'); }
|
|
21
|
+
|
|
22
|
+
let Customer = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'customer',
|
|
24
|
+
schema: 'saltedge'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "150"
|
|
28
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
29
|
+
name: 'organisation_id',
|
|
30
|
+
referencedColumnName: 'id'
|
|
31
|
+
}), _dec5 = (0, _typeorm.CreateDateColumn)({
|
|
32
|
+
type: 'timestamp with time zone'
|
|
33
|
+
}), _dec6 = (0, _typeorm.UpdateDateColumn)({
|
|
34
|
+
type: 'timestamp with time zone'
|
|
35
|
+
}), _dec(_class = (_class2 = class Customer {
|
|
36
|
+
constructor() {
|
|
37
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
38
|
+
|
|
39
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
40
|
+
|
|
41
|
+
_initializerDefineProperty(this, "created_at", _descriptor3, this);
|
|
42
|
+
|
|
43
|
+
_initializerDefineProperty(this, "updated_at", _descriptor4, this);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
initializer: function () {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
54
|
+
configurable: true,
|
|
55
|
+
enumerable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
initializer: function () {
|
|
58
|
+
return _organisation.default;
|
|
59
|
+
}
|
|
60
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
|
|
61
|
+
configurable: true,
|
|
62
|
+
enumerable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
initializer: null
|
|
65
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec6], {
|
|
66
|
+
configurable: true,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
writable: true,
|
|
69
|
+
initializer: null
|
|
70
|
+
})), _class2)) || _class);
|
|
71
|
+
exports.default = Customer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _account = _interopRequireDefault(require("./account"));
|
|
9
|
+
|
|
10
|
+
var _connection = _interopRequireDefault(require("./connection"));
|
|
11
|
+
|
|
12
|
+
var _customer = _interopRequireDefault(require("./customer"));
|
|
13
|
+
|
|
14
|
+
var _transaction = _interopRequireDefault(require("./transaction"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const ENTITIES = [_account.default, _connection.default, _customer.default, _transaction.default];
|
|
19
|
+
var _default = ENTITIES;
|
|
20
|
+
exports.default = _default;
|
|
@@ -0,0 +1,158 @@
|
|
|
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 _account = _interopRequireDefault(require("../account"));
|
|
13
|
+
|
|
14
|
+
var _account2 = _interopRequireDefault(require("../../bank/account"));
|
|
15
|
+
|
|
16
|
+
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;
|
|
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 Transaction = (_dec = (0, _typeorm.Entity)({
|
|
27
|
+
name: 'transaction',
|
|
28
|
+
schema: 'saltedge'
|
|
29
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "150"
|
|
32
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _account.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
33
|
+
name: 'account_id',
|
|
34
|
+
referencedColumnName: 'id'
|
|
35
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
36
|
+
name: 'organisation_id',
|
|
37
|
+
referencedColumnName: 'id'
|
|
38
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _account2.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
39
|
+
name: 'payee',
|
|
40
|
+
referencedColumnName: 'iban'
|
|
41
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _account2.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
42
|
+
name: 'payer',
|
|
43
|
+
referencedColumnName: 'iban'
|
|
44
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
45
|
+
type: "int"
|
|
46
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
47
|
+
type: "varchar",
|
|
48
|
+
length: "250",
|
|
49
|
+
nullable: true
|
|
50
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
51
|
+
type: "varchar",
|
|
52
|
+
length: "100"
|
|
53
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
54
|
+
type: "varchar",
|
|
55
|
+
length: "100",
|
|
56
|
+
nullable: true
|
|
57
|
+
}), _dec15 = (0, _typeorm.CreateDateColumn)({
|
|
58
|
+
type: 'timestamp with time zone'
|
|
59
|
+
}), _dec16 = (0, _typeorm.UpdateDateColumn)({
|
|
60
|
+
type: 'timestamp with time zone'
|
|
61
|
+
}), _dec(_class = (_class2 = class Transaction {
|
|
62
|
+
constructor() {
|
|
63
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "account", _descriptor2, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "organisation", _descriptor3, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "payee", _descriptor4, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "payer", _descriptor5, this);
|
|
72
|
+
|
|
73
|
+
_initializerDefineProperty(this, "amount", _descriptor6, this);
|
|
74
|
+
|
|
75
|
+
_initializerDefineProperty(this, "description", _descriptor7, this);
|
|
76
|
+
|
|
77
|
+
_initializerDefineProperty(this, "status", _descriptor8, this);
|
|
78
|
+
|
|
79
|
+
_initializerDefineProperty(this, "category", _descriptor9, this);
|
|
80
|
+
|
|
81
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
82
|
+
|
|
83
|
+
_initializerDefineProperty(this, "updated_at", _descriptor11, this);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
87
|
+
configurable: true,
|
|
88
|
+
enumerable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
initializer: function () {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "account", [_dec3, _dec4], {
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
initializer: function () {
|
|
98
|
+
return _account.default;
|
|
99
|
+
}
|
|
100
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec5, _dec6], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: function () {
|
|
105
|
+
return _organisation.default;
|
|
106
|
+
}
|
|
107
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "payee", [_dec7, _dec8], {
|
|
108
|
+
configurable: true,
|
|
109
|
+
enumerable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
initializer: function () {
|
|
112
|
+
return _account2.default;
|
|
113
|
+
}
|
|
114
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "payer", [_dec9, _dec10], {
|
|
115
|
+
configurable: true,
|
|
116
|
+
enumerable: true,
|
|
117
|
+
writable: true,
|
|
118
|
+
initializer: function () {
|
|
119
|
+
return _account2.default;
|
|
120
|
+
}
|
|
121
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec11], {
|
|
122
|
+
configurable: true,
|
|
123
|
+
enumerable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
initializer: null
|
|
126
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec12], {
|
|
127
|
+
configurable: true,
|
|
128
|
+
enumerable: true,
|
|
129
|
+
writable: true,
|
|
130
|
+
initializer: function () {
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec13], {
|
|
134
|
+
configurable: true,
|
|
135
|
+
enumerable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
initializer: function () {
|
|
138
|
+
return "";
|
|
139
|
+
}
|
|
140
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "category", [_dec14], {
|
|
141
|
+
configurable: true,
|
|
142
|
+
enumerable: true,
|
|
143
|
+
writable: true,
|
|
144
|
+
initializer: function () {
|
|
145
|
+
return "";
|
|
146
|
+
}
|
|
147
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec15], {
|
|
148
|
+
configurable: true,
|
|
149
|
+
enumerable: true,
|
|
150
|
+
writable: true,
|
|
151
|
+
initializer: null
|
|
152
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec16], {
|
|
153
|
+
configurable: true,
|
|
154
|
+
enumerable: true,
|
|
155
|
+
writable: true,
|
|
156
|
+
initializer: null
|
|
157
|
+
})), _class2)) || _class);
|
|
158
|
+
exports.default = Transaction;
|
package/dist/index.js
CHANGED
|
@@ -303,6 +303,30 @@ Object.defineProperty(exports, "STATUS_TYPES", {
|
|
|
303
303
|
return _status.STATUS_TYPES;
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
+
Object.defineProperty(exports, "SaltedgeAccount", {
|
|
307
|
+
enumerable: true,
|
|
308
|
+
get: function () {
|
|
309
|
+
return _account3.default;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
Object.defineProperty(exports, "SaltedgeConnection", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _connection.default;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "SaltedgeCustomer", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () {
|
|
321
|
+
return _customer.default;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
Object.defineProperty(exports, "SaltedgeTransaction", {
|
|
325
|
+
enumerable: true,
|
|
326
|
+
get: function () {
|
|
327
|
+
return _transaction6.default;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
306
330
|
Object.defineProperty(exports, "SandboxRegistrationEvent", {
|
|
307
331
|
enumerable: true,
|
|
308
332
|
get: function () {
|
|
@@ -666,6 +690,14 @@ var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction")
|
|
|
666
690
|
|
|
667
691
|
var _transactionMetadata3 = _interopRequireDefault(require("./entity/nuvei/transaction-metadata"));
|
|
668
692
|
|
|
693
|
+
var _account3 = _interopRequireDefault(require("./entity/saltedge/account"));
|
|
694
|
+
|
|
695
|
+
var _connection = _interopRequireDefault(require("./entity/saltedge/connection"));
|
|
696
|
+
|
|
697
|
+
var _customer = _interopRequireDefault(require("./entity/saltedge/customer"));
|
|
698
|
+
|
|
699
|
+
var _transaction6 = _interopRequireDefault(require("./entity/saltedge/transaction"));
|
|
700
|
+
|
|
669
701
|
var _paymentInitationTypes = _interopRequireDefault(require("./enums/payment-initation-types"));
|
|
670
702
|
|
|
671
703
|
var _registration = _interopRequireDefault(require("./event/user/registration"));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class saltedgeEntities1674567015124 {
|
|
4
|
+
name = 'saltedgeEntities1674567015124'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "saltedge"."customer" ("id" character varying(150) NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "organisation_id" character varying(150), CONSTRAINT "PK_a7a13f4cacb744524e44dfdad32" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "saltedge"."connection" ("id" character varying(150) NOT NULL, "provider_name" character varying(150), "provider_code" character varying(150), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "customer_id" character varying(150), "organisation_id" character varying(150), CONSTRAINT "PK_be611ce8b8cf439091c82a334b2" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "saltedge"."account" ("id" character varying(150) NOT NULL, "name" character varying(150), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "connection_id" character varying(150), "customer_id" character varying(150), "organisation_id" character varying(150), "iban" character varying(22), CONSTRAINT "PK_54115ee388cdb6d86bb4bf5b2ea" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TABLE "saltedge"."transaction" ("id" character varying(150) NOT NULL, "amount" integer NOT NULL, "description" character varying(250), "status" character varying(100) NOT NULL, "category" character varying(100), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "account_id" character varying(150), "organisation_id" character varying(150), "payee" character varying(22), "payer" character varying(22), CONSTRAINT "PK_89eadb93a89810556e1cbcd6ab9" PRIMARY KEY ("id"))`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."customer" ADD CONSTRAINT "FK_4826e339f8ec2dc55a693f896fc" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."connection" ADD CONSTRAINT "FK_fe87fc52e1ca65e31da4f8b291d" FOREIGN KEY ("customer_id") REFERENCES "saltedge"."customer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."connection" ADD CONSTRAINT "FK_f45f04b8b523530592dc83072b9" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD CONSTRAINT "FK_d7c87f026e8744f7855da000d1b" FOREIGN KEY ("connection_id") REFERENCES "saltedge"."connection"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD CONSTRAINT "FK_977b5abdf1370566eaade16eaa9" FOREIGN KEY ("customer_id") REFERENCES "saltedge"."customer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD CONSTRAINT "FK_14bca995e1448a5fa193361ff98" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD CONSTRAINT "FK_9da5ce7d9dd0b944febcb74f293" FOREIGN KEY ("iban") REFERENCES "bank"."account"("iban") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" ADD CONSTRAINT "FK_e2652fa8c16723c83a00fb9b17e" FOREIGN KEY ("account_id") REFERENCES "saltedge"."account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" ADD CONSTRAINT "FK_57ac3dfd4c89ae765952d2896b1" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" ADD CONSTRAINT "FK_e99a9052bd2e8cba7b0253add7e" FOREIGN KEY ("payee") REFERENCES "bank"."account"("iban") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" ADD CONSTRAINT "FK_ecee96a00ea6281651be2c47dc8" FOREIGN KEY ("payer") REFERENCES "bank"."account"("iban") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async down(queryRunner) {
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" DROP CONSTRAINT "FK_ecee96a00ea6281651be2c47dc8"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" DROP CONSTRAINT "FK_e99a9052bd2e8cba7b0253add7e"`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" DROP CONSTRAINT "FK_57ac3dfd4c89ae765952d2896b1"`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" DROP CONSTRAINT "FK_e2652fa8c16723c83a00fb9b17e"`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP CONSTRAINT "FK_9da5ce7d9dd0b944febcb74f293"`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP CONSTRAINT "FK_14bca995e1448a5fa193361ff98"`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP CONSTRAINT "FK_977b5abdf1370566eaade16eaa9"`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP CONSTRAINT "FK_d7c87f026e8744f7855da000d1b"`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."connection" DROP CONSTRAINT "FK_f45f04b8b523530592dc83072b9"`);
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."connection" DROP CONSTRAINT "FK_fe87fc52e1ca65e31da4f8b291d"`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."customer" DROP CONSTRAINT "FK_4826e339f8ec2dc55a693f896fc"`);
|
|
36
|
+
await queryRunner.query(`DROP TABLE "saltedge"."transaction"`);
|
|
37
|
+
await queryRunner.query(`DROP TABLE "saltedge"."account"`);
|
|
38
|
+
await queryRunner.query(`DROP TABLE "saltedge"."connection"`);
|
|
39
|
+
await queryRunner.query(`DROP TABLE "saltedge"."customer"`);
|
|
40
|
+
}
|
|
41
|
+
}
|