rez_core 2.2.109 → 2.2.111
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/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/constant/global.constant.d.ts +2 -0
- package/dist/constant/global.constant.js +3 -1
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/module/ics/controller/ics.controller.d.ts +8 -0
- package/dist/module/ics/controller/ics.controller.js +45 -0
- package/dist/module/ics/controller/ics.controller.js.map +1 -0
- package/dist/module/ics/dto/ics.dto.d.ts +17 -0
- package/dist/module/ics/dto/ics.dto.js +73 -0
- package/dist/module/ics/dto/ics.dto.js.map +1 -0
- package/dist/module/ics/ics.module.d.ts +2 -0
- package/dist/module/ics/ics.module.js +26 -0
- package/dist/module/ics/ics.module.js.map +1 -0
- package/dist/module/ics/service/ics.service.d.ts +5 -0
- package/dist/module/ics/service/ics.service.js +55 -0
- package/dist/module/ics/service/ics.service.js.map +1 -0
- package/dist/module/meta/controller/entity-dynamic.controller.js +3 -3
- package/dist/module/meta/controller/entity-dynamic.controller.js.map +1 -1
- package/dist/module/meta/controller/entity-relation.controller.d.ts +6 -0
- package/dist/module/meta/controller/entity-relation.controller.js +43 -0
- package/dist/module/meta/controller/entity-relation.controller.js.map +1 -0
- package/dist/module/meta/entity/entity-relation-data.entity.d.ts +10 -0
- package/dist/module/meta/entity/entity-relation-data.entity.js +51 -0
- package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-relation.entity.d.ts +10 -0
- package/dist/module/meta/entity/entity-relation.entity.js +51 -0
- package/dist/module/meta/entity/entity-relation.entity.js.map +1 -0
- package/dist/module/meta/entity.module.js +16 -3
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.d.ts +5 -0
- package/dist/module/meta/service/entity-dynamic.service.js +195 -5
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/entity-realation-data.service.d.ts +4 -0
- package/dist/module/meta/service/entity-realation-data.service.js +25 -0
- package/dist/module/meta/service/entity-realation-data.service.js.map +1 -0
- package/dist/module/meta/service/entity-relation.service.d.ts +7 -0
- package/dist/module/meta/service/entity-relation.service.js +31 -0
- package/dist/module/meta/service/entity-relation.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/app.module.ts +2 -0
- package/src/constant/global.constant.ts +2 -0
- package/src/module/ics/controller/ics.controller.ts +21 -0
- package/src/module/ics/dto/ics.dto.ts +55 -0
- package/src/module/ics/ics.module.ts +13 -0
- package/src/module/ics/service/ics.service.ts +48 -0
- package/src/module/meta/controller/entity-dynamic.controller.ts +94 -78
- package/src/module/meta/controller/entity-relation.controller.ts +31 -0
- package/src/module/meta/entity/entity-relation-data.entity.ts +29 -0
- package/src/module/meta/entity/entity-relation.entity.ts +29 -0
- package/src/module/meta/entity.module.ts +17 -4
- package/src/module/meta/service/entity-dynamic.service.ts +417 -21
- package/src/module/meta/service/entity-realation-data.service.ts +9 -0
- package/src/module/meta/service/entity-relation.service.ts +22 -0
package/dist/app.module.js
CHANGED
|
@@ -23,6 +23,7 @@ const filter_module_1 = require("./module/filter/filter.module");
|
|
|
23
23
|
const lead_module_1 = require("./module/lead/lead.module");
|
|
24
24
|
const layout_preference_module_1 = require("./module/layout_preference/layout_preference.module");
|
|
25
25
|
const workflow_module_1 = require("./module/workflow/workflow.module");
|
|
26
|
+
const ics_module_1 = require("./module/ics/ics.module");
|
|
26
27
|
let AppModule = class AppModule {
|
|
27
28
|
};
|
|
28
29
|
exports.AppModule = AppModule;
|
|
@@ -44,6 +45,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
44
45
|
lead_module_1.LeadModule,
|
|
45
46
|
layout_preference_module_1.LayoutPreferenceModule,
|
|
46
47
|
workflow_module_1.WorkflowModule,
|
|
48
|
+
ics_module_1.IcsMeetingModule,
|
|
47
49
|
],
|
|
48
50
|
})
|
|
49
51
|
], AppModule);
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,0DAAwD;AACxD,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,qEAAuD;AACvD,iEAA6D;AAC7D,6EAAyE;AACzE,uFAAkF;AAClF,iEAA6D;AAC7D,2DAAuD;AACvD,kGAA6F;AAC7F,uEAAmE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,0DAAwD;AACxD,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,qEAAuD;AACvD,iEAA6D;AAC7D,6EAAyE;AACzE,uFAAkF;AAClF,iEAA6D;AAC7D,2DAAuD;AACvD,kGAA6F;AAC7F,uEAAmE;AACnE,wDAA2D;AAsBpD,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IApBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,4BAAY;YACZ,8BAAc;YACd,oCAAgB;YAChB,0BAAW;YACX,wBAAU;YACV,4BAAY;YACZ,wCAAkB;YAClB,2BAAU;YACV,4BAAY;YACZ,oCAAgB;YAChB,qCAAgB;YAChB,4BAAY;YACZ,wBAAU;YACV,iDAAsB;YACtB,gCAAc;YACd,6BAAgB;SACjB;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -13,6 +13,8 @@ export declare const ENTITYTYPE_FIELDMASTER = "FLD";
|
|
|
13
13
|
export declare const ENTITYTYPE_USRROLMAP = "URM";
|
|
14
14
|
export declare const ENTITYTYPE_SAVEDFILTERMASTER = "SFM";
|
|
15
15
|
export declare const ENTITYTYPE_SAVEDFILTERDETAIL = "SFD";
|
|
16
|
+
export declare const ENTITYTYPE_ENTITY_RELATION = "ENR";
|
|
17
|
+
export declare const ENTITYTYPE_ENTITY_RELATION_DATA = "ERD";
|
|
16
18
|
export declare const STORAGETYPE_SINGLEJSON = "singlejson";
|
|
17
19
|
export declare const STORAGETYPE_COLUMN = "column";
|
|
18
20
|
export declare const secretKey: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FORM_STATUS_ACCEPTED = exports.FORM_STATUS_RESUBMIT_REQUESTED = exports.FORM_STATUS_SUBMITTED = exports.FORM_STATUS_SAVED = exports.FORM_STATUS_SENT = exports.FORM_STATUS_TO_BE_SENT = exports.ACTION_RESOURCES_MAPPING = exports.ENTITY_MODIFICATION = exports.STAGE_MOVEMENT_DATA = exports.WORKFLOW_DATA = exports.ACTION_TEMPLATE_MAPPING = exports.COMM_TEMPLATE = exports.STAGE_ACTION_MAPPING = exports.ACTION_CATEGORY = exports.STAGE_GROUP = exports.STAGE = exports.ACTION = exports.WORKFLOW = exports.DISPLAY_REPORT = exports.DISPLAY_EXPORT = exports.DISPLAY_LIST = exports.ENTITYSTATUS_PUBLISHED = exports.ENTITYSTATUS_TO_BE_PUBLISHED = exports.INVITATION_STATUS_ACCEPTED = exports.INVITATION_STATUS_SENT = exports.STATUS_PENDING = exports.STATUS_INACTIVE = exports.STATUS_ACTIVE = exports.secretKey = exports.STORAGETYPE_COLUMN = exports.STORAGETYPE_SINGLEJSON = exports.ENTITYTYPE_SAVEDFILTERDETAIL = exports.ENTITYTYPE_SAVEDFILTERMASTER = exports.ENTITYTYPE_USRROLMAP = exports.ENTITYTYPE_FIELDMASTER = exports.ENTITYTYPE_SECTIONMASTER = exports.ENTITYTYPE_LISTMASTERITEMS = exports.ENTITYTYPE_LISTMASTER = exports.ENTITYTYPE_MEDIA = exports.ENTITYTYPE_VIEWMASTER = exports.ENTITYTYPE_PREFERENCEMASTER = exports.ENTITYTYPE_ENTITYTABLECOLUMN = exports.ENTITYTYPE_ENTITYTABLE = exports.ENTITYTYPE_ROLE = exports.ENTITYTYPE_ENTITYMASTER = exports.ENTITYTYPE_USER = void 0;
|
|
3
|
+
exports.FORM_STATUS_ACCEPTED = exports.FORM_STATUS_RESUBMIT_REQUESTED = exports.FORM_STATUS_SUBMITTED = exports.FORM_STATUS_SAVED = exports.FORM_STATUS_SENT = exports.FORM_STATUS_TO_BE_SENT = exports.ACTION_RESOURCES_MAPPING = exports.ENTITY_MODIFICATION = exports.STAGE_MOVEMENT_DATA = exports.WORKFLOW_DATA = exports.ACTION_TEMPLATE_MAPPING = exports.COMM_TEMPLATE = exports.STAGE_ACTION_MAPPING = exports.ACTION_CATEGORY = exports.STAGE_GROUP = exports.STAGE = exports.ACTION = exports.WORKFLOW = exports.DISPLAY_REPORT = exports.DISPLAY_EXPORT = exports.DISPLAY_LIST = exports.ENTITYSTATUS_PUBLISHED = exports.ENTITYSTATUS_TO_BE_PUBLISHED = exports.INVITATION_STATUS_ACCEPTED = exports.INVITATION_STATUS_SENT = exports.STATUS_PENDING = exports.STATUS_INACTIVE = exports.STATUS_ACTIVE = exports.secretKey = exports.STORAGETYPE_COLUMN = exports.STORAGETYPE_SINGLEJSON = exports.ENTITYTYPE_ENTITY_RELATION_DATA = exports.ENTITYTYPE_ENTITY_RELATION = exports.ENTITYTYPE_SAVEDFILTERDETAIL = exports.ENTITYTYPE_SAVEDFILTERMASTER = exports.ENTITYTYPE_USRROLMAP = exports.ENTITYTYPE_FIELDMASTER = exports.ENTITYTYPE_SECTIONMASTER = exports.ENTITYTYPE_LISTMASTERITEMS = exports.ENTITYTYPE_LISTMASTER = exports.ENTITYTYPE_MEDIA = exports.ENTITYTYPE_VIEWMASTER = exports.ENTITYTYPE_PREFERENCEMASTER = exports.ENTITYTYPE_ENTITYTABLECOLUMN = exports.ENTITYTYPE_ENTITYTABLE = exports.ENTITYTYPE_ROLE = exports.ENTITYTYPE_ENTITYMASTER = exports.ENTITYTYPE_USER = void 0;
|
|
4
4
|
exports.ENTITYTYPE_USER = 'USR';
|
|
5
5
|
exports.ENTITYTYPE_ENTITYMASTER = 'EMS';
|
|
6
6
|
exports.ENTITYTYPE_ROLE = 'ROL';
|
|
@@ -16,6 +16,8 @@ exports.ENTITYTYPE_FIELDMASTER = 'FLD';
|
|
|
16
16
|
exports.ENTITYTYPE_USRROLMAP = 'URM';
|
|
17
17
|
exports.ENTITYTYPE_SAVEDFILTERMASTER = 'SFM';
|
|
18
18
|
exports.ENTITYTYPE_SAVEDFILTERDETAIL = 'SFD';
|
|
19
|
+
exports.ENTITYTYPE_ENTITY_RELATION = 'ENR';
|
|
20
|
+
exports.ENTITYTYPE_ENTITY_RELATION_DATA = 'ERD';
|
|
19
21
|
exports.STORAGETYPE_SINGLEJSON = 'singlejson';
|
|
20
22
|
exports.STORAGETYPE_COLUMN = 'column';
|
|
21
23
|
exports.secretKey = process.env.secret_key || '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.constant.js","sourceRoot":"","sources":["../../src/constant/global.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,2BAA2B,GAAG,KAAK,CAAC;AACpC,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,gBAAgB,GAAG,KAAK,CAAC;AACzB,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,0BAA0B,GAAG,KAAK,CAAC;AACnC,QAAA,wBAAwB,GAAG,KAAK,CAAC;AACjC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAC7B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,4BAA4B,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"global.constant.js","sourceRoot":"","sources":["../../src/constant/global.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,2BAA2B,GAAG,KAAK,CAAC;AACpC,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,gBAAgB,GAAG,KAAK,CAAC;AACzB,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,0BAA0B,GAAG,KAAK,CAAC;AACnC,QAAA,wBAAwB,GAAG,KAAK,CAAC;AACjC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAC7B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,0BAA0B,GAAG,KAAK,CAAC;AACnC,QAAA,+BAA+B,GAAG,KAAK,CAAC;AAExC,QAAA,sBAAsB,GAAG,YAAY,CAAC;AACtC,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAG9B,QAAA,SAAS,GAAW,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;AAGjD,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,cAAc,GAAG,SAAS,CAAC;AAG3B,QAAA,sBAAsB,GAAG,MAAM,CAAC;AAChC,QAAA,0BAA0B,GAAG,UAAU,CAAC;AAGxC,QAAA,4BAA4B,GAAG,iBAAiB,CAAC;AACjD,QAAA,sBAAsB,GAAG,WAAW,CAAC;AAGrC,QAAA,YAAY,GAAG,MAAM,CAAC;AACtB,QAAA,cAAc,GAAG,QAAQ,CAAC;AAC1B,QAAA,cAAc,GAAG,QAAQ,CAAC;AAG1B,QAAA,QAAQ,GAAG,MAAM,CAAC;AAClB,QAAA,MAAM,GAAG,MAAM,CAAC;AAChB,QAAA,KAAK,GAAG,KAAK,CAAC;AACd,QAAA,WAAW,GAAG,MAAM,CAAC;AACrB,QAAA,eAAe,GAAG,MAAM,CAAC;AACzB,QAAA,oBAAoB,GAAG,MAAM,CAAC;AAC9B,QAAA,aAAa,GAAG,KAAK,CAAC;AACtB,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,aAAa,GAAG,MAAM,CAAC;AACvB,QAAA,mBAAmB,GAAG,MAAM,CAAC;AAE7B,QAAA,mBAAmB,GAAG,MAAM,CAAC;AAC7B,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAGlC,QAAA,sBAAsB,GAAG,YAAY,CAAC;AACtC,QAAA,gBAAgB,GAAG,MAAM,CAAC;AAC1B,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,8BAA8B,GAAG,oBAAoB,CAAC;AACtD,QAAA,oBAAoB,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Response } from 'express';
|
|
2
|
+
import { IcsMeetingService } from '../service/ics.service';
|
|
3
|
+
import { CreateInviteDto } from '../dto/ics.dto';
|
|
4
|
+
export declare class IcsMeetingController {
|
|
5
|
+
private readonly calendarService;
|
|
6
|
+
constructor(calendarService: IcsMeetingService);
|
|
7
|
+
getIcs(dto: CreateInviteDto, res: Response): Promise<Response<any, Record<string, any>>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.IcsMeetingController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const ics_service_1 = require("../service/ics.service");
|
|
18
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
19
|
+
const ics_dto_1 = require("../dto/ics.dto");
|
|
20
|
+
let IcsMeetingController = class IcsMeetingController {
|
|
21
|
+
constructor(calendarService) {
|
|
22
|
+
this.calendarService = calendarService;
|
|
23
|
+
}
|
|
24
|
+
async getIcs(dto, res) {
|
|
25
|
+
const ics = await this.calendarService.generateIcs(dto);
|
|
26
|
+
res.setHeader('Content-Type', 'text/calendar; charset=utf-8');
|
|
27
|
+
res.setHeader('Content-Disposition', 'attachment; filename="invite.ics"');
|
|
28
|
+
return res.send(ics);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.IcsMeetingController = IcsMeetingController;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, common_1.Post)('/create'),
|
|
34
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
35
|
+
__param(0, (0, common_1.Body)()),
|
|
36
|
+
__param(1, (0, common_1.Res)()),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", [ics_dto_1.CreateInviteDto, Object]),
|
|
39
|
+
__metadata("design:returntype", Promise)
|
|
40
|
+
], IcsMeetingController.prototype, "getIcs", null);
|
|
41
|
+
exports.IcsMeetingController = IcsMeetingController = __decorate([
|
|
42
|
+
(0, common_1.Controller)('/ics'),
|
|
43
|
+
__metadata("design:paramtypes", [ics_service_1.IcsMeetingService])
|
|
44
|
+
], IcsMeetingController);
|
|
45
|
+
//# sourceMappingURL=ics.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ics.controller.js","sourceRoot":"","sources":["../../../../src/module/ics/controller/ics.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAwE;AAExE,wDAA2D;AAC3D,2DAAgE;AAChE,4CAAiD;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;IAAG,CAAC;IAK7D,AAAN,KAAK,CAAC,MAAM,CAAS,GAAoB,EAAS,GAAa;QAC7D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACxD,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,8BAA8B,CAAC,CAAC;QAC9D,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;QAC1E,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AAZY,oDAAoB;AAMzB;IAFL,IAAA,aAAI,EAAC,SAAS,CAAC;IACf,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACV,WAAA,IAAA,aAAI,GAAE,CAAA;IAAwB,WAAA,IAAA,YAAG,GAAE,CAAA;;qCAAvB,yBAAe;;kDAKxC;+BAXU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAE6B,+BAAiB;GADpD,oBAAoB,CAYhC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
+
declare class IcsMeetingDto extends BaseEntity {
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class CreateInviteDto {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
startsAt: string;
|
|
10
|
+
durationMinutes: number;
|
|
11
|
+
meetingUrl?: string;
|
|
12
|
+
location?: string;
|
|
13
|
+
organizerName?: string;
|
|
14
|
+
organizerEmail?: string;
|
|
15
|
+
attendees: IcsMeetingDto[];
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateInviteDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const base_entity_entity_1 = require("../../meta/entity/base-entity.entity");
|
|
16
|
+
class IcsMeetingDto extends base_entity_entity_1.BaseEntity {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], IcsMeetingDto.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEmail)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], IcsMeetingDto.prototype, "email", void 0);
|
|
26
|
+
class CreateInviteDto {
|
|
27
|
+
}
|
|
28
|
+
exports.CreateInviteDto = CreateInviteDto;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MinLength)(3),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateInviteDto.prototype, "title", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateInviteDto.prototype, "description", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsISO8601)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CreateInviteDto.prototype, "startsAt", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsInt)(),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], CreateInviteDto.prototype, "durationMinutes", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CreateInviteDto.prototype, "meetingUrl", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], CreateInviteDto.prototype, "location", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsString)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], CreateInviteDto.prototype, "organizerName", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsEmail)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CreateInviteDto.prototype, "organizerEmail", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_validator_1.IsArray)(),
|
|
69
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
70
|
+
(0, class_transformer_1.Type)(() => IcsMeetingDto),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], CreateInviteDto.prototype, "attendees", void 0);
|
|
73
|
+
//# sourceMappingURL=ics.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ics.dto.js","sourceRoot":"","sources":["../../../../src/module/ics/dto/ics.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDASyB;AACzB,yDAAyC;AACzC,6EAAuE;AAEvE,MAAM,aAAc,SAAQ,+BAAU;CAGrC;AAFa;IAAX,IAAA,0BAAQ,GAAE;;2CAAc;AACd;IAAV,IAAA,yBAAO,GAAE;;4CAAe;AAG3B,MAAa,eAAe;CAmC3B;AAnCD,0CAmCC;AAhCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,CAAC,CAAC;;8CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACQ;AAGrB;IADC,IAAA,2BAAS,GAAE;;iDACK;AAGjB;IADC,IAAA,uBAAK,GAAE;;wDACgB;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACU;AAIvB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;uDACW;AAKxB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,aAAa,CAAC;;kDACC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IcsMeetingModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const ics_service_1 = require("./service/ics.service");
|
|
13
|
+
const ics_controller_1 = require("./controller/ics.controller");
|
|
14
|
+
const ics_dto_1 = require("./dto/ics.dto");
|
|
15
|
+
let IcsMeetingModule = class IcsMeetingModule {
|
|
16
|
+
};
|
|
17
|
+
exports.IcsMeetingModule = IcsMeetingModule;
|
|
18
|
+
exports.IcsMeetingModule = IcsMeetingModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([ics_dto_1.CreateInviteDto])],
|
|
21
|
+
controllers: [ics_controller_1.IcsMeetingController],
|
|
22
|
+
providers: [ics_service_1.IcsMeetingService],
|
|
23
|
+
exports: [ics_service_1.IcsMeetingService],
|
|
24
|
+
})
|
|
25
|
+
], IcsMeetingModule);
|
|
26
|
+
//# sourceMappingURL=ics.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ics.module.js","sourceRoot":"","sources":["../../../src/module/ics/ics.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,uDAA0D;AAC1D,gEAAmE;AACnE,2CAAgD;AAQzC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,yBAAe,CAAC,CAAC,CAAC;QACtD,WAAW,EAAE,CAAC,qCAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,+BAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,+BAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IcsMeetingService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const ics_1 = require("ics");
|
|
12
|
+
let IcsMeetingService = class IcsMeetingService {
|
|
13
|
+
toDateParts(iso) {
|
|
14
|
+
const d = new Date(iso);
|
|
15
|
+
return [
|
|
16
|
+
d.getUTCFullYear(),
|
|
17
|
+
d.getUTCMonth() + 1,
|
|
18
|
+
d.getUTCDate(),
|
|
19
|
+
d.getUTCHours(),
|
|
20
|
+
d.getUTCMinutes(),
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async generateIcs(dto) {
|
|
24
|
+
const startParts = this.toDateParts(dto.startsAt);
|
|
25
|
+
const event = {
|
|
26
|
+
start: startParts,
|
|
27
|
+
duration: {
|
|
28
|
+
hours: Math.floor(dto.durationMinutes / 60),
|
|
29
|
+
minutes: dto.durationMinutes % 60,
|
|
30
|
+
},
|
|
31
|
+
title: dto.title,
|
|
32
|
+
description: dto.description ?? '',
|
|
33
|
+
location: dto.location ?? 'Online',
|
|
34
|
+
url: dto.meetingUrl,
|
|
35
|
+
organizer: dto.organizerEmail
|
|
36
|
+
? { name: dto.organizerName ?? 'Organizer', email: dto.organizerEmail }
|
|
37
|
+
: undefined,
|
|
38
|
+
attendees: dto.attendees?.map((a) => ({ name: a.name, email: a.email })),
|
|
39
|
+
status: 'CONFIRMED',
|
|
40
|
+
};
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
(0, ics_1.createEvent)(event, (err, value) => {
|
|
43
|
+
if (err)
|
|
44
|
+
reject(err);
|
|
45
|
+
const base64 = Buffer.from(value, 'utf-8').toString('base64');
|
|
46
|
+
resolve(base64);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.IcsMeetingService = IcsMeetingService;
|
|
52
|
+
exports.IcsMeetingService = IcsMeetingService = __decorate([
|
|
53
|
+
(0, common_1.Injectable)()
|
|
54
|
+
], IcsMeetingService);
|
|
55
|
+
//# sourceMappingURL=ics.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ics.service.js","sourceRoot":"","sources":["../../../../src/module/ics/service/ics.service.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAA4C;AAC5C,6BAAkC;AAI3B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACpB,WAAW,CAAC,GAAW;QAC7B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO;YACL,CAAC,CAAC,cAAc,EAAE;YAClB,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC;YACnB,CAAC,CAAC,UAAU,EAAE;YACd,CAAC,CAAC,WAAW,EAAE;YACf,CAAC,CAAC,aAAa,EAAE;SAClB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAAoB;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAElD,MAAM,KAAK,GAAQ;YACjB,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE;gBACR,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,GAAG,EAAE,CAAC;gBAC3C,OAAO,EAAE,GAAG,CAAC,eAAe,GAAG,EAAE;aAClC;YACD,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,WAAW,EAAE,GAAG,CAAC,WAAW,IAAI,EAAE;YAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ;YAClC,GAAG,EAAE,GAAG,CAAC,UAAU;YACnB,SAAS,EAAE,GAAG,CAAC,cAAc;gBAC3B,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,aAAa,IAAI,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,cAAc,EAAE;gBACvE,CAAC,CAAC,SAAS;YACb,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YACxE,MAAM,EAAE,WAAoB;SAC7B,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAA,iBAAW,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAChC,IAAI,GAAG;oBAAE,MAAM,CAAC,GAAG,CAAC,CAAC;gBAErB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC9D,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAzCY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAyC7B"}
|
|
@@ -25,7 +25,7 @@ let EntityDynamicController = class EntityDynamicController {
|
|
|
25
25
|
if (!entityType) {
|
|
26
26
|
throw new common_1.BadRequestException(`Query param "entity_type" is required`);
|
|
27
27
|
}
|
|
28
|
-
return await this.entityDynamicService.
|
|
28
|
+
return await this.entityDynamicService.createEntityWithRelation(entityType, data, loggedInUser);
|
|
29
29
|
}
|
|
30
30
|
async updateEntity(id, data, entityType, req) {
|
|
31
31
|
const loggedInUser = req.user.userData;
|
|
@@ -36,14 +36,14 @@ let EntityDynamicController = class EntityDynamicController {
|
|
|
36
36
|
if (!existingEntity) {
|
|
37
37
|
throw new common_1.NotFoundException(`No entity found for id "${id}"`);
|
|
38
38
|
}
|
|
39
|
-
return await this.entityDynamicService.
|
|
39
|
+
return await this.entityDynamicService.updateEntityWithRelations(entityType, id, data, loggedInUser);
|
|
40
40
|
}
|
|
41
41
|
async getEntity(id, entityType, req) {
|
|
42
42
|
const loggedInUser = req.user.userData;
|
|
43
43
|
if (!entityType) {
|
|
44
44
|
throw new common_1.BadRequestException(`Query param "entity_type" is required`);
|
|
45
45
|
}
|
|
46
|
-
const entity = await this.entityDynamicService.
|
|
46
|
+
const entity = await this.entityDynamicService.getEntityWithRelation(entityType, id, loggedInUser);
|
|
47
47
|
if (!entity) {
|
|
48
48
|
throw new common_1.NotFoundException(`No entity found for id "${id}"`);
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-dynamic.controller.js","sourceRoot":"","sources":["../../../../src/module/meta/controller/entity-dynamic.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"entity-dynamic.controller.js","sourceRoot":"","sources":["../../../../src/module/meta/controller/entity-dynamic.controller.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EntityRelationService } from '../service/entity-relation.service';
|
|
2
|
+
export declare class EntityRelationController {
|
|
3
|
+
private readonly entityRelationService;
|
|
4
|
+
constructor(entityRelationService: EntityRelationService);
|
|
5
|
+
getEntityRelations(sourceEntityType: string, req: any): Promise<any>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EntityRelationController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
|
+
const entity_relation_service_1 = require("../service/entity-relation.service");
|
|
19
|
+
let EntityRelationController = class EntityRelationController {
|
|
20
|
+
constructor(entityRelationService) {
|
|
21
|
+
this.entityRelationService = entityRelationService;
|
|
22
|
+
}
|
|
23
|
+
async getEntityRelations(sourceEntityType, req) {
|
|
24
|
+
const loggedInUser = req.user.userData;
|
|
25
|
+
return this.entityRelationService.getEntityRelations(sourceEntityType, loggedInUser);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.EntityRelationController = EntityRelationController;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, common_1.Get)(':source_entity_type'),
|
|
31
|
+
__param(0, (0, common_1.Param)('source_entity_type')),
|
|
32
|
+
__param(1, (0, common_1.Request)()),
|
|
33
|
+
__metadata("design:type", Function),
|
|
34
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
35
|
+
__metadata("design:returntype", Promise)
|
|
36
|
+
], EntityRelationController.prototype, "getEntityRelations", null);
|
|
37
|
+
exports.EntityRelationController = EntityRelationController = __decorate([
|
|
38
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
39
|
+
(0, common_1.Controller)('entity-relation'),
|
|
40
|
+
__param(0, (0, common_1.Inject)('EntityRelationService')),
|
|
41
|
+
__metadata("design:paramtypes", [entity_relation_service_1.EntityRelationService])
|
|
42
|
+
], EntityRelationController);
|
|
43
|
+
//# sourceMappingURL=entity-relation.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-relation.controller.js","sourceRoot":"","sources":["../../../../src/module/meta/controller/entity-relation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,2DAA2D;AAC3D,gFAA2E;AAIpE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAEmB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAC5D,CAAC;IAGE,AAAN,KAAK,CAAC,kBAAkB,CACO,gBAAwB,EAC1C,GAAQ;QAEnB,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,OAAO,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAClD,gBAAgB,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AAjBY,4DAAwB;AAO7B;IADL,IAAA,YAAG,EAAC,qBAAqB,CAAC;IAExB,WAAA,IAAA,cAAK,EAAC,oBAAoB,CAAC,CAAA;IAC3B,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;kEAOX;mCAhBU,wBAAwB;IAFpC,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACvB,IAAA,mBAAU,EAAC,iBAAiB,CAAC;IAGzB,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;qCACQ,+CAAqB;GAHpD,wBAAwB,CAiBpC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseEntity } from './base-entity.entity';
|
|
2
|
+
export declare class EntityRelationData extends BaseEntity {
|
|
3
|
+
constructor();
|
|
4
|
+
source_entity_type: string;
|
|
5
|
+
source_entity_id: number;
|
|
6
|
+
target_entity_type: string;
|
|
7
|
+
target_entity_id: number;
|
|
8
|
+
relation_type: string;
|
|
9
|
+
relation_id: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityRelationData = void 0;
|
|
13
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const base_entity_entity_1 = require("./base-entity.entity");
|
|
16
|
+
let EntityRelationData = class EntityRelationData extends base_entity_entity_1.BaseEntity {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.entity_type = global_constant_1.ENTITYTYPE_ENTITY_RELATION_DATA;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.EntityRelationData = EntityRelationData;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], EntityRelationData.prototype, "source_entity_type", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], EntityRelationData.prototype, "source_entity_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], EntityRelationData.prototype, "target_entity_type", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], EntityRelationData.prototype, "target_entity_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], EntityRelationData.prototype, "relation_type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], EntityRelationData.prototype, "relation_id", void 0);
|
|
47
|
+
exports.EntityRelationData = EntityRelationData = __decorate([
|
|
48
|
+
(0, typeorm_1.Entity)({ name: 'cr_entity_relation_data' }),
|
|
49
|
+
__metadata("design:paramtypes", [])
|
|
50
|
+
], EntityRelationData);
|
|
51
|
+
//# sourceMappingURL=entity-relation-data.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-relation-data.entity.js","sourceRoot":"","sources":["../../../../src/module/meta/entity/entity-relation-data.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA+E;AAC/E,qCAAyC;AACzC,6DAAkD;AAG3C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAAU;IAChD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,iDAA+B,CAAC;IACrD,CAAC;CAmBF,CAAA;AAvBY,gDAAkB;AAO7B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACL;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACP;6BAtBT,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;;GAC/B,kBAAkB,CAuB9B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseEntity } from './base-entity.entity';
|
|
2
|
+
export declare class EntityRelation extends BaseEntity {
|
|
3
|
+
constructor();
|
|
4
|
+
source_entity_type: string;
|
|
5
|
+
source_entity_id: number;
|
|
6
|
+
target_entity_type: string;
|
|
7
|
+
target_entity_id: number;
|
|
8
|
+
relation_type: string;
|
|
9
|
+
relation_id: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityRelation = void 0;
|
|
13
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const base_entity_entity_1 = require("./base-entity.entity");
|
|
16
|
+
let EntityRelation = class EntityRelation extends base_entity_entity_1.BaseEntity {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.entity_type = global_constant_1.ENTITYTYPE_ENTITY_RELATION;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.EntityRelation = EntityRelation;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], EntityRelation.prototype, "source_entity_type", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], EntityRelation.prototype, "source_entity_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], EntityRelation.prototype, "target_entity_type", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], EntityRelation.prototype, "target_entity_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], EntityRelation.prototype, "relation_type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], EntityRelation.prototype, "relation_id", void 0);
|
|
47
|
+
exports.EntityRelation = EntityRelation = __decorate([
|
|
48
|
+
(0, typeorm_1.Entity)({ name: 'cr_entity_relation' }),
|
|
49
|
+
__metadata("design:paramtypes", [])
|
|
50
|
+
], EntityRelation);
|
|
51
|
+
//# sourceMappingURL=entity-relation.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-relation.entity.js","sourceRoot":"","sources":["../../../../src/module/meta/entity/entity-relation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA0E;AAC1E,qCAAyC;AACzC,6DAAkD;AAG3C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,+BAAU;IAC5C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,4CAA0B,CAAC;IAChD,CAAC;CAmBF,CAAA;AAvBY,wCAAc;AAOzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACL;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACP;yBAtBT,cAAc;IAD1B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;;GAC1B,cAAc,CAuB1B"}
|
|
@@ -52,6 +52,11 @@ const attribute_master_controller_1 = require("./controller/attribute-master.con
|
|
|
52
52
|
const entity_dynamic_controller_1 = require("./controller/entity-dynamic.controller");
|
|
53
53
|
const entity_dynamic_service_1 = require("./service/entity-dynamic.service");
|
|
54
54
|
const resolver_service_1 = require("./service/resolver.service");
|
|
55
|
+
const entity_relation_entity_1 = require("./entity/entity-relation.entity");
|
|
56
|
+
const entity_relation_data_entity_1 = require("./entity/entity-relation-data.entity");
|
|
57
|
+
const entity_relation_service_1 = require("./service/entity-relation.service");
|
|
58
|
+
const entity_realation_data_service_1 = require("./service/entity-realation-data.service");
|
|
59
|
+
const entity_relation_controller_1 = require("./controller/entity-relation.controller");
|
|
55
60
|
let EntityModule = class EntityModule {
|
|
56
61
|
};
|
|
57
62
|
exports.EntityModule = EntityModule;
|
|
@@ -67,7 +72,9 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
67
72
|
media_data_entity_1.MediaData,
|
|
68
73
|
view_master_entity_1.ViewMaster,
|
|
69
74
|
user_role_mapping_entity_1.UserRoleMapping,
|
|
70
|
-
app_master_entity_1.AppMaster
|
|
75
|
+
app_master_entity_1.AppMaster,
|
|
76
|
+
entity_relation_entity_1.EntityRelation,
|
|
77
|
+
entity_relation_data_entity_1.EntityRelationData,
|
|
71
78
|
]),
|
|
72
79
|
(0, common_1.forwardRef)(() => listmaster_module_1.ListMasterModule),
|
|
73
80
|
(0, common_1.forwardRef)(() => filter_module_1.FilterModule),
|
|
@@ -93,10 +100,15 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
93
100
|
view_master_repository_1.ViewMaterRespository,
|
|
94
101
|
entity_validation_service_1.EntityValidationService,
|
|
95
102
|
{ provide: 'ViewMasterService', useClass: view_master_service_1.ViewMasterService },
|
|
103
|
+
{ provide: 'EntityRelationService', useClass: entity_relation_service_1.EntityRelationService },
|
|
104
|
+
{
|
|
105
|
+
provide: 'EntityRelationDataService',
|
|
106
|
+
useClass: entity_realation_data_service_1.EntityRelationDataService,
|
|
107
|
+
},
|
|
96
108
|
user_role_mapping_repository_1.UserRoleMappingRepository,
|
|
97
109
|
app_master_repository_1.AppMasterRespository,
|
|
98
110
|
app_master_service_1.AppMasterService,
|
|
99
|
-
resolver_service_1.ResolverService
|
|
111
|
+
resolver_service_1.ResolverService,
|
|
100
112
|
],
|
|
101
113
|
exports: [
|
|
102
114
|
entity_master_service_1.EntityMasterService,
|
|
@@ -112,7 +124,7 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
112
124
|
attribute_master_service_1.AttributeMasterService,
|
|
113
125
|
app_master_service_1.AppMasterService,
|
|
114
126
|
master_service_1.MasterService,
|
|
115
|
-
resolver_service_1.ResolverService
|
|
127
|
+
resolver_service_1.ResolverService,
|
|
116
128
|
],
|
|
117
129
|
controllers: [
|
|
118
130
|
entity_controller_1.EntityController,
|
|
@@ -123,6 +135,7 @@ exports.EntityModule = EntityModule = __decorate([
|
|
|
123
135
|
app_master_controller_1.AppMasterController,
|
|
124
136
|
attribute_master_controller_1.AttributeMasterController,
|
|
125
137
|
entity_dynamic_controller_1.EntityDynamicController,
|
|
138
|
+
entity_relation_controller_1.EntityRelationController,
|
|
126
139
|
],
|
|
127
140
|
})
|
|
128
141
|
], EntityModule);
|