@felloh-org/lambda-wrapper 1.0.0 → 1.0.4
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/.eslintignore +5 -0
- package/.eslintrc.yml +1 -0
- package/.github/workflows/release.yml +2 -0
- package/babel.config.js +20 -1
- package/cli/seed/create-schema.js +22 -0
- package/dist/config/dependencies.js +36 -0
- package/dist/dependency-injection/dependency-aware.js +43 -0
- package/dist/dependency-injection/dependency-injection.js +135 -0
- package/dist/entity/agent-data/booking/index.js +127 -0
- package/dist/entity/agent-data/booking-component/index.js +39 -0
- package/dist/entity/agent-data/booking-component-type/index.js +39 -0
- package/dist/entity/agent-data/index.js +24 -0
- package/dist/entity/agent-data/supplier/index.js +39 -0
- package/dist/entity/agent-data/supplier-type/index.js +39 -0
- package/dist/entity/bank/account/index.js +87 -0
- package/dist/entity/bank/beneficiary-organisation/index.js +69 -0
- package/dist/entity/bank/beneficiary-provider/index.js +79 -0
- package/dist/entity/bank/disbursal/index.js +39 -0
- package/dist/entity/bank/index.js +20 -0
- package/dist/entity/index.js +22 -0
- package/dist/entity/nuapay/account/index.js +96 -0
- package/dist/entity/nuapay/balance/index.js +64 -0
- package/dist/entity/nuapay/beneficiary/index.js +60 -0
- package/dist/entity/nuapay/index.js +20 -0
- package/dist/entity/nuapay/transaction/index.js +120 -0
- package/dist/entity/payment/index.js +28 -0
- package/dist/entity/payment/payment-link/index.js +161 -0
- package/dist/entity/payment/transaction/index.js +150 -0
- package/dist/entity/payment/transaction-event/index.js +71 -0
- package/dist/entity/payment/transaction-event-type/index.js +39 -0
- package/dist/entity/payment/transaction-metadata/index.js +140 -0
- package/dist/entity/payment/transaction-method/index.js +39 -0
- package/dist/entity/payment/transaction-status/index.js +39 -0
- package/dist/entity/payment/transaction-type/index.js +39 -0
- package/dist/entity/user/feature/index.js +63 -0
- package/dist/entity/user/index.js +26 -0
- package/dist/entity/user/organisation/index.js +111 -0
- package/dist/entity/user/organisation-feature/index.js +69 -0
- package/dist/entity/user/role/index.js +107 -0
- package/dist/entity/user/user/index.js +154 -0
- package/dist/entity/user/user-activity/index.js +82 -0
- package/dist/entity/user/user-role/index.js +83 -0
- package/dist/index.js +359 -0
- package/dist/migration/agent-data/1642121041760-inital.js +15 -0
- package/dist/migration/agent-data/1642121610577-organisation-suppliers.js +13 -0
- package/dist/migration/agent-data/1642121681610-organisation-suppliers-type.js +13 -0
- package/dist/migration/agent-data/1642122014731-booking-component-type.js +13 -0
- package/dist/migration/agent-data/1642505882721-booking-fields.js +29 -0
- package/dist/migration/agent-data/1642508385880-booking-id.js +19 -0
- package/dist/migration/bank/1642313073694-bank-initial.js +25 -0
- package/dist/migration/nuapay/1642200051764-initial.js +13 -0
- package/dist/migration/nuapay/1642201303413-add-fields-nuapay.js +15 -0
- package/dist/migration/nuapay/1642282666475-add-nuapay-account.js +13 -0
- package/dist/migration/nuapay/1642283420696-fix-iban-length.js +15 -0
- package/dist/migration/nuapay/1642283781684-account-relation.js +15 -0
- package/dist/migration/nuapay/1642286393959-beneficiary.js +13 -0
- package/dist/migration/nuapay/1642316424390-account-ibans.js +21 -0
- package/dist/migration/nuapay/1642318117667-cleanup-beneficaries.js +23 -0
- package/dist/migration/nuapay/1642365244026-nullable-bic.js +13 -0
- package/dist/migration/nuapay/1642366232568-remove-bic.js +13 -0
- package/dist/migration/nuapay/1642370449589-transaction.js +17 -0
- package/dist/migration/payment/1642120204899-inital.js +21 -0
- package/dist/migration/payment/1642514728358-payment-link-updates.js +39 -0
- package/dist/migration/payment/1642516017835-payment-link-add-booking.js +15 -0
- package/dist/migration/payment/1642519453365-transaction.js +63 -0
- package/dist/migration/payment/1642520774562-transaction-payment-link.js +15 -0
- package/dist/migration/payment/1642533711013-transaction-metadata.js +15 -0
- package/dist/migration/payment/1642540883807-transaction-event.js +27 -0
- package/dist/migration/user/1641774481300-initial.js +27 -0
- package/dist/migration/user/1641829697638-add_parent_org.js +25 -0
- package/dist/migration/user/1641901624008-add_roles.js +21 -0
- package/dist/migration/user/1641903059924-add_roles_kyc.js +13 -0
- package/dist/migration/user/1641903425025-roles-defaults.js +15 -0
- package/dist/migration/user/1641939221103-feature.js +13 -0
- package/dist/migration/user/1642019067334-organisation-feature.js +17 -0
- package/dist/migration/user/1642078564295-user-activity-relation.js +16 -0
- package/dist/migration/user/1642207858247-fix-user-constraint.js +19 -0
- package/dist/model/index.js +45 -0
- package/dist/model/response/index.js +150 -0
- package/dist/model/status/index.js +82 -0
- package/dist/service/http.js +55 -0
- package/dist/service/logger.js +236 -0
- package/dist/service/request.js +342 -0
- package/dist/service/warehouse.js +59 -0
- package/dist/util/lambda-termination.js +39 -0
- package/dist/util/promisified-delay.js +59 -0
- package/dist/wrapper/index.js +165 -0
- package/ormconfig.js +25 -0
- package/package.json +19 -5
package/.eslintignore
ADDED
package/.eslintrc.yml
CHANGED
package/babel.config.js
CHANGED
|
@@ -9,5 +9,24 @@ module.exports = {
|
|
|
9
9
|
},
|
|
10
10
|
],
|
|
11
11
|
],
|
|
12
|
-
plugins: [
|
|
12
|
+
plugins: [
|
|
13
|
+
"@babel/plugin-syntax-flow",
|
|
14
|
+
"@babel/plugin-transform-flow-strip-types",
|
|
15
|
+
"@babel/plugin-proposal-optional-chaining",
|
|
16
|
+
[
|
|
17
|
+
"@babel/plugin-proposal-decorators",
|
|
18
|
+
{
|
|
19
|
+
"legacy": true
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"transform-class-properties",
|
|
23
|
+
[
|
|
24
|
+
"module-resolver",
|
|
25
|
+
{
|
|
26
|
+
"alias": {
|
|
27
|
+
"@": "."
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
],
|
|
13
32
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DotEnv from 'dotenv';
|
|
2
|
+
|
|
3
|
+
import Warehouse from '@/src/service/warehouse';
|
|
4
|
+
|
|
5
|
+
DotEnv.config();
|
|
6
|
+
|
|
7
|
+
const run = async () => {
|
|
8
|
+
const warehouse = new Warehouse();
|
|
9
|
+
|
|
10
|
+
const connection = await warehouse.connect();
|
|
11
|
+
|
|
12
|
+
const queryRunner = await connection.createQueryRunner();
|
|
13
|
+
await queryRunner.createDatabase("felloh", true);
|
|
14
|
+
|
|
15
|
+
await queryRunner.createSchema("nuapay", true);
|
|
16
|
+
await queryRunner.createSchema("agent_data", true);
|
|
17
|
+
await queryRunner.createSchema("payment", true);
|
|
18
|
+
await queryRunner.createSchema("bank", true);
|
|
19
|
+
await queryRunner.createSchema("user", true);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
run();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Dependencies = exports.DEFINITIONS = void 0;
|
|
7
|
+
|
|
8
|
+
var _http = _interopRequireDefault(require("../service/http"));
|
|
9
|
+
|
|
10
|
+
var _logger = _interopRequireDefault(require("../service/logger"));
|
|
11
|
+
|
|
12
|
+
var _request = _interopRequireDefault(require("../service/request"));
|
|
13
|
+
|
|
14
|
+
var _warehouse = _interopRequireDefault(require("../service/warehouse"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const DEFINITIONS = {
|
|
19
|
+
HTTP: 'HTTP',
|
|
20
|
+
LOGGER: 'LOGGER',
|
|
21
|
+
REQUEST: 'REQUEST',
|
|
22
|
+
WAREHOUSE: 'WAREHOUSE'
|
|
23
|
+
};
|
|
24
|
+
exports.DEFINITIONS = DEFINITIONS;
|
|
25
|
+
const Dependencies = {
|
|
26
|
+
[DEFINITIONS.HTTP]: _http.default,
|
|
27
|
+
[DEFINITIONS.LOGGER]: _logger.default,
|
|
28
|
+
[DEFINITIONS.REQUEST]: _request.default,
|
|
29
|
+
[DEFINITIONS.WAREHOUSE]: _warehouse.default
|
|
30
|
+
};
|
|
31
|
+
exports.Dependencies = Dependencies;
|
|
32
|
+
var _default = {
|
|
33
|
+
DEFINITIONS,
|
|
34
|
+
DEPENDENCIES: Dependencies
|
|
35
|
+
};
|
|
36
|
+
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* DependencyAwareClass Class
|
|
10
|
+
*/
|
|
11
|
+
class DependencyAware {
|
|
12
|
+
/**
|
|
13
|
+
* DependencyAwareClass constructor
|
|
14
|
+
*
|
|
15
|
+
* @param {DependencyInjection} di
|
|
16
|
+
*/
|
|
17
|
+
constructor(di) {
|
|
18
|
+
this.di = di;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get Dependency Injection Container
|
|
22
|
+
*
|
|
23
|
+
* @returns {DependencyInjection}
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
getContainer() {
|
|
28
|
+
return this.di;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Shortcut for `this.getContainer().definitions`
|
|
32
|
+
*
|
|
33
|
+
* @returns {object}
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
get definitions() {
|
|
38
|
+
return this.getContainer().definitions;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.default = DependencyAware;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _dependencies = require("../config/dependencies");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* DependencyInjection class
|
|
12
|
+
*/
|
|
13
|
+
class DependencyInjection {
|
|
14
|
+
/**
|
|
15
|
+
* DependencyInjection constructor
|
|
16
|
+
*
|
|
17
|
+
* @param configuration
|
|
18
|
+
* @param event
|
|
19
|
+
* @param context
|
|
20
|
+
*/
|
|
21
|
+
constructor(configuration, event, context) {
|
|
22
|
+
this.event = event;
|
|
23
|
+
this.context = context;
|
|
24
|
+
this.dependencies = {};
|
|
25
|
+
this.configuration = configuration;
|
|
26
|
+
|
|
27
|
+
for (let x = 0; x <= 1; x += 1) {
|
|
28
|
+
// Iterate over dependencies and add to container
|
|
29
|
+
Object.keys(_dependencies.DEFINITIONS).forEach(dependencyKey => {
|
|
30
|
+
this.dependencies[dependencyKey] = new _dependencies.Dependencies[dependencyKey](this);
|
|
31
|
+
}); // Iterate over child dependencies and add to container
|
|
32
|
+
|
|
33
|
+
if (typeof configuration.DEPENDENCIES !== 'undefined') {
|
|
34
|
+
Object.keys(configuration.DEPENDENCIES).forEach(dependencyKey => {
|
|
35
|
+
this.dependencies[dependencyKey] = new configuration.DEPENDENCIES[dependencyKey](this);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get Dependency
|
|
42
|
+
*
|
|
43
|
+
* @param definition
|
|
44
|
+
* @returns {*}
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
get(definition) {
|
|
49
|
+
if (typeof this.dependencies[definition] === 'undefined') {
|
|
50
|
+
throw new TypeError(`${definition} does not exist in di container`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return this.dependencies[definition];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get Event
|
|
57
|
+
*
|
|
58
|
+
* @returns {*}
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
getEvent() {
|
|
63
|
+
return this.event;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get Context
|
|
67
|
+
*
|
|
68
|
+
* @returns {*}
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
getContext() {
|
|
73
|
+
return this.context;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get Configuration
|
|
77
|
+
*
|
|
78
|
+
* @param definition string
|
|
79
|
+
* @returns {*}
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
getConfiguration(definition = null) {
|
|
84
|
+
if (definition !== null && typeof this.configuration[definition] === 'undefined') {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (typeof this.configuration[definition] !== 'undefined') {
|
|
89
|
+
return this.configuration[definition];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return this.configuration;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Check whether the function
|
|
96
|
+
* is being executed in a serverless-offline context
|
|
97
|
+
*
|
|
98
|
+
* @returns {boolean}
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
get isOffline() {
|
|
103
|
+
const context = this.getContext() || {};
|
|
104
|
+
|
|
105
|
+
if (!Object.prototype.hasOwnProperty.call(context, 'invokedFunctionArn')) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (context.invokedFunctionArn.includes('offline')) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (process.env.USE_SERVERLESS_OFFLINE) {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Returns the definitions
|
|
121
|
+
* associated to this DependencyInjection
|
|
122
|
+
* so that services can refer to them
|
|
123
|
+
* without causing circular imports.
|
|
124
|
+
*
|
|
125
|
+
* @returns {object}
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
get definitions() {
|
|
130
|
+
return this.configuration.DEFINITIONS;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
exports.default = DependencyInjection;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _user = _interopRequireDefault(require("../../user/user"));
|
|
11
|
+
|
|
12
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
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 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
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.'); }
|
|
23
|
+
|
|
24
|
+
let Booking = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'booking',
|
|
26
|
+
schema: 'agent_data'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
28
|
+
type: "varchar",
|
|
29
|
+
length: "150"
|
|
30
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _user.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
31
|
+
name: 'user_id',
|
|
32
|
+
referencedColumnName: 'id'
|
|
33
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec7 = (0, _typeorm.JoinColumn)({
|
|
34
|
+
name: 'organisation_id',
|
|
35
|
+
referencedColumnName: 'id'
|
|
36
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: "150"
|
|
39
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
40
|
+
type: "varchar",
|
|
41
|
+
length: "150"
|
|
42
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
43
|
+
type: "date",
|
|
44
|
+
nullable: true
|
|
45
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
46
|
+
type: "date",
|
|
47
|
+
nullable: true
|
|
48
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
|
|
49
|
+
constructor() {
|
|
50
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
51
|
+
|
|
52
|
+
_initializerDefineProperty(this, "email", _descriptor2, this);
|
|
53
|
+
|
|
54
|
+
_initializerDefineProperty(this, "user", _descriptor3, this);
|
|
55
|
+
|
|
56
|
+
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
57
|
+
|
|
58
|
+
_initializerDefineProperty(this, "customer_name", _descriptor5, this);
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(this, "booking_reference", _descriptor6, this);
|
|
61
|
+
|
|
62
|
+
_initializerDefineProperty(this, "departure_date", _descriptor7, this);
|
|
63
|
+
|
|
64
|
+
_initializerDefineProperty(this, "return_date", _descriptor8, this);
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(this, "created_at", _descriptor9, this);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
70
|
+
configurable: true,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
initializer: function () {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec3], {
|
|
77
|
+
configurable: true,
|
|
78
|
+
enumerable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
initializer: function () {
|
|
81
|
+
return "";
|
|
82
|
+
}
|
|
83
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec4, _dec5], {
|
|
84
|
+
configurable: true,
|
|
85
|
+
enumerable: true,
|
|
86
|
+
writable: true,
|
|
87
|
+
initializer: function () {
|
|
88
|
+
return _user.default;
|
|
89
|
+
}
|
|
90
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec6, _dec7], {
|
|
91
|
+
configurable: true,
|
|
92
|
+
enumerable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
initializer: function () {
|
|
95
|
+
return _organisation.default;
|
|
96
|
+
}
|
|
97
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec8], {
|
|
98
|
+
configurable: true,
|
|
99
|
+
enumerable: true,
|
|
100
|
+
writable: true,
|
|
101
|
+
initializer: function () {
|
|
102
|
+
return "";
|
|
103
|
+
}
|
|
104
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "booking_reference", [_dec9], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: function () {
|
|
109
|
+
return "";
|
|
110
|
+
}
|
|
111
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "departure_date", [_dec10], {
|
|
112
|
+
configurable: true,
|
|
113
|
+
enumerable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
initializer: null
|
|
116
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "return_date", [_dec11], {
|
|
117
|
+
configurable: true,
|
|
118
|
+
enumerable: true,
|
|
119
|
+
writable: true,
|
|
120
|
+
initializer: null
|
|
121
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
122
|
+
configurable: true,
|
|
123
|
+
enumerable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
initializer: null
|
|
126
|
+
})), _class2)) || _class);
|
|
127
|
+
exports.default = Booking;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
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 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
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.'); }
|
|
17
|
+
|
|
18
|
+
let BookingComponent = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'booking_component',
|
|
20
|
+
schema: 'agent_data'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BookingComponent {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = BookingComponent;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
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 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
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.'); }
|
|
17
|
+
|
|
18
|
+
let BookingComponentType = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'booking_component_type',
|
|
20
|
+
schema: 'agent_data'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BookingComponentType {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = BookingComponentType;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _booking = _interopRequireDefault(require("./booking"));
|
|
9
|
+
|
|
10
|
+
var _bookingComponent = _interopRequireDefault(require("./booking-component"));
|
|
11
|
+
|
|
12
|
+
var _bookingComponentType = _interopRequireDefault(require("./booking-component-type"));
|
|
13
|
+
|
|
14
|
+
var _supplier = _interopRequireDefault(require("./supplier"));
|
|
15
|
+
|
|
16
|
+
var _supplierType = _interopRequireDefault(require("./supplier-type"));
|
|
17
|
+
|
|
18
|
+
var _transactionEvent = _interopRequireDefault(require("../payment/transaction-event"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
const ENTITIES = [_booking.default, _bookingComponent.default, _bookingComponentType.default, _supplier.default, _supplierType.default, _transactionEvent.default];
|
|
23
|
+
var _default = ENTITIES;
|
|
24
|
+
exports.default = _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
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 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
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.'); }
|
|
17
|
+
|
|
18
|
+
let Supplier = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'supplier',
|
|
20
|
+
schema: 'agent_data'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Supplier {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = Supplier;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
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 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
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.'); }
|
|
17
|
+
|
|
18
|
+
let SupplierType = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'supplier_type',
|
|
20
|
+
schema: 'agent_data'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class SupplierType {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = SupplierType;
|