@felloh-org/lambda-wrapper 1.0.1 → 1.0.2
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/babel.config.js +20 -1
- package/cli/seed/create-schema.js +22 -0
- package/dist/config/dependencies.js +6 -2
- package/dist/entity/agent-data/booking/index.js +39 -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/customer/index.js +39 -0
- package/dist/entity/agent-data/index.js +24 -0
- package/dist/entity/agent-data/organisation-supplier/index.js +39 -0
- package/dist/entity/agent-data/organisation-supplier-type/index.js +39 -0
- package/dist/entity/index.js +22 -0
- package/dist/entity/nuapay/balance/index.js +65 -0
- package/dist/entity/nuapay/index.js +14 -0
- package/dist/entity/payment/index.js +22 -0
- package/dist/entity/payment/payment-link/index.js +39 -0
- package/dist/entity/payment/transaction/index.js +39 -0
- package/dist/entity/payment/transaction-event/index.js +39 -0
- package/dist/entity/payment/transaction-method/index.js +39 -0
- package/dist/entity/payment/transaction-status/index.js +39 -0
- package/dist/entity/payout/beneficiary/index.js +103 -0
- package/dist/entity/payout/beneficiary-organisation/index.js +69 -0
- package/dist/entity/payout/beneficiary-provider/index.js +91 -0
- package/dist/entity/payout/disbursal/index.js +39 -0
- package/dist/entity/payout/index.js +20 -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 +147 -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 +200 -0
- package/dist/migration/agent-data/1642121041760-inital.js +17 -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/nuapay/1642200051764-initial.js +13 -0
- package/dist/migration/nuapay/1642201303413-add-fields-nuapay.js +15 -0
- package/dist/migration/payment/1642120204899-inital.js +21 -0
- package/dist/migration/payout/1642141038609-initial.js +15 -0
- package/dist/migration/payout/1642196506002-beneficiary.js +31 -0
- package/dist/migration/payout/1642199881916-breakout-beneficaries.js +25 -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/service/warehouse.js +59 -0
- package/ormconfig.js +25 -0
- package/package.json +17 -4
|
@@ -0,0 +1,107 @@
|
|
|
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, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
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 Role = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'role',
|
|
20
|
+
schema: 'user'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "50"
|
|
24
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
25
|
+
type: "varchar",
|
|
26
|
+
length: "150"
|
|
27
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
28
|
+
type: "varchar",
|
|
29
|
+
length: "250"
|
|
30
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
31
|
+
type: "boolean",
|
|
32
|
+
default: false
|
|
33
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
34
|
+
type: "boolean",
|
|
35
|
+
default: false
|
|
36
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: "100"
|
|
39
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Role {
|
|
40
|
+
constructor() {
|
|
41
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
42
|
+
|
|
43
|
+
_initializerDefineProperty(this, "machine_name", _descriptor2, this);
|
|
44
|
+
|
|
45
|
+
_initializerDefineProperty(this, "name", _descriptor3, this);
|
|
46
|
+
|
|
47
|
+
_initializerDefineProperty(this, "description", _descriptor4, this);
|
|
48
|
+
|
|
49
|
+
_initializerDefineProperty(this, "parent_only", _descriptor5, this);
|
|
50
|
+
|
|
51
|
+
_initializerDefineProperty(this, "kyc_required", _descriptor6, this);
|
|
52
|
+
|
|
53
|
+
_initializerDefineProperty(this, "group", _descriptor7, this);
|
|
54
|
+
|
|
55
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
59
|
+
configurable: true,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
initializer: null
|
|
63
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "machine_name", [_dec3], {
|
|
64
|
+
configurable: true,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
initializer: function () {
|
|
68
|
+
return "";
|
|
69
|
+
}
|
|
70
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec4], {
|
|
71
|
+
configurable: true,
|
|
72
|
+
enumerable: true,
|
|
73
|
+
writable: true,
|
|
74
|
+
initializer: function () {
|
|
75
|
+
return "";
|
|
76
|
+
}
|
|
77
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec5], {
|
|
78
|
+
configurable: true,
|
|
79
|
+
enumerable: true,
|
|
80
|
+
writable: true,
|
|
81
|
+
initializer: function () {
|
|
82
|
+
return "";
|
|
83
|
+
}
|
|
84
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "parent_only", [_dec6], {
|
|
85
|
+
configurable: true,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
initializer: null
|
|
89
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "kyc_required", [_dec7], {
|
|
90
|
+
configurable: true,
|
|
91
|
+
enumerable: true,
|
|
92
|
+
writable: true,
|
|
93
|
+
initializer: null
|
|
94
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "group", [_dec8], {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
initializer: function () {
|
|
99
|
+
return "";
|
|
100
|
+
}
|
|
101
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
|
|
102
|
+
configurable: true,
|
|
103
|
+
enumerable: true,
|
|
104
|
+
writable: true,
|
|
105
|
+
initializer: null
|
|
106
|
+
})), _class2)) || _class);
|
|
107
|
+
exports.default = Role;
|
|
@@ -0,0 +1,147 @@
|
|
|
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 _organisation = _interopRequireDefault(require("../organisation"));
|
|
11
|
+
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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 }); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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.'); }
|
|
21
|
+
|
|
22
|
+
let User = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'user',
|
|
24
|
+
schema: 'user'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "150"
|
|
28
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
29
|
+
type: "varchar",
|
|
30
|
+
length: "50"
|
|
31
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: "20"
|
|
34
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
35
|
+
type: "varchar",
|
|
36
|
+
length: "50"
|
|
37
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: "50"
|
|
40
|
+
}), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec9 = (0, _typeorm.UpdateDateColumn)(), _dec10 = (0, _typeorm.DeleteDateColumn)(), _dec11 = (0, _typeorm.ManyToMany)(() => _organisation.default, organisation => organisation.users, {
|
|
41
|
+
cascade: true
|
|
42
|
+
}), _dec12 = (0, _typeorm.JoinTable)({
|
|
43
|
+
name: "user_organisation",
|
|
44
|
+
schema: "user",
|
|
45
|
+
joinColumn: {
|
|
46
|
+
name: "user_id",
|
|
47
|
+
referencedColumnName: "id"
|
|
48
|
+
},
|
|
49
|
+
inverseJoinColumn: {
|
|
50
|
+
name: "organisation_id",
|
|
51
|
+
referencedColumnName: "id"
|
|
52
|
+
}
|
|
53
|
+
}), _dec(_class = (_class2 = class User {
|
|
54
|
+
constructor() {
|
|
55
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "email", _descriptor2, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "mobile", _descriptor3, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "status", _descriptor4, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "first_name", _descriptor5, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "last_name", _descriptor6, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor9, this);
|
|
72
|
+
|
|
73
|
+
_initializerDefineProperty(this, "organisations", _descriptor10, this);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
propgate(email, mobile, status, firstName, lastName) {
|
|
77
|
+
this.email = email;
|
|
78
|
+
this.mobile = mobile;
|
|
79
|
+
this.status = status;
|
|
80
|
+
this.first_name = firstName;
|
|
81
|
+
this.last_name = lastName;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
85
|
+
configurable: true,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
initializer: function () {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec3], {
|
|
92
|
+
configurable: true,
|
|
93
|
+
enumerable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
initializer: function () {
|
|
96
|
+
return "";
|
|
97
|
+
}
|
|
98
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "mobile", [_dec4], {
|
|
99
|
+
configurable: true,
|
|
100
|
+
enumerable: true,
|
|
101
|
+
writable: true,
|
|
102
|
+
initializer: function () {
|
|
103
|
+
return "";
|
|
104
|
+
}
|
|
105
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec5], {
|
|
106
|
+
configurable: true,
|
|
107
|
+
enumerable: true,
|
|
108
|
+
writable: true,
|
|
109
|
+
initializer: function () {
|
|
110
|
+
return "";
|
|
111
|
+
}
|
|
112
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "first_name", [_dec6], {
|
|
113
|
+
configurable: true,
|
|
114
|
+
enumerable: true,
|
|
115
|
+
writable: true,
|
|
116
|
+
initializer: function () {
|
|
117
|
+
return "";
|
|
118
|
+
}
|
|
119
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "last_name", [_dec7], {
|
|
120
|
+
configurable: true,
|
|
121
|
+
enumerable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
initializer: function () {
|
|
124
|
+
return "";
|
|
125
|
+
}
|
|
126
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
|
|
127
|
+
configurable: true,
|
|
128
|
+
enumerable: true,
|
|
129
|
+
writable: true,
|
|
130
|
+
initializer: null
|
|
131
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec9], {
|
|
132
|
+
configurable: true,
|
|
133
|
+
enumerable: true,
|
|
134
|
+
writable: true,
|
|
135
|
+
initializer: null
|
|
136
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec10], {
|
|
137
|
+
configurable: true,
|
|
138
|
+
enumerable: true,
|
|
139
|
+
writable: true,
|
|
140
|
+
initializer: null
|
|
141
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "organisations", [_dec11, _dec12], {
|
|
142
|
+
configurable: true,
|
|
143
|
+
enumerable: true,
|
|
144
|
+
writable: true,
|
|
145
|
+
initializer: null
|
|
146
|
+
})), _class2)) || _class);
|
|
147
|
+
exports.default = User;
|
|
@@ -0,0 +1,82 @@
|
|
|
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"));
|
|
11
|
+
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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 }); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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.'); }
|
|
21
|
+
|
|
22
|
+
let UserActivity = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'user_activity',
|
|
24
|
+
schema: 'user'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _user.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
26
|
+
name: 'user_id',
|
|
27
|
+
referencedColumnName: 'id'
|
|
28
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
29
|
+
type: 'uuid',
|
|
30
|
+
nullable: false
|
|
31
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: 40
|
|
34
|
+
}), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class UserActivity {
|
|
35
|
+
constructor() {
|
|
36
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
37
|
+
|
|
38
|
+
_initializerDefineProperty(this, "user", _descriptor2, this);
|
|
39
|
+
|
|
40
|
+
_initializerDefineProperty(this, "user_id", _descriptor3, this);
|
|
41
|
+
|
|
42
|
+
_initializerDefineProperty(this, "type", _descriptor4, this);
|
|
43
|
+
|
|
44
|
+
_initializerDefineProperty(this, "created_at", _descriptor5, this);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
propgate(user_id, type) {
|
|
48
|
+
this.user_id = user_id;
|
|
49
|
+
this.type = type;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
53
|
+
configurable: true,
|
|
54
|
+
enumerable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
initializer: null
|
|
57
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec3, _dec4], {
|
|
58
|
+
configurable: true,
|
|
59
|
+
enumerable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
initializer: function () {
|
|
62
|
+
return _user.default;
|
|
63
|
+
}
|
|
64
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "user_id", [_dec5], {
|
|
65
|
+
configurable: true,
|
|
66
|
+
enumerable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
initializer: null
|
|
69
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec6], {
|
|
70
|
+
configurable: true,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
initializer: function () {
|
|
74
|
+
return "";
|
|
75
|
+
}
|
|
76
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
|
|
77
|
+
configurable: true,
|
|
78
|
+
enumerable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
initializer: null
|
|
81
|
+
})), _class2)) || _class);
|
|
82
|
+
exports.default = UserActivity;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 _role = _interopRequireDefault(require("../role"));
|
|
11
|
+
|
|
12
|
+
var _organisation = _interopRequireDefault(require("../organisation"));
|
|
13
|
+
|
|
14
|
+
var _user = _interopRequireDefault(require("../user"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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 }); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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.'); }
|
|
25
|
+
|
|
26
|
+
let UserRole = (_dec = (0, _typeorm.Entity)({
|
|
27
|
+
name: 'user_role',
|
|
28
|
+
schema: 'user'
|
|
29
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _user.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'user_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec6 = (0, _typeorm.JoinColumn)({
|
|
33
|
+
name: 'organisation_id',
|
|
34
|
+
referencedColumnName: 'id'
|
|
35
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _role.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
36
|
+
name: 'role_id',
|
|
37
|
+
referencedColumnName: 'id'
|
|
38
|
+
}), _dec9 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class UserRole {
|
|
39
|
+
constructor() {
|
|
40
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
41
|
+
|
|
42
|
+
_initializerDefineProperty(this, "user", _descriptor2, this);
|
|
43
|
+
|
|
44
|
+
_initializerDefineProperty(this, "organisation", _descriptor3, this);
|
|
45
|
+
|
|
46
|
+
_initializerDefineProperty(this, "role", _descriptor4, this);
|
|
47
|
+
|
|
48
|
+
_initializerDefineProperty(this, "created_at", _descriptor5, this);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
52
|
+
configurable: true,
|
|
53
|
+
enumerable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
initializer: null
|
|
56
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec3, _dec4], {
|
|
57
|
+
configurable: true,
|
|
58
|
+
enumerable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
initializer: function () {
|
|
61
|
+
return _user.default;
|
|
62
|
+
}
|
|
63
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec5, _dec6], {
|
|
64
|
+
configurable: true,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
initializer: function () {
|
|
68
|
+
return _organisation.default;
|
|
69
|
+
}
|
|
70
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "role", [_dec7, _dec8], {
|
|
71
|
+
configurable: true,
|
|
72
|
+
enumerable: true,
|
|
73
|
+
writable: true,
|
|
74
|
+
initializer: function () {
|
|
75
|
+
return _role.default;
|
|
76
|
+
}
|
|
77
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
|
|
78
|
+
configurable: true,
|
|
79
|
+
enumerable: true,
|
|
80
|
+
writable: true,
|
|
81
|
+
initializer: null
|
|
82
|
+
})), _class2)) || _class);
|
|
83
|
+
exports.default = UserRole;
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "BeneficiaryEntity", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _beneficiary.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "BeneficiaryOrganisation", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _beneficiaryOrganisation.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "BeneficiaryProviderEntity", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _beneficiaryProvider.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "Booking", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _booking.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "BookingComponent", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _bookingComponent.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "BookingComponentType", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _bookingComponentType.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "Customer", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _customer.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
6
48
|
Object.defineProperty(exports, "DEFINITIONS", {
|
|
7
49
|
enumerable: true,
|
|
8
50
|
get: function () {
|
|
@@ -21,6 +63,24 @@ Object.defineProperty(exports, "DependencyInjection", {
|
|
|
21
63
|
return _dependencyInjection.default;
|
|
22
64
|
}
|
|
23
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "DisbursalEntity", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _disbursal.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "Entities", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _entity.default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "FeatureEntity", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _feature.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
24
84
|
Object.defineProperty(exports, "HTTPService", {
|
|
25
85
|
enumerable: true,
|
|
26
86
|
get: function () {
|
|
@@ -51,6 +111,42 @@ Object.defineProperty(exports, "Model", {
|
|
|
51
111
|
return _model.default;
|
|
52
112
|
}
|
|
53
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "NuapayBalance", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _balance.default;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "OrganisationEntity", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _organisation.default;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "OrganisationFeatureEntity", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _organisationFeature.default;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "OrganisationSupplier", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _organisationSupplier.default;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "OrganisationSupplierType", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _organisationSupplierType.default;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "PaymentLinkEntity", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _paymentLink.default;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
54
150
|
Object.defineProperty(exports, "PromisifiedDelay", {
|
|
55
151
|
enumerable: true,
|
|
56
152
|
get: function () {
|
|
@@ -69,6 +165,12 @@ Object.defineProperty(exports, "ResponseModel", {
|
|
|
69
165
|
return _response.default;
|
|
70
166
|
}
|
|
71
167
|
});
|
|
168
|
+
Object.defineProperty(exports, "RoleEntity", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _role.default;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
72
174
|
Object.defineProperty(exports, "STATUS_TYPES", {
|
|
73
175
|
enumerable: true,
|
|
74
176
|
get: function () {
|
|
@@ -81,6 +183,64 @@ Object.defineProperty(exports, "StatusModel", {
|
|
|
81
183
|
return _status.default;
|
|
82
184
|
}
|
|
83
185
|
});
|
|
186
|
+
Object.defineProperty(exports, "TransactionEntity", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return _transaction.default;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "TransactionEventEntity", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () {
|
|
195
|
+
return _transactionEvent.default;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "TransactionMethodEntity", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _transactionMethod.default;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "TransactionStatusEntity", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _transactionStatus.default;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "UserActivityEntity", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _userActivity.default;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "UserEntity", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _user.default;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "UserRoleEntity", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () {
|
|
225
|
+
return _userRole.default;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "WarehouseService", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _warehouse.default;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
var _paymentLink = _interopRequireDefault(require("./entity/payment/payment-link"));
|
|
236
|
+
|
|
237
|
+
var _transaction = _interopRequireDefault(require("./entity/payment/transaction"));
|
|
238
|
+
|
|
239
|
+
var _transactionEvent = _interopRequireDefault(require("./entity/payment/transaction-event"));
|
|
240
|
+
|
|
241
|
+
var _transactionMethod = _interopRequireDefault(require("./entity/payment/transaction-method"));
|
|
242
|
+
|
|
243
|
+
var _transactionStatus = _interopRequireDefault(require("./entity/payment/transaction-status"));
|
|
84
244
|
|
|
85
245
|
var _dependencies = require("./config/dependencies");
|
|
86
246
|
|
|
@@ -88,6 +248,44 @@ var _dependencyAware = _interopRequireDefault(require("./dependency-injection/de
|
|
|
88
248
|
|
|
89
249
|
var _dependencyInjection = _interopRequireDefault(require("./dependency-injection/dependency-injection"));
|
|
90
250
|
|
|
251
|
+
var _entity = _interopRequireDefault(require("./entity"));
|
|
252
|
+
|
|
253
|
+
var _organisation = _interopRequireDefault(require("./entity/user/organisation"));
|
|
254
|
+
|
|
255
|
+
var _role = _interopRequireDefault(require("./entity/user/role"));
|
|
256
|
+
|
|
257
|
+
var _userRole = _interopRequireDefault(require("./entity/user/user-role"));
|
|
258
|
+
|
|
259
|
+
var _user = _interopRequireDefault(require("./entity/user/user"));
|
|
260
|
+
|
|
261
|
+
var _userActivity = _interopRequireDefault(require("./entity/user/user-activity"));
|
|
262
|
+
|
|
263
|
+
var _feature = _interopRequireDefault(require("./entity/user/feature"));
|
|
264
|
+
|
|
265
|
+
var _organisationFeature = _interopRequireDefault(require("./entity/user/organisation-feature"));
|
|
266
|
+
|
|
267
|
+
var _beneficiary = _interopRequireDefault(require("./entity/payout/beneficiary"));
|
|
268
|
+
|
|
269
|
+
var _beneficiaryProvider = _interopRequireDefault(require("./entity/payout/beneficiary-provider"));
|
|
270
|
+
|
|
271
|
+
var _disbursal = _interopRequireDefault(require("./entity/payout/disbursal"));
|
|
272
|
+
|
|
273
|
+
var _beneficiaryOrganisation = _interopRequireDefault(require("./entity/payout/beneficiary-organisation"));
|
|
274
|
+
|
|
275
|
+
var _booking = _interopRequireDefault(require("./entity/agent-data/booking"));
|
|
276
|
+
|
|
277
|
+
var _customer = _interopRequireDefault(require("./entity/agent-data/customer"));
|
|
278
|
+
|
|
279
|
+
var _bookingComponent = _interopRequireDefault(require("./entity/agent-data/booking-component"));
|
|
280
|
+
|
|
281
|
+
var _bookingComponentType = _interopRequireDefault(require("./entity/agent-data/booking-component-type"));
|
|
282
|
+
|
|
283
|
+
var _organisationSupplier = _interopRequireDefault(require("./entity/agent-data/organisation-supplier"));
|
|
284
|
+
|
|
285
|
+
var _organisationSupplierType = _interopRequireDefault(require("./entity/agent-data/organisation-supplier-type"));
|
|
286
|
+
|
|
287
|
+
var _balance = _interopRequireDefault(require("./entity/nuapay/balance"));
|
|
288
|
+
|
|
91
289
|
var _model = _interopRequireDefault(require("./model"));
|
|
92
290
|
|
|
93
291
|
var _response = _interopRequireDefault(require("./model/response"));
|
|
@@ -100,6 +298,8 @@ var _logger = _interopRequireDefault(require("./service/logger"));
|
|
|
100
298
|
|
|
101
299
|
var _request = _interopRequireDefault(require("./service/request"));
|
|
102
300
|
|
|
301
|
+
var _warehouse = _interopRequireDefault(require("./service/warehouse"));
|
|
302
|
+
|
|
103
303
|
var _lambdaTermination = _interopRequireDefault(require("./util/lambda-termination"));
|
|
104
304
|
|
|
105
305
|
var _promisifiedDelay = _interopRequireDefault(require("./util/promisified-delay"));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class inital1642121041760 {
|
|
4
|
+
name = 'inital1642121041760'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."booking" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_49171efc69702ed84c812f33540" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."customer" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_a7a13f4cacb744524e44dfdad32" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."booking_component" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_fde413f2d9d1e1377876431efaa" PRIMARY KEY ("id"))`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`DROP TABLE "agent_data"."booking_component"`);
|
|
14
|
+
await queryRunner.query(`DROP TABLE "agent_data"."customer"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "agent_data"."booking"`);
|
|
16
|
+
}
|
|
17
|
+
}
|