@felloh-org/lambda-wrapper 1.3.8 → 1.3.10
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.
|
@@ -27,8 +27,10 @@ var _organisationWebhook = _interopRequireDefault(require("./organisation-webhoo
|
|
|
27
27
|
|
|
28
28
|
var _organisationPayoutConfig = _interopRequireDefault(require("./organisation-payout-config"));
|
|
29
29
|
|
|
30
|
+
var _organisationType = _interopRequireDefault(require("./organisation-type"));
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
32
|
-
const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default, _organisationPayoutConfig.default];
|
|
34
|
+
const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default, _organisationPayoutConfig.default, _organisationType.default];
|
|
33
35
|
var _default = ENTITIES;
|
|
34
36
|
exports.default = _default;
|
|
@@ -9,11 +9,11 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _user = _interopRequireDefault(require("../user"));
|
|
11
11
|
|
|
12
|
-
var _bookingComponent = _interopRequireDefault(require("../../agent-data/booking-component"));
|
|
13
|
-
|
|
14
12
|
var _organisationFeature = _interopRequireDefault(require("../organisation-feature"));
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var _organisationType = _interopRequireDefault(require("../organisation-type"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -51,7 +51,10 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
51
51
|
name: "user_id",
|
|
52
52
|
referencedColumnName: "id"
|
|
53
53
|
}
|
|
54
|
-
}), _dec12 = (0, _typeorm.TreeParent)(), _dec13 = (0, _typeorm.TreeChildren)(), _dec14 = (0, _typeorm.OneToMany)(() => _organisationFeature.default, organisationFeature => organisationFeature.organisation),
|
|
54
|
+
}), _dec12 = (0, _typeorm.TreeParent)(), _dec13 = (0, _typeorm.TreeChildren)(), _dec14 = (0, _typeorm.OneToMany)(() => _organisationFeature.default, organisationFeature => organisationFeature.organisation), _dec15 = (0, _typeorm.ManyToOne)(() => _organisationType.default), _dec16 = (0, _typeorm.JoinColumn)({
|
|
55
|
+
name: 'type_id',
|
|
56
|
+
referencedColumnName: 'id'
|
|
57
|
+
}), _dec(_class = _dec2(_class = (_class2 = class Organisation {
|
|
55
58
|
constructor() {
|
|
56
59
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
57
60
|
|
|
@@ -74,6 +77,8 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
74
77
|
_initializerDefineProperty(this, "children", _descriptor10, this);
|
|
75
78
|
|
|
76
79
|
_initializerDefineProperty(this, "organisation_feature", _descriptor11, this);
|
|
80
|
+
|
|
81
|
+
_initializerDefineProperty(this, "organisation_type", _descriptor12, this);
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
propgate(id, name) {
|
|
@@ -179,5 +184,12 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
179
184
|
enumerable: true,
|
|
180
185
|
writable: true,
|
|
181
186
|
initializer: null
|
|
187
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "organisation_type", [_dec15, _dec16], {
|
|
188
|
+
configurable: true,
|
|
189
|
+
enumerable: true,
|
|
190
|
+
writable: true,
|
|
191
|
+
initializer: function () {
|
|
192
|
+
return _organisationType.default;
|
|
193
|
+
}
|
|
182
194
|
})), _class2)) || _class) || _class);
|
|
183
195
|
exports.default = Organisation;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _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 OrganisationType = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'organisation_type',
|
|
20
|
+
schema: 'user'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "150"
|
|
24
|
+
}), _dec(_class = (_class2 = class OrganisationType {
|
|
25
|
+
constructor() {
|
|
26
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
27
|
+
|
|
28
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
32
|
+
configurable: true,
|
|
33
|
+
enumerable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
initializer: null
|
|
36
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
37
|
+
configurable: true,
|
|
38
|
+
enumerable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
initializer: function () {
|
|
41
|
+
return "";
|
|
42
|
+
}
|
|
43
|
+
})), _class2)) || _class);
|
|
44
|
+
exports.default = OrganisationType;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class organisationType1669151569675 {
|
|
4
|
+
name = 'organisationType1669151569675'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "user"."organisation_type" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(150) NOT NULL, CONSTRAINT "PK_725a339dae75d88d0bb5c7307ff" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation" ADD "type_id" uuid`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation" ADD CONSTRAINT "FK_725a339dae75d88d0bb5c7307ff" FOREIGN KEY ("type_id") REFERENCES "user"."organisation_type"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation" DROP CONSTRAINT "FK_725a339dae75d88d0bb5c7307ff"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation" DROP COLUMN "type_id"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "user"."organisation_type"`);
|
|
16
|
+
}
|
|
17
|
+
}
|