rez_core 1.0.63 → 1.0.64

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.
@@ -19,3 +19,6 @@ export declare const STATUS_INACTIVE = "INACTIVE";
19
19
  export declare const STATUS_PENDING = "PENDING";
20
20
  export declare const ENTITYSTATUS_TO_BE_PUBLISHED = "to_be_published";
21
21
  export declare const ENTITYSTATUS_PUBLISHED = "published";
22
+ export declare const DISPLAY_LIST = "LIST";
23
+ export declare const DISPLAY_EXPORT = "EXPORT";
24
+ export declare const DISPLAY_REPORT = "REPORT";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENTITYSTATUS_PUBLISHED = exports.ENTITYSTATUS_TO_BE_PUBLISHED = exports.STATUS_PENDING = exports.STATUS_INACTIVE = exports.STATUS_ACTIVE = exports.secretKey = exports.STORAGETYPE_COLUMN = exports.STORAGETYPE_SINGLEJSON = 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.DISPLAY_REPORT = exports.DISPLAY_EXPORT = exports.DISPLAY_LIST = exports.ENTITYSTATUS_PUBLISHED = exports.ENTITYSTATUS_TO_BE_PUBLISHED = exports.STATUS_PENDING = exports.STATUS_INACTIVE = exports.STATUS_ACTIVE = exports.secretKey = exports.STORAGETYPE_COLUMN = exports.STORAGETYPE_SINGLEJSON = 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';
@@ -22,4 +22,7 @@ exports.STATUS_INACTIVE = 'INACTIVE';
22
22
  exports.STATUS_PENDING = 'PENDING';
23
23
  exports.ENTITYSTATUS_TO_BE_PUBLISHED = 'to_be_published';
24
24
  exports.ENTITYSTATUS_PUBLISHED = 'published';
25
+ exports.DISPLAY_LIST = 'LIST';
26
+ exports.DISPLAY_EXPORT = 'EXPORT';
27
+ exports.DISPLAY_REPORT = 'REPORT';
25
28
  //# sourceMappingURL=global.constant.js.map
@@ -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,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AA,cAAc,GAAG,SAAS,CAAC;AAG3B,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"}
@@ -0,0 +1,7 @@
1
+ import { EntityTableService } from '../service/entity-table.service';
2
+ import { Response } from 'express';
3
+ export declare class MetaController {
4
+ private readonly entityTableService;
5
+ constructor(entityTableService: EntityTableService);
6
+ getTableMetaData(entityType: string, listType: string, response: Response): Promise<Response<any, Record<string, any>>>;
7
+ }
@@ -0,0 +1,47 @@
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.MetaController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const entity_table_service_1 = require("../service/entity-table.service");
18
+ const jwt_guard_1 = require("../../auth/guards/jwt.guard");
19
+ let MetaController = class MetaController {
20
+ constructor(entityTableService) {
21
+ this.entityTableService = entityTableService;
22
+ }
23
+ async getTableMetaData(entityType, listType, response) {
24
+ let entityTableDto = await this.entityTableService.getTableMetaDataForListing(entityType, listType);
25
+ return response.status(common_1.HttpStatus.OK).json({
26
+ success: true,
27
+ data: entityTableDto,
28
+ message: 'Data fetch successfully!'
29
+ });
30
+ }
31
+ };
32
+ exports.MetaController = MetaController;
33
+ __decorate([
34
+ (0, common_1.Post)('get-table-data'),
35
+ __param(0, (0, common_1.Query)('entity_type')),
36
+ __param(1, (0, common_1.Query)('list_type')),
37
+ __param(2, (0, common_1.Res)()),
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", [String, String, Object]),
40
+ __metadata("design:returntype", Promise)
41
+ ], MetaController.prototype, "getTableMetaData", null);
42
+ exports.MetaController = MetaController = __decorate([
43
+ (0, common_1.Controller)('meta'),
44
+ (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
45
+ __metadata("design:paramtypes", [entity_table_service_1.EntityTableService])
46
+ ], MetaController);
47
+ //# sourceMappingURL=meta.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.controller.js","sourceRoot":"","sources":["../../../../src/module/meta/controller/meta.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqF;AACrF,0EAAqE;AAErE,2DAA2D;AAIpD,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAGjE,AAAN,KAAK,CAAC,gBAAgB,CAAuB,UAAkB,EACpB,QAAgB,EAC7B,QAAkB;QAC9C,IAAI,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACpG,OAAO,QAAQ,CAAC,MAAM,CAAC,mBAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;YACzC,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,0BAA0B;SACpC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAdY,wCAAc;AAInB;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,aAAa,CAAC,CAAA;IACpB,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;IAClB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sDAO5B;yBAbU,cAAc;IAF1B,IAAA,mBAAU,EAAC,MAAM,CAAC;IAClB,IAAA,kBAAS,EAAC,wBAAY,CAAC;qCAE2B,yCAAkB;GADxD,cAAc,CAc1B"}
@@ -0,0 +1,5 @@
1
+ import { EntityTable } from '../entity/entity-table.entity';
2
+ import { EntityTableColumn } from '../entity/entity-table-column.entity';
3
+ export declare class EntityTableDto extends EntityTable {
4
+ column_list: EntityTableColumn[];
5
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityTableDto = void 0;
4
+ const entity_table_entity_1 = require("../entity/entity-table.entity");
5
+ class EntityTableDto extends entity_table_entity_1.EntityTable {
6
+ }
7
+ exports.EntityTableDto = EntityTableDto;
8
+ //# sourceMappingURL=entity-table.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-table.dto.js","sourceRoot":"","sources":["../../../../src/module/meta/dto/entity-table.dto.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,MAAa,cAAe,SAAQ,iCAAW;CAE9C;AAFD,wCAEC"}
@@ -43,6 +43,7 @@ const field_group_service_1 = require("./service/field-group.service");
43
43
  const view_master_service_1 = require("./service/view-master.service");
44
44
  const view_master_controller_1 = require("./controller/view-master.controller");
45
45
  const view_master_repository_1 = require("./repository/view-master.repository");
46
+ const meta_controller_1 = require("./controller/meta.controller");
46
47
  let EntityModule = class EntityModule {
47
48
  };
48
49
  exports.EntityModule = EntityModule;
@@ -96,7 +97,7 @@ exports.EntityModule = EntityModule = __decorate([
96
97
  field_group_service_1.FieldGroupService,
97
98
  'ViewMasterService',
98
99
  ],
99
- controllers: [entity_controller_1.EntityController, master_controller_1.MasterController, media_controller_1.MediaController, view_master_controller_1.ViewMasterController],
100
+ controllers: [entity_controller_1.EntityController, master_controller_1.MasterController, media_controller_1.MediaController, view_master_controller_1.ViewMasterController, meta_controller_1.MetaController],
100
101
  })
101
102
  ], EntityModule);
102
103
  //# sourceMappingURL=entity.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity.module.js","sourceRoot":"","sources":["../../../src/module/meta/entity.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2EAAsE;AACtE,uFAA0E;AAC1E,sEAAkE;AAClE,6CAAgD;AAChD,2DAAuD;AACvD,wEAA6D;AAC7D,8EAAmE;AACnE,0FAAqF;AACrF,qEAAiE;AACjE,8EAA0E;AAC1E,kEAA8D;AAC9D,8EAA0E;AAC1E,qEAAiE;AACjE,sEAA2D;AAC3D,oFAAwE;AACxE,kFAA6E;AAC7E,yEAAoE;AACpE,gGAA0F;AAC1F,uFAAiF;AACjF,uEAAkE;AAClE,kEAAuD;AACvD,qEAAgE;AAChE,8EAAyE;AACzE,oEAAgE;AAChE,oEAAyD;AACzD,0DAAsD;AACtD,wEAAoE;AACpE,iFAA4E;AAC5E,6EAAwE;AACxE,0EAA+D;AAC/D,oEAAyD;AACzD,uEAAkE;AAClE,uEAAkE;AAClE,gFAA2E;AAC3E,gFAA2E;AAqDpE,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAnDxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,mCAAY;gBACZ,yCAAe;gBACf,oCAAgB;gBAChB,iCAAW;gBACX,8CAAiB;gBACjB,6BAAS;gBACT,+BAAU;gBACV,4BAAY;gBACZ,0CAAmB;gBACnB,qCAAa;gBACb,+BAAU;aACX,CAAC;YACF,0BAAW;SACZ;QACD,SAAS,EAAE;YACT,2CAAmB;YACnB,+CAAiB;YACjB,uDAAyB;YACzB,sCAAiB;YACjB,4CAAoB;YACpB,8BAAa;YACb,+CAAqB;YACrB,yCAAkB;YAClB,4DAA2B;YAC3B,sDAAwB;YACxB,uCAAiB;YACjB,2CAAmB;YACnB,qCAAgB;YAChB,iDAAsB;YACtB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uCAAiB,EAAE;SAC9D;QACD,OAAO,EAAE;YACP,2CAAmB;YACnB,+CAAiB;YACjB,sCAAiB;YACjB,uCAAiB;YACjB,yCAAkB;YAClB,sDAAwB;YACxB,qCAAgB;YAChB,6CAAoB;YACpB,uCAAiB;YACjB,mBAAmB;SACpB;QACD,WAAW,EAAE,CAAC,oCAAgB,EAAE,oCAAgB,EAAE,kCAAe,EAAE,6CAAoB,CAAC;KACzF,CAAC;GACW,YAAY,CAAG"}
1
+ {"version":3,"file":"entity.module.js","sourceRoot":"","sources":["../../../src/module/meta/entity.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2EAAsE;AACtE,uFAA0E;AAC1E,sEAAkE;AAClE,6CAAgD;AAChD,2DAAuD;AACvD,wEAA6D;AAC7D,8EAAmE;AACnE,0FAAqF;AACrF,qEAAiE;AACjE,8EAA0E;AAC1E,kEAA8D;AAC9D,8EAA0E;AAC1E,qEAAiE;AACjE,sEAA2D;AAC3D,oFAAwE;AACxE,kFAA6E;AAC7E,yEAAoE;AACpE,gGAA0F;AAC1F,uFAAiF;AACjF,uEAAkE;AAClE,kEAAuD;AACvD,qEAAgE;AAChE,8EAAyE;AACzE,oEAAgE;AAChE,oEAAyD;AACzD,0DAAsD;AACtD,wEAAoE;AACpE,iFAA4E;AAC5E,6EAAwE;AACxE,0EAA+D;AAC/D,oEAAyD;AACzD,uEAAkE;AAClE,uEAAkE;AAClE,gFAA2E;AAC3E,gFAA2E;AAC3E,kEAA8D;AAqDvD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAnDxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,mCAAY;gBACZ,yCAAe;gBACf,oCAAgB;gBAChB,iCAAW;gBACX,8CAAiB;gBACjB,6BAAS;gBACT,+BAAU;gBACV,4BAAY;gBACZ,0CAAmB;gBACnB,qCAAa;gBACb,+BAAU;aACX,CAAC;YACF,0BAAW;SACZ;QACD,SAAS,EAAE;YACT,2CAAmB;YACnB,+CAAiB;YACjB,uDAAyB;YACzB,sCAAiB;YACjB,4CAAoB;YACpB,8BAAa;YACb,+CAAqB;YACrB,yCAAkB;YAClB,4DAA2B;YAC3B,sDAAwB;YACxB,uCAAiB;YACjB,2CAAmB;YACnB,qCAAgB;YAChB,iDAAsB;YACtB,6CAAoB;YACpB,uCAAiB;YACjB,6CAAoB;YACpB,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uCAAiB,EAAE;SAC9D;QACD,OAAO,EAAE;YACP,2CAAmB;YACnB,+CAAiB;YACjB,sCAAiB;YACjB,uCAAiB;YACjB,yCAAkB;YAClB,sDAAwB;YACxB,qCAAgB;YAChB,6CAAoB;YACpB,uCAAiB;YACjB,mBAAmB;SACpB;QACD,WAAW,EAAE,CAAC,oCAAgB,EAAE,oCAAgB,EAAE,kCAAe,EAAE,6CAAoB,EAAE,gCAAc,CAAC;KACzG,CAAC;GACW,YAAY,CAAG"}
@@ -27,6 +27,7 @@ let EntityTableColumnRepository = class EntityTableColumnRepository {
27
27
  parent_id: parentId,
28
28
  parent_type: parentType,
29
29
  },
30
+ order: { col_position: 'ASC' }
30
31
  });
31
32
  }
32
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"entity-table-column.repository.js","sourceRoot":"","sources":["../../../../src/module/meta/repository/entity-table-column.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qFAAyE;AACzE,qCAAqC;AAG9B,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEU,2BAA0D;QAA1D,gCAA2B,GAA3B,2BAA2B,CAA+B;IACjE,CAAC;IAEJ,KAAK,CAAC,2BAA2B,CAAC,QAAgB,EAAE,UAAkB;QACpE,OAAO,MAAM,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC;YACjD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,WAAW,EAAE,UAAU;aACxB;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAdY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;qCACC,oBAAU;GAHtC,2BAA2B,CAcvC"}
1
+ {"version":3,"file":"entity-table-column.repository.js","sourceRoot":"","sources":["../../../../src/module/meta/repository/entity-table-column.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qFAAyE;AACzE,qCAAqC;AAG9B,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YAEU,2BAA0D;QAA1D,gCAA2B,GAA3B,2BAA2B,CAA+B;IACjE,CAAC;IAEJ,KAAK,CAAC,2BAA2B,CAAC,QAAgB,EAAE,UAAkB;QACpE,OAAO,MAAM,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC;YACjD,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,WAAW,EAAE,UAAU;aACxB;YACD,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;SAC/B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAfY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;qCACC,oBAAU;GAHtC,2BAA2B,CAevC"}
@@ -1,7 +1,12 @@
1
1
  import { EntityTableRepository } from '../repository/entity-table.repository';
2
+ import { EntityTableColumnRepository } from '../repository/entity-table-column.repository';
3
+ import { EntityTableDto } from '../dto/entity-table.dto';
2
4
  export declare class EntityTableService {
3
5
  private entityTableRepository;
4
- constructor(entityTableRepository: EntityTableRepository);
6
+ private readonly entityTableColumnRepository;
7
+ constructor(entityTableRepository: EntityTableRepository, entityTableColumnRepository: EntityTableColumnRepository);
5
8
  findByEntityTypeAndListType(entityType: string, listType: string): Promise<import("../entity/entity-table.entity").EntityTable | null>;
6
9
  findByEntityTypeAndListTypeAndDisplayType(entityType: string, listType: string, displayType: string): Promise<import("../entity/entity-table.entity").EntityTable | null>;
10
+ getTableMetaDataForListing(entityType: string, listType: string): Promise<EntityTableDto>;
11
+ getTableMetaData(entityType: string, listType: string, displayType: string): Promise<EntityTableDto>;
7
12
  }
@@ -12,9 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EntityTableService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const entity_table_repository_1 = require("../repository/entity-table.repository");
15
+ const entity_table_column_repository_1 = require("../repository/entity-table-column.repository");
16
+ const global_constant_1 = require("../../../constant/global.constant");
15
17
  let EntityTableService = class EntityTableService {
16
- constructor(entityTableRepository) {
18
+ constructor(entityTableRepository, entityTableColumnRepository) {
17
19
  this.entityTableRepository = entityTableRepository;
20
+ this.entityTableColumnRepository = entityTableColumnRepository;
18
21
  }
19
22
  async findByEntityTypeAndListType(entityType, listType) {
20
23
  return await this.entityTableRepository.findByEntityTypeAndListType(entityType, listType);
@@ -22,10 +25,23 @@ let EntityTableService = class EntityTableService {
22
25
  async findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType) {
23
26
  return await this.entityTableRepository.findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType);
24
27
  }
28
+ async getTableMetaDataForListing(entityType, listType) {
29
+ return await this.getTableMetaData(entityType, listType, global_constant_1.DISPLAY_LIST);
30
+ }
31
+ async getTableMetaData(entityType, listType, displayType) {
32
+ let entityTable = await this.findByEntityTypeAndListTypeAndDisplayType(entityType, listType, displayType);
33
+ let entityTableDto = entityTable;
34
+ if (entityTable) {
35
+ entityTableDto.column_list =
36
+ await this.entityTableColumnRepository.findByParentIdAndParentType(entityTable.id, entityTable.entity_type);
37
+ }
38
+ return entityTableDto;
39
+ }
25
40
  };
26
41
  exports.EntityTableService = EntityTableService;
27
42
  exports.EntityTableService = EntityTableService = __decorate([
28
43
  (0, common_1.Injectable)(),
29
- __metadata("design:paramtypes", [entity_table_repository_1.EntityTableRepository])
44
+ __metadata("design:paramtypes", [entity_table_repository_1.EntityTableRepository,
45
+ entity_table_column_repository_1.EntityTableColumnRepository])
30
46
  ], EntityTableService);
31
47
  //# sourceMappingURL=entity-table.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity-table.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-table.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mFAA8E;AAGvE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAAoB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAEpE,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,QAAgB;QACpE,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,CACjE,UAAU,EACV,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,yCAAyC,CAAC,UAAkB,EAAE,QAAgB,EAAE,WAAmB;QACvG,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,yCAAyC,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACvH,CAAC;CACF,CAAA;AAbY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAEgC,+CAAqB;GADrD,kBAAkB,CAa9B"}
1
+ {"version":3,"file":"entity-table.service.js","sourceRoot":"","sources":["../../../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