@felloh-org/lambda-wrapper 1.1.42 → 1.1.45
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.
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.PAYMENT_METHOD = void 0;
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
10
|
var _uuid = require("uuid");
|
|
11
11
|
|
|
12
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
|
|
13
13
|
|
|
14
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 }); }
|
|
15
15
|
|
|
@@ -17,25 +17,34 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
17
17
|
|
|
18
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.'); }
|
|
19
19
|
|
|
20
|
+
const PAYMENT_METHOD = {
|
|
21
|
+
CARD: 'CARD',
|
|
22
|
+
OPEN_BANKING: 'OPEN_BANKING'
|
|
23
|
+
};
|
|
24
|
+
exports.PAYMENT_METHOD = PAYMENT_METHOD;
|
|
20
25
|
let PaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
21
26
|
name: 'payment_provider',
|
|
22
27
|
schema: 'payment'
|
|
23
28
|
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
24
29
|
type: "varchar",
|
|
25
|
-
length: "150"
|
|
26
|
-
nullable: true
|
|
30
|
+
length: "150"
|
|
27
31
|
}), _dec4 = (0, _typeorm.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: "20"
|
|
34
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
28
35
|
type: "boolean",
|
|
29
36
|
default: false
|
|
30
|
-
}),
|
|
37
|
+
}), _dec6 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentProvider {
|
|
31
38
|
constructor() {
|
|
32
39
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
33
40
|
|
|
34
41
|
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
35
42
|
|
|
36
|
-
_initializerDefineProperty(this, "
|
|
43
|
+
_initializerDefineProperty(this, "payment_method", _descriptor3, this);
|
|
44
|
+
|
|
45
|
+
_initializerDefineProperty(this, "is_active", _descriptor4, this);
|
|
37
46
|
|
|
38
|
-
_initializerDefineProperty(this, "created_at",
|
|
47
|
+
_initializerDefineProperty(this, "created_at", _descriptor5, this);
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -52,14 +61,21 @@ let PaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
52
61
|
initializer: function () {
|
|
53
62
|
return "";
|
|
54
63
|
}
|
|
55
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
64
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "payment_method", [_dec4], {
|
|
65
|
+
configurable: true,
|
|
66
|
+
enumerable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
initializer: function () {
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "is_active", [_dec5], {
|
|
56
72
|
configurable: true,
|
|
57
73
|
enumerable: true,
|
|
58
74
|
writable: true,
|
|
59
75
|
initializer: function () {
|
|
60
76
|
return false;
|
|
61
77
|
}
|
|
62
|
-
}),
|
|
78
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
|
|
63
79
|
configurable: true,
|
|
64
80
|
enumerable: true,
|
|
65
81
|
writable: true,
|
|
@@ -6,7 +6,7 @@ module.exports = class paymentProviderActiveWeighting1658478874188 {
|
|
|
6
6
|
async up(queryRunner) {
|
|
7
7
|
await queryRunner.query(`ALTER TABLE "payment"."payment_provider" ADD "is_active" boolean NOT NULL DEFAULT false`);
|
|
8
8
|
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "is_active" boolean NOT NULL DEFAULT false`);
|
|
9
|
-
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "weight" integer NOT NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "weight" integer NOT NULL DEFAULT 0`);
|
|
10
10
|
await queryRunner.query(`UPDATE "payment"."payment_provider" SET "is_active" = true`);
|
|
11
11
|
await queryRunner.query(`UPDATE "payment"."organisation_payment_provider" SET "is_active" = true, "weight" = 100`);
|
|
12
12
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentProviderPaymentMethod1658483667045 {
|
|
4
|
+
name = 'paymentProviderPaymentMethod1658483667045'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_provider" ADD "payment_method" character varying(20) NOT NULL DEFAULT 'UNKNOWN'`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_provider" ALTER COLUMN "name" SET NOT NULL`);
|
|
9
|
+
await queryRunner.query(`UPDATE "payment"."payment_provider" SET "payment_method" = 'CARD' WHERE "name" = 'TOTAL_PROCESSING'`);
|
|
10
|
+
await queryRunner.query(`UPDATE "payment"."payment_provider" SET "payment_method" = 'OPEN_BANKING' WHERE "name" = 'NUAPAY'`);
|
|
11
|
+
await queryRunner.query(`UPDATE "payment"."payment_provider" SET "payment_method" = 'CARD' WHERE "name" = 'NUVEI'`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_provider" ALTER COLUMN "name" DROP NOT NULL`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_provider" DROP COLUMN "payment_method"`);
|
|
17
|
+
}
|
|
18
|
+
}
|