@felloh-org/lambda-wrapper 1.11.50 → 1.11.51
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.
|
@@ -28,31 +28,31 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
28
28
|
let Refund = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
29
29
|
name: 'refund',
|
|
30
30
|
schema: 'payment'
|
|
31
|
-
}), _dec2 = (0, _typeorm.
|
|
31
|
+
}), _dec2 = (0, _typeorm.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: "36",
|
|
32
34
|
primary: true
|
|
33
|
-
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
35
|
+
}), _dec3 = (0, _typeorm.ManyToOne)(() => _transaction.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
34
36
|
name: 'transaction_id',
|
|
35
37
|
referencedColumnName: 'id'
|
|
36
|
-
}
|
|
38
|
+
}, {
|
|
39
|
+
nullable: false
|
|
40
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _refundStatus.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
37
41
|
name: 'status_id',
|
|
38
42
|
referencedColumnName: 'id'
|
|
39
|
-
}), _dec6 = (0, _typeorm.Column)({
|
|
40
|
-
type: "int"
|
|
41
43
|
}), _dec7 = (0, _typeorm.Column)({
|
|
44
|
+
type: "int"
|
|
45
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
42
46
|
type: "text",
|
|
43
47
|
nullable: true
|
|
44
|
-
}),
|
|
48
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _user.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
45
49
|
name: 'requesting_user_id',
|
|
46
50
|
referencedColumnName: 'id'
|
|
47
|
-
}),
|
|
51
|
+
}), _dec11 = (0, _typeorm.ManyToOne)(() => _user.default, {
|
|
48
52
|
nullable: true
|
|
49
|
-
}),
|
|
53
|
+
}), _dec12 = (0, _typeorm.JoinColumn)({
|
|
50
54
|
name: 'authorised_user_id',
|
|
51
55
|
referencedColumnName: 'id'
|
|
52
|
-
}), _dec12 = (0, _typeorm.Column)({
|
|
53
|
-
type: "varchar",
|
|
54
|
-
length: "36",
|
|
55
|
-
nullable: true
|
|
56
56
|
}), _dec13 = (0, _typeorm.Column)({
|
|
57
57
|
type: "timestamp with time zone",
|
|
58
58
|
nullable: true
|
|
@@ -76,19 +76,19 @@ let Refund = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
76
76
|
nullable: true
|
|
77
77
|
}), _dec(_class = (_class2 = class Refund {
|
|
78
78
|
constructor() {
|
|
79
|
-
_initializerDefineProperty(this, "
|
|
79
|
+
_initializerDefineProperty(this, "authorisation_code", _descriptor, this);
|
|
80
80
|
|
|
81
|
-
_initializerDefineProperty(this, "
|
|
81
|
+
_initializerDefineProperty(this, "transaction", _descriptor2, this);
|
|
82
82
|
|
|
83
|
-
_initializerDefineProperty(this, "
|
|
83
|
+
_initializerDefineProperty(this, "status", _descriptor3, this);
|
|
84
84
|
|
|
85
|
-
_initializerDefineProperty(this, "
|
|
85
|
+
_initializerDefineProperty(this, "amount", _descriptor4, this);
|
|
86
86
|
|
|
87
|
-
_initializerDefineProperty(this, "
|
|
87
|
+
_initializerDefineProperty(this, "description", _descriptor5, this);
|
|
88
88
|
|
|
89
|
-
_initializerDefineProperty(this, "
|
|
89
|
+
_initializerDefineProperty(this, "requesting_user", _descriptor6, this);
|
|
90
90
|
|
|
91
|
-
_initializerDefineProperty(this, "
|
|
91
|
+
_initializerDefineProperty(this, "authorised_user", _descriptor7, this);
|
|
92
92
|
|
|
93
93
|
_initializerDefineProperty(this, "authorised_at", _descriptor8, this);
|
|
94
94
|
|
|
@@ -109,6 +109,7 @@ let Refund = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
109
109
|
var _this$status, _this$requesting_user, _this$authorised_user, _this$organisation, _this$transaction;
|
|
110
110
|
|
|
111
111
|
return {
|
|
112
|
+
id: this.id,
|
|
112
113
|
amount: this.amount,
|
|
113
114
|
description: this.description,
|
|
114
115
|
status: this.status && typeof ((_this$status = this.status) === null || _this$status === void 0 ? void 0 : _this$status.getPublicData) === 'function' ? this.status.getPublicData() : null,
|
|
@@ -124,51 +125,51 @@ let Refund = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "
|
|
128
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "authorisation_code", [_dec2], {
|
|
129
|
+
configurable: true,
|
|
130
|
+
enumerable: true,
|
|
131
|
+
writable: true,
|
|
132
|
+
initializer: function () {
|
|
133
|
+
return "";
|
|
134
|
+
}
|
|
135
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec3, _dec4], {
|
|
128
136
|
configurable: true,
|
|
129
137
|
enumerable: true,
|
|
130
138
|
writable: true,
|
|
131
139
|
initializer: function () {
|
|
132
140
|
return _transaction.default;
|
|
133
141
|
}
|
|
134
|
-
}),
|
|
142
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec5, _dec6], {
|
|
135
143
|
configurable: true,
|
|
136
144
|
enumerable: true,
|
|
137
145
|
writable: true,
|
|
138
146
|
initializer: function () {
|
|
139
147
|
return _refundStatus.default;
|
|
140
148
|
}
|
|
141
|
-
}),
|
|
149
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec7], {
|
|
142
150
|
configurable: true,
|
|
143
151
|
enumerable: true,
|
|
144
152
|
writable: true,
|
|
145
153
|
initializer: null
|
|
146
|
-
}),
|
|
154
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec8], {
|
|
147
155
|
configurable: true,
|
|
148
156
|
enumerable: true,
|
|
149
157
|
writable: true,
|
|
150
158
|
initializer: null
|
|
151
|
-
}),
|
|
159
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "requesting_user", [_dec9, _dec10], {
|
|
152
160
|
configurable: true,
|
|
153
161
|
enumerable: true,
|
|
154
162
|
writable: true,
|
|
155
163
|
initializer: function () {
|
|
156
164
|
return _user.default;
|
|
157
165
|
}
|
|
158
|
-
}),
|
|
166
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "authorised_user", [_dec11, _dec12], {
|
|
159
167
|
configurable: true,
|
|
160
168
|
enumerable: true,
|
|
161
169
|
writable: true,
|
|
162
170
|
initializer: function () {
|
|
163
171
|
return _user.default;
|
|
164
172
|
}
|
|
165
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "authorisation_code", [_dec12], {
|
|
166
|
-
configurable: true,
|
|
167
|
-
enumerable: true,
|
|
168
|
-
writable: true,
|
|
169
|
-
initializer: function () {
|
|
170
|
-
return "";
|
|
171
|
-
}
|
|
172
173
|
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "authorised_at", [_dec13], {
|
|
173
174
|
configurable: true,
|
|
174
175
|
enumerable: true,
|
|
@@ -99,7 +99,7 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
99
99
|
}), _dec26 = (0, _typeorm.JoinColumn)({
|
|
100
100
|
name: 'tokenisation_provider_id',
|
|
101
101
|
referencedColumnName: 'id'
|
|
102
|
-
}), _dec27 = (0, _typeorm.
|
|
102
|
+
}), _dec27 = (0, _typeorm.OneToMany)(() => _refund.default, refund => refund.transaction, {
|
|
103
103
|
nullable: true
|
|
104
104
|
}), _dec28 = (0, _typeorm.Column)({
|
|
105
105
|
type: "varchar",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class swapPkRefunds1698312655310 {
|
|
4
|
+
name = 'swapPkRefunds1698312655310'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "FK_74ffc5427c595968dd777f71bf4"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ALTER COLUMN "authorisation_code" SET NOT NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "PK_74ffc5427c595968dd777f71bf4"`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "PK_44b64ab23f7fd549ea397ef8b1a" PRIMARY KEY ("transaction_id", "authorisation_code")`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "PK_44b64ab23f7fd549ea397ef8b1a"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "PK_a7d1f9dccfa5feb43681629d965" PRIMARY KEY ("authorisation_code")`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async down(queryRunner) {
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "PK_a7d1f9dccfa5feb43681629d965"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "PK_44b64ab23f7fd549ea397ef8b1a" PRIMARY KEY ("authorisation_code", "transaction_id")`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ALTER COLUMN "transaction_id" SET NOT NULL`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "PK_44b64ab23f7fd549ea397ef8b1a"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "PK_74ffc5427c595968dd777f71bf4" PRIMARY KEY ("transaction_id")`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "FK_74ffc5427c595968dd777f71bf4" FOREIGN KEY ("transaction_id") REFERENCES "payment"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
22
|
+
}
|
|
23
|
+
}
|