@felloh-org/lambda-wrapper 1.2.36 → 1.3.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/payment/credit-note/index.js +46 -30
- package/dist/entity/payment/organisation-payment-provider/index.js +32 -8
- package/dist/migration/payment/1666947609074-credit_notes_short_id.js +13 -0
- package/dist/migration/payment/1667918366826-insert_applepay_and_googlepay_transaction_types.js +14 -0
- package/dist/migration/payment/1667925229730-organisation_payment_provider_add_applepay_googlepay_columns.js +15 -0
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
13
13
|
|
|
14
14
|
var _currency = require("../../bank/currency");
|
|
15
15
|
|
|
16
|
-
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, _descriptor10;
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -27,67 +27,76 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
|
|
|
27
27
|
name: 'credit_note',
|
|
28
28
|
schema: 'payment'
|
|
29
29
|
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
30
|
-
type: "
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "150",
|
|
32
|
+
nullable: true
|
|
31
33
|
}), _dec4 = (0, _typeorm.Column)({
|
|
34
|
+
type: "int"
|
|
35
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
32
36
|
type: "varchar",
|
|
33
37
|
length: "150"
|
|
34
|
-
}),
|
|
38
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _booking.default, {
|
|
35
39
|
nullable: true
|
|
36
|
-
}),
|
|
40
|
+
}), _dec7 = (0, _typeorm.JoinColumn)({
|
|
37
41
|
name: 'booking_created_from',
|
|
38
42
|
referencedColumnName: 'id'
|
|
39
|
-
}),
|
|
43
|
+
}), _dec8 = (0, _typeorm.ManyToOne)(() => _booking.default, {
|
|
40
44
|
nullable: true
|
|
41
|
-
}),
|
|
45
|
+
}), _dec9 = (0, _typeorm.JoinColumn)({
|
|
42
46
|
name: 'booking_applied_to',
|
|
43
47
|
referencedColumnName: 'id'
|
|
44
|
-
}),
|
|
48
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
45
49
|
type: "varchar",
|
|
46
50
|
length: "2048",
|
|
47
51
|
nullable: true
|
|
48
|
-
}),
|
|
52
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
49
53
|
type: "varchar",
|
|
50
54
|
length: "3",
|
|
51
55
|
default: _currency.DEFAULT_CURRENCY
|
|
52
|
-
}),
|
|
56
|
+
}), _dec12 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec13 = (0, _typeorm.JoinColumn)({
|
|
53
57
|
name: 'organisation_id',
|
|
54
58
|
referencedColumnName: 'id'
|
|
55
|
-
}),
|
|
59
|
+
}), _dec14 = (0, _typeorm.CreateDateColumn)({
|
|
56
60
|
type: 'timestamp with time zone'
|
|
57
|
-
}),
|
|
61
|
+
}), _dec15 = (0, _typeorm.UpdateDateColumn)({
|
|
58
62
|
type: 'timestamp with time zone'
|
|
59
63
|
}), _dec(_class = (_class2 = class CreditNote {
|
|
60
64
|
constructor() {
|
|
61
65
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
62
66
|
|
|
63
|
-
_initializerDefineProperty(this, "
|
|
67
|
+
_initializerDefineProperty(this, "short_id", _descriptor2, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "amount", _descriptor3, this);
|
|
64
70
|
|
|
65
|
-
_initializerDefineProperty(this, "customer_name",
|
|
71
|
+
_initializerDefineProperty(this, "customer_name", _descriptor4, this);
|
|
66
72
|
|
|
67
|
-
_initializerDefineProperty(this, "booking_created_from",
|
|
73
|
+
_initializerDefineProperty(this, "booking_created_from", _descriptor5, this);
|
|
68
74
|
|
|
69
|
-
_initializerDefineProperty(this, "booking_applied_to",
|
|
75
|
+
_initializerDefineProperty(this, "booking_applied_to", _descriptor6, this);
|
|
70
76
|
|
|
71
|
-
_initializerDefineProperty(this, "description",
|
|
77
|
+
_initializerDefineProperty(this, "description", _descriptor7, this);
|
|
72
78
|
|
|
73
|
-
_initializerDefineProperty(this, "currency",
|
|
79
|
+
_initializerDefineProperty(this, "currency", _descriptor8, this);
|
|
74
80
|
|
|
75
|
-
_initializerDefineProperty(this, "organisation",
|
|
81
|
+
_initializerDefineProperty(this, "organisation", _descriptor9, this);
|
|
76
82
|
|
|
77
|
-
_initializerDefineProperty(this, "created_at",
|
|
83
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
78
84
|
|
|
79
|
-
_initializerDefineProperty(this, "updated_at",
|
|
85
|
+
_initializerDefineProperty(this, "updated_at", _descriptor11, this);
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
getPublicData() {
|
|
83
89
|
const response = {
|
|
84
90
|
id: this.id,
|
|
91
|
+
short_id: this.short_id,
|
|
85
92
|
customer_name: this.customer_name,
|
|
86
93
|
amount: this.amount,
|
|
87
94
|
description: this.description,
|
|
88
95
|
currency: this.currency,
|
|
89
96
|
organisation: this.organisation,
|
|
90
|
-
created_at: this.created_at
|
|
97
|
+
created_at: this.created_at,
|
|
98
|
+
booking_applied_to: null,
|
|
99
|
+
booking_created_from: null
|
|
91
100
|
};
|
|
92
101
|
|
|
93
102
|
if (this.booking_applied_to && typeof this.booking_applied_to.getPublicData === 'function') {
|
|
@@ -108,59 +117,66 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
|
|
|
108
117
|
initializer: function () {
|
|
109
118
|
return undefined;
|
|
110
119
|
}
|
|
111
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
120
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "short_id", [_dec3], {
|
|
121
|
+
configurable: true,
|
|
122
|
+
enumerable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
initializer: function () {
|
|
125
|
+
return "";
|
|
126
|
+
}
|
|
127
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec4], {
|
|
112
128
|
configurable: true,
|
|
113
129
|
enumerable: true,
|
|
114
130
|
writable: true,
|
|
115
131
|
initializer: null
|
|
116
|
-
}),
|
|
132
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec5], {
|
|
117
133
|
configurable: true,
|
|
118
134
|
enumerable: true,
|
|
119
135
|
writable: true,
|
|
120
136
|
initializer: function () {
|
|
121
137
|
return "";
|
|
122
138
|
}
|
|
123
|
-
}),
|
|
139
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "booking_created_from", [_dec6, _dec7], {
|
|
124
140
|
configurable: true,
|
|
125
141
|
enumerable: true,
|
|
126
142
|
writable: true,
|
|
127
143
|
initializer: function () {
|
|
128
144
|
return _booking.default;
|
|
129
145
|
}
|
|
130
|
-
}),
|
|
146
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "booking_applied_to", [_dec8, _dec9], {
|
|
131
147
|
configurable: true,
|
|
132
148
|
enumerable: true,
|
|
133
149
|
writable: true,
|
|
134
150
|
initializer: function () {
|
|
135
151
|
return _booking.default;
|
|
136
152
|
}
|
|
137
|
-
}),
|
|
153
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec10], {
|
|
138
154
|
configurable: true,
|
|
139
155
|
enumerable: true,
|
|
140
156
|
writable: true,
|
|
141
157
|
initializer: function () {
|
|
142
158
|
return "";
|
|
143
159
|
}
|
|
144
|
-
}),
|
|
160
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec11], {
|
|
145
161
|
configurable: true,
|
|
146
162
|
enumerable: true,
|
|
147
163
|
writable: true,
|
|
148
164
|
initializer: function () {
|
|
149
165
|
return _currency.DEFAULT_CURRENCY;
|
|
150
166
|
}
|
|
151
|
-
}),
|
|
167
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec12, _dec13], {
|
|
152
168
|
configurable: true,
|
|
153
169
|
enumerable: true,
|
|
154
170
|
writable: true,
|
|
155
171
|
initializer: function () {
|
|
156
172
|
return _organisation.default;
|
|
157
173
|
}
|
|
158
|
-
}),
|
|
174
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec14], {
|
|
159
175
|
configurable: true,
|
|
160
176
|
enumerable: true,
|
|
161
177
|
writable: true,
|
|
162
178
|
initializer: null
|
|
163
|
-
}),
|
|
179
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec15], {
|
|
164
180
|
configurable: true,
|
|
165
181
|
enumerable: true,
|
|
166
182
|
writable: true,
|
|
@@ -19,7 +19,7 @@ var _currency = _interopRequireDefault(require("../../bank/currency"));
|
|
|
19
19
|
|
|
20
20
|
var _organisationPaymentProviderMethod = _interopRequireDefault(require("../organisation-payment-provider-method"));
|
|
21
21
|
|
|
22
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
|
|
22
|
+
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;
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -73,7 +73,13 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
73
73
|
}), _dec15 = (0, _typeorm.Column)({
|
|
74
74
|
type: "boolean",
|
|
75
75
|
default: false
|
|
76
|
-
}), _dec16 = (0, _typeorm.
|
|
76
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
77
|
+
type: "boolean",
|
|
78
|
+
default: false
|
|
79
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
80
|
+
type: "boolean",
|
|
81
|
+
default: false
|
|
82
|
+
}), _dec18 = (0, _typeorm.CreateDateColumn)(), _dec19 = (0, _typeorm.UpdateDateColumn)(), _dec20 = (0, _typeorm.DeleteDateColumn)(), _dec(_class = (_class2 = class OrganisationPaymentProvider {
|
|
77
83
|
constructor() {
|
|
78
84
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
79
85
|
|
|
@@ -97,11 +103,15 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
97
103
|
|
|
98
104
|
_initializerDefineProperty(this, "is_active", _descriptor11, this);
|
|
99
105
|
|
|
100
|
-
_initializerDefineProperty(this, "
|
|
106
|
+
_initializerDefineProperty(this, "googlepay_enabled", _descriptor12, this);
|
|
107
|
+
|
|
108
|
+
_initializerDefineProperty(this, "applepay_enabled", _descriptor13, this);
|
|
101
109
|
|
|
102
|
-
_initializerDefineProperty(this, "
|
|
110
|
+
_initializerDefineProperty(this, "created_at", _descriptor14, this);
|
|
103
111
|
|
|
104
|
-
_initializerDefineProperty(this, "
|
|
112
|
+
_initializerDefineProperty(this, "updated_at", _descriptor15, this);
|
|
113
|
+
|
|
114
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor16, this);
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -175,17 +185,31 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
|
|
|
175
185
|
initializer: function () {
|
|
176
186
|
return false;
|
|
177
187
|
}
|
|
178
|
-
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
188
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "googlepay_enabled", [_dec16], {
|
|
189
|
+
configurable: true,
|
|
190
|
+
enumerable: true,
|
|
191
|
+
writable: true,
|
|
192
|
+
initializer: function () {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "applepay_enabled", [_dec17], {
|
|
196
|
+
configurable: true,
|
|
197
|
+
enumerable: true,
|
|
198
|
+
writable: true,
|
|
199
|
+
initializer: function () {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec18], {
|
|
179
203
|
configurable: true,
|
|
180
204
|
enumerable: true,
|
|
181
205
|
writable: true,
|
|
182
206
|
initializer: null
|
|
183
|
-
}),
|
|
207
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec19], {
|
|
184
208
|
configurable: true,
|
|
185
209
|
enumerable: true,
|
|
186
210
|
writable: true,
|
|
187
211
|
initializer: null
|
|
188
|
-
}),
|
|
212
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec20], {
|
|
189
213
|
configurable: true,
|
|
190
214
|
enumerable: true,
|
|
191
215
|
writable: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class creditNotesShortId1666947609074 {
|
|
4
|
+
name = 'creditNotesShortId1666947609074'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" ADD "short_id" character varying(150)`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" DROP COLUMN "short_id"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/dist/migration/payment/1667918366826-insert_applepay_and_googlepay_transaction_types.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class InsertApplepayAndGooglepayTransactionTypes1667918366826 {
|
|
4
|
+
name = 'InsertApplepayAndGooglepayTransactionTypes1667918366826'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`INSERT INTO "payment"."transaction_type" (id) VALUES ('GOOGLEPAY'), ('APPLEPAY')`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`DELETE FROM "payment"."transaction_type" WHERE id = 'GOOGLEPAY' or id ='APPLEPAY'`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class organisationPaymentProviderAddApplepayGooglepayColumns1667925229730 {
|
|
4
|
+
name = 'organisationPaymentProviderAddApplepayGooglepayColumns1667925229730'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "googlepay_enabled" boolean NOT NULL DEFAULT false`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "applepay_enabled" boolean NOT NULL DEFAULT false`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "applepay_enabled"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "googlepay_enabled"`);
|
|
14
|
+
}
|
|
15
|
+
}
|