@felloh-org/lambda-wrapper 1.6.0 → 1.6.1
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.
|
@@ -0,0 +1,85 @@
|
|
|
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 _merchant = _interopRequireDefault(require("../merchant"));
|
|
11
|
+
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
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 Batch = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'batch',
|
|
24
|
+
schema: 'nuvei'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _merchant.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
26
|
+
name: 'merchant_number',
|
|
27
|
+
referencedColumnName: 'merchant_number'
|
|
28
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
29
|
+
type: "int"
|
|
30
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
31
|
+
type: "date"
|
|
32
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: "5"
|
|
35
|
+
}), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Batch {
|
|
36
|
+
constructor() {
|
|
37
|
+
_initializerDefineProperty(this, "bank_reference", _descriptor, this);
|
|
38
|
+
|
|
39
|
+
_initializerDefineProperty(this, "merchant_number", _descriptor2, this);
|
|
40
|
+
|
|
41
|
+
_initializerDefineProperty(this, "amount", _descriptor3, this);
|
|
42
|
+
|
|
43
|
+
_initializerDefineProperty(this, "posting_date", _descriptor4, this);
|
|
44
|
+
|
|
45
|
+
_initializerDefineProperty(this, "currency", _descriptor5, this);
|
|
46
|
+
|
|
47
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bank_reference", [_dec2], {
|
|
51
|
+
configurable: true,
|
|
52
|
+
enumerable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
initializer: function () {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "merchant_number", [_dec3, _dec4], {
|
|
58
|
+
configurable: true,
|
|
59
|
+
enumerable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
initializer: function () {
|
|
62
|
+
return _merchant.default;
|
|
63
|
+
}
|
|
64
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec5], {
|
|
65
|
+
configurable: true,
|
|
66
|
+
enumerable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
initializer: null
|
|
69
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "posting_date", [_dec6], {
|
|
70
|
+
configurable: true,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
initializer: null
|
|
74
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec7], {
|
|
75
|
+
configurable: true,
|
|
76
|
+
enumerable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
initializer: null
|
|
79
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
|
|
80
|
+
configurable: true,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
initializer: null
|
|
84
|
+
})), _class2)) || _class);
|
|
85
|
+
exports.default = Batch;
|
|
@@ -0,0 +1,56 @@
|
|
|
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, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
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 Merchant = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'merchant',
|
|
20
|
+
schema: 'nuvei'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "150"
|
|
24
|
+
}), _dec3 = (0, _typeorm.Column)({
|
|
25
|
+
type: "varchar",
|
|
26
|
+
length: "150"
|
|
27
|
+
}), _dec4 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Merchant {
|
|
28
|
+
constructor() {
|
|
29
|
+
_initializerDefineProperty(this, "merchant_number", _descriptor, this);
|
|
30
|
+
|
|
31
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
32
|
+
|
|
33
|
+
_initializerDefineProperty(this, "created_at", _descriptor3, this);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "merchant_number", [_dec2], {
|
|
37
|
+
configurable: true,
|
|
38
|
+
enumerable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
initializer: function () {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
44
|
+
configurable: true,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
initializer: function () {
|
|
48
|
+
return "";
|
|
49
|
+
}
|
|
50
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec4], {
|
|
51
|
+
configurable: true,
|
|
52
|
+
enumerable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
initializer: null
|
|
55
|
+
})), _class2)) || _class);
|
|
56
|
+
exports.default = Merchant;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class nuveiBatchAndMerchant1671555132026 {
|
|
4
|
+
name = 'nuveiBatchAndMerchant1671555132026'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "nuvei"."merchant" ("merchant_number" character varying(150) NOT NULL, "name" character varying(150) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_f6dece295160ada4ae4b5035503" PRIMARY KEY ("merchant_number"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "nuvei"."batch" ("bank_reference" character varying NOT NULL, "amount" integer NOT NULL, "posting_date" date NOT NULL, "currency" character varying(5) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "merchant_number" character varying(150), CONSTRAINT "PK_2764676698c90f2ac84d9255436" PRIMARY KEY ("bank_reference"))`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "nuvei"."batch" ADD CONSTRAINT "FK_f41b6b9d92dac3770ea3f3b0e1b" FOREIGN KEY ("merchant_number") REFERENCES "nuvei"."merchant"("merchant_number") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "nuvei"."batch" DROP CONSTRAINT "FK_f41b6b9d92dac3770ea3f3b0e1b"`);
|
|
14
|
+
await queryRunner.query(`DROP TABLE "nuvei"."batch"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "nuvei"."merchant"`);
|
|
16
|
+
}
|
|
17
|
+
}
|