@felloh-org/lambda-wrapper 1.1.11 → 1.1.14
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/agent-data/booking/index.js +7 -2
- package/dist/entity/payment/payment-link/index.js +4 -0
- package/dist/entity/payment/transaction/index.js +11 -1
- package/dist/entity/payment/transaction-metadata/index.js +17 -7
- package/dist/migration/{1651671204869-beneficiary.js → bank/1651671204869-beneficiary.js} +0 -0
- package/dist/migration/payment/1651747895363-transaction_charges.js +13 -0
- package/package.json +2 -2
|
@@ -97,10 +97,14 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
97
97
|
response.transactions = this.transactions.map(transaction => transaction.getPublicCompactData());
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
if (typeof this.user.id !== 'undefined') {
|
|
100
|
+
if (this.user !== null && typeof this.user.id !== 'undefined') {
|
|
101
101
|
response.user = this.user.getPublicCompactData();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
105
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
106
|
+
}
|
|
107
|
+
|
|
104
108
|
return response;
|
|
105
109
|
}
|
|
106
110
|
|
|
@@ -172,4 +176,5 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
172
176
|
writable: true,
|
|
173
177
|
initializer: null
|
|
174
178
|
})), _class2)) || _class);
|
|
175
|
-
exports.default = Booking;
|
|
179
|
+
exports.default = Booking;
|
|
180
|
+
``;
|
|
@@ -150,6 +150,10 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
150
150
|
response.user = this.user.getPublicCompactData();
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
154
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
155
|
+
}
|
|
156
|
+
|
|
153
157
|
return response;
|
|
154
158
|
}
|
|
155
159
|
|
|
@@ -138,11 +138,15 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
138
138
|
response.booking = this.booking.getPublicData();
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
142
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
143
|
+
}
|
|
144
|
+
|
|
141
145
|
return response;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
getPublicCompactData() {
|
|
145
|
-
|
|
149
|
+
const response = {
|
|
146
150
|
id: this.id,
|
|
147
151
|
amount: this.amount,
|
|
148
152
|
status: this.status.id,
|
|
@@ -151,6 +155,12 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
151
155
|
created_at: this.created_at,
|
|
152
156
|
completed_at: this.completed_at
|
|
153
157
|
};
|
|
158
|
+
|
|
159
|
+
if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
|
|
160
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return response;
|
|
154
164
|
}
|
|
155
165
|
|
|
156
166
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _transaction = _interopRequireDefault(require("../transaction"));
|
|
11
11
|
|
|
12
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
12
|
+
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, _descriptor11, _descriptor12;
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -59,9 +59,12 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
|
|
|
59
59
|
type: "varchar",
|
|
60
60
|
nullable: true,
|
|
61
61
|
length: 150
|
|
62
|
-
}), _dec12 = (0, _typeorm.
|
|
62
|
+
}), _dec12 = (0, _typeorm.Column)({
|
|
63
|
+
type: "int",
|
|
64
|
+
nullable: true
|
|
65
|
+
}), _dec13 = (0, _typeorm.CreateDateColumn)({
|
|
63
66
|
type: 'timestamp with time zone'
|
|
64
|
-
}),
|
|
67
|
+
}), _dec14 = (0, _typeorm.UpdateDateColumn)({
|
|
65
68
|
type: 'timestamp with time zone'
|
|
66
69
|
}), _dec(_class = (_class2 = class TransactionMetadata {
|
|
67
70
|
constructor() {
|
|
@@ -83,9 +86,11 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
|
|
|
83
86
|
|
|
84
87
|
_initializerDefineProperty(this, "cardholder_name", _descriptor9, this);
|
|
85
88
|
|
|
86
|
-
_initializerDefineProperty(this, "
|
|
89
|
+
_initializerDefineProperty(this, "charges", _descriptor10, this);
|
|
87
90
|
|
|
88
|
-
_initializerDefineProperty(this, "
|
|
91
|
+
_initializerDefineProperty(this, "created_at", _descriptor11, this);
|
|
92
|
+
|
|
93
|
+
_initializerDefineProperty(this, "updated_at", _descriptor12, this);
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
@@ -135,12 +140,17 @@ let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
|
|
|
135
140
|
enumerable: true,
|
|
136
141
|
writable: true,
|
|
137
142
|
initializer: null
|
|
138
|
-
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
143
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "charges", [_dec12], {
|
|
144
|
+
configurable: true,
|
|
145
|
+
enumerable: true,
|
|
146
|
+
writable: true,
|
|
147
|
+
initializer: null
|
|
148
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec13], {
|
|
139
149
|
configurable: true,
|
|
140
150
|
enumerable: true,
|
|
141
151
|
writable: true,
|
|
142
152
|
initializer: null
|
|
143
|
-
}),
|
|
153
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec14], {
|
|
144
154
|
configurable: true,
|
|
145
155
|
enumerable: true,
|
|
146
156
|
writable: true,
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionCharges1651747895363 {
|
|
4
|
+
name = 'transactionCharges1651747895363'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD "charges" integer`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP COLUMN "charges"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@felloh-org/lambda-wrapper",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "Lambda wrapper for all Felloh Serverless Projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dotenv": "^16.0.0",
|
|
58
58
|
"epsagon": "^1.121.3",
|
|
59
59
|
"typeorm": "^0.2.41",
|
|
60
|
-
"typeorm-aurora-data-api-driver": "^2.
|
|
60
|
+
"typeorm-aurora-data-api-driver": "^2.4.2",
|
|
61
61
|
"useragent": "^2.3.0",
|
|
62
62
|
"uuid": "^8.3.2",
|
|
63
63
|
"validate.js": "^0.13.1",
|