@felloh-org/lambda-wrapper 1.1.37 → 1.1.40
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/.concourse/pipeline.yml +40 -0
- package/cli/seed/create-schema.js +23 -16
- package/dist/entity/bank/ledger/index.js +29 -8
- package/dist/entity/nuvei/index.js +14 -0
- package/dist/entity/nuvei/transaction/index.js +216 -0
- package/dist/index.js +8 -0
- package/dist/migration/1657713850640-ledger_adjustment.js +15 -0
- package/dist/migration/nuvei/1658229415800-nuvei-transaction-schema.js +13 -0
- package/package.json +1 -1
package/.concourse/pipeline.yml
CHANGED
|
@@ -167,3 +167,43 @@ jobs:
|
|
|
167
167
|
params:
|
|
168
168
|
alert_type: 'failed'
|
|
169
169
|
message: Migrations deployment failed
|
|
170
|
+
|
|
171
|
+
- name: 'migrations.pr'
|
|
172
|
+
serial: true
|
|
173
|
+
plan:
|
|
174
|
+
- in_parallel:
|
|
175
|
+
- get: lambda-wrapper
|
|
176
|
+
passed: ['migrations.staging']
|
|
177
|
+
trigger: true
|
|
178
|
+
- get: concourse-scripts
|
|
179
|
+
- task: 'schema.create'
|
|
180
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
181
|
+
input_mapping:
|
|
182
|
+
repository: lambda-wrapper
|
|
183
|
+
params:
|
|
184
|
+
NPM_COMMAND: 'orm:schema:create'
|
|
185
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
186
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
187
|
+
AWS_REGION: ((aws.region.primary))
|
|
188
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.pr))
|
|
189
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.pr))
|
|
190
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
191
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
192
|
+
- task: 'migrations.run'
|
|
193
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
194
|
+
input_mapping:
|
|
195
|
+
repository: lambda-wrapper
|
|
196
|
+
params:
|
|
197
|
+
NPM_COMMAND: 'orm:migration:run'
|
|
198
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
199
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
200
|
+
AWS_REGION: ((aws.region.primary))
|
|
201
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.pr))
|
|
202
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.pr))
|
|
203
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
204
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
205
|
+
on_failure:
|
|
206
|
+
put: slack-alert-deploy
|
|
207
|
+
params:
|
|
208
|
+
alert_type: 'failed'
|
|
209
|
+
message: Migrations deployment failed
|
|
@@ -5,22 +5,29 @@ import Warehouse from '@/src/service/warehouse';
|
|
|
5
5
|
DotEnv.config();
|
|
6
6
|
|
|
7
7
|
const run = async () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
try {
|
|
9
|
+
const warehouse = new Warehouse();
|
|
10
|
+
|
|
11
|
+
const connection = await warehouse.connect();
|
|
12
|
+
|
|
13
|
+
const queryRunner = await connection.createQueryRunner();
|
|
14
|
+
await queryRunner.createDatabase('felloh', true);
|
|
15
|
+
|
|
16
|
+
await queryRunner.createSchema('trust_payments', true);
|
|
17
|
+
await queryRunner.createSchema('nuapay', true);
|
|
18
|
+
await queryRunner.createSchema('agent_data', true);
|
|
19
|
+
await queryRunner.createSchema('payment', true);
|
|
20
|
+
await queryRunner.createSchema('bank', true);
|
|
21
|
+
await queryRunner.createSchema('user', true);
|
|
22
|
+
await queryRunner.createSchema('total_processing', true);
|
|
23
|
+
await queryRunner.createSchema('token', true);
|
|
24
|
+
await queryRunner.createSchema('scratch', true);
|
|
25
|
+
await queryRunner.createSchema('nuvei', true);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.log(error);
|
|
28
|
+
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
run();
|
|
@@ -11,11 +11,13 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
11
11
|
|
|
12
12
|
var _disbursal = _interopRequireDefault(require("../disbursal"));
|
|
13
13
|
|
|
14
|
+
var _adjustment = _interopRequireDefault(require("../adjustment"));
|
|
15
|
+
|
|
14
16
|
var _amendment = _interopRequireDefault(require("../amendment"));
|
|
15
17
|
|
|
16
18
|
var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
17
19
|
|
|
18
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
20
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
@@ -55,9 +57,14 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
|
55
57
|
}), _dec12 = (0, _typeorm.JoinColumn)({
|
|
56
58
|
name: 'amendment_id',
|
|
57
59
|
referencedColumnName: 'id'
|
|
58
|
-
}), _dec13 = (0, _typeorm.
|
|
60
|
+
}), _dec13 = (0, _typeorm.ManyToOne)(() => _adjustment.default, {
|
|
61
|
+
nullable: true
|
|
62
|
+
}), _dec14 = (0, _typeorm.JoinColumn)({
|
|
63
|
+
name: 'adjustment_id',
|
|
64
|
+
referencedColumnName: 'id'
|
|
65
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
59
66
|
type: "int"
|
|
60
|
-
}),
|
|
67
|
+
}), _dec16 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Ledger {
|
|
61
68
|
constructor() {
|
|
62
69
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
63
70
|
|
|
@@ -73,16 +80,19 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
|
73
80
|
|
|
74
81
|
_initializerDefineProperty(this, "amendment", _descriptor7, this);
|
|
75
82
|
|
|
76
|
-
_initializerDefineProperty(this, "
|
|
83
|
+
_initializerDefineProperty(this, "adjustment", _descriptor8, this);
|
|
77
84
|
|
|
78
|
-
_initializerDefineProperty(this, "
|
|
85
|
+
_initializerDefineProperty(this, "amount", _descriptor9, this);
|
|
86
|
+
|
|
87
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
getSource() {
|
|
82
91
|
if (this.disbursal !== null) return 'disbursal';
|
|
83
92
|
if (this.transaction !== null) return 'settled transaction';
|
|
84
93
|
if (this.amendment !== null) return 'amendment';
|
|
85
|
-
return '
|
|
94
|
+
if (this.adjustment !== null) return 'adjustment';
|
|
95
|
+
return 'unknown';
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
getPublicData() {
|
|
@@ -102,6 +112,10 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
|
102
112
|
response.amendment = this.amendment.getPublicData();
|
|
103
113
|
}
|
|
104
114
|
|
|
115
|
+
if (typeof this.adjustment !== 'undefined' && this.adjustment !== null) {
|
|
116
|
+
response.adjustment = this.adjustment.getPublicData();
|
|
117
|
+
}
|
|
118
|
+
|
|
105
119
|
if (typeof this.transaction !== 'undefined' && this.transaction !== null) {
|
|
106
120
|
response.transaction = this.transaction.getPublicCompactData();
|
|
107
121
|
}
|
|
@@ -158,12 +172,19 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
|
|
|
158
172
|
initializer: function () {
|
|
159
173
|
return _amendment.default;
|
|
160
174
|
}
|
|
161
|
-
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
175
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "adjustment", [_dec13, _dec14], {
|
|
176
|
+
configurable: true,
|
|
177
|
+
enumerable: true,
|
|
178
|
+
writable: true,
|
|
179
|
+
initializer: function () {
|
|
180
|
+
return _adjustment.default;
|
|
181
|
+
}
|
|
182
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec15], {
|
|
162
183
|
configurable: true,
|
|
163
184
|
enumerable: true,
|
|
164
185
|
writable: true,
|
|
165
186
|
initializer: null
|
|
166
|
-
}),
|
|
187
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec16], {
|
|
167
188
|
configurable: true,
|
|
168
189
|
enumerable: true,
|
|
169
190
|
writable: true,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _transaction = _interopRequireDefault(require("./transaction"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const ENTITIES = [_transaction.default];
|
|
13
|
+
var _default = ENTITIES;
|
|
14
|
+
exports.default = _default;
|
|
@@ -0,0 +1,216 @@
|
|
|
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 _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
11
|
+
|
|
12
|
+
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
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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
|
+
|
|
18
|
+
let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'transaction',
|
|
20
|
+
schema: 'nuvei'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: 18
|
|
24
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
25
|
+
type: "varchar",
|
|
26
|
+
length: 20
|
|
27
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
28
|
+
type: "varchar",
|
|
29
|
+
length: 20
|
|
30
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
31
|
+
type: "varchar",
|
|
32
|
+
length: 20
|
|
33
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
34
|
+
type: "int"
|
|
35
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
36
|
+
type: "varchar",
|
|
37
|
+
length: 5
|
|
38
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
39
|
+
type: "varchar",
|
|
40
|
+
length: 28,
|
|
41
|
+
nullable: true
|
|
42
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
43
|
+
type: "varchar",
|
|
44
|
+
length: 1,
|
|
45
|
+
nullable: true
|
|
46
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
47
|
+
type: "varchar",
|
|
48
|
+
length: 36
|
|
49
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
50
|
+
type: "varchar",
|
|
51
|
+
length: 36
|
|
52
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
53
|
+
type: "varchar",
|
|
54
|
+
length: 6
|
|
55
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
56
|
+
type: "varchar",
|
|
57
|
+
length: 6
|
|
58
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
59
|
+
type: "int"
|
|
60
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
61
|
+
type: "varchar",
|
|
62
|
+
length: 100
|
|
63
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
64
|
+
type: "varchar",
|
|
65
|
+
length: 50,
|
|
66
|
+
nullable: true
|
|
67
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
68
|
+
type: "timestamp without time zone"
|
|
69
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
70
|
+
type: "varchar",
|
|
71
|
+
length: 50
|
|
72
|
+
}), _dec20 = (0, _typeorm.Column)({
|
|
73
|
+
type: "varchar",
|
|
74
|
+
length: 1500
|
|
75
|
+
}), _dec(_class = (_class2 = class Transaction {
|
|
76
|
+
constructor() {
|
|
77
|
+
_initializerDefineProperty(this, "order_id", _descriptor, this);
|
|
78
|
+
|
|
79
|
+
_initializerDefineProperty(this, "transaction_id", _descriptor2, this);
|
|
80
|
+
|
|
81
|
+
_initializerDefineProperty(this, "transaction_type", _descriptor3, this);
|
|
82
|
+
|
|
83
|
+
_initializerDefineProperty(this, "transaction_status", _descriptor4, this);
|
|
84
|
+
|
|
85
|
+
_initializerDefineProperty(this, "status", _descriptor5, this);
|
|
86
|
+
|
|
87
|
+
_initializerDefineProperty(this, "amount", _descriptor6, this);
|
|
88
|
+
|
|
89
|
+
_initializerDefineProperty(this, "currency", _descriptor7, this);
|
|
90
|
+
|
|
91
|
+
_initializerDefineProperty(this, "unique_cc", _descriptor8, this);
|
|
92
|
+
|
|
93
|
+
_initializerDefineProperty(this, "threeds_is_liability_on_issuer", _descriptor9, this);
|
|
94
|
+
|
|
95
|
+
_initializerDefineProperty(this, "session_token", _descriptor10, this);
|
|
96
|
+
|
|
97
|
+
_initializerDefineProperty(this, "client_unique_id", _descriptor11, this);
|
|
98
|
+
|
|
99
|
+
_initializerDefineProperty(this, "auth_code", _descriptor12, this);
|
|
100
|
+
|
|
101
|
+
_initializerDefineProperty(this, "merchant_site_id", _descriptor13, this);
|
|
102
|
+
|
|
103
|
+
_initializerDefineProperty(this, "err_code", _descriptor14, this);
|
|
104
|
+
|
|
105
|
+
_initializerDefineProperty(this, "reason", _descriptor15, this);
|
|
106
|
+
|
|
107
|
+
_initializerDefineProperty(this, "entity_id", _descriptor16, this);
|
|
108
|
+
|
|
109
|
+
_initializerDefineProperty(this, "processing_time", _descriptor17, this);
|
|
110
|
+
|
|
111
|
+
_initializerDefineProperty(this, "merchant_account_id", _descriptor18, this);
|
|
112
|
+
|
|
113
|
+
_initializerDefineProperty(this, "merchant_name", _descriptor19, this);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "order_id", [_dec2], {
|
|
117
|
+
configurable: true,
|
|
118
|
+
enumerable: true,
|
|
119
|
+
writable: true,
|
|
120
|
+
initializer: function () {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "transaction_id", [_dec3], {
|
|
124
|
+
configurable: true,
|
|
125
|
+
enumerable: true,
|
|
126
|
+
writable: true,
|
|
127
|
+
initializer: null
|
|
128
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "transaction_type", [_dec4], {
|
|
129
|
+
configurable: true,
|
|
130
|
+
enumerable: true,
|
|
131
|
+
writable: true,
|
|
132
|
+
initializer: null
|
|
133
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "transaction_status", [_dec5], {
|
|
134
|
+
configurable: true,
|
|
135
|
+
enumerable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
initializer: null
|
|
138
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec6], {
|
|
139
|
+
configurable: true,
|
|
140
|
+
enumerable: true,
|
|
141
|
+
writable: true,
|
|
142
|
+
initializer: null
|
|
143
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec7], {
|
|
144
|
+
configurable: true,
|
|
145
|
+
enumerable: true,
|
|
146
|
+
writable: true,
|
|
147
|
+
initializer: null
|
|
148
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec8], {
|
|
149
|
+
configurable: true,
|
|
150
|
+
enumerable: true,
|
|
151
|
+
writable: true,
|
|
152
|
+
initializer: null
|
|
153
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "unique_cc", [_dec9], {
|
|
154
|
+
configurable: true,
|
|
155
|
+
enumerable: true,
|
|
156
|
+
writable: true,
|
|
157
|
+
initializer: null
|
|
158
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "threeds_is_liability_on_issuer", [_dec10], {
|
|
159
|
+
configurable: true,
|
|
160
|
+
enumerable: true,
|
|
161
|
+
writable: true,
|
|
162
|
+
initializer: null
|
|
163
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "session_token", [_dec11], {
|
|
164
|
+
configurable: true,
|
|
165
|
+
enumerable: true,
|
|
166
|
+
writable: true,
|
|
167
|
+
initializer: null
|
|
168
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "client_unique_id", [_dec12], {
|
|
169
|
+
configurable: true,
|
|
170
|
+
enumerable: true,
|
|
171
|
+
writable: true,
|
|
172
|
+
initializer: null
|
|
173
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "auth_code", [_dec13], {
|
|
174
|
+
configurable: true,
|
|
175
|
+
enumerable: true,
|
|
176
|
+
writable: true,
|
|
177
|
+
initializer: null
|
|
178
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "merchant_site_id", [_dec14], {
|
|
179
|
+
configurable: true,
|
|
180
|
+
enumerable: true,
|
|
181
|
+
writable: true,
|
|
182
|
+
initializer: null
|
|
183
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "err_code", [_dec15], {
|
|
184
|
+
configurable: true,
|
|
185
|
+
enumerable: true,
|
|
186
|
+
writable: true,
|
|
187
|
+
initializer: null
|
|
188
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "reason", [_dec16], {
|
|
189
|
+
configurable: true,
|
|
190
|
+
enumerable: true,
|
|
191
|
+
writable: true,
|
|
192
|
+
initializer: null
|
|
193
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "entity_id", [_dec17], {
|
|
194
|
+
configurable: true,
|
|
195
|
+
enumerable: true,
|
|
196
|
+
writable: true,
|
|
197
|
+
initializer: null
|
|
198
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "processing_time", [_dec18], {
|
|
199
|
+
configurable: true,
|
|
200
|
+
enumerable: true,
|
|
201
|
+
writable: true,
|
|
202
|
+
initializer: function () {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "merchant_account_id", [_dec19], {
|
|
206
|
+
configurable: true,
|
|
207
|
+
enumerable: true,
|
|
208
|
+
writable: true,
|
|
209
|
+
initializer: null
|
|
210
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "merchant_name", [_dec20], {
|
|
211
|
+
configurable: true,
|
|
212
|
+
enumerable: true,
|
|
213
|
+
writable: true,
|
|
214
|
+
initializer: null
|
|
215
|
+
})), _class2)) || _class);
|
|
216
|
+
exports.default = Transaction;
|
package/dist/index.js
CHANGED
|
@@ -159,6 +159,12 @@ Object.defineProperty(exports, "NuapayTransactionEntity", {
|
|
|
159
159
|
return _transaction.default;
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
|
+
Object.defineProperty(exports, "NuveiTransactionEntity", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _transaction5.default;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
162
168
|
Object.defineProperty(exports, "OrganisationEntity", {
|
|
163
169
|
enumerable: true,
|
|
164
170
|
get: function () {
|
|
@@ -520,6 +526,8 @@ var _organisationFeature = _interopRequireDefault(require("./entity/user/organis
|
|
|
520
526
|
|
|
521
527
|
var _loginLink = _interopRequireDefault(require("./entity/user/login-link"));
|
|
522
528
|
|
|
529
|
+
var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction"));
|
|
530
|
+
|
|
523
531
|
var _registration = _interopRequireDefault(require("./event/user/registration"));
|
|
524
532
|
|
|
525
533
|
var _changed = _interopRequireDefault(require("./event/user/password/changed"));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class ledgerAdjustment1657713850640 {
|
|
4
|
+
name = 'ledgerAdjustment1657713850640'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "bank"."ledger" ADD "adjustment_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "bank"."ledger" ADD CONSTRAINT "FK_7563a6252b9059f5098b3f080e8" FOREIGN KEY ("adjustment_id") REFERENCES "bank"."adjustment"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "bank"."ledger" DROP CONSTRAINT "FK_7563a6252b9059f5098b3f080e8"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "bank"."ledger" DROP COLUMN "adjustment_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class nuveiTransactionSchema1658229415800 {
|
|
4
|
+
name = 'nuveiTransactionSchema1658229415800'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "nuvei"."transaction" ("order_id" character varying NOT NULL, "transaction_id" character varying(18) NOT NULL, "transaction_type" character varying(20) NOT NULL, "transaction_status" character varying(20) NOT NULL, "status" character varying(20) NOT NULL, "amount" integer NOT NULL, "currency" character varying(5) NOT NULL, "unique_cc" character varying(28), "threeds_is_liability_on_issuer" character varying(1), "session_token" character varying(36) NOT NULL, "client_unique_id" character varying(36) NOT NULL, "auth_code" character varying(6) NOT NULL, "merchant_site_id" character varying(6) NOT NULL, "err_code" integer NOT NULL, "reason" character varying(100) NOT NULL, "entity_id" character varying(50), "processing_time" TIMESTAMP NOT NULL, "merchant_account_id" character varying(50) NOT NULL, "merchant_name" character varying(1500) NOT NULL, CONSTRAINT "PK_9011283056620f5eaa7ad74cef6" PRIMARY KEY ("order_id"))`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`DROP TABLE "nuvei"."transaction"`);
|
|
12
|
+
}
|
|
13
|
+
}
|