@felloh-org/lambda-wrapper 1.11.96 → 1.11.98
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/cli/seed/create-schema.js +2 -0
- package/dist/config/dependencies.js +6 -2
- package/dist/entity/bank/adjustment/index.js +12 -0
- package/dist/entity/bank/disbursal/index.js +32 -19
- package/dist/service/authentication.js +6 -0
- package/dist/service/secrets.js +44 -0
- package/dist/service/warehouse.js +17 -4
- package/ormconfig.js +1 -1
- package/package.json +3 -1
- package/dist/migration/view/1693832604328-plecom.js +0 -60
- package/dist/migration/view/1693832604329-plecom.js +0 -105
|
@@ -19,6 +19,8 @@ var _paymentInitiationObject = _interopRequireDefault(require("../service/paymen
|
|
|
19
19
|
|
|
20
20
|
var _request = _interopRequireDefault(require("../service/request"));
|
|
21
21
|
|
|
22
|
+
var _secrets = _interopRequireDefault(require("../service/secrets"));
|
|
23
|
+
|
|
22
24
|
var _user = _interopRequireDefault(require("../service/user"));
|
|
23
25
|
|
|
24
26
|
var _warehouse = _interopRequireDefault(require("../service/warehouse"));
|
|
@@ -34,7 +36,8 @@ const DEFINITIONS = exports.DEFINITIONS = {
|
|
|
34
36
|
PAYMENT_INITIATION_OBJECT: 'PAYMENT_INITIATION_OBJECT',
|
|
35
37
|
REQUEST: 'REQUEST',
|
|
36
38
|
USER: 'USER',
|
|
37
|
-
WAREHOUSE: 'WAREHOUSE'
|
|
39
|
+
WAREHOUSE: 'WAREHOUSE',
|
|
40
|
+
SECRETS: 'SECRETS'
|
|
38
41
|
};
|
|
39
42
|
const Dependencies = exports.Dependencies = {
|
|
40
43
|
[DEFINITIONS.AUDIT_LOGGER]: _auditLogger.default,
|
|
@@ -45,7 +48,8 @@ const Dependencies = exports.Dependencies = {
|
|
|
45
48
|
[DEFINITIONS.REQUEST]: _request.default,
|
|
46
49
|
[DEFINITIONS.WAREHOUSE]: _warehouse.default,
|
|
47
50
|
[DEFINITIONS.AUTHENTICATION]: _authentication.default,
|
|
48
|
-
[DEFINITIONS.USER]: _user.default
|
|
51
|
+
[DEFINITIONS.USER]: _user.default,
|
|
52
|
+
[DEFINITIONS.SECRETS]: _secrets.default
|
|
49
53
|
};
|
|
50
54
|
|
|
51
55
|
var _default = exports.default = {
|
|
@@ -96,6 +96,18 @@ let Adjustment = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
96
96
|
return response;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
getPublicCompactData() {
|
|
100
|
+
return {
|
|
101
|
+
id: this.id,
|
|
102
|
+
amount: this.amount,
|
|
103
|
+
vendor_reference: this.vendor_reference,
|
|
104
|
+
description: this.description,
|
|
105
|
+
created_at: this.created_at,
|
|
106
|
+
updated_at: this.updated_at,
|
|
107
|
+
currency: this.currency
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
99
111
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
100
112
|
configurable: true,
|
|
101
113
|
enumerable: true,
|
|
@@ -13,11 +13,13 @@ var _account = _interopRequireDefault(require("../account"));
|
|
|
13
13
|
|
|
14
14
|
var _transactionBatch = _interopRequireDefault(require("../transaction-batch"));
|
|
15
15
|
|
|
16
|
+
var _adjustmentBatch = _interopRequireDefault(require("../adjustment-batch"));
|
|
17
|
+
|
|
16
18
|
var _currency = require("../currency");
|
|
17
19
|
|
|
18
20
|
var _transaction = _interopRequireDefault(require("../../saltedge/transaction"));
|
|
19
21
|
|
|
20
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
22
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -43,24 +45,24 @@ let Disbursal = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
43
45
|
}), _dec8 = (0, _typeorm.Column)({
|
|
44
46
|
type: "varchar",
|
|
45
47
|
length: "50"
|
|
46
|
-
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec10 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.disbursal), _dec11 = (0, _typeorm.Column)({
|
|
48
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec10 = (0, _typeorm.OneToMany)(() => _transactionBatch.default, transactionBatch => transactionBatch.disbursal), _dec11 = (0, _typeorm.OneToMany)(() => _adjustmentBatch.default, adjustmentBatch => adjustmentBatch.disbursal), _dec12 = (0, _typeorm.Column)({
|
|
47
49
|
type: "varchar",
|
|
48
50
|
length: "3",
|
|
49
51
|
default: _currency.DEFAULT_CURRENCY
|
|
50
|
-
}),
|
|
52
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
51
53
|
type: "varchar",
|
|
52
54
|
length: "250",
|
|
53
55
|
nullable: true
|
|
54
|
-
}),
|
|
56
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
55
57
|
type: "boolean",
|
|
56
58
|
default: true
|
|
57
|
-
}),
|
|
59
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
58
60
|
type: "boolean",
|
|
59
61
|
default: false
|
|
60
|
-
}),
|
|
62
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
61
63
|
type: "boolean",
|
|
62
64
|
default: false
|
|
63
|
-
}),
|
|
65
|
+
}), _dec17 = (0, _typeorm.OneToOne)(() => _transaction.default, transaction => transaction.disbursal), _dec(_class = (_class2 = class Disbursal {
|
|
64
66
|
constructor() {
|
|
65
67
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
66
68
|
|
|
@@ -76,17 +78,19 @@ let Disbursal = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
76
78
|
|
|
77
79
|
_initializerDefineProperty(this, "batch", _descriptor7, this);
|
|
78
80
|
|
|
79
|
-
_initializerDefineProperty(this, "
|
|
81
|
+
_initializerDefineProperty(this, "adjustment_batch", _descriptor8, this);
|
|
80
82
|
|
|
81
|
-
_initializerDefineProperty(this, "
|
|
83
|
+
_initializerDefineProperty(this, "currency", _descriptor9, this);
|
|
82
84
|
|
|
83
|
-
_initializerDefineProperty(this, "
|
|
85
|
+
_initializerDefineProperty(this, "provider_reference", _descriptor10, this);
|
|
84
86
|
|
|
85
|
-
_initializerDefineProperty(this, "
|
|
87
|
+
_initializerDefineProperty(this, "is_ledgered", _descriptor11, this);
|
|
86
88
|
|
|
87
|
-
_initializerDefineProperty(this, "
|
|
89
|
+
_initializerDefineProperty(this, "is_manual_review", _descriptor12, this);
|
|
88
90
|
|
|
89
|
-
_initializerDefineProperty(this, "
|
|
91
|
+
_initializerDefineProperty(this, "updated_legacy_system", _descriptor13, this);
|
|
92
|
+
|
|
93
|
+
_initializerDefineProperty(this, "bank_transaction", _descriptor14, this);
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
getPublicData() {
|
|
@@ -108,6 +112,10 @@ let Disbursal = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
108
112
|
data.transactions = this.batch.map(batch => batch.transaction.getPublicCompactData());
|
|
109
113
|
}
|
|
110
114
|
|
|
115
|
+
if (this.adjustment && this.adjustment.length >= 1) {
|
|
116
|
+
data.adjustments = this.adjustment.map(batch => batch.adjustment.getPublicCompactData());
|
|
117
|
+
}
|
|
118
|
+
|
|
111
119
|
return data;
|
|
112
120
|
}
|
|
113
121
|
|
|
@@ -152,42 +160,47 @@ let Disbursal = exports.default = (_dec = (0, _typeorm.Entity)({
|
|
|
152
160
|
enumerable: true,
|
|
153
161
|
writable: true,
|
|
154
162
|
initializer: null
|
|
155
|
-
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
163
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "adjustment_batch", [_dec11], {
|
|
164
|
+
configurable: true,
|
|
165
|
+
enumerable: true,
|
|
166
|
+
writable: true,
|
|
167
|
+
initializer: null
|
|
168
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec12], {
|
|
156
169
|
configurable: true,
|
|
157
170
|
enumerable: true,
|
|
158
171
|
writable: true,
|
|
159
172
|
initializer: function () {
|
|
160
173
|
return _currency.DEFAULT_CURRENCY;
|
|
161
174
|
}
|
|
162
|
-
}),
|
|
175
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec13], {
|
|
163
176
|
configurable: true,
|
|
164
177
|
enumerable: true,
|
|
165
178
|
writable: true,
|
|
166
179
|
initializer: function () {
|
|
167
180
|
return "";
|
|
168
181
|
}
|
|
169
|
-
}),
|
|
182
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "is_ledgered", [_dec14], {
|
|
170
183
|
configurable: true,
|
|
171
184
|
enumerable: true,
|
|
172
185
|
writable: true,
|
|
173
186
|
initializer: function () {
|
|
174
187
|
return true;
|
|
175
188
|
}
|
|
176
|
-
}),
|
|
189
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "is_manual_review", [_dec15], {
|
|
177
190
|
configurable: true,
|
|
178
191
|
enumerable: true,
|
|
179
192
|
writable: true,
|
|
180
193
|
initializer: function () {
|
|
181
194
|
return false;
|
|
182
195
|
}
|
|
183
|
-
}),
|
|
196
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "updated_legacy_system", [_dec16], {
|
|
184
197
|
configurable: true,
|
|
185
198
|
enumerable: true,
|
|
186
199
|
writable: true,
|
|
187
200
|
initializer: function () {
|
|
188
201
|
return false;
|
|
189
202
|
}
|
|
190
|
-
}),
|
|
203
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "bank_transaction", [_dec17], {
|
|
191
204
|
configurable: true,
|
|
192
205
|
enumerable: true,
|
|
193
206
|
writable: true,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _clientSecretsManager = require("@aws-sdk/client-secrets-manager");
|
|
9
|
+
|
|
10
|
+
var _dependencyAware = _interopRequireDefault(require("../dependency-injection/dependency-aware"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const client = new _clientSecretsManager.SecretsManagerClient({
|
|
15
|
+
region: process.env.REGION
|
|
16
|
+
});
|
|
17
|
+
const cache = {};
|
|
18
|
+
/**
|
|
19
|
+
* Event Bridge Service
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
class Secrets extends _dependencyAware.default {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.initalised = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async get(arn) {
|
|
29
|
+
this.initalised = true;
|
|
30
|
+
|
|
31
|
+
if (cache[arn]) {
|
|
32
|
+
return cache[arn];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const response = await client.send(new _clientSecretsManager.GetSecretValueCommand({
|
|
36
|
+
SecretId: arn
|
|
37
|
+
}));
|
|
38
|
+
cache[arn] = JSON.parse(response.SecretString);
|
|
39
|
+
return cache[arn];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.default = Secrets;
|
|
@@ -9,6 +9,8 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _typeormAuroraDataApiDriver = _interopRequireDefault(require("typeorm-aurora-data-api-driver"));
|
|
11
11
|
|
|
12
|
+
var _dependencies = require("../config/dependencies");
|
|
13
|
+
|
|
12
14
|
var _dependencyAware = _interopRequireDefault(require("../dependency-injection/dependency-aware"));
|
|
13
15
|
|
|
14
16
|
var _entity = _interopRequireDefault(require("../entity"));
|
|
@@ -24,8 +26,8 @@ class Warehouse extends _dependencyAware.default {
|
|
|
24
26
|
/**
|
|
25
27
|
* Warehouse Constructor
|
|
26
28
|
*/
|
|
27
|
-
constructor() {
|
|
28
|
-
super();
|
|
29
|
+
constructor(di) {
|
|
30
|
+
super(di);
|
|
29
31
|
this.connection = null;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
@@ -47,22 +49,33 @@ class Warehouse extends _dependencyAware.default {
|
|
|
47
49
|
const connectionParams = {
|
|
48
50
|
entities: _entity.default,
|
|
49
51
|
schema: process.env.WAREHOUSE_SCHEMA,
|
|
50
|
-
database: database || process.env.WAREHOUSE_DATABASE,
|
|
51
52
|
logging: process.env.DB_LOGGING !== 'undefined' && process.env.DB_LOGGING === 'true'
|
|
52
53
|
};
|
|
53
54
|
|
|
54
|
-
if (process.env.WAREHOUSE_TYPE === 'postgres') {
|
|
55
|
+
if (process.env.WAREHOUSE_TYPE === 'postgres-ssm') {
|
|
56
|
+
const secretsManager = this.di.get(_dependencies.DEFINITIONS.SECRETS);
|
|
57
|
+
const credentials = await secretsManager.get(process.env.DB_CREDS_ARN);
|
|
58
|
+
connectionParams.type = credentials.engine;
|
|
59
|
+
connectionParams.host = credentials.host;
|
|
60
|
+
connectionParams.port = credentials.port;
|
|
61
|
+
connectionParams.username = credentials.username;
|
|
62
|
+
connectionParams.password = credentials.password;
|
|
63
|
+
connectionParams.database = database || credentials.dbname;
|
|
64
|
+
connectionParams.ssl = true;
|
|
65
|
+
} else if (process.env.WAREHOUSE_TYPE === 'postgres') {
|
|
55
66
|
connectionParams.type = 'postgres';
|
|
56
67
|
connectionParams.host = process.env.WAREHOUSE_HOST;
|
|
57
68
|
connectionParams.port = 5432;
|
|
58
69
|
connectionParams.username = process.env.WAREHOUSE_USERNAME;
|
|
59
70
|
connectionParams.password = process.env.WAREHOUSE_PASSWORD;
|
|
71
|
+
connectionParams.database = database || process.env.WAREHOUSE_DATABASE;
|
|
60
72
|
connectionParams.ssl = true;
|
|
61
73
|
} else {
|
|
62
74
|
connectionParams.type = 'aurora-data-api-pg';
|
|
63
75
|
connectionParams.secretArn = process.env.WAREHOUSE_SECRET_ARN;
|
|
64
76
|
connectionParams.resourceArn = process.env.WAREHOUSE_ARN;
|
|
65
77
|
connectionParams.region = process.env.REGION;
|
|
78
|
+
connectionParams.database = database || process.env.WAREHOUSE_DATABASE;
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
this.connection = await (0, _typeorm.createConnection)(connectionParams);
|
package/ormconfig.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@felloh-org/lambda-wrapper",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.98",
|
|
4
4
|
"description": "Lambda wrapper for all Felloh Serverless Projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -55,12 +55,14 @@
|
|
|
55
55
|
"aws-sdk": ">=2.831.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
+
"@aws-sdk/client-secrets-manager": "^3.574.0",
|
|
58
59
|
"@baselime/lambda-logger": "^0.2.2",
|
|
59
60
|
"alai": "^1.0.3",
|
|
60
61
|
"async": "^3.2.3",
|
|
61
62
|
"axios": "^0.26.1",
|
|
62
63
|
"dotenv": "^16.0.0",
|
|
63
64
|
"epsagon": "^1.121.3",
|
|
65
|
+
"execution-time": "^1.4.1",
|
|
64
66
|
"geojson": "^0.5.0",
|
|
65
67
|
"moment": "^2.29.3",
|
|
66
68
|
"pg": "^8.11.3",
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
-
|
|
3
|
-
module.exports = class initial1641774481300 {
|
|
4
|
-
name = 'plecom1693832604328'
|
|
5
|
-
|
|
6
|
-
async up(queryRunner) {
|
|
7
|
-
await queryRunner.query(`
|
|
8
|
-
CREATE OR REPLACE VIEW plecom_union AS
|
|
9
|
-
select
|
|
10
|
-
amount,
|
|
11
|
-
description,
|
|
12
|
-
expires_at,
|
|
13
|
-
user_id,
|
|
14
|
-
organisation_id,
|
|
15
|
-
id,
|
|
16
|
-
booking_id,
|
|
17
|
-
customer_name,
|
|
18
|
-
open_banking_enabled,
|
|
19
|
-
card_enabled,
|
|
20
|
-
moto,
|
|
21
|
-
status,
|
|
22
|
-
created_at,
|
|
23
|
-
updated_at,
|
|
24
|
-
email,
|
|
25
|
-
currency,
|
|
26
|
-
deleted_at,
|
|
27
|
-
pre_authorized,
|
|
28
|
-
customer_id
|
|
29
|
-
from "payment"."payment_Link"
|
|
30
|
-
union
|
|
31
|
-
select
|
|
32
|
-
amount,
|
|
33
|
-
'' as description,
|
|
34
|
-
expires_at,
|
|
35
|
-
user_id,
|
|
36
|
-
organisation_id,
|
|
37
|
-
id,
|
|
38
|
-
booking_id,
|
|
39
|
-
customer_name,
|
|
40
|
-
open_banking_enabled,
|
|
41
|
-
card_enabled,
|
|
42
|
-
moto,
|
|
43
|
-
status,
|
|
44
|
-
created_at,
|
|
45
|
-
updated_at,
|
|
46
|
-
email,
|
|
47
|
-
currency,
|
|
48
|
-
deleted_at,
|
|
49
|
-
pre_authorized,
|
|
50
|
-
customer_id
|
|
51
|
-
from "payment".ecommerce
|
|
52
|
-
`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async down(queryRunner) {
|
|
56
|
-
await queryRunner.query(`
|
|
57
|
-
DROP VIEW IF EXISTS plecom_union;
|
|
58
|
-
`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
-
|
|
3
|
-
module.exports = class initial1641774481300 {
|
|
4
|
-
name = 'plecom1693832604329'
|
|
5
|
-
|
|
6
|
-
async up(queryRunner) {
|
|
7
|
-
await queryRunner.query(`
|
|
8
|
-
CREATE OR REPLACE VIEW plecom_union AS
|
|
9
|
-
select
|
|
10
|
-
amount,
|
|
11
|
-
description,
|
|
12
|
-
expires_at,
|
|
13
|
-
user_id,
|
|
14
|
-
organisation_id,
|
|
15
|
-
id,
|
|
16
|
-
booking_id,
|
|
17
|
-
customer_name,
|
|
18
|
-
open_banking_enabled,
|
|
19
|
-
card_enabled,
|
|
20
|
-
moto,
|
|
21
|
-
status,
|
|
22
|
-
created_at,
|
|
23
|
-
updated_at,
|
|
24
|
-
email,
|
|
25
|
-
currency,
|
|
26
|
-
deleted_at,
|
|
27
|
-
pre_authorized,
|
|
28
|
-
customer_id,
|
|
29
|
-
cast(coalesce(metadata, '{}') as jsonb) as metadata
|
|
30
|
-
from "payment"."payment_Link"
|
|
31
|
-
union
|
|
32
|
-
select
|
|
33
|
-
amount,
|
|
34
|
-
'' as description,
|
|
35
|
-
expires_at,
|
|
36
|
-
user_id,
|
|
37
|
-
organisation_id,
|
|
38
|
-
id,
|
|
39
|
-
booking_id,
|
|
40
|
-
customer_name,
|
|
41
|
-
open_banking_enabled,
|
|
42
|
-
card_enabled,
|
|
43
|
-
moto,
|
|
44
|
-
status,
|
|
45
|
-
created_at,
|
|
46
|
-
updated_at,
|
|
47
|
-
email,
|
|
48
|
-
currency,
|
|
49
|
-
deleted_at,
|
|
50
|
-
pre_authorized,
|
|
51
|
-
customer_id,
|
|
52
|
-
cast('{}' as jsonb) as metadata
|
|
53
|
-
from "payment".ecommerce
|
|
54
|
-
`);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async down(queryRunner) {
|
|
58
|
-
await queryRunner.query(`
|
|
59
|
-
CREATE OR REPLACE VIEW plecom_union AS
|
|
60
|
-
select
|
|
61
|
-
amount,
|
|
62
|
-
description,
|
|
63
|
-
expires_at,
|
|
64
|
-
user_id,
|
|
65
|
-
organisation_id,
|
|
66
|
-
id,
|
|
67
|
-
booking_id,
|
|
68
|
-
customer_name,
|
|
69
|
-
open_banking_enabled,
|
|
70
|
-
card_enabled,
|
|
71
|
-
moto,
|
|
72
|
-
status,
|
|
73
|
-
created_at,
|
|
74
|
-
updated_at,
|
|
75
|
-
email,
|
|
76
|
-
currency,
|
|
77
|
-
deleted_at,
|
|
78
|
-
pre_authorized,
|
|
79
|
-
customer_id
|
|
80
|
-
from "payment"."payment_Link"
|
|
81
|
-
union
|
|
82
|
-
select
|
|
83
|
-
amount,
|
|
84
|
-
'' as description,
|
|
85
|
-
expires_at,
|
|
86
|
-
user_id,
|
|
87
|
-
organisation_id,
|
|
88
|
-
id,
|
|
89
|
-
booking_id,
|
|
90
|
-
customer_name,
|
|
91
|
-
open_banking_enabled,
|
|
92
|
-
card_enabled,
|
|
93
|
-
moto,
|
|
94
|
-
status,
|
|
95
|
-
created_at,
|
|
96
|
-
updated_at,
|
|
97
|
-
email,
|
|
98
|
-
currency,
|
|
99
|
-
deleted_at,
|
|
100
|
-
pre_authorized,
|
|
101
|
-
customer_id
|
|
102
|
-
from "payment".ecommerce
|
|
103
|
-
`);
|
|
104
|
-
}
|
|
105
|
-
}
|