@servicelabsco/slabs-access-manager 2.0.11 → 2.0.13

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 (167) hide show
  1. package/AGENTS.md +2 -0
  2. package/CLAUDE.md +2 -0
  3. package/dist/access/controllers/business.preference.controller.js.map +1 -1
  4. package/dist/access/controllers/developer.menu.controller.d.ts +81 -0
  5. package/dist/access/controllers/developer.menu.controller.js +158 -0
  6. package/dist/access/controllers/developer.menu.controller.js.map +1 -0
  7. package/dist/access/controllers/developer.report.controller.d.ts +88 -0
  8. package/dist/access/controllers/developer.report.controller.js +128 -0
  9. package/dist/access/controllers/developer.report.controller.js.map +1 -0
  10. package/dist/access/controllers/index.d.ts +2 -0
  11. package/dist/access/controllers/index.js +2 -0
  12. package/dist/access/controllers/index.js.map +1 -1
  13. package/dist/access/controllers/ui.action.controller.d.ts +47 -0
  14. package/dist/access/controllers/ui.action.controller.js +49 -0
  15. package/dist/access/controllers/ui.action.controller.js.map +1 -1
  16. package/dist/access/dtos/business.downloadable.report.dto.d.ts +4 -0
  17. package/dist/access/dtos/business.downloadable.report.dto.js +28 -0
  18. package/dist/access/dtos/business.downloadable.report.dto.js.map +1 -0
  19. package/dist/access/dtos/business.menu.layout.attributes.dto.d.ts +3 -0
  20. package/dist/access/dtos/business.menu.layout.attributes.dto.js +8 -0
  21. package/dist/access/dtos/business.menu.layout.attributes.dto.js.map +1 -0
  22. package/dist/access/dtos/business.ui.action.attributes.dto.d.ts +3 -0
  23. package/dist/access/dtos/business.ui.action.attributes.dto.js +8 -0
  24. package/dist/access/dtos/business.ui.action.attributes.dto.js.map +1 -0
  25. package/dist/access/dtos/developer.business.query.dto.d.ts +3 -0
  26. package/dist/access/dtos/developer.business.query.dto.js +25 -0
  27. package/dist/access/dtos/developer.business.query.dto.js.map +1 -0
  28. package/dist/access/dtos/developer.business.search.dto.d.ts +4 -0
  29. package/dist/access/dtos/developer.business.search.dto.js +32 -0
  30. package/dist/access/dtos/developer.business.search.dto.js.map +1 -0
  31. package/dist/access/dtos/developer.search.query.dto.d.ts +4 -0
  32. package/dist/access/dtos/developer.search.query.dto.js +24 -0
  33. package/dist/access/dtos/developer.search.query.dto.js.map +1 -0
  34. package/dist/access/dtos/downloadable.report.dto.d.ts +8 -0
  35. package/dist/access/dtos/downloadable.report.dto.js +54 -0
  36. package/dist/access/dtos/downloadable.report.dto.js.map +1 -0
  37. package/dist/access/dtos/index.d.ts +12 -0
  38. package/dist/access/dtos/index.js +12 -0
  39. package/dist/access/dtos/index.js.map +1 -1
  40. package/dist/access/dtos/menu.layout.dto.d.ts +7 -0
  41. package/dist/access/dtos/menu.layout.dto.js +43 -0
  42. package/dist/access/dtos/menu.layout.dto.js.map +1 -0
  43. package/dist/access/dtos/report.sheet.dto.d.ts +9 -0
  44. package/dist/access/dtos/report.sheet.dto.js +59 -0
  45. package/dist/access/dtos/report.sheet.dto.js.map +1 -0
  46. package/dist/access/dtos/set.active.dto.d.ts +3 -0
  47. package/dist/access/dtos/set.active.dto.js +23 -0
  48. package/dist/access/dtos/set.active.dto.js.map +1 -0
  49. package/dist/access/dtos/set.menus.active.dto.d.ts +7 -0
  50. package/dist/access/dtos/set.menus.active.dto.js +41 -0
  51. package/dist/access/dtos/set.menus.active.dto.js.map +1 -0
  52. package/dist/access/dtos/set.ui.action.businesses.dto.d.ts +3 -0
  53. package/dist/access/dtos/set.ui.action.businesses.dto.js +26 -0
  54. package/dist/access/dtos/set.ui.action.businesses.dto.js.map +1 -0
  55. package/dist/access/entities/business.menu.layout.entity.d.ts +13 -0
  56. package/dist/access/entities/business.menu.layout.entity.js +51 -0
  57. package/dist/access/entities/business.menu.layout.entity.js.map +1 -0
  58. package/dist/access/entities/business.ui.action.entity.d.ts +11 -0
  59. package/dist/access/entities/business.ui.action.entity.js +46 -0
  60. package/dist/access/entities/business.ui.action.entity.js.map +1 -0
  61. package/dist/access/entities/index.d.ts +2 -0
  62. package/dist/access/entities/index.js +2 -0
  63. package/dist/access/entities/index.js.map +1 -1
  64. package/dist/access/es6.classes.d.ts +22 -10
  65. package/dist/access/es6.classes.js +48 -0
  66. package/dist/access/es6.classes.js.map +1 -1
  67. package/dist/access/libraries/apply.menu.layout.d.ts +4 -0
  68. package/dist/access/libraries/apply.menu.layout.js +52 -0
  69. package/dist/access/libraries/apply.menu.layout.js.map +1 -0
  70. package/dist/access/libraries/business.ui.action.availability.d.ts +8 -0
  71. package/dist/access/libraries/business.ui.action.availability.js +34 -0
  72. package/dist/access/libraries/business.ui.action.availability.js.map +1 -0
  73. package/dist/access/libraries/index.d.ts +7 -0
  74. package/dist/access/libraries/index.js +7 -0
  75. package/dist/access/libraries/index.js.map +1 -1
  76. package/dist/access/libraries/process.application.menu.d.ts +1 -0
  77. package/dist/access/libraries/process.application.menu.js +11 -5
  78. package/dist/access/libraries/process.application.menu.js.map +1 -1
  79. package/dist/access/libraries/process.business.ui.action.d.ts +35 -0
  80. package/dist/access/libraries/process.business.ui.action.js +27 -0
  81. package/dist/access/libraries/process.business.ui.action.js.map +1 -0
  82. package/dist/access/libraries/process.developer.menu.d.ts +80 -0
  83. package/dist/access/libraries/process.developer.menu.js +156 -0
  84. package/dist/access/libraries/process.developer.menu.js.map +1 -0
  85. package/dist/access/libraries/process.downloadable.report.d.ts +91 -0
  86. package/dist/access/libraries/process.downloadable.report.js +221 -0
  87. package/dist/access/libraries/process.downloadable.report.js.map +1 -0
  88. package/dist/access/libraries/process.menu.details.js +12 -3
  89. package/dist/access/libraries/process.menu.details.js.map +1 -1
  90. package/dist/access/libraries/search.developer.businesses.d.ts +9 -0
  91. package/dist/access/libraries/search.developer.businesses.js +24 -0
  92. package/dist/access/libraries/search.developer.businesses.js.map +1 -0
  93. package/dist/access/libraries/ui.action.businesses.d.ts +12 -0
  94. package/dist/access/libraries/ui.action.businesses.js +56 -0
  95. package/dist/access/libraries/ui.action.businesses.js.map +1 -0
  96. package/dist/access/services/developer.mode.access.service.d.ts +5 -1
  97. package/dist/access/services/developer.mode.access.service.js +37 -3
  98. package/dist/access/services/developer.mode.access.service.js.map +1 -1
  99. package/dist/auth.controller.d.ts +6 -1
  100. package/dist/auth.controller.js +22 -3
  101. package/dist/auth.controller.js.map +1 -1
  102. package/dist/development/controllers/development.report.controller.d.ts +82 -0
  103. package/dist/development/controllers/development.report.controller.js +89 -0
  104. package/dist/development/controllers/development.report.controller.js.map +1 -1
  105. package/dist/development/controllers/development.ui.action.controller.d.ts +7 -0
  106. package/dist/development/controllers/development.ui.action.controller.js +48 -0
  107. package/dist/development/controllers/development.ui.action.controller.js.map +1 -0
  108. package/dist/development/controllers/index.d.ts +1 -0
  109. package/dist/development/controllers/index.js +1 -0
  110. package/dist/development/controllers/index.js.map +1 -1
  111. package/dist/development/es6.classes.d.ts +4 -2
  112. package/dist/development/es6.classes.js +10 -2
  113. package/dist/development/es6.classes.js.map +1 -1
  114. package/dist/development/services/development.ui.action.service.d.ts +12 -0
  115. package/dist/development/services/development.ui.action.service.js +38 -0
  116. package/dist/development/services/development.ui.action.service.js.map +1 -0
  117. package/dist/development/services/index.d.ts +1 -0
  118. package/dist/development/services/index.js +1 -0
  119. package/dist/development/services/index.js.map +1 -1
  120. package/dist/mcp/admin/tools/admin.tool.registry.js +16 -0
  121. package/dist/mcp/admin/tools/admin.tool.registry.js.map +1 -1
  122. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.get.tool.d.ts +19 -0
  123. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.get.tool.js +24 -0
  124. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.get.tool.js.map +1 -0
  125. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.set.tool.d.ts +22 -0
  126. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.set.tool.js +26 -0
  127. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.business.set.tool.js.map +1 -0
  128. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.businesses.list.tool.d.ts +19 -0
  129. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.businesses.list.tool.js +25 -0
  130. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.businesses.list.tool.js.map +1 -0
  131. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.get.tool.d.ts +17 -0
  132. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.get.tool.js +23 -0
  133. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.get.tool.js.map +1 -0
  134. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.list.tool.d.ts +17 -0
  135. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.list.tool.js +24 -0
  136. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.list.tool.js.map +1 -0
  137. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.upsert.tool.d.ts +26 -0
  138. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.upsert.tool.js +50 -0
  139. package/dist/mcp/admin/tools/downloadable_report/downloadable.report.upsert.tool.js.map +1 -0
  140. package/dist/mcp/admin/tools/downloadable_report/index.d.ts +8 -0
  141. package/dist/mcp/admin/tools/downloadable_report/index.js +25 -0
  142. package/dist/mcp/admin/tools/downloadable_report/index.js.map +1 -0
  143. package/dist/mcp/admin/tools/downloadable_report/report.sheet.delete.tool.d.ts +19 -0
  144. package/dist/mcp/admin/tools/downloadable_report/report.sheet.delete.tool.js +24 -0
  145. package/dist/mcp/admin/tools/downloadable_report/report.sheet.delete.tool.js.map +1 -0
  146. package/dist/mcp/admin/tools/downloadable_report/report.sheet.upsert.tool.d.ts +30 -0
  147. package/dist/mcp/admin/tools/downloadable_report/report.sheet.upsert.tool.js +48 -0
  148. package/dist/mcp/admin/tools/downloadable_report/report.sheet.upsert.tool.js.map +1 -0
  149. package/dist/mcp/admin/tools/index.d.ts +1 -0
  150. package/dist/mcp/admin/tools/index.js +1 -0
  151. package/dist/mcp/admin/tools/index.js.map +1 -1
  152. package/dist/mcp/admin/tools/ui_action/ui.action.create.tool.d.ts +3 -1
  153. package/dist/mcp/admin/tools/ui_action/ui.action.create.tool.js +3 -2
  154. package/dist/mcp/admin/tools/ui_action/ui.action.create.tool.js.map +1 -1
  155. package/dist/mcp/admin/tools/ui_action/ui.action.get.tool.d.ts +1 -1
  156. package/dist/mcp/admin/tools/ui_action/ui.action.get.tool.js +2 -2
  157. package/dist/mcp/admin/tools/ui_action/ui.action.get.tool.js.map +1 -1
  158. package/dist/mcp/admin/tools/ui_action/ui.action.update.tool.d.ts +3 -1
  159. package/dist/mcp/admin/tools/ui_action/ui.action.update.tool.js +6 -3
  160. package/dist/mcp/admin/tools/ui_action/ui.action.update.tool.js.map +1 -1
  161. package/dist/migrations/1791742796375-CreateBusinessUiActionTable.d.ts +5 -0
  162. package/dist/migrations/1791742796375-CreateBusinessUiActionTable.js +19 -0
  163. package/dist/migrations/1791742796375-CreateBusinessUiActionTable.js.map +1 -0
  164. package/dist/migrations/1791746059175-CreateBusinessMenuLayoutTable.d.ts +5 -0
  165. package/dist/migrations/1791746059175-CreateBusinessMenuLayoutTable.js +20 -0
  166. package/dist/migrations/1791746059175-CreateBusinessMenuLayoutTable.js.map +1 -0
  167. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UiActionBusinesses = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ const typeorm_1 = require("typeorm");
6
+ const access_business_entity_1 = require("../entities/access.business.entity");
7
+ const business_ui_action_entity_1 = require("../entities/business.ui.action.entity");
8
+ class UiActionBusinesses {
9
+ async get(uiActionId) {
10
+ const rows = await business_ui_action_entity_1.BusinessUiActionEntity.find({ where: { ui_action_id: uiActionId }, order: { business_id: 'ASC' } });
11
+ return rows.map((row) => row.business_id);
12
+ }
13
+ async describe(uiActionId) {
14
+ const businessIds = await this.get(uiActionId);
15
+ if (!businessIds.length)
16
+ return { business_ids: [], businesses: [] };
17
+ const businesses = await access_business_entity_1.AccessBusinessEntity.find({ where: { id: (0, typeorm_1.In)(businessIds) }, order: { name: 'ASC' } });
18
+ return { business_ids: businessIds, businesses: businesses.map((business) => ({ id: business.id, name: business.name })) };
19
+ }
20
+ async validate(businessIds) {
21
+ if (businessIds === undefined || businessIds === null)
22
+ return undefined;
23
+ if (!Array.isArray(businessIds))
24
+ throw new nestjs_utility_services_1.OperationException('business_ids must be an array.');
25
+ const ids = [];
26
+ for (const id of businessIds) {
27
+ if (!Number.isInteger(id) || id <= 0)
28
+ throw new nestjs_utility_services_1.OperationException('business_ids must be positive integers.');
29
+ if (ids.includes(id))
30
+ throw new nestjs_utility_services_1.OperationException(`Business ${id} is listed more than once.`);
31
+ ids.push(id);
32
+ }
33
+ if (!ids.length)
34
+ return [];
35
+ const found = await access_business_entity_1.AccessBusinessEntity.find({ where: { id: (0, typeorm_1.In)(ids) } });
36
+ const missing = ids.filter((id) => !found.some((business) => business.id === id));
37
+ if (missing.length)
38
+ throw new nestjs_utility_services_1.OperationException(`No business found with id ${missing.join(', ')}.`);
39
+ return ids;
40
+ }
41
+ async sync(uiActionId, businessIds) {
42
+ const rows = await business_ui_action_entity_1.BusinessUiActionEntity.find({ where: { ui_action_id: uiActionId } });
43
+ for (const businessId of businessIds) {
44
+ if (rows.some((row) => row.business_id === businessId))
45
+ continue;
46
+ await business_ui_action_entity_1.BusinessUiActionEntity.create({ ui_action_id: uiActionId, business_id: businessId }).save();
47
+ }
48
+ for (const row of rows) {
49
+ if (businessIds.includes(row.business_id))
50
+ continue;
51
+ await row.softDelete();
52
+ }
53
+ }
54
+ }
55
+ exports.UiActionBusinesses = UiActionBusinesses;
56
+ //# sourceMappingURL=ui.action.businesses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.action.businesses.js","sourceRoot":"","sources":["../../../src/access/libraries/ui.action.businesses.ts"],"names":[],"mappings":";;;AAAA,oFAA4E;AAC5E,qCAA6B;AAC7B,+EAA0E;AAC1E,qFAA+E;AAM/E,MAAa,kBAAk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UAAU,CAAC;gBAAE,SAAS;YAEjE,MAAM,kDAAsB,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACtG,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACrB,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC;gBAAE,SAAS;YAEpD,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ;AA1ED,gDA0EC"}
@@ -1,7 +1,11 @@
1
+ import { AccessBusinessEntity } from '../entities/access.business.entity';
1
2
  import { AccessBusinessService } from './access.business.service';
2
3
  export declare class DeveloperModeAccessService {
3
4
  private readonly accessBusinessService;
4
5
  constructor(accessBusinessService: AccessBusinessService);
5
- validate(): Promise<void>;
6
+ validate(): Promise<AccessBusinessEntity>;
7
+ resolveBusiness(businessId?: number): Promise<AccessBusinessEntity>;
8
+ isCurrentUserDeveloper(): Promise<boolean>;
6
9
  hasDeveloperAccess(attributes?: Record<string, any> | null): boolean;
10
+ private isImpersonatorDeveloper;
7
11
  }
@@ -12,20 +12,54 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.DeveloperModeAccessService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
15
+ const access_business_entity_1 = require("../entities/access.business.entity");
16
+ const finnoto_user_entity_1 = require("../entities/finnoto.user.entity");
15
17
  const access_business_service_1 = require("./access.business.service");
18
+ const impersonatorDeveloperCache = new WeakMap();
16
19
  let DeveloperModeAccessService = class DeveloperModeAccessService {
17
20
  constructor(accessBusinessService) {
18
21
  this.accessBusinessService = accessBusinessService;
19
22
  }
20
23
  async validate() {
21
- await this.accessBusinessService.validateAccess();
22
- if (this.hasDeveloperAccess(nestjs_utility_services_1.Auth.user()?.attributes))
23
- return;
24
+ const business = await this.accessBusinessService.validateAccess();
25
+ const isDeveloper = await this.isCurrentUserDeveloper();
26
+ if (isDeveloper)
27
+ return business;
24
28
  throw new nestjs_utility_services_1.OperationException('You do not have access for this operation');
25
29
  }
30
+ async resolveBusiness(businessId) {
31
+ const current = await this.validate();
32
+ if (!businessId || businessId === current.id)
33
+ return current;
34
+ const business = await access_business_entity_1.AccessBusinessEntity.findOne({ where: { id: businessId } });
35
+ if (!business)
36
+ throw new nestjs_utility_services_1.OperationException(`No business found with id ${businessId}`);
37
+ return business;
38
+ }
39
+ async isCurrentUserDeveloper() {
40
+ const user = nestjs_utility_services_1.Auth.user();
41
+ if (!user)
42
+ return false;
43
+ const impersonatingUserId = user.auth_attributes?.impersonating_user_id;
44
+ if (impersonatingUserId === undefined || impersonatingUserId === null)
45
+ return this.hasDeveloperAccess(user.attributes);
46
+ const cached = impersonatorDeveloperCache.get(user);
47
+ if (cached)
48
+ return cached;
49
+ const lookup = this.isImpersonatorDeveloper(impersonatingUserId);
50
+ impersonatorDeveloperCache.set(user, lookup);
51
+ return lookup;
52
+ }
26
53
  hasDeveloperAccess(attributes) {
27
54
  return Boolean(attributes?.is_developer);
28
55
  }
56
+ async isImpersonatorDeveloper(impersonatingUserId) {
57
+ const metaServerId = Number(impersonatingUserId);
58
+ if (!Number.isInteger(metaServerId) || metaServerId <= 0)
59
+ return false;
60
+ const impersonator = await finnoto_user_entity_1.FinnotoUserEntity.findOne({ select: ['id', 'attributes'], where: { meta_server_id: metaServerId } });
61
+ return this.hasDeveloperAccess(impersonator?.attributes);
62
+ }
29
63
  };
30
64
  exports.DeveloperModeAccessService = DeveloperModeAccessService;
31
65
  exports.DeveloperModeAccessService = DeveloperModeAccessService = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"developer.mode.access.service.js","sourceRoot":"","sources":["../../../src/access/services/developer.mode.access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAkF;AAClF,uEAAkE;AAQ3D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACnC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAI,CAAC;IAM9E,KAAK,CAAC,QAAQ;QACV,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,kBAAkB,CAAC,8BAAI,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC;YAAE,OAAO;QAE7D,MAAM,IAAI,4CAAkB,CAAC,2CAA2C,CAAC,CAAC;IAC9E,CAAC;IAKD,kBAAkB,CAAC,UAAuC;QACtD,OAAO,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAC7C,CAAC;CACJ,CAAA;AArBY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAE2C,+CAAqB;GADhE,0BAA0B,CAqBtC"}
1
+ {"version":3,"file":"developer.mode.access.service.js","sourceRoot":"","sources":["../../../src/access/services/developer.mode.access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAkF;AAClF,+EAA0E;AAC1E,yEAAoE;AACpE,uEAAkE;AAGlE,MAAM,0BAA0B,GAAG,IAAI,OAAO,EAA4B,CAAC;AASpE,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACnC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAO7E,KAAK,CAAC,QAAQ;QACV,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACxD,IAAI,WAAW;YAAE,OAAO,QAAQ,CAAC;QAEjC,MAAM,IAAI,4CAAkB,CAAC,2CAA2C,CAAC,CAAC;IAC9E,CAAC;IASD,KAAK,CAAC,eAAe,CAAC,UAAmB;QACrC,MAAM,OAAO,GA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AC,IAAI,YAAY,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAEvE,MAAM,YAAY,GAAG,MAAM,uCAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;QAEhI,OAAO,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACJ,CAAA;AA7EY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAE2C,+CAAqB;GADhE,0BAA0B,CA6EtC"}
@@ -1,10 +1,15 @@
1
1
  import { AuthService } from '@servicelabsco/nestjs-utility-services';
2
2
  import { LoginService } from './login.service';
3
+ import { DeveloperModeAccessService } from './access/services/developer.mode.access.service';
3
4
  export declare class AuthController {
4
5
  private readonly loginService;
5
6
  private readonly authService;
6
- constructor(loginService: LoginService, authService: AuthService);
7
+ private readonly developerModeAccessService;
8
+ constructor(loginService: LoginService, authService: AuthService, developerModeAccessService: DeveloperModeAccessService);
7
9
  validateToken(req: any, token: string): Promise<any>;
10
+ developer(): Promise<{
11
+ is_developer: boolean;
12
+ }>;
8
13
  check(): Promise<any>;
9
14
  logout(): Promise<import("@servicelabsco/nestjs-utility-services").SessionIdentifierEntity>;
10
15
  }
@@ -17,21 +17,33 @@ const common_1 = require("@nestjs/common");
17
17
  const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
18
18
  const login_service_1 = require("./login.service");
19
19
  const access_business_entity_1 = require("./access/entities/access.business.entity");
20
+ const developer_mode_access_service_1 = require("./access/services/developer.mode.access.service");
20
21
  let AuthController = class AuthController {
21
- constructor(loginService, authService) {
22
+ constructor(loginService, authService, developerModeAccessService) {
22
23
  this.loginService = loginService;
23
24
  this.authService = authService;
25
+ this.developerModeAccessService = developerModeAccessService;
24
26
  }
25
27
  async validateToken(req, token) {
26
28
  const payload = await this.loginService.validateToken(token);
27
29
  return this.authService.getUserLoginInfo(payload, req);
28
30
  }
31
+ async developer() {
32
+ const user = nestjs_utility_services_1.Auth.user();
33
+ if (!user)
34
+ throw new nestjs_utility_services_1.AccessException();
35
+ const isDeveloper = await this.developerModeAccessService.isCurrentUserDeveloper();
36
+ return { is_developer: isDeveloper };
37
+ }
29
38
  async check() {
30
39
  const user = nestjs_utility_services_1.Auth.user();
31
40
  if (!user)
32
41
  throw new nestjs_utility_services_1.AccessException();
33
42
  const businessId = user?.auth_attributes?.business_id;
34
- const business = nestjs_utility_services_1.ClassMapper.removeWhoColumns(await access_business_entity_1.AccessBusinessEntity.first(businessId, { relations: ['country.currency'] }));
43
+ const entity = await access_business_entity_1.AccessBusinessEntity.first(businessId, { relations: ['country.currency'] });
44
+ if (!entity)
45
+ throw new nestjs_utility_services_1.AccessException();
46
+ const business = nestjs_utility_services_1.ClassMapper.removeWhoColumns(entity);
35
47
  return { ...user, business, meta_business_id: business.meta_server_id };
36
48
  }
37
49
  async logout() {
@@ -50,6 +62,12 @@ __decorate([
50
62
  __metadata("design:paramtypes", [Object, String]),
51
63
  __metadata("design:returntype", Promise)
52
64
  ], AuthController.prototype, "validateToken", null);
65
+ __decorate([
66
+ (0, common_1.Get)('developer'),
67
+ __metadata("design:type", Function),
68
+ __metadata("design:paramtypes", []),
69
+ __metadata("design:returntype", Promise)
70
+ ], AuthController.prototype, "developer", null);
53
71
  __decorate([
54
72
  (0, common_1.Get)(),
55
73
  __metadata("design:type", Function),
@@ -65,6 +83,7 @@ __decorate([
65
83
  exports.AuthController = AuthController = __decorate([
66
84
  (0, common_1.Controller)('auth'),
67
85
  __metadata("design:paramtypes", [login_service_1.LoginService,
68
- nestjs_utility_services_1.AuthService])
86
+ nestjs_utility_services_1.AuthService,
87
+ developer_mode_access_service_1.DeveloperModeAccessService])
69
88
  ], AuthController);
70
89
  //# sourceMappingURL=auth.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.controller.js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ownloadableReportDto } from '../../access/dtos/business.downloadable.report.dto';
3
+ import { BusinessParamDto } from '../../access/dtos/business.param.dto';
4
+ import { DeveloperSearchQueryDto } from '../../access/dtos/developer.search.query.dto';
5
+ import { DownloadableReportDto } from '../../access/dtos/downloadable.report.dto';
6
+ import { ReportSheetDto } from '../../access/dtos/report.sheet.dto';
2
7
  import { AccessReportService } from '../../access/services/access.report.service';
3
8
  type ReportUpsertBody = {
4
9
  id?: number;
@@ -10,6 +15,83 @@ export declare class DevelopmentReportController {
10
15
  private readonly accessReportService;
11
16
  constructor(accessReportService: AccessReportService);
12
17
  upsert(body: ReportUpsertBody): Promise<ReportEntity>;
18
+ listDownloadable(query: DeveloperSearchQueryDto): Promise<{
19
+ sheets: {
20
+ id: number;
21
+ report_id: number;
22
+ name: string;
23
+ priority: number;
24
+ active: boolean;
25
+ }[];
26
+ id: number;
27
+ name: string;
28
+ description: string;
29
+ is_downloadable: boolean;
30
+ configurations: any;
31
+ attributes: any;
32
+ }[]>;
33
+ upsertDownloadable(body: DownloadableReportDto): Promise<{
34
+ pre_script: string;
35
+ sheets: {
36
+ query: string;
37
+ pre_script: string;
38
+ post_script: string;
39
+ id: number;
40
+ report_id: number;
41
+ name: string;
42
+ priority: number;
43
+ active: boolean;
44
+ }[];
45
+ id: number;
46
+ name: string;
47
+ description: string;
48
+ is_downloadable: boolean;
49
+ configurations: any;
50
+ attributes: any;
51
+ }>;
52
+ getDownloadable(params: BusinessParamDto): Promise<{
53
+ pre_script: string;
54
+ sheets: {
55
+ query: string;
56
+ pre_script: string;
57
+ post_script: string;
58
+ id: number;
59
+ report_id: number;
60
+ name: string;
61
+ priority: number;
62
+ active: boolean;
63
+ }[];
64
+ id: number;
65
+ name: string;
66
+ description: string;
67
+ is_downloadable: boolean;
68
+ configurations: any;
69
+ attributes: any;
70
+ }>;
71
+ upsertSheet(params: BusinessParamDto, body: ReportSheetDto): Promise<{
72
+ query: string;
73
+ pre_script: string;
74
+ post_script: string;
75
+ id: number;
76
+ report_id: number;
77
+ name: string;
78
+ priority: number;
79
+ active: boolean;
80
+ }>;
81
+ removeSheet(params: BusinessParamDto): Promise<{
82
+ success: boolean;
83
+ }>;
84
+ listBusinesses(params: BusinessParamDto, query: DeveloperSearchQueryDto): Promise<{
85
+ id: number;
86
+ business_id: number;
87
+ name: string;
88
+ identifier: number;
89
+ active: boolean;
90
+ emails: string[];
91
+ created_at: Date;
92
+ }[]>;
93
+ getBusiness(params: BusinessParamDto): Promise<import("../..").BusinessDownloadableReportEntity>;
94
+ setBusiness(params: BusinessParamDto, body: BusinessDownloadableReportDto): Promise<import("../..").BusinessDownloadableReportEntity>;
13
95
  private resolveName;
14
96
  }
15
97
  export {};
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.DevelopmentReportController = void 0;
16
16
  const common_1 = require("@nestjs/common");
17
17
  const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
18
+ const business_downloadable_report_dto_1 = require("../../access/dtos/business.downloadable.report.dto");
19
+ const business_param_dto_1 = require("../../access/dtos/business.param.dto");
20
+ const developer_search_query_dto_1 = require("../../access/dtos/developer.search.query.dto");
21
+ const downloadable_report_dto_1 = require("../../access/dtos/downloadable.report.dto");
22
+ const report_sheet_dto_1 = require("../../access/dtos/report.sheet.dto");
23
+ const process_downloadable_report_1 = require("../../access/libraries/process.downloadable.report");
18
24
  const access_report_service_1 = require("../../access/services/access.report.service");
19
25
  let DevelopmentReportController = class DevelopmentReportController {
20
26
  constructor(accessReportService) {
@@ -30,6 +36,30 @@ let DevelopmentReportController = class DevelopmentReportController {
30
36
  description: body.description ?? '',
31
37
  });
32
38
  }
39
+ async listDownloadable(query) {
40
+ return new process_downloadable_report_1.ProcessDownloadableReport().list(query.q);
41
+ }
42
+ async upsertDownloadable(body) {
43
+ return new process_downloadable_report_1.ProcessDownloadableReport().upsert(body);
44
+ }
45
+ async getDownloadable(params) {
46
+ return new process_downloadable_report_1.ProcessDownloadableReport().get(params.id);
47
+ }
48
+ async upsertSheet(params, body) {
49
+ return new process_downloadable_report_1.ProcessDownloadableReport().upsertSheet(params.id, body);
50
+ }
51
+ async removeSheet(params) {
52
+ return new process_downloadable_report_1.ProcessDownloadableReport().removeSheet(params.id, params.second_id);
53
+ }
54
+ async listBusinesses(params, query) {
55
+ return new process_downloadable_report_1.ProcessDownloadableReport().listBusinesses(params.id, query.q);
56
+ }
57
+ async getBusiness(params) {
58
+ return new process_downloadable_report_1.ProcessDownloadableReport().getBusiness(params.id, params.second_id);
59
+ }
60
+ async setBusiness(params, body) {
61
+ return new process_downloadable_report_1.ProcessDownloadableReport().setBusiness(params.id, params.second_id, body);
62
+ }
33
63
  async resolveName(body) {
34
64
  if (body?.name)
35
65
  return body.name;
@@ -50,6 +80,65 @@ __decorate([
50
80
  __metadata("design:paramtypes", [Object]),
51
81
  __metadata("design:returntype", Promise)
52
82
  ], DevelopmentReportController.prototype, "upsert", null);
83
+ __decorate([
84
+ (0, common_1.Get)('downloadable/list'),
85
+ __param(0, (0, common_1.Query)()),
86
+ __metadata("design:type", Function),
87
+ __metadata("design:paramtypes", [developer_search_query_dto_1.DeveloperSearchQueryDto]),
88
+ __metadata("design:returntype", Promise)
89
+ ], DevelopmentReportController.prototype, "listDownloadable", null);
90
+ __decorate([
91
+ (0, common_1.Post)('downloadable/upsert'),
92
+ __param(0, (0, common_1.Body)()),
93
+ __metadata("design:type", Function),
94
+ __metadata("design:paramtypes", [downloadable_report_dto_1.DownloadableReportDto]),
95
+ __metadata("design:returntype", Promise)
96
+ ], DevelopmentReportController.prototype, "upsertDownloadable", null);
97
+ __decorate([
98
+ (0, common_1.Get)(':id/downloadable'),
99
+ __param(0, (0, common_1.Param)()),
100
+ __metadata("design:type", Function),
101
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
102
+ __metadata("design:returntype", Promise)
103
+ ], DevelopmentReportController.prototype, "getDownloadable", null);
104
+ __decorate([
105
+ (0, common_1.Post)(':id/sheet/upsert'),
106
+ __param(0, (0, common_1.Param)()),
107
+ __param(1, (0, common_1.Body)()),
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto, report_sheet_dto_1.ReportSheetDto]),
110
+ __metadata("design:returntype", Promise)
111
+ ], DevelopmentReportController.prototype, "upsertSheet", null);
112
+ __decorate([
113
+ (0, common_1.Delete)(':id/sheet/:second_id'),
114
+ __param(0, (0, common_1.Param)()),
115
+ __metadata("design:type", Function),
116
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
117
+ __metadata("design:returntype", Promise)
118
+ ], DevelopmentReportController.prototype, "removeSheet", null);
119
+ __decorate([
120
+ (0, common_1.Get)(':id/businesses'),
121
+ __param(0, (0, common_1.Param)()),
122
+ __param(1, (0, common_1.Query)()),
123
+ __metadata("design:type", Function),
124
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto, developer_search_query_dto_1.DeveloperSearchQueryDto]),
125
+ __metadata("design:returntype", Promise)
126
+ ], DevelopmentReportController.prototype, "listBusinesses", null);
127
+ __decorate([
128
+ (0, common_1.Get)(':id/business/:second_id'),
129
+ __param(0, (0, common_1.Param)()),
130
+ __metadata("design:type", Function),
131
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
132
+ __metadata("design:returntype", Promise)
133
+ ], DevelopmentReportController.prototype, "getBusiness", null);
134
+ __decorate([
135
+ (0, common_1.Post)(':id/business/:second_id'),
136
+ __param(0, (0, common_1.Param)()),
137
+ __param(1, (0, common_1.Body)()),
138
+ __metadata("design:type", Function),
139
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto, business_downloadable_report_dto_1.BusinessDownloadableReportDto]),
140
+ __metadata("design:returntype", Promise)
141
+ ], DevelopmentReportController.prototype, "setBusiness", null);
53
142
  exports.DevelopmentReportController = DevelopmentReportController = __decorate([
54
143
  (0, common_1.Controller)('development/report'),
55
144
  __metadata("design:paramtypes", [access_report_service_1.AccessReportService])
@@ -1 +1 @@
1
- {"version":3,"file":"development.report.controller.js","sourceRoot":"","sources":["../../../src/development/controllers/development.report.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,oFAA0F;AAC1F,uFAAkF;AAe3E,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACpC,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAOnE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAsB;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,EAAE,KAAK;YAAE,MAAM,IAAI,4CAAkB,CAAC,mBAAmB,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC;YACzC,IAAI;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;SACtC,CAAC,CAAC;IACP,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,IAAsB;QAC5C,IAAI,IAAI,EAAE,IAAI;YAAE,OAAO,IAAI,CAAC,IAAI,CAAC;QAEjC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;YACX,MAAM,MAAM,GAAG,MAAM,sCAAY,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjD,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,4CAAkB,CAAC,2BAA2B,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YAChF,OAAO,MAAM,CAAC,IAAI,CAAC;QACvB,CAAC;QAED,MAAM,IAAI,4CAAkB,CAAC,wBAAwB,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AA9BY,kEAA2B;AAQ9B;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;;;yDASnB;sCAjBQ,2BAA2B;IADvC,IAAA,mBAAU,EAAC,oBAAoB,CAAC;qCAEqB,2CAAmB;GAD5D,2BAA2B,CA8BvC"}
1
+ {"version":3,"file":"development.report.controller.js","sourceRoot":"","sources":["../../../src/development/controllers/development.report.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmF;AACnF,oFAA0F;AAC1F,yGAAmG;AACnG,6EAAwE;AACxE,6FAAuF;AACvF,uFAAkF;AAClF,yEAAoE;AACpE,oGAA+F;AAC/F,uFAAkF;AAkB3E,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACpC,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAOnE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAsB;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,EAAE,KAAK;YAAE,MAAM,IAAI,4CAAkB,CAAC,mBAAmB,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC;YACzC,IAAI;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;SACtC,CAAC,CAAC;IACP,CAAC;IAMK,AAAN,KAAK,CAAC,gBAAgB,CAAU,KAA8B;QAC1D,OAAO,IAAI,uDAAyB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC;IAMK,AAAN,KAAK,CAAC,kBAAkB,CAAS,IAA2B;QACxD,OAAO,IAAI,uDAAyB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IAMK,AAAN,KAAK,CAAC,eAAe,CAAU,MAAwB;QACnD,OAAO,IAAI,uDAAyB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;IAMK,AA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CAEqB,2CAAmB;GAD5D,2BAA2B,CA8FvC"}
@@ -0,0 +1,7 @@
1
+ import { DevelopmentUiActionService, UiActionUpsertBody } from '../services/development.ui.action.service';
2
+ export declare class DevelopmentUiActionController {
3
+ private readonly uiActionService;
4
+ constructor(uiActionService: DevelopmentUiActionService);
5
+ upsert(body: UiActionUpsertBody): Promise<any>;
6
+ getFull(id: string): Promise<any>;
7
+ }
@@ -0,0 +1,48 @@
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.DevelopmentUiActionController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const development_ui_action_service_1 = require("../services/development.ui.action.service");
18
+ let DevelopmentUiActionController = class DevelopmentUiActionController {
19
+ constructor(uiActionService) {
20
+ this.uiActionService = uiActionService;
21
+ }
22
+ async upsert(body) {
23
+ return this.uiActionService.upsert(body);
24
+ }
25
+ async getFull(id) {
26
+ return this.uiActionService.get(parseInt(id, 10));
27
+ }
28
+ };
29
+ exports.DevelopmentUiActionController = DevelopmentUiActionController;
30
+ __decorate([
31
+ (0, common_1.Post)('upsert'),
32
+ __param(0, (0, common_1.Body)()),
33
+ __metadata("design:type", Function),
34
+ __metadata("design:paramtypes", [Object]),
35
+ __metadata("design:returntype", Promise)
36
+ ], DevelopmentUiActionController.prototype, "upsert", null);
37
+ __decorate([
38
+ (0, common_1.Get)(':id/full'),
39
+ __param(0, (0, common_1.Param)('id')),
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", [String]),
42
+ __metadata("design:returntype", Promise)
43
+ ], DevelopmentUiActionController.prototype, "getFull", null);
44
+ exports.DevelopmentUiActionController = DevelopmentUiActionController = __decorate([
45
+ (0, common_1.Controller)('development/ui_action'),
46
+ __metadata("design:paramtypes", [development_ui_action_service_1.DevelopmentUiActionService])
47
+ ], DevelopmentUiActionController);
48
+ //# sourceMappingURL=development.ui.action.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.ui.action.controller.js","sourceRoot":"","sources":["../../../src/development/controllers/development.ui.action.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,6FAA2G;AAOpG,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACtC,YAA6B,eAA2C;QAA3C,oBAAe,GAAf,eAAe,CAA4B;IAAG,CAAC;IAMtE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAwB;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAMK,AAAN,KAAK,CAAC,OAAO,CAAc,EAAU;QACjC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC;CACJ,CAAA;AAlBY,sEAA6B;AAOhC;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;;;2DAEnB;AAMK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;IACD,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;4DAEzB;wCAjBQ,6BAA6B;IADzC,IAAA,mBAAU,EAAC,uBAAuB,CAAC;qCAEc,0DAA0B;GAD/D,6BAA6B,CAkBzC"}
@@ -2,3 +2,4 @@ export * from './development.catalog.controller';
2
2
  export * from './development.crud.controller';
3
3
  export * from './development.form.script.controller';
4
4
  export * from './development.report.controller';
5
+ export * from './development.ui.action.controller';
@@ -18,4 +18,5 @@ __exportStar(require("./development.catalog.controller"), exports);
18
18
  __exportStar(require("./development.crud.controller"), exports);
19
19
  __exportStar(require("./development.form.script.controller"), exports);
20
20
  __exportStar(require("./development.report.controller"), exports);
21
+ __exportStar(require("./development.ui.action.controller"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/development/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,mEAAiD;AACjD,gEAA8C;AAC9C,uEAAqD;AACrD,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/development/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,mEAAiD;AACjD,gEAA8C;AAC9C,uEAAqD;AACrD,kEAAgD;AAChD,qEAAmD"}
@@ -3,6 +3,7 @@ import { DevelopmentCatalogController } from './controllers/development.catalog.
3
3
  import { DevelopmentCrudController } from './controllers/development.crud.controller';
4
4
  import { DevelopmentFormScriptController } from './controllers/development.form.script.controller';
5
5
  import { DevelopmentReportController } from './controllers/development.report.controller';
6
+ import { DevelopmentUiActionController } from './controllers/development.ui.action.controller';
6
7
  import { ColumnCatalogAttributesDto } from './dtos/column.catalog.attributes.dto';
7
8
  import { MaterialViewCatalogAttributesDto } from './dtos/material.view.catalog.attributes.dto';
8
9
  import { ReportingCatalogGate } from './gates/reporting.catalog.gate';
@@ -10,9 +11,10 @@ import { DevelopmentMiddleware } from './middlewares/development.middleware';
10
11
  import { DevelopmentEntityRegistry } from './registries/development.entity.registry';
11
12
  import { AdminReportViewService } from './services/admin.report.view.service';
12
13
  import { DevelopmentCrudService } from './services/development.crud.service';
14
+ import { DevelopmentUiActionService } from './services/development.ui.action.service';
13
15
  declare const es6Classes: {
14
16
  commands: (typeof DevelopmentFormScriptCommand)[];
15
- controllers: (typeof DevelopmentCatalogController | typeof DevelopmentCrudController | typeof DevelopmentFormScriptController | typeof DevelopmentReportController)[];
17
+ controllers: (typeof DevelopmentCatalogController | typeof DevelopmentCrudController | typeof DevelopmentFormScriptController | typeof DevelopmentReportController | typeof DevelopmentUiActionController)[];
16
18
  dtos: (typeof ColumnCatalogAttributesDto | typeof MaterialViewCatalogAttributesDto)[];
17
19
  entities: any[];
18
20
  gates: (typeof ReportingCatalogGate)[];
@@ -20,7 +22,7 @@ declare const es6Classes: {
20
22
  jobs: any[];
21
23
  middlewares: (typeof DevelopmentMiddleware)[];
22
24
  registries: (typeof DevelopmentEntityRegistry)[];
23
- services: (typeof DevelopmentCrudService | typeof AdminReportViewService)[];
25
+ services: (typeof DevelopmentCrudService | typeof AdminReportViewService | typeof DevelopmentUiActionService)[];
24
26
  subscribers: any[];
25
27
  };
26
28
  export default es6Classes;
@@ -5,6 +5,7 @@ const development_catalog_controller_1 = require("./controllers/development.cata
5
5
  const development_crud_controller_1 = require("./controllers/development.crud.controller");
6
6
  const development_form_script_controller_1 = require("./controllers/development.form.script.controller");
7
7
  const development_report_controller_1 = require("./controllers/development.report.controller");
8
+ const development_ui_action_controller_1 = require("./controllers/development.ui.action.controller");
8
9
  const column_catalog_attributes_dto_1 = require("./dtos/column.catalog.attributes.dto");
9
10
  const material_view_catalog_attributes_dto_1 = require("./dtos/material.view.catalog.attributes.dto");
10
11
  const reporting_catalog_gate_1 = require("./gates/reporting.catalog.gate");
@@ -12,9 +13,16 @@ const development_middleware_1 = require("./middlewares/development.middleware")
12
13
  const development_entity_registry_1 = require("./registries/development.entity.registry");
13
14
  const admin_report_view_service_1 = require("./services/admin.report.view.service");
14
15
  const development_crud_service_1 = require("./services/development.crud.service");
16
+ const development_ui_action_service_1 = require("./services/development.ui.action.service");
15
17
  const es6Classes = {
16
18
  commands: [development_form_script_command_1.DevelopmentFormScriptCommand],
17
- controllers: [development_catalog_controller_1.DevelopmentCatalogController, development_crud_controller_1.DevelopmentCrudController, development_form_script_controller_1.DevelopmentFormScriptController, development_report_controller_1.DevelopmentReportController],
19
+ controllers: [
20
+ development_catalog_controller_1.DevelopmentCatalogController,
21
+ development_crud_controller_1.DevelopmentCrudController,
22
+ development_form_script_controller_1.DevelopmentFormScriptController,
23
+ development_report_controller_1.DevelopmentReportController,
24
+ development_ui_action_controller_1.DevelopmentUiActionController,
25
+ ],
18
26
  dtos: [column_catalog_attributes_dto_1.ColumnCatalogAttributesDto, material_view_catalog_attributes_dto_1.MaterialViewCatalogAttributesDto],
19
27
  entities: [],
20
28
  gates: [reporting_catalog_gate_1.ReportingCatalogGate],
@@ -22,7 +30,7 @@ const es6Classes = {
22
30
  jobs: [],
23
31
  middlewares: [development_middleware_1.DevelopmentMiddleware],
24
32
  registries: [development_entity_registry_1.DevelopmentEntityRegistry],
25
- services: [admin_report_view_service_1.AdminReportViewService, development_crud_service_1.DevelopmentCrudService],
33
+ services: [admin_report_view_service_1.AdminReportViewService, development_crud_service_1.DevelopmentCrudService, development_ui_action_service_1.DevelopmentUiActionService],
26
34
  subscribers: [],
27
35
  };
28
36
  exports.default = es6Classes;
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/development/es6.classes.ts"],"names":[],"mappings":";;AAAA,gGAA0F;AAC1F,iGAA4F;AAC5F,2FAAsF;AACtF,yGAAmG;AACnG,+FAA0F;AAC1F,wFAAkF;AAClF,sGAA+F;AAC/F,2EAAsE;AACtE,iFAA6E;AAC7E,0FAAqF;AACrF,oFAA8E;AAC9E,kFAA6E;AAE7E,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,8DAA4B,CAAC;IACxC,WAAW,EAAE,CAAC,6DAA4B,EAAE,uDAAyB,EAAE,oEAA+B,EAAE,2DAA2B,CAAC;IACpI,IAAI,EAAE,CAAC,0DAA0B,EAAE,uEAAgC,CAAC;IACpE,QAAQ,EAAE,EAAE;IACZ,KAAK,EAAE,CAAC,6CAAoB,CAAC;IAC7B,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,UAAU,EAAE,CAAC,uDAAyB,CAAC;IACvC,QAAQ,EAAE,CAAC,kDAAsB,EAAE,iDAAsB,CAAC;IAC1D,WAAW,EAAE,EAAE;CAClB,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/development/es6.classes.ts"],"names":[],"mappings":";;AAAA,gGAA0F;AAC1F,iGAA4F;AAC5F,2FAAsF;AACtF,yGAAmG;AACnG,+FAA0F;AAC1F,qGAA+F;AAC/F,wFAAkF;AAClF,sGAA+F;AAC/F,2EAAsE;AACtE,iFAA6E;AAC7E,0FAAqF;AACrF,oFAA8E;AAC9E,kFAA6E;AAC7E,4FAAsF;AAEtF,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,8DAA4B,CAAC;IACxC,WAAW,EAAE;QACT,6DAA4B;QAC5B,uDAAyB;QACzB,oEAA+B;QAC/B,2DAA2B;QAC3B,gEAA6B;KAChC;IACD,IAAI,EAAE,CAAC,0DAA0B,EAAE,uEAAgC,CAAC;IACpE,QAAQ,EAAE,EAAE;IACZ,KAAK,EAAE,CAAC,6CAAoB,CAAC;IAC7B,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,UAAU,EAAE,CAAC,uDAAyB,CAAC;IACvC,QAAQ,EAAE,CAAC,kDAAsB,EAAE,iDAAsB,EAAE,0DAA0B,CAAC;IACtF,WAAW,EAAE,EAAE;CAClB,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { DevelopmentCrudService } from './development.crud.service';
2
+ export type UiActionUpsertBody = Record<string, unknown> & {
3
+ id?: number;
4
+ business_ids?: number[];
5
+ };
6
+ export declare class DevelopmentUiActionService {
7
+ private readonly crudService;
8
+ private readonly businesses;
9
+ constructor(crudService: DevelopmentCrudService);
10
+ get(id: number): Promise<any>;
11
+ upsert(body: UiActionUpsertBody): Promise<any>;
12
+ }