@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.
Files changed (56) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.yml +1 -0
  3. package/babel.config.js +20 -1
  4. package/cli/seed/create-schema.js +22 -0
  5. package/dist/config/dependencies.js +6 -2
  6. package/dist/entity/agent-data/booking/index.js +39 -0
  7. package/dist/entity/agent-data/booking-component/index.js +39 -0
  8. package/dist/entity/agent-data/booking-component-type/index.js +39 -0
  9. package/dist/entity/agent-data/customer/index.js +39 -0
  10. package/dist/entity/agent-data/index.js +24 -0
  11. package/dist/entity/agent-data/organisation-supplier/index.js +39 -0
  12. package/dist/entity/agent-data/organisation-supplier-type/index.js +39 -0
  13. package/dist/entity/index.js +22 -0
  14. package/dist/entity/nuapay/balance/index.js +65 -0
  15. package/dist/entity/nuapay/index.js +14 -0
  16. package/dist/entity/payment/index.js +22 -0
  17. package/dist/entity/payment/payment-link/index.js +39 -0
  18. package/dist/entity/payment/transaction/index.js +39 -0
  19. package/dist/entity/payment/transaction-event/index.js +39 -0
  20. package/dist/entity/payment/transaction-method/index.js +39 -0
  21. package/dist/entity/payment/transaction-status/index.js +39 -0
  22. package/dist/entity/payout/beneficiary/index.js +103 -0
  23. package/dist/entity/payout/beneficiary-organisation/index.js +69 -0
  24. package/dist/entity/payout/beneficiary-provider/index.js +91 -0
  25. package/dist/entity/payout/disbursal/index.js +39 -0
  26. package/dist/entity/payout/index.js +20 -0
  27. package/dist/entity/user/feature/index.js +63 -0
  28. package/dist/entity/user/index.js +26 -0
  29. package/dist/entity/user/organisation/index.js +111 -0
  30. package/dist/entity/user/organisation-feature/index.js +69 -0
  31. package/dist/entity/user/role/index.js +107 -0
  32. package/dist/entity/user/user/index.js +147 -0
  33. package/dist/entity/user/user-activity/index.js +82 -0
  34. package/dist/entity/user/user-role/index.js +83 -0
  35. package/dist/index.js +200 -0
  36. package/dist/migration/agent-data/1642121041760-inital.js +17 -0
  37. package/dist/migration/agent-data/1642121610577-organisation-suppliers.js +13 -0
  38. package/dist/migration/agent-data/1642121681610-organisation-suppliers-type.js +13 -0
  39. package/dist/migration/agent-data/1642122014731-booking-component-type.js +13 -0
  40. package/dist/migration/nuapay/1642200051764-initial.js +13 -0
  41. package/dist/migration/nuapay/1642201303413-add-fields-nuapay.js +15 -0
  42. package/dist/migration/payment/1642120204899-inital.js +21 -0
  43. package/dist/migration/payout/1642141038609-initial.js +15 -0
  44. package/dist/migration/payout/1642196506002-beneficiary.js +31 -0
  45. package/dist/migration/payout/1642199881916-breakout-beneficaries.js +25 -0
  46. package/dist/migration/user/1641774481300-initial.js +27 -0
  47. package/dist/migration/user/1641829697638-add_parent_org.js +25 -0
  48. package/dist/migration/user/1641901624008-add_roles.js +21 -0
  49. package/dist/migration/user/1641903059924-add_roles_kyc.js +13 -0
  50. package/dist/migration/user/1641903425025-roles-defaults.js +15 -0
  51. package/dist/migration/user/1641939221103-feature.js +13 -0
  52. package/dist/migration/user/1642019067334-organisation-feature.js +17 -0
  53. package/dist/migration/user/1642078564295-user-activity-relation.js +16 -0
  54. package/dist/service/warehouse.js +59 -0
  55. package/ormconfig.js +25 -0
  56. package/package.json +17 -4
@@ -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 TransactionStatus = (_dec = (0, _typeorm.Entity)({
19
+ name: 'transaction_status',
20
+ schema: 'payment'
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionStatus {
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 = TransactionStatus;
@@ -0,0 +1,103 @@
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("../../user/organisation"));
11
+
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
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 Beneficiary = (_dec = (0, _typeorm.Entity)({
23
+ name: 'beneficiary',
24
+ schema: 'payout'
25
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
26
+ type: "varchar",
27
+ length: "15"
28
+ }), _dec4 = (0, _typeorm.Column)({
29
+ type: "varchar",
30
+ length: "15"
31
+ }), _dec5 = (0, _typeorm.Column)({
32
+ type: "varchar",
33
+ length: "15"
34
+ }), _dec6 = (0, _typeorm.Column)({
35
+ type: "varchar",
36
+ length: "10"
37
+ }), _dec7 = (0, _typeorm.Column)({
38
+ type: "varchar",
39
+ length: "250"
40
+ }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Beneficiary {
41
+ constructor() {
42
+ _initializerDefineProperty(this, "id", _descriptor, this);
43
+
44
+ _initializerDefineProperty(this, "iban", _descriptor2, this);
45
+
46
+ _initializerDefineProperty(this, "bic", _descriptor3, this);
47
+
48
+ _initializerDefineProperty(this, "account_number", _descriptor4, this);
49
+
50
+ _initializerDefineProperty(this, "sort_code", _descriptor5, this);
51
+
52
+ _initializerDefineProperty(this, "bank_name", _descriptor6, this);
53
+
54
+ _initializerDefineProperty(this, "created_at", _descriptor7, this);
55
+ }
56
+
57
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: null
62
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec3], {
63
+ configurable: true,
64
+ enumerable: true,
65
+ writable: true,
66
+ initializer: function () {
67
+ return "";
68
+ }
69
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "bic", [_dec4], {
70
+ configurable: true,
71
+ enumerable: true,
72
+ writable: true,
73
+ initializer: function () {
74
+ return "";
75
+ }
76
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "account_number", [_dec5], {
77
+ configurable: true,
78
+ enumerable: true,
79
+ writable: true,
80
+ initializer: function () {
81
+ return "";
82
+ }
83
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "sort_code", [_dec6], {
84
+ configurable: true,
85
+ enumerable: true,
86
+ writable: true,
87
+ initializer: function () {
88
+ return "";
89
+ }
90
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "bank_name", [_dec7], {
91
+ configurable: true,
92
+ enumerable: true,
93
+ writable: true,
94
+ initializer: function () {
95
+ return "";
96
+ }
97
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
98
+ configurable: true,
99
+ enumerable: true,
100
+ writable: true,
101
+ initializer: null
102
+ })), _class2)) || _class);
103
+ exports.default = Beneficiary;
@@ -0,0 +1,69 @@
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 _beneficiary = _interopRequireDefault(require("../beneficiary"));
11
+
12
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
+
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 BeneficiaryOrganisation = (_dec = (0, _typeorm.Entity)({
25
+ name: 'beneficiary_organisation',
26
+ schema: 'payout'
27
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
28
+ name: 'organisation_id',
29
+ referencedColumnName: 'id'
30
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _beneficiary.default), _dec6 = (0, _typeorm.JoinColumn)({
31
+ name: 'beneficiary_id',
32
+ referencedColumnName: 'id'
33
+ }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryOrganisation {
34
+ constructor() {
35
+ _initializerDefineProperty(this, "id", _descriptor, this);
36
+
37
+ _initializerDefineProperty(this, "organisation", _descriptor2, this);
38
+
39
+ _initializerDefineProperty(this, "beneficiary", _descriptor3, this);
40
+
41
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
42
+ }
43
+
44
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
45
+ configurable: true,
46
+ enumerable: true,
47
+ writable: true,
48
+ initializer: null
49
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
50
+ configurable: true,
51
+ enumerable: true,
52
+ writable: true,
53
+ initializer: function () {
54
+ return _organisation.default;
55
+ }
56
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "beneficiary", [_dec5, _dec6], {
57
+ configurable: true,
58
+ enumerable: true,
59
+ writable: true,
60
+ initializer: function () {
61
+ return _beneficiary.default;
62
+ }
63
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
64
+ configurable: true,
65
+ enumerable: true,
66
+ writable: true,
67
+ initializer: null
68
+ })), _class2)) || _class);
69
+ exports.default = BeneficiaryOrganisation;
@@ -0,0 +1,91 @@
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 _beneficiary = _interopRequireDefault(require("../beneficiary"));
11
+
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
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 BeneficiaryProvider = (_dec = (0, _typeorm.Entity)({
23
+ name: 'beneficiary_provider',
24
+ schema: 'payout'
25
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
26
+ type: "varchar",
27
+ length: "15"
28
+ }), _dec4 = (0, _typeorm.Column)({
29
+ type: "varchar",
30
+ length: "50"
31
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _beneficiary.default), _dec6 = (0, _typeorm.JoinColumn)({
32
+ name: 'beneficiary_id',
33
+ referencedColumnName: 'id'
34
+ }), _dec7 = (0, _typeorm.Column)({
35
+ type: "varchar",
36
+ length: "150"
37
+ }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryProvider {
38
+ constructor() {
39
+ _initializerDefineProperty(this, "id", _descriptor, this);
40
+
41
+ _initializerDefineProperty(this, "provider", _descriptor2, this);
42
+
43
+ _initializerDefineProperty(this, "provider_reference", _descriptor3, this);
44
+
45
+ _initializerDefineProperty(this, "beneficiary", _descriptor4, this);
46
+
47
+ _initializerDefineProperty(this, "account_name", _descriptor5, this);
48
+
49
+ _initializerDefineProperty(this, "created_at", _descriptor6, this);
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, "provider", [_dec3], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: function () {
62
+ return "";
63
+ }
64
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec4], {
65
+ configurable: true,
66
+ enumerable: true,
67
+ writable: true,
68
+ initializer: function () {
69
+ return "";
70
+ }
71
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "beneficiary", [_dec5, _dec6], {
72
+ configurable: true,
73
+ enumerable: true,
74
+ writable: true,
75
+ initializer: function () {
76
+ return _beneficiary.default;
77
+ }
78
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "account_name", [_dec7], {
79
+ configurable: true,
80
+ enumerable: true,
81
+ writable: true,
82
+ initializer: function () {
83
+ return "";
84
+ }
85
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
86
+ configurable: true,
87
+ enumerable: true,
88
+ writable: true,
89
+ initializer: null
90
+ })), _class2)) || _class);
91
+ exports.default = BeneficiaryProvider;
@@ -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 Payout = (_dec = (0, _typeorm.Entity)({
19
+ name: 'disbursal',
20
+ schema: 'payout'
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Payout {
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 = Payout;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _beneficiary = _interopRequireDefault(require("./beneficiary"));
9
+
10
+ var _disbursal = _interopRequireDefault(require("./disbursal"));
11
+
12
+ var _beneficiaryProvider = _interopRequireDefault(require("./beneficiary-provider"));
13
+
14
+ var _beneficiaryOrganisation = _interopRequireDefault(require("./beneficiary-organisation"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ const ENTITIES = [_beneficiary.default, _disbursal.default, _beneficiaryProvider.default, _beneficiaryOrganisation.default];
19
+ var _default = ENTITIES;
20
+ exports.default = _default;
@@ -0,0 +1,63 @@
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 Feature = (_dec = (0, _typeorm.Entity)({
19
+ name: 'feature',
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.CreateDateColumn)(), _dec(_class = (_class2 = class Feature {
28
+ constructor() {
29
+ _initializerDefineProperty(this, "id", _descriptor, this);
30
+
31
+ _initializerDefineProperty(this, "machine_name", _descriptor2, this);
32
+
33
+ _initializerDefineProperty(this, "name", _descriptor3, this);
34
+
35
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
36
+ }
37
+
38
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
39
+ configurable: true,
40
+ enumerable: true,
41
+ writable: true,
42
+ initializer: null
43
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "machine_name", [_dec3], {
44
+ configurable: true,
45
+ enumerable: true,
46
+ writable: true,
47
+ initializer: function () {
48
+ return "";
49
+ }
50
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec4], {
51
+ configurable: true,
52
+ enumerable: true,
53
+ writable: true,
54
+ initializer: function () {
55
+ return "";
56
+ }
57
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: null
62
+ })), _class2)) || _class);
63
+ exports.default = Feature;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _organisation = _interopRequireDefault(require("./organisation"));
9
+
10
+ var _role = _interopRequireDefault(require("./role"));
11
+
12
+ var _userRole = _interopRequireDefault(require("./user-role"));
13
+
14
+ var _user = _interopRequireDefault(require("./user"));
15
+
16
+ var _userActivity = _interopRequireDefault(require("./user-activity"));
17
+
18
+ var _feature = _interopRequireDefault(require("./feature"));
19
+
20
+ var _organisationFeature = _interopRequireDefault(require("./organisation-feature"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default];
25
+ var _default = ENTITIES;
26
+ exports.default = _default;
@@ -0,0 +1,111 @@
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, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
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 Organisation = (_dec = (0, _typeorm.Entity)({
23
+ name: 'organisation',
24
+ schema: 'user'
25
+ }), _dec2 = (0, _typeorm.Tree)("closure-table"), _dec3 = (0, _typeorm.PrimaryColumn)({
26
+ type: "varchar",
27
+ length: "150"
28
+ }), _dec4 = (0, _typeorm.Column)({
29
+ type: "varchar",
30
+ length: "150"
31
+ }), _dec5 = (0, _typeorm.CreateDateColumn)(), _dec6 = (0, _typeorm.UpdateDateColumn)(), _dec7 = (0, _typeorm.DeleteDateColumn)(), _dec8 = (0, _typeorm.ManyToMany)(() => _user.default, users => users.organisations), _dec9 = (0, _typeorm.JoinTable)({
32
+ name: "user_organisation",
33
+ schema: "user",
34
+ joinColumn: {
35
+ name: "organisation_id",
36
+ referencedColumnName: "id"
37
+ },
38
+ inverseJoinColumn: {
39
+ name: "user_id",
40
+ referencedColumnName: "id"
41
+ }
42
+ }), _dec10 = (0, _typeorm.TreeParent)(), _dec11 = (0, _typeorm.TreeChildren)(), _dec(_class = _dec2(_class = (_class2 = class Organisation {
43
+ constructor() {
44
+ _initializerDefineProperty(this, "id", _descriptor, this);
45
+
46
+ _initializerDefineProperty(this, "name", _descriptor2, this);
47
+
48
+ _initializerDefineProperty(this, "created_at", _descriptor3, this);
49
+
50
+ _initializerDefineProperty(this, "updated_at", _descriptor4, this);
51
+
52
+ _initializerDefineProperty(this, "deleted_at", _descriptor5, this);
53
+
54
+ _initializerDefineProperty(this, "users", _descriptor6, this);
55
+
56
+ _initializerDefineProperty(this, "parent", _descriptor7, this);
57
+
58
+ _initializerDefineProperty(this, "children", _descriptor8, this);
59
+ }
60
+
61
+ propgate(id, name) {
62
+ this.id = id;
63
+ this.name = name;
64
+ }
65
+
66
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec3], {
67
+ configurable: true,
68
+ enumerable: true,
69
+ writable: true,
70
+ initializer: function () {
71
+ return undefined;
72
+ }
73
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec4], {
74
+ configurable: true,
75
+ enumerable: true,
76
+ writable: true,
77
+ initializer: function () {
78
+ return "";
79
+ }
80
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
81
+ configurable: true,
82
+ enumerable: true,
83
+ writable: true,
84
+ initializer: null
85
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec6], {
86
+ configurable: true,
87
+ enumerable: true,
88
+ writable: true,
89
+ initializer: null
90
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec7], {
91
+ configurable: true,
92
+ enumerable: true,
93
+ writable: true,
94
+ initializer: null
95
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "users", [_dec8, _dec9], {
96
+ configurable: true,
97
+ enumerable: true,
98
+ writable: true,
99
+ initializer: null
100
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "parent", [_dec10], {
101
+ configurable: true,
102
+ enumerable: true,
103
+ writable: true,
104
+ initializer: null
105
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "children", [_dec11], {
106
+ configurable: true,
107
+ enumerable: true,
108
+ writable: true,
109
+ initializer: null
110
+ })), _class2)) || _class) || _class);
111
+ exports.default = Organisation;
@@ -0,0 +1,69 @@
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 _feature = _interopRequireDefault(require("../feature"));
13
+
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 OrganisationFeature = (_dec = (0, _typeorm.Entity)({
25
+ name: 'organisation_feature',
26
+ schema: 'user'
27
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
28
+ name: 'organisation_id',
29
+ referencedColumnName: 'id'
30
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _feature.default), _dec6 = (0, _typeorm.JoinColumn)({
31
+ name: 'feature_id',
32
+ referencedColumnName: 'id'
33
+ }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationFeature {
34
+ constructor() {
35
+ _initializerDefineProperty(this, "id", _descriptor, this);
36
+
37
+ _initializerDefineProperty(this, "organisation", _descriptor2, this);
38
+
39
+ _initializerDefineProperty(this, "feature", _descriptor3, this);
40
+
41
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
42
+ }
43
+
44
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
45
+ configurable: true,
46
+ enumerable: true,
47
+ writable: true,
48
+ initializer: null
49
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
50
+ configurable: true,
51
+ enumerable: true,
52
+ writable: true,
53
+ initializer: function () {
54
+ return _organisation.default;
55
+ }
56
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "feature", [_dec5, _dec6], {
57
+ configurable: true,
58
+ enumerable: true,
59
+ writable: true,
60
+ initializer: function () {
61
+ return _feature.default;
62
+ }
63
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
64
+ configurable: true,
65
+ enumerable: true,
66
+ writable: true,
67
+ initializer: null
68
+ })), _class2)) || _class);
69
+ exports.default = OrganisationFeature;