@servicelabsco/slabs-access-manager 1.0.53 → 1.0.55

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 (174) hide show
  1. package/dist/access/controllers/device.auth.controller.d.ts +44 -0
  2. package/dist/access/controllers/device.auth.controller.js +69 -0
  3. package/dist/access/controllers/device.auth.controller.js.map +1 -0
  4. package/dist/access/controllers/index.d.ts +4 -0
  5. package/dist/access/controllers/index.js +4 -0
  6. package/dist/access/controllers/index.js.map +1 -1
  7. package/dist/access/controllers/oauth.as.controller.d.ts +52 -0
  8. package/dist/access/controllers/oauth.as.controller.js +117 -0
  9. package/dist/access/controllers/oauth.as.controller.js.map +1 -0
  10. package/dist/access/controllers/oauth.discovery.controller.d.ts +16 -0
  11. package/dist/access/controllers/oauth.discovery.controller.js +35 -0
  12. package/dist/access/controllers/oauth.discovery.controller.js.map +1 -0
  13. package/dist/access/controllers/ui.action.controller.d.ts +13 -0
  14. package/dist/access/controllers/ui.action.controller.js +76 -0
  15. package/dist/access/controllers/ui.action.controller.js.map +1 -0
  16. package/dist/access/dtos/device.decide.dto.d.ts +5 -0
  17. package/dist/access/dtos/device.decide.dto.js +36 -0
  18. package/dist/access/dtos/device.decide.dto.js.map +1 -0
  19. package/dist/access/dtos/device.poll.dto.d.ts +3 -0
  20. package/dist/access/dtos/device.poll.dto.js +24 -0
  21. package/dist/access/dtos/device.poll.dto.js.map +1 -0
  22. package/dist/access/dtos/index.d.ts +5 -0
  23. package/dist/access/dtos/index.js +5 -0
  24. package/dist/access/dtos/index.js.map +1 -1
  25. package/dist/access/dtos/oauth.consent.decide.dto.d.ts +5 -0
  26. package/dist/access/dtos/oauth.consent.decide.dto.js +38 -0
  27. package/dist/access/dtos/oauth.consent.decide.dto.js.map +1 -0
  28. package/dist/access/dtos/oauth.register.dto.d.ts +7 -0
  29. package/dist/access/dtos/oauth.register.dto.js +51 -0
  30. package/dist/access/dtos/oauth.register.dto.js.map +1 -0
  31. package/dist/access/dtos/update.ui.action.attributes.dto.d.ts +3 -0
  32. package/dist/access/dtos/update.ui.action.attributes.dto.js +23 -0
  33. package/dist/access/dtos/update.ui.action.attributes.dto.js.map +1 -0
  34. package/dist/access/entities/device.code.entity.d.ts +17 -0
  35. package/dist/access/entities/device.code.entity.js +74 -0
  36. package/dist/access/entities/device.code.entity.js.map +1 -0
  37. package/dist/access/entities/index.d.ts +3 -0
  38. package/dist/access/entities/index.js +3 -0
  39. package/dist/access/entities/index.js.map +1 -1
  40. package/dist/access/entities/menu.action.entity.d.ts +1 -0
  41. package/dist/access/entities/menu.action.entity.js +4 -0
  42. package/dist/access/entities/menu.action.entity.js.map +1 -1
  43. package/dist/access/entities/oauth.authorization.entity.d.ts +23 -0
  44. package/dist/access/entities/oauth.authorization.entity.js +98 -0
  45. package/dist/access/entities/oauth.authorization.entity.js.map +1 -0
  46. package/dist/access/entities/oauth.client.entity.d.ts +10 -0
  47. package/dist/access/entities/oauth.client.entity.js +49 -0
  48. package/dist/access/entities/oauth.client.entity.js.map +1 -0
  49. package/dist/access/es6.classes.d.ts +25 -7
  50. package/dist/access/es6.classes.js +38 -1
  51. package/dist/access/es6.classes.js.map +1 -1
  52. package/dist/access/libraries/evaluate.email.rule.js.map +1 -1
  53. package/dist/access/libraries/extract.client.credentials.d.ts +12 -0
  54. package/dist/access/libraries/extract.client.credentials.js +41 -0
  55. package/dist/access/libraries/extract.client.credentials.js.map +1 -0
  56. package/dist/access/libraries/index.d.ts +2 -0
  57. package/dist/access/libraries/index.js +2 -0
  58. package/dist/access/libraries/index.js.map +1 -1
  59. package/dist/access/libraries/oauth.pkce.d.ts +6 -0
  60. package/dist/access/libraries/oauth.pkce.js +25 -0
  61. package/dist/access/libraries/oauth.pkce.js.map +1 -0
  62. package/dist/access/libraries/process.email.notification.js +3 -3
  63. package/dist/access/libraries/process.email.notification.js.map +1 -1
  64. package/dist/access/libraries/process.internal.notification.js +3 -3
  65. package/dist/access/libraries/process.internal.notification.js.map +1 -1
  66. package/dist/access/libraries/sanitize.email.addresses.d.ts +3 -1
  67. package/dist/access/libraries/sanitize.email.addresses.js +28 -25
  68. package/dist/access/libraries/sanitize.email.addresses.js.map +1 -1
  69. package/dist/access/libraries/send.email.notification.js +1 -1
  70. package/dist/access/libraries/send.email.notification.js.map +1 -1
  71. package/dist/access/middlewares/external.access.middleware.d.ts +3 -5
  72. package/dist/access/middlewares/external.access.middleware.js +9 -17
  73. package/dist/access/middlewares/external.access.middleware.js.map +1 -1
  74. package/dist/access/middlewares/index.d.ts +1 -0
  75. package/dist/access/middlewares/index.js +1 -0
  76. package/dist/access/middlewares/index.js.map +1 -1
  77. package/dist/access/middlewares/mcp.access.middleware.d.ts +7 -0
  78. package/dist/access/middlewares/mcp.access.middleware.js +34 -0
  79. package/dist/access/middlewares/mcp.access.middleware.js.map +1 -0
  80. package/dist/access/services/credential.resolve.service.d.ts +22 -0
  81. package/dist/access/services/credential.resolve.service.js +106 -0
  82. package/dist/access/services/credential.resolve.service.js.map +1 -0
  83. package/dist/access/services/device.auth.service.d.ts +50 -0
  84. package/dist/access/services/device.auth.service.js +177 -0
  85. package/dist/access/services/device.auth.service.js.map +1 -0
  86. package/dist/access/services/index.d.ts +3 -0
  87. package/dist/access/services/index.js +3 -0
  88. package/dist/access/services/index.js.map +1 -1
  89. package/dist/access/services/oauth.as.service.d.ts +96 -0
  90. package/dist/access/services/oauth.as.service.js +299 -0
  91. package/dist/access/services/oauth.as.service.js.map +1 -0
  92. package/dist/app.module.js +2 -1
  93. package/dist/app.module.js.map +1 -1
  94. package/dist/config/entity.constants.d.ts +6 -0
  95. package/dist/config/entity.constants.js +6 -0
  96. package/dist/config/entity.constants.js.map +1 -1
  97. package/dist/development/registries/development.entity.registry.js +2 -0
  98. package/dist/development/registries/development.entity.registry.js.map +1 -1
  99. package/dist/main.js +1 -0
  100. package/dist/main.js.map +1 -1
  101. package/dist/mcp/admin/tools/admin.tool.registry.js +10 -0
  102. package/dist/mcp/admin/tools/admin.tool.registry.js.map +1 -1
  103. package/dist/mcp/admin/tools/index.d.ts +1 -0
  104. package/dist/mcp/admin/tools/index.js +1 -0
  105. package/dist/mcp/admin/tools/index.js.map +1 -1
  106. package/dist/mcp/admin/tools/menu_ui_action/index.d.ts +5 -0
  107. package/dist/mcp/admin/tools/menu_ui_action/index.js +22 -0
  108. package/dist/mcp/admin/tools/menu_ui_action/index.js.map +1 -0
  109. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.d.ts +22 -0
  110. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.js +25 -0
  111. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.js.map +1 -0
  112. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.d.ts +17 -0
  113. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.js +23 -0
  114. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.js.map +1 -0
  115. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.d.ts +17 -0
  116. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.js +23 -0
  117. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.js.map +1 -0
  118. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.d.ts +23 -0
  119. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.js +37 -0
  120. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.js.map +1 -0
  121. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.d.ts +20 -0
  122. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.js +25 -0
  123. package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.js.map +1 -0
  124. package/dist/mcp/auth/execution.context.interface.d.ts +9 -0
  125. package/dist/mcp/auth/execution.context.interface.js +3 -0
  126. package/dist/mcp/auth/execution.context.interface.js.map +1 -0
  127. package/dist/mcp/auth/index.d.ts +1 -0
  128. package/dist/mcp/auth/index.js +18 -0
  129. package/dist/mcp/auth/index.js.map +1 -0
  130. package/dist/mcp/es6.classes.d.ts +7 -1
  131. package/dist/mcp/es6.classes.js +14 -1
  132. package/dist/mcp/es6.classes.js.map +1 -1
  133. package/dist/mcp/http/admin.mcp.controller.js +1 -1
  134. package/dist/mcp/http/admin.mcp.controller.js.map +1 -1
  135. package/dist/mcp/http/business.mcp.controller.js +5 -5
  136. package/dist/mcp/http/business.mcp.controller.js.map +1 -1
  137. package/dist/mcp/http/index.d.ts +1 -0
  138. package/dist/mcp/http/index.js +1 -0
  139. package/dist/mcp/http/index.js.map +1 -1
  140. package/dist/mcp/http/mcp.http.module.js +2 -1
  141. package/dist/mcp/http/mcp.http.module.js.map +1 -1
  142. package/dist/mcp/http/mcp.request.handler.js +1 -1
  143. package/dist/mcp/http/mcp.request.handler.js.map +1 -1
  144. package/dist/mcp/http/prm.controller.d.ts +10 -0
  145. package/dist/mcp/http/prm.controller.js +45 -0
  146. package/dist/mcp/http/prm.controller.js.map +1 -0
  147. package/dist/mcp/http/unauthorized.mcp.response.d.ts +6 -3
  148. package/dist/mcp/http/unauthorized.mcp.response.js +27 -17
  149. package/dist/mcp/http/unauthorized.mcp.response.js.map +1 -1
  150. package/dist/mcp/index.d.ts +1 -0
  151. package/dist/mcp/index.js +1 -0
  152. package/dist/mcp/index.js.map +1 -1
  153. package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.d.ts +5 -0
  154. package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.js +15 -0
  155. package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.js.map +1 -0
  156. package/dist/migrations/1785057482427-CreateDeviceCodesTable.d.ts +5 -0
  157. package/dist/migrations/1785057482427-CreateDeviceCodesTable.js +25 -0
  158. package/dist/migrations/1785057482427-CreateDeviceCodesTable.js.map +1 -0
  159. package/dist/migrations/1785058700995-CreateOauthClientsTable.d.ts +5 -0
  160. package/dist/migrations/1785058700995-CreateOauthClientsTable.js +23 -0
  161. package/dist/migrations/1785058700995-CreateOauthClientsTable.js.map +1 -0
  162. package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.d.ts +5 -0
  163. package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.js +31 -0
  164. package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.js.map +1 -0
  165. package/dist/migrations/{1788000000000-CreateBzEventTriggersTable.d.ts → 1785163352085-CreateBzEventTriggersTable.d.ts} +1 -1
  166. package/dist/migrations/{1788000000000-CreateBzEventTriggersTable.js → 1785163352085-CreateBzEventTriggersTable.js} +4 -4
  167. package/dist/migrations/{1788000000000-CreateBzEventTriggersTable.js.map → 1785163352085-CreateBzEventTriggersTable.js.map} +1 -1
  168. package/dist/migrations/{1789000000000-RenameSourceHashToTableNameBzEventTriggersTable.d.ts → 1785163353086-RenameSourceHashToTableNameBzEventTriggersTable.d.ts} +1 -1
  169. package/dist/migrations/{1789000000000-RenameSourceHashToTableNameBzEventTriggersTable.js → 1785163353086-RenameSourceHashToTableNameBzEventTriggersTable.js} +4 -4
  170. package/dist/migrations/{1789000000000-RenameSourceHashToTableNameBzEventTriggersTable.js.map → 1785163353086-RenameSourceHashToTableNameBzEventTriggersTable.js.map} +1 -1
  171. package/dist/migrations/{1790000000000-CreateBzEventTriggerLogsTable.d.ts → 1785163354087-CreateBzEventTriggerLogsTable.d.ts} +1 -1
  172. package/dist/migrations/{1790000000000-CreateBzEventTriggerLogsTable.js → 1785163354087-CreateBzEventTriggerLogsTable.js} +4 -4
  173. package/dist/migrations/{1790000000000-CreateBzEventTriggerLogsTable.js.map → 1785163354087-CreateBzEventTriggerLogsTable.js.map} +1 -1
  174. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./execution.context.interface"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C"}
@@ -29,6 +29,11 @@ import { MenuRoleDeleteTool } from './admin/tools/menu_role/menu.role.delete.too
29
29
  import { MenuRoleGetTool } from './admin/tools/menu_role/menu.role.get.tool';
30
30
  import { MenuRoleListTool } from './admin/tools/menu_role/menu.role.list.tool';
31
31
  import { MenuRoleUpdateTool } from './admin/tools/menu_role/menu.role.update.tool';
32
+ import { MenuUiActionCreateTool } from './admin/tools/menu_ui_action/menu.ui.action.create.tool';
33
+ import { MenuUiActionDeleteTool } from './admin/tools/menu_ui_action/menu.ui.action.delete.tool';
34
+ import { MenuUiActionGetTool } from './admin/tools/menu_ui_action/menu.ui.action.get.tool';
35
+ import { MenuUiActionListTool } from './admin/tools/menu_ui_action/menu.ui.action.list.tool';
36
+ import { MenuUiActionUpdateTool } from './admin/tools/menu_ui_action/menu.ui.action.update.tool';
32
37
  import { ModuleCreateTool } from './admin/tools/module/module.create.tool';
33
38
  import { ModuleDeleteTool } from './admin/tools/module/module.delete.tool';
34
39
  import { ModuleGetTool } from './admin/tools/module/module.get.tool';
@@ -62,7 +67,8 @@ import { McpTool } from './tools/mcp.tool';
62
67
  import { SaveListingPreferenceTool } from './tools/save.listing.preference.tool';
63
68
  import { ToolRegistry } from './tools/tool.registry';
64
69
  declare const es6Classes: {
65
- admin: (typeof ChildMenuCreateTool | typeof ChildMenuDeleteTool | typeof ChildMenuGetTool | typeof ChildMenuListTool | typeof ChildMenuUpdateTool | typeof ListingColumnCreateTool | typeof ListingColumnDeleteTool | typeof ListingColumnGetTool | typeof ListingColumnListTool | typeof ListingColumnUpdateTool | typeof ListingPageCreateTool | typeof ListingPageDeleteTool | typeof ListingPageGetTool | typeof ListingPageListTool | typeof ListingPageUpdateTool | typeof ListingPreferenceCreateTool | typeof ListingPreferenceDeleteTool | typeof ListingPreferenceGetTool | typeof ListingPreferenceListTool | typeof ListingPreferenceUpdateTool | typeof MenuCreateTool | typeof MenuDeleteTool | typeof MenuGetTool | typeof MenuListTool | typeof MenuUpdateTool | typeof MenuRoleCreateTool | typeof MenuRoleDeleteTool | typeof MenuRoleGetTool | typeof MenuRoleListTool | typeof MenuRoleUpdateTool | typeof ModuleCreateTool | typeof ModuleDeleteTool | typeof ModuleGetTool | typeof ModuleListTool | typeof ModuleUpdateTool | typeof ModuleMenuCreateTool | typeof ModuleMenuDeleteTool | typeof ModuleMenuGetTool | typeof ModuleMenuListTool | typeof ModuleMenuUpdateTool | typeof UiActionCreateTool | typeof UiActionDeleteTool | typeof UiActionGetTool | typeof UiActionListTool | typeof UiActionUpdateTool | typeof UiActionRoleCreateTool | typeof UiActionRoleDeleteTool | typeof UiActionRoleGetTool | typeof UiActionRoleListTool | typeof UiActionRoleUpdateTool | typeof AdminToolRegistry)[];
70
+ admin: (typeof ChildMenuCreateTool | typeof ChildMenuDeleteTool | typeof ChildMenuGetTool | typeof ChildMenuListTool | typeof ChildMenuUpdateTool | typeof ListingColumnCreateTool | typeof ListingColumnDeleteTool | typeof ListingColumnGetTool | typeof ListingColumnListTool | typeof ListingColumnUpdateTool | typeof ListingPageCreateTool | typeof ListingPageDeleteTool | typeof ListingPageGetTool | typeof ListingPageListTool | typeof ListingPageUpdateTool | typeof ListingPreferenceCreateTool | typeof ListingPreferenceDeleteTool | typeof ListingPreferenceGetTool | typeof ListingPreferenceListTool | typeof ListingPreferenceUpdateTool | typeof MenuCreateTool | typeof MenuDeleteTool | typeof MenuGetTool | typeof MenuListTool | typeof MenuUpdateTool | typeof MenuRoleCreateTool | typeof MenuRoleDeleteTool | typeof MenuRoleGetTool | typeof MenuRoleListTool | typeof MenuRoleUpdateTool | typeof MenuUiActionCreateTool | typeof MenuUiActionDeleteTool | typeof MenuUiActionGetTool | typeof MenuUiActionListTool | typeof MenuUiActionUpdateTool | typeof ModuleCreateTool | typeof ModuleDeleteTool | typeof ModuleGetTool | typeof ModuleListTool | typeof ModuleUpdateTool | typeof ModuleMenuCreateTool | typeof ModuleMenuDeleteTool | typeof ModuleMenuGetTool | typeof ModuleMenuListTool | typeof ModuleMenuUpdateTool | typeof UiActionCreateTool | typeof UiActionDeleteTool | typeof UiActionGetTool | typeof UiActionListTool | typeof UiActionUpdateTool | typeof UiActionRoleCreateTool | typeof UiActionRoleDeleteTool | typeof UiActionRoleGetTool | typeof UiActionRoleListTool | typeof UiActionRoleUpdateTool | typeof AdminToolRegistry)[];
71
+ auth: any[];
66
72
  client: (typeof DevelopmentKeyAuth | typeof SlabsApiError | typeof SlabsApiClient | typeof ClientCredentialAuth)[];
67
73
  http: (typeof AdminMcpController | typeof BusinessMcpController | typeof McpHttpModule)[];
68
74
  interfaces: any[];
@@ -31,6 +31,11 @@ const menu_role_delete_tool_1 = require("./admin/tools/menu_role/menu.role.delet
31
31
  const menu_role_get_tool_1 = require("./admin/tools/menu_role/menu.role.get.tool");
32
32
  const menu_role_list_tool_1 = require("./admin/tools/menu_role/menu.role.list.tool");
33
33
  const menu_role_update_tool_1 = require("./admin/tools/menu_role/menu.role.update.tool");
34
+ const menu_ui_action_create_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.create.tool");
35
+ const menu_ui_action_delete_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.delete.tool");
36
+ const menu_ui_action_get_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.get.tool");
37
+ const menu_ui_action_list_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.list.tool");
38
+ const menu_ui_action_update_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.update.tool");
34
39
  const module_create_tool_1 = require("./admin/tools/module/module.create.tool");
35
40
  const module_delete_tool_1 = require("./admin/tools/module/module.delete.tool");
36
41
  const module_get_tool_1 = require("./admin/tools/module/module.get.tool");
@@ -59,6 +64,8 @@ const admin_mcp_controller_1 = require("./http/admin.mcp.controller");
59
64
  const business_mcp_controller_1 = require("./http/business.mcp.controller");
60
65
  const mcp_http_module_1 = require("./http/mcp.http.module");
61
66
  const mcp_request_handler_1 = require("./http/mcp.request.handler");
67
+ const prm_controller_1 = require("./http/prm.controller");
68
+ const unauthorized_mcp_response_1 = require("./http/unauthorized.mcp.response");
62
69
  const delete_listing_preference_tool_1 = require("./tools/delete.listing.preference.tool");
63
70
  const get_listing_tool_1 = require("./tools/get.listing.tool");
64
71
  const mcp_tool_1 = require("./tools/mcp.tool");
@@ -97,6 +104,11 @@ const es6Classes = {
97
104
  menu_role_get_tool_1.MenuRoleGetTool,
98
105
  menu_role_list_tool_1.MenuRoleListTool,
99
106
  menu_role_update_tool_1.MenuRoleUpdateTool,
107
+ menu_ui_action_create_tool_1.MenuUiActionCreateTool,
108
+ menu_ui_action_delete_tool_1.MenuUiActionDeleteTool,
109
+ menu_ui_action_get_tool_1.MenuUiActionGetTool,
110
+ menu_ui_action_list_tool_1.MenuUiActionListTool,
111
+ menu_ui_action_update_tool_1.MenuUiActionUpdateTool,
100
112
  module_create_tool_1.ModuleCreateTool,
101
113
  module_delete_tool_1.ModuleDeleteTool,
102
114
  module_get_tool_1.ModuleGetTool,
@@ -118,8 +130,9 @@ const es6Classes = {
118
130
  ui_action_role_list_tool_1.UiActionRoleListTool,
119
131
  ui_action_role_update_tool_1.UiActionRoleUpdateTool,
120
132
  ],
133
+ auth: [],
121
134
  client: [client_credential_auth_1.ClientCredentialAuth, development_key_auth_1.DevelopmentKeyAuth, slabs_api_client_1.SlabsApiClient, slabs_api_error_1.SlabsApiError],
122
- http: [admin_mcp_controller_1.AdminMcpController, business_mcp_controller_1.BusinessMcpController, mcp_http_module_1.McpHttpModule, mcp_request_handler_1.McpRequestHandler],
135
+ http: [admin_mcp_controller_1.AdminMcpController, business_mcp_controller_1.BusinessMcpController, mcp_http_module_1.McpHttpModule, mcp_request_handler_1.McpRequestHandler, prm_controller_1.PrmController, unauthorized_mcp_response_1.UnauthorizedMcpResponse],
123
136
  interfaces: [],
124
137
  tools: [delete_listing_preference_tool_1.DeleteListingPreferenceTool, get_listing_tool_1.GetListingTool, mcp_tool_1.McpTool, save_listing_preference_tool_1.SaveListingPreferenceTool, tool_registry_1.ToolRegistry],
125
138
  };
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/mcp/es6.classes.ts"],"names":[],"mappings":";;AAAA,2EAAsE;AACtE,4FAAsF;AACtF,4FAAsF;AACtF,sFAAgF;AAChF,wFAAkF;AAClF,4FAAsF;AACtF,wGAAkG;AAClG,wGAAkG;AAClG,kGAA4F;AAC5F,oGAA8F;AAC9F,wGAAkG;AAClG,kGAA4F;AAC5F,kGAA4F;AAC5F,4FAAsF;AACtF,8FAAwF;AACxF,kGAA4F;AAC5F,oHAA8G;AAC9G,oHAA8G;AAC9G,8GAAwG;AACxG,gHAA0G;AAC1G,oHAA8G;AAC9G,0EAAqE;AACrE,0EAAqE;AACrE,oEAA+D;AAC/D,sEAAiE;AACjE,0EAAqE;AACrE,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFAAmF;AACnF,gFAA2E;AAC3E,gFAA2E;AAC3E,0EAAqE;AACrE,4EAAuE;AACvE,gFAA2E;AAC3E,+FAAyF;AACzF,+FAAyF;AACzF,yFAA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AE,CAAC,yCAAkB,EAAE,+CAAqB,EAAE,+BAAa,EAAE,uCAAiB,CAAC;IACnF,UAAU,EAAE,EAAE;IACd,KAAK,EAAE,CAAC,4DAA2B,EAAE,iCAAc,EAAE,kBAAO,EAAE,wDAAyB,EAAE,4BAAY,CAAC;CACzG,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/mcp/es6.classes.ts"],"names":[],"mappings":";;AAAA,2EAAsE;AACtE,4FAAsF;AACtF,4FAAsF;AACtF,sFAAgF;AAChF,wFAAkF;AAClF,4FAAsF;AACtF,wGAAkG;AAClG,wGAAkG;AAClG,kGAA4F;AAC5F,oGAA8F;AAC9F,wGAAkG;AAClG,kGAA4F;AAC5F,kGAA4F;AAC5F,4FAAsF;AACtF,8FAAwF;AACxF,kGAA4F;AAC5F,oHAA8G;AAC9G,oHAA8G;AAC9G,8GAAwG;AACxG,gHAA0G;AAC1G,oHAA8G;AAC9G,0EAAqE;AACrE,0EAAqE;AACrE,oEAA+D;AAC/D,sEAAiE;AACjE,0EAAqE;AACrE,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFAAmF;AACnF,wGAAiG;AACjG,wGAAiG;AACjG,kGAA2F;AAC3F,oGAA6F;AAC7F,wGAAiG;AACjG,gFAA2E;AAC3E,gFAA2E;AAC3E,0EAAqE;AACrE,4EAAuE;AACvE,gFAA2E;AAC3E,+FAAyF;AACzF,+FAAyF;AACzF,yFAAmF;AACnF,2FAAqF;AACrF,+FAAyF;AACzF,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFAAmF;AACnF,wGAAiG;AACjG,wGAAiG;AACjG,kGAA2F;AAC3F,oGAA6F;AAC7F,wGAAiG;AACjG,4EAAuE;AACvE,wEAAmE;AACnE,gEAA2D;AAC3D,8DAAyD;AACzD,sEAAiE;AACjE,4EAAuE;AACvE,4DAA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,iCAAc,EAAE,kBAAO,EAAE,wDAAyB,EAAE,4BAAY,CAAC;CACzG,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -31,7 +31,7 @@ let AdminMcpController = class AdminMcpController {
31
31
  dispatch(req, res) {
32
32
  const key = String(req.headers['x-development-key'] ?? '');
33
33
  if (!key) {
34
- return (0, unauthorized_mcp_response_1.unauthorizedMcpResponse)(res, 'Missing x-development-key header.');
34
+ return unauthorized_mcp_response_1.UnauthorizedMcpResponse.unauthorized(res, 'Missing x-development-key header.');
35
35
  }
36
36
  const auth = new development_key_auth_1.DevelopmentKeyAuth(key);
37
37
  return this.handler.handle(req, res, {
@@ -1 +1 @@
1
- {"version":3,"file":"admin.mcp.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/admin.mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AAEjE,yEAAoE;AAEpE,4EAAuE;AACvE,+DAA0D;AAC1D,2EAAsE;AAQ/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC3B,YAA6B,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAAG,CAAC;IAG3D,IAAI,CAAQ,GAAY,EAAS,GAAa;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAGD,GAAG,CAAQ,GAAY,EAAS,GAAa;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,QAAQ,CAAC,GAAY,EAAE,GAAa;QACxC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,OAAO,IAAA,mDAAuB,EAAC,GAAG,EAAE,mCAAmC,CAAC,CAAC;QAC7E,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,yCA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,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,OAAO,mDAAuB,CAAC,YAAY,CAAC,GAAG,EAAE,mCAAmC,CAAC,CAAC;QAC1F,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,yCAAkB,CAAC,GAAG,CAAC,CAAC;QAEzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;YACjC,IAAI,EAAE,4BAA4B;YAClC,IAAI;YACJ,KAAK,EAAE,CAAC,MAAsB,EAAE,EAAE,CAAC,IAAI,uCAAiB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;SAC3E,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA5BY,gDAAkB;AAI3B;IADC,IAAA,aAAI,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;8CAE/B;AAGD;IADC,IAAA,YAAG,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;6CAE9B;6BAXQ,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,WAAW,CAAC;qCAEkB,uCAAiB;GAD9C,kBAAkB,CA4B9B"}
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.BusinessMcpController = void 0;
16
16
  const common_1 = require("@nestjs/common");
17
+ const extract_client_credentials_1 = require("../../access/libraries/extract.client.credentials");
17
18
  const client_credential_auth_1 = require("../client/client.credential.auth");
18
19
  const tool_registry_1 = require("../tools/tool.registry");
19
20
  const mcp_request_handler_1 = require("./mcp.request.handler");
@@ -29,12 +30,11 @@ let BusinessMcpController = class BusinessMcpController {
29
30
  return this.dispatch(req, res);
30
31
  }
31
32
  dispatch(req, res) {
32
- const clientId = String(req.headers['x-client-id'] ?? '');
33
- const clientSecret = String(req.headers['x-client-secret'] ?? '');
34
- if (!clientId || !clientSecret) {
35
- return (0, unauthorized_mcp_response_1.unauthorizedMcpResponse)(res, 'Missing x-client-id / x-client-secret headers.');
33
+ const creds = extract_client_credentials_1.ExtractClientCredentials.fromHeaders(req.headers);
34
+ if (!creds) {
35
+ return unauthorized_mcp_response_1.UnauthorizedMcpResponse.unauthorized(res, 'Missing Authorization Bearer token or x-client-id / x-client-secret headers.');
36
36
  }
37
- const auth = new client_credential_auth_1.ClientCredentialAuth(clientId, clientSecret);
37
+ const auth = new client_credential_auth_1.ClientCredentialAuth(creds.clientId, creds.clientSecret);
38
38
  return this.handler.handle(req, res, {
39
39
  name: 'slabs-access-manager',
40
40
  auth,
@@ -1 +1 @@
1
- {"version":3,"file":"business.mcp.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/business.mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AAEjE,6EAAwE;AAExE,0DAAsD;AACtD,+DAA0D;AAC1D,2EAAsE;AAQ/D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC9B,YAA6B,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAAG,CAAC;IAG3D,IAAI,CAAQ,GAAY,EAAS,GAAa;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAGD,GAAG,CAAQ,GAAY,EAAS,GAAa;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,QAAQ,CAAC,GAAY,EAAE,GAAa;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAA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AC;IACnC,CAAC;IAGD,GAAG,CAAQ,GAAY,EAAS,GAAa;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,QAAQ,CAAC,GAAY,EAAE,GAAa;QACxC,MAAM,KAAK,GAAG,qDAAwB,CAAC,WAAW,CAAC,GAAG,CAAC,OAAkC,CAAC,CAAC;QAE3F,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO,mDAAuB,CAAC,YAAY,CAAC,GAAG,EAAE,8EAA8E,CAAC,CAAC;QACrI,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,6CAAoB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;QAE1E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;YACjC,IAAI,EAAE,sBAAsB;YAC5B,IAAI;YACJ,KAAK,EAAE,CAAC,MAAsB,EAAE,EAAE,CAAC,IAAI,4BAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;SACtE,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA5BY,sDAAqB;AAI9B;IADC,IAAA,aAAI,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;iDAE/B;AAGD;IADC,IAAA,YAAG,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;gDAE9B;gCAXQ,qBAAqB;IADjC,IAAA,mBAAU,EAAC,KAAK,CAAC;qCAEwB,uCAAiB;GAD9C,qBAAqB,CA4BjC"}
@@ -2,4 +2,5 @@ export * from './admin.mcp.controller';
2
2
  export * from './business.mcp.controller';
3
3
  export * from './mcp.http.module';
4
4
  export * from './mcp.request.handler';
5
+ export * from './prm.controller';
5
6
  export * from './unauthorized.mcp.response';
@@ -18,5 +18,6 @@ __exportStar(require("./admin.mcp.controller"), exports);
18
18
  __exportStar(require("./business.mcp.controller"), exports);
19
19
  __exportStar(require("./mcp.http.module"), exports);
20
20
  __exportStar(require("./mcp.request.handler"), exports);
21
+ __exportStar(require("./prm.controller"), exports);
21
22
  __exportStar(require("./unauthorized.mcp.response"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,8DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,mDAAiC;AAAA,8DAA2C"}
@@ -11,12 +11,13 @@ const common_1 = require("@nestjs/common");
11
11
  const admin_mcp_controller_1 = require("./admin.mcp.controller");
12
12
  const business_mcp_controller_1 = require("./business.mcp.controller");
13
13
  const mcp_request_handler_1 = require("./mcp.request.handler");
14
+ const prm_controller_1 = require("./prm.controller");
14
15
  let McpHttpModule = class McpHttpModule {
15
16
  };
16
17
  exports.McpHttpModule = McpHttpModule;
17
18
  exports.McpHttpModule = McpHttpModule = __decorate([
18
19
  (0, common_1.Module)({
19
- controllers: [business_mcp_controller_1.BusinessMcpController, admin_mcp_controller_1.AdminMcpController],
20
+ controllers: [business_mcp_controller_1.BusinessMcpController, admin_mcp_controller_1.AdminMcpController, prm_controller_1.PrmController],
20
21
  providers: [mcp_request_handler_1.McpRequestHandler],
21
22
  })
22
23
  ], McpHttpModule);
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.http.module.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.http.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iEAA4D;AAC5D,uEAAkE;AAClE,+DAA0D;AAWnD,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAJzB,IAAA,eAAM,EAAC;QACJ,WAAW,EAAE,CAAC,+CAAqB,EAAE,yCAAkB,CAAC;QACxD,SAAS,EAAE,CAAC,uCAAiB,CAAC;KACjC,CAAC;GACW,aAAa,CAAG"}
1
+ {"version":3,"file":"mcp.http.module.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.http.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iEAA4D;AAC5D,uEAAkE;AAClE,+DAA0D;AAC1D,qDAAiD;AAa1C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAJzB,IAAA,eAAM,EAAC;QACJ,WAAW,EAAE,CAAC,+CAAqB,EAAE,yCAAkB,EAAE,8BAAa,CAAC;QACvE,SAAS,EAAE,CAAC,uCAAiB,CAAC;KACjC,CAAC;GACW,aAAa,CAAG"}
@@ -31,7 +31,7 @@ let McpRequestHandler = McpRequestHandler_1 = class McpRequestHandler {
31
31
  }
32
32
  catch (error) {
33
33
  this.logger.error(`MCP request failed: ${error?.message ?? error}`, error?.stack);
34
- (0, unauthorized_mcp_response_1.internalMcpErrorResponse)(res, 'MCP request handling failed.');
34
+ unauthorized_mcp_response_1.UnauthorizedMcpResponse.internal(res, 'MCP request handling failed.');
35
35
  }
36
36
  }
37
37
  safeClose(fn) {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.request.handler.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.request.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,0FAAmG;AACnG,iEAA4D;AAG5D,0DAAqD;AACrD,2EAAuE;AAgBhE,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAAvB;QACc,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC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AAK,EAAE,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC;YAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAChC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YAClF,mDAAuB,CAAC,QAAQ,CAAC,GAAG,EAAE,8BAA8B,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,EAAc;QAC5B,IAAI,CAAC;YACD,EAAE,EAAE,CAAC;QACT,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;IAEO,eAAe;QACnB,OAAO,oBAAoB,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;IACjE,CAAC;CACJ,CAAA;AAtCY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAsC7B"}
@@ -0,0 +1,10 @@
1
+ export declare class PrmController {
2
+ protectedResourceMetadata(): {
3
+ resource: string;
4
+ authorization_servers: string[];
5
+ scopes_supported: string[];
6
+ bearer_methods_supported: string[];
7
+ resource_documentation: string;
8
+ };
9
+ private baseUrl;
10
+ }
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PrmController = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ let PrmController = class PrmController {
15
+ protectedResourceMetadata() {
16
+ const resource = process.env.MCP_CANONICAL_URI || `${this.baseUrl()}/mcp`;
17
+ const authorizationServer = process.env.MCP_AUTHORIZATION_SERVER || process.env.SERVER_URL || this.baseUrl();
18
+ const scopes = (process.env.MCP_SCOPES_SUPPORTED || 'mcp,reporting:read')
19
+ .split(',')
20
+ .map((s) => s.trim())
21
+ .filter(Boolean);
22
+ return {
23
+ resource,
24
+ authorization_servers: [authorizationServer.replace(/\/+$/, '')],
25
+ scopes_supported: scopes,
26
+ bearer_methods_supported: ['header'],
27
+ resource_documentation: process.env.MCP_RESOURCE_DOCUMENTATION || 'https://developers.finnoto.com/mcp',
28
+ };
29
+ }
30
+ baseUrl() {
31
+ return (process.env.SERVER_URL || `http://127.0.0.1:${process.env.SERVER_PORT || 4000}`).replace(/\/+$/, '');
32
+ }
33
+ };
34
+ exports.PrmController = PrmController;
35
+ __decorate([
36
+ (0, common_1.Get)('oauth-protected-resource'),
37
+ (0, common_1.Header)('Cache-Control', 'public, max-age=3600'),
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", []),
40
+ __metadata("design:returntype", void 0)
41
+ ], PrmController.prototype, "protectedResourceMetadata", null);
42
+ exports.PrmController = PrmController = __decorate([
43
+ (0, common_1.Controller)('.well-known')
44
+ ], PrmController);
45
+ //# sourceMappingURL=prm.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3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mBAAU,EAAC,aAAa,CAAC;GACb,aAAa,CAuBzB"}
@@ -1,4 +1,7 @@
1
1
  import { Response } from 'express';
2
- export declare function mcpErrorResponse(res: Response, status: number, code: number, message: string): void;
3
- export declare function unauthorizedMcpResponse(res: Response, message: string): void;
4
- export declare function internalMcpErrorResponse(res: Response, message: string): void;
2
+ export declare class UnauthorizedMcpResponse {
3
+ static error(res: Response, status: number, code: number, message: string): void;
4
+ static challenge(): string;
5
+ static unauthorized(res: Response, message: string): void;
6
+ static internal(res: Response, message: string): void;
7
+ }
@@ -1,23 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mcpErrorResponse = mcpErrorResponse;
4
- exports.unauthorizedMcpResponse = unauthorizedMcpResponse;
5
- exports.internalMcpErrorResponse = internalMcpErrorResponse;
3
+ exports.UnauthorizedMcpResponse = void 0;
6
4
  const JSONRPC_UNAUTHORIZED = -32001;
7
5
  const JSONRPC_INTERNAL_ERROR = -32603;
8
- function mcpErrorResponse(res, status, code, message) {
9
- if (res.headersSent)
10
- return;
11
- res.status(status).json({
12
- jsonrpc: '2.0',
13
- error: { code, message },
14
- id: null,
15
- });
16
- }
17
- function unauthorizedMcpResponse(res, message) {
18
- mcpErrorResponse(res, 401, JSONRPC_UNAUTHORIZED, message);
19
- }
20
- function internalMcpErrorResponse(res, message) {
21
- mcpErrorResponse(res, 500, JSONRPC_INTERNAL_ERROR, message);
6
+ class UnauthorizedMcpResponse {
7
+ static error(res, status, code, message) {
8
+ if (res.headersSent)
9
+ return;
10
+ res.status(status).json({
11
+ jsonrpc: '2.0',
12
+ error: { code, message },
13
+ id: null,
14
+ });
15
+ }
16
+ static challenge() {
17
+ const resource = process.env.MCP_CANONICAL_URI || `${(process.env.SERVER_URL || 'http://127.0.0.1:4000').replace(/\/+$/, '')}/mcp`;
18
+ const metadataUrl = `${resource.replace(/\/mcp\/?$/, '')}/.well-known/oauth-protected-resource`;
19
+ const scope = process.env.MCP_SCOPES_SUPPORTED?.split(',')[0]?.trim() || 'mcp';
20
+ return `Bearer resource_metadata="${metadataUrl}", scope="${scope}"`;
21
+ }
22
+ static unauthorized(res, message) {
23
+ if (!res.headersSent) {
24
+ res.setHeader('WWW-Authenticate', UnauthorizedMcpResponse.challenge());
25
+ }
26
+ UnauthorizedMcpResponse.error(res, 401, JSONRPC_UNAUTHORIZED, message);
27
+ }
28
+ static internal(res, message) {
29
+ UnauthorizedMcpResponse.error(res, 500, JSONRPC_INTERNAL_ERROR, message);
30
+ }
22
31
  }
32
+ exports.UnauthorizedMcpResponse = UnauthorizedMcpResponse;
23
33
  //# sourceMappingURL=unauthorized.mcp.response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unauthorized.mcp.response.js","sourceRoot":"","sources":["../../../src/mcp/http/unauthorized.mcp.response.ts"],"names":[],"mappings":";;AAaA,4CAQC;AASD,0DAEC;AAOD,4DAEC;AAtCD,MAAM,oBAAoB,GAAG,CAAC,KAAK,CAAC;AAGpC,MAAM,sBAAsB,GAAG,CAAC,KAAK,CAAC;AAOtC,SAAgB,gBAAgB,CAAC,GAAa,EAAE,MAAc,EAAE,IAAY,EAAE,OAAe;IACzF,IAAI,GAAG,CAAC,WAAW;QAAE,OAAO;IAE5B,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;QACpB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACxB,EAAE,EAAE,IAAI;KACX,CAAC,CAAC;AACP,CAAC;AASD,SAAgB,uBAAuB,CAAC,GAAa,EAAE,OAAe;IAClE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAOD,SAAgB,wBAAwB,CAAC,GAAa,EAAE,OAAe;IACnE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
1
+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GAAG,EAAE,GAAG,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAKD,MAAM,CAAC,QAAQ,CAAC,GAAa,EAAE,OAAe;QAC1C,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACJ;AA1CD,0DA0CC"}
@@ -1,4 +1,5 @@
1
1
  export * from './admin';
2
+ export * from './auth';
2
3
  export * from './client';
3
4
  export * from './http';
4
5
  export * from './interfaces';
package/dist/mcp/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./admin"), exports);
18
+ __exportStar(require("./auth"), exports);
18
19
  __exportStar(require("./client"), exports);
19
20
  __exportStar(require("./http"), exports);
20
21
  __exportStar(require("./interfaces"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AAAA,2CAAyB;AAAA,yCAAuB;AAAA,+CAA6B;AAAA,0CAAwB;AAAA,+CAA6B;AAAA,qDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AAAA,yCAAuB;AAAA,2CAAyB;AAAA,yCAAuB;AAAA,+CAA6B;AAAA,0CAAwB;AAAA,+CAA6B;AAAA,qDAAkC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class AddDisplayOrderUtlMenuActionsTable1785056165556 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddDisplayOrderUtlMenuActionsTable1785056165556 = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class AddDisplayOrderUtlMenuActionsTable1785056165556 extends nestjs_utility_services_1.MigrationUtility {
6
+ constructor() {
7
+ super('utl_menu_actions');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.number('display_order');
12
+ }
13
+ }
14
+ exports.AddDisplayOrderUtlMenuActionsTable1785056165556 = AddDisplayOrderUtlMenuActionsTable1785056165556;
15
+ //# sourceMappingURL=1785056165556-AddDisplayOrderUtlMenuActionsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785056165556-AddDisplayOrderUtlMenuActionsTable.js","sourceRoot":"","sources":["../../src/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,+CAAgD,SAAQ,0CAAgB;IACjF;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACjC,CAAC;CACJ;AATD,0GASC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class CreateDeviceCodesTable1785057482427 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateDeviceCodesTable1785057482427 = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class CreateDeviceCodesTable1785057482427 extends nestjs_utility_services_1.MigrationUtility {
6
+ constructor() {
7
+ super('bz_device_codes');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.primary();
12
+ this.string('device_code_hash');
13
+ this.string('user_code');
14
+ this.dateTime('expires_at');
15
+ this.dateTime('approved_at');
16
+ this.dateTime('denied_at');
17
+ this.dateTime('consumed_at');
18
+ this.foreign({ name: 'approved_by_user_id', foreignTable: 'sys_users' });
19
+ this.foreign({ name: 'business_id', foreignTable: 'bz_business_details' });
20
+ this.foreign({ name: 'user_secret_id', foreignTable: 'bz_user_secrets' });
21
+ this.whoColumns();
22
+ }
23
+ }
24
+ exports.CreateDeviceCodesTable1785057482427 = CreateDeviceCodesTable1785057482427;
25
+ //# sourceMappingURL=1785057482427-CreateDeviceCodesTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785057482427-CreateDeviceCodesTable.js","sourceRoot":"","sources":["../../src/migrations/1785057482427-CreateDeviceCodesTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,mCAAoC,SAAQ,0CAAgB;IACrE;QACI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACzB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE5B,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAE1E,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAvBD,kFAuBC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class CreateOauthClientsTable1785058700995 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateOauthClientsTable1785058700995 = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class CreateOauthClientsTable1785058700995 extends nestjs_utility_services_1.MigrationUtility {
6
+ constructor() {
7
+ super('bz_oauth_clients');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.primary();
12
+ this.string('client_id');
13
+ this.string('client_name');
14
+ this.json('redirect_uris');
15
+ this.string('token_endpoint_auth_method');
16
+ this.json('grant_types');
17
+ this.json('response_types');
18
+ this.json('attributes');
19
+ this.whoColumns();
20
+ }
21
+ }
22
+ exports.CreateOauthClientsTable1785058700995 = CreateOauthClientsTable1785058700995;
23
+ //# sourceMappingURL=1785058700995-CreateOauthClientsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785058700995-CreateOauthClientsTable.js","sourceRoot":"","sources":["../../src/migrations/1785058700995-CreateOauthClientsTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,oCAAqC,SAAQ,0CAAgB;IACtE;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAnBD,oFAmBC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class CreateOauthAuthorizationsTable1785058701000 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateOauthAuthorizationsTable1785058701000 = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class CreateOauthAuthorizationsTable1785058701000 extends nestjs_utility_services_1.MigrationUtility {
6
+ constructor() {
7
+ super('bz_oauth_authorizations');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.primary();
12
+ this.string('client_id');
13
+ this.string('redirect_uri');
14
+ this.string('scope');
15
+ this.string('state');
16
+ this.string('code_challenge');
17
+ this.string('code_challenge_method');
18
+ this.string('resource');
19
+ this.dateTime('expires_at');
20
+ this.dateTime('approved_at');
21
+ this.dateTime('denied_at');
22
+ this.dateTime('consumed_at');
23
+ this.string('code_hash');
24
+ this.foreign({ name: 'approved_by_user_id', foreignTable: 'sys_users' });
25
+ this.foreign({ name: 'business_id', foreignTable: 'bz_business_details' });
26
+ this.foreign({ name: 'user_secret_id', foreignTable: 'bz_user_secrets' });
27
+ this.whoColumns();
28
+ }
29
+ }
30
+ exports.CreateOauthAuthorizationsTable1785058701000 = CreateOauthAuthorizationsTable1785058701000;
31
+ //# sourceMappingURL=1785058701000-CreateOauthAuthorizationsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785058701000-CreateOauthAuthorizationsTable.js","sourceRoot":"","sources":["../../src/migrations/1785058701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ationUtility } from '@servicelabsco/nestjs-utility-services';
2
- export declare class CreateBzEventTriggersTable1788000000000 extends MigrationUtility {
2
+ export declare class CreateBzEventTriggersTable1785163352085 extends MigrationUtility {
3
3
  constructor();
4
4
  process(): void;
5
5
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateBzEventTriggersTable1788000000000 = void 0;
3
+ exports.CreateBzEventTriggersTable1785163352085 = void 0;
4
4
  const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
- class CreateBzEventTriggersTable1788000000000 extends nestjs_utility_services_1.MigrationUtility {
5
+ class CreateBzEventTriggersTable1785163352085 extends nestjs_utility_services_1.MigrationUtility {
6
6
  constructor() {
7
7
  super('bz_event_triggers');
8
8
  this.process();
@@ -23,5 +23,5 @@ class CreateBzEventTriggersTable1788000000000 extends nestjs_utility_services_1.
23
23
  this.index(['table_name'], 'bz_event_triggers_table_name_index');
24
24
  }
25
25
  }
26
- exports.CreateBzEventTriggersTable1788000000000 = CreateBzEventTriggersTable1788000000000;
27
- //# sourceMappingURL=1788000000000-CreateBzEventTriggersTable.js.map
26
+ exports.CreateBzEventTriggersTable1785163352085 = CreateBzEventTriggersTable1785163352085;
27
+ //# sourceMappingURL=1785163352085-CreateBzEventTriggersTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"1788000000000-CreateBzEventTriggersTable.js","sourceRoot":"","sources":["../../src/migrations/1788000000000-CreateBzEventTriggersTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,uCAAwC,SAAQ,0CAAgB;IACzE;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAClF,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,EAAE,oCAAoC,CAAC,CAAC;IACrE,CAAC;CACJ;AAzBD,0FAyBC"}
1
+ {"version":3,"file":"1785163352085-CreateBzEventTriggersTable.js","sourceRoot":"","sources":["../../src/migrations/1785163352085-CreateBzEventTriggersTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,uCAAwC,SAAQ,0CAAgB;IACzE;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAClF,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,EAAE,oCAAoC,CAAC,CAAC;IACrE,CAAC;CACJ;AAzBD,0FAyBC"}
@@ -1,5 +1,5 @@
1
1
  import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class RenameSourceHashToTableNameBzEventTriggersTable1789000000000 implements MigrationInterface {
2
+ export declare class RenameSourceHashToTableNameBzEventTriggersTable1785163353086 implements MigrationInterface {
3
3
  up(queryRunner: QueryRunner): Promise<void>;
4
4
  down(queryRunner: QueryRunner): Promise<void>;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RenameSourceHashToTableNameBzEventTriggersTable1789000000000 = void 0;
4
- class RenameSourceHashToTableNameBzEventTriggersTable1789000000000 {
3
+ exports.RenameSourceHashToTableNameBzEventTriggersTable1785163353086 = void 0;
4
+ class RenameSourceHashToTableNameBzEventTriggersTable1785163353086 {
5
5
  async up(queryRunner) {
6
6
  const table = await queryRunner.getTable('bz_event_triggers');
7
7
  if (!table)
@@ -23,5 +23,5 @@ class RenameSourceHashToTableNameBzEventTriggersTable1789000000000 {
23
23
  }
24
24
  }
25
25
  }
26
- exports.RenameSourceHashToTableNameBzEventTriggersTable1789000000000 = RenameSourceHashToTableNameBzEventTriggersTable1789000000000;
27
- //# sourceMappingURL=1789000000000-RenameSourceHashToTableNameBzEventTriggersTable.js.map
26
+ exports.RenameSourceHashToTableNameBzEventTriggersTable1785163353086 = RenameSourceHashToTableNameBzEventTriggersTable1785163353086;
27
+ //# sourceMappingURL=1785163353086-RenameSourceHashToTableNameBzEventTriggersTable.js.map