@felloh-org/lambda-wrapper 1.3.13 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entity/nuvei/index.js +3 -1
- package/dist/entity/nuvei/transaction/index.js +12 -1
- package/dist/entity/nuvei/transaction-metadata/index.js +116 -0
- package/dist/index.js +8 -0
- package/dist/migration/nuvei/1669564062461-create_nuvei_transaction_metadata_table.js +16 -0
- package/dist/model/response/index.js +2 -2
- package/package.json +1 -1
|
@@ -7,8 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _transaction = _interopRequireDefault(require("./transaction"));
|
|
9
9
|
|
|
10
|
+
var _transactionMetadata = _interopRequireDefault(require("./transaction-metadata"));
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
|
|
12
|
-
const ENTITIES = [_transaction.default];
|
|
14
|
+
const ENTITIES = [_transaction.default, _transactionMetadata.default];
|
|
13
15
|
var _default = ENTITIES;
|
|
14
16
|
exports.default = _default;
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
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;
|
|
10
|
+
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, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20;
|
|
11
11
|
|
|
12
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
13
|
|
|
@@ -72,6 +72,10 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
72
72
|
}), _dec20 = (0, _typeorm.Column)({
|
|
73
73
|
type: "varchar",
|
|
74
74
|
length: 1500
|
|
75
|
+
}), _dec21 = (0, _typeorm.Column)({
|
|
76
|
+
type: "varchar",
|
|
77
|
+
length: 50,
|
|
78
|
+
nullable: true
|
|
75
79
|
}), _dec(_class = (_class2 = class Transaction {
|
|
76
80
|
constructor() {
|
|
77
81
|
_initializerDefineProperty(this, "order_id", _descriptor, this);
|
|
@@ -111,6 +115,8 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
111
115
|
_initializerDefineProperty(this, "merchant_account_id", _descriptor18, this);
|
|
112
116
|
|
|
113
117
|
_initializerDefineProperty(this, "merchant_name", _descriptor19, this);
|
|
118
|
+
|
|
119
|
+
_initializerDefineProperty(this, "batch_id", _descriptor20, this);
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "order_id", [_dec2], {
|
|
@@ -212,5 +218,10 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
212
218
|
enumerable: true,
|
|
213
219
|
writable: true,
|
|
214
220
|
initializer: null
|
|
221
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "batch_id", [_dec21], {
|
|
222
|
+
configurable: true,
|
|
223
|
+
enumerable: true,
|
|
224
|
+
writable: true,
|
|
225
|
+
initializer: null
|
|
215
226
|
})), _class2)) || _class);
|
|
216
227
|
exports.default = Transaction;
|
|
@@ -0,0 +1,116 @@
|
|
|
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
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 TransactionMetadata = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'transaction_metadata',
|
|
20
|
+
schema: 'nuvei'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "timestamp without time zone"
|
|
23
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
24
|
+
type: "varchar",
|
|
25
|
+
length: "20"
|
|
26
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
27
|
+
type: "varchar",
|
|
28
|
+
nullable: true,
|
|
29
|
+
length: 25
|
|
30
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
31
|
+
type: "varchar",
|
|
32
|
+
length: 25
|
|
33
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
34
|
+
type: "varchar",
|
|
35
|
+
length: 20
|
|
36
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: 150
|
|
39
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
40
|
+
type: "varchar",
|
|
41
|
+
nullable: true,
|
|
42
|
+
length: 150
|
|
43
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
44
|
+
type: "varchar",
|
|
45
|
+
nullable: true,
|
|
46
|
+
length: 25
|
|
47
|
+
}), _dec(_class = (_class2 = class TransactionMetadata {
|
|
48
|
+
constructor() {
|
|
49
|
+
_initializerDefineProperty(this, "transaction_id", _descriptor, this);
|
|
50
|
+
|
|
51
|
+
_initializerDefineProperty(this, "date", _descriptor2, this);
|
|
52
|
+
|
|
53
|
+
_initializerDefineProperty(this, "payment_method", _descriptor3, this);
|
|
54
|
+
|
|
55
|
+
_initializerDefineProperty(this, "issuing_country", _descriptor4, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "bin", _descriptor5, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "card_type", _descriptor6, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "cardholder_name", _descriptor7, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "card_brand", _descriptor8, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "card_product_brand", _descriptor9, this);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction_id", [_dec2], {
|
|
69
|
+
configurable: true,
|
|
70
|
+
enumerable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
initializer: function () {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "date", [_dec3], {
|
|
76
|
+
configurable: true,
|
|
77
|
+
enumerable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
initializer: null
|
|
80
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "payment_method", [_dec4], {
|
|
81
|
+
configurable: true,
|
|
82
|
+
enumerable: true,
|
|
83
|
+
writable: true,
|
|
84
|
+
initializer: null
|
|
85
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "issuing_country", [_dec5], {
|
|
86
|
+
configurable: true,
|
|
87
|
+
enumerable: true,
|
|
88
|
+
writable: true,
|
|
89
|
+
initializer: null
|
|
90
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "bin", [_dec6], {
|
|
91
|
+
configurable: true,
|
|
92
|
+
enumerable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
initializer: null
|
|
95
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "card_type", [_dec7], {
|
|
96
|
+
configurable: true,
|
|
97
|
+
enumerable: true,
|
|
98
|
+
writable: true,
|
|
99
|
+
initializer: null
|
|
100
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "cardholder_name", [_dec8], {
|
|
101
|
+
configurable: true,
|
|
102
|
+
enumerable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
initializer: null
|
|
105
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "card_brand", [_dec9], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: null
|
|
110
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "card_product_brand", [_dec10], {
|
|
111
|
+
configurable: true,
|
|
112
|
+
enumerable: true,
|
|
113
|
+
writable: true,
|
|
114
|
+
initializer: null
|
|
115
|
+
})), _class2)) || _class);
|
|
116
|
+
exports.default = TransactionMetadata;
|
package/dist/index.js
CHANGED
|
@@ -195,6 +195,12 @@ Object.defineProperty(exports, "NuveiTransactionEntity", {
|
|
|
195
195
|
return _transaction5.default;
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
|
+
Object.defineProperty(exports, "NuveiTransactionMetadataEntity", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _transactionMetadata3.default;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
198
204
|
Object.defineProperty(exports, "OrganisationEntity", {
|
|
199
205
|
enumerable: true,
|
|
200
206
|
get: function () {
|
|
@@ -642,6 +648,8 @@ var _organisationPayoutConfig = _interopRequireDefault(require("./entity/user/or
|
|
|
642
648
|
|
|
643
649
|
var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction"));
|
|
644
650
|
|
|
651
|
+
var _transactionMetadata3 = _interopRequireDefault(require("./entity/nuvei/transaction-metadata"));
|
|
652
|
+
|
|
645
653
|
var _paymentInitationTypes = _interopRequireDefault(require("./enums/payment-initation-types"));
|
|
646
654
|
|
|
647
655
|
var _registration = _interopRequireDefault(require("./event/user/registration"));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class createNuveiTransactionMetadataTable1669564062461 {
|
|
4
|
+
name = 'createNuveiTransactionMetadataTable1669564062461'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "nuvei"."transaction_metadata" ("transaction_id" character varying NOT NULL, "date" TIMESTAMP NOT NULL, "payment_method" character varying(20) NOT NULL, "issuing_country" character varying(25), "bin" character varying(25) NOT NULL, "card_type" character varying(20) NOT NULL, "cardholder_name" character varying(150) NOT NULL, "card_brand" character varying(150), "card_product_brand" character varying(25), CONSTRAINT "PK_b613ceeab504ae9e7702ee09678" PRIMARY KEY ("transaction_id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "nuvei"."transaction" ADD "batch_id" character varying(50)`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "nuvei"."transaction" DROP COLUMN "batch_id"`);
|
|
14
|
+
await queryRunner.query(`DROP TABLE "nuvei"."transaction_metadata"`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -80,8 +80,8 @@ class Index extends _.default {
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
setCode(code) {
|
|
83
|
-
this.body.meta.reason = _statusCodes.default[code].reason;
|
|
84
|
-
this.body.meta.message = _statusCodes.default[code].message;
|
|
83
|
+
this.body.meta.reason = typeof _statusCodes.default[code] !== 'undefined' ? _statusCodes.default[code].reason : '';
|
|
84
|
+
this.body.meta.message = typeof _statusCodes.default[code] !== 'undefined' ? _statusCodes.default[code].message : code;
|
|
85
85
|
this.code = code;
|
|
86
86
|
this.body.meta.code = code;
|
|
87
87
|
}
|