@hotmeshio/long-tail 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/escalations/index.d.ts +1 -1
- package/build/api/escalations/index.js +2 -1
- package/build/api/escalations/list.d.ts +11 -0
- package/build/api/escalations/list.js +31 -2
- package/build/api/settings.js +2 -0
- package/build/api/users.d.ts +11 -0
- package/build/api/users.js +19 -0
- package/build/index.js +6 -0
- package/build/lib/uuid.d.ts +11 -0
- package/build/lib/uuid.js +20 -0
- package/build/modules/search.d.ts +21 -0
- package/build/modules/search.js +55 -0
- package/build/routes/escalations/list.js +10 -1
- package/build/routes/users.js +9 -0
- package/build/scripts/ortho-populate.d.ts +3 -1
- package/build/scripts/ortho-populate.js +15 -5
- package/build/sdk/index.d.ts +1 -0
- package/build/services/escalation/batch.js +3 -0
- package/build/services/escalation/bulk.js +8 -0
- package/build/services/escalation/crud.js +26 -0
- package/build/services/escalation/queries.d.ts +14 -1
- package/build/services/escalation/queries.js +49 -7
- package/build/services/escalation/sql.d.ts +4 -2
- package/build/services/escalation/sql.js +4 -0
- package/build/services/role/types.d.ts +18 -0
- package/build/services/role/types.js +6 -0
- package/build/services/user/auth.js +2 -2
- package/build/services/user/crud.d.ts +13 -0
- package/build/services/user/crud.js +26 -3
- package/build/services/user/index.d.ts +1 -1
- package/build/services/user/index.js +2 -1
- package/build/services/user/sql.d.ts +11 -5
- package/build/services/user/sql.js +18 -6
- package/build/start/adapters.js +2 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/startup.d.ts +12 -1
- package/dashboard/dist/assets/{AdminDashboard-mULAQuHV.js → AdminDashboard-DPkWtPc1.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-mULAQuHV.js.map → AdminDashboard-DPkWtPc1.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-DHdzgXcr.js → AgentConfigPage-DRfnLiQS.js} +6 -6
- package/dashboard/dist/assets/{AgentConfigPage-DHdzgXcr.js.map → AgentConfigPage-DRfnLiQS.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-Du_33U2u.js → AgentDetailPage-CufRZXnT.js} +3 -3
- package/dashboard/dist/assets/{AgentDetailPage-Du_33U2u.js.map → AgentDetailPage-CufRZXnT.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-4KkQO2Hl.js → AgentsPage-CoCWGhUd.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-4KkQO2Hl.js.map → AgentsPage-CoCWGhUd.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-BSqOctep.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-BSqOctep.js.map +1 -0
- package/dashboard/dist/assets/{BotPicker-BaFiLa-H.js → BotPicker-DMojDLlV.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-BaFiLa-H.js.map → BotPicker-DMojDLlV.js.map} +1 -1
- package/dashboard/dist/assets/BulkAssignModal-DYbM_6Or.js +2 -0
- package/dashboard/dist/assets/BulkAssignModal-DYbM_6Or.js.map +1 -0
- package/dashboard/dist/assets/CapabilitiesPage-CDQ5JHNP.js +2 -0
- package/dashboard/dist/assets/{CapabilitiesPage-Cewd6Uku.js.map → CapabilitiesPage-CDQ5JHNP.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-D1WIbyDa.js → CollapsibleSection-D4VlCEbD.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-D1WIbyDa.js.map → CollapsibleSection-D4VlCEbD.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-CQsJUzEa.js → ConfirmDeleteModal-DnNHjJtD.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-CQsJUzEa.js.map → ConfirmDeleteModal-DnNHjJtD.js.map} +1 -1
- package/dashboard/dist/assets/CountdownTimer-DPHMBmgz.js +2 -0
- package/dashboard/dist/assets/CountdownTimer-DPHMBmgz.js.map +1 -0
- package/dashboard/dist/assets/CredentialsPage-CSYZw-rL.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-CwtkQUG3.js.map → CredentialsPage-CSYZw-rL.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-CRC_uNuC.js → CronLabel-CpmqDrlJ.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-CRC_uNuC.js.map → CronLabel-CpmqDrlJ.js.map} +1 -1
- package/dashboard/dist/assets/{DropZone-Pv-v5RAs.js → DropZone-BbXlQnYB.js} +2 -2
- package/dashboard/dist/assets/{DropZone-Pv-v5RAs.js.map → DropZone-BbXlQnYB.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-CxAi0zN0.js → ElapsedCell-Cul22qBS.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-CxAi0zN0.js.map → ElapsedCell-Cul22qBS.js.map} +1 -1
- package/dashboard/dist/assets/EntityTimelinePanel-CtzpJ-j2.js +2 -0
- package/dashboard/dist/assets/EntityTimelinePanel-CtzpJ-j2.js.map +1 -0
- package/dashboard/dist/assets/{EscalationListSchemaPage--yZfsE8s.js → EscalationListSchemaPage-BZQ8Y_UH.js} +3 -3
- package/dashboard/dist/assets/{EscalationListSchemaPage--yZfsE8s.js.map → EscalationListSchemaPage-BZQ8Y_UH.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-CmoVqaS7.js → EscalationSchemaPage-CydTtq_A.js} +3 -3
- package/dashboard/dist/assets/{EscalationSchemaPage-CmoVqaS7.js.map → EscalationSchemaPage-CydTtq_A.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-DDQTW6Jo.js → EscalationsOverview-DSYC0nI7.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-DDQTW6Jo.js.map → EscalationsOverview-DSYC0nI7.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-C5jN7XT7.js → EventTable-s48cTXIw.js} +2 -2
- package/dashboard/dist/assets/{EventTable-C5jN7XT7.js.map → EventTable-s48cTXIw.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-CcIgQH9h.js → FilterBar-B61qKmFD.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-CcIgQH9h.js.map → FilterBar-B61qKmFD.js.map} +1 -1
- package/dashboard/dist/assets/GraphInvokePage-DxZv_KC2.js +2 -0
- package/dashboard/dist/assets/{GraphInvokePage-LACIxaiH.js.map → GraphInvokePage-DxZv_KC2.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-zK3VP_9g.js +2 -0
- package/dashboard/dist/assets/HomePage-zK3VP_9g.js.map +1 -0
- package/dashboard/dist/assets/{ListToolbar-CLwSkmUH.js → ListToolbar-DaxloPQc.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-CLwSkmUH.js.map → ListToolbar-DaxloPQc.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-C2U1XfQw.js → McpOverview-Ciq8r6-p.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-C2U1XfQw.js.map → McpOverview-Ciq8r6-p.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-DYOK8A4D.js → McpQueryDetailPage-DIC0FEEb.js} +3 -3
- package/dashboard/dist/assets/{McpQueryDetailPage-DYOK8A4D.js.map → McpQueryDetailPage-DIC0FEEb.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-BBy0NSNg.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-Ck75ikSd.js.map → McpQueryPage-BBy0NSNg.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-CA9gWQ4L.js → McpRunDetailPage-BqKNmIyW.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-CA9gWQ4L.js.map → McpRunDetailPage-BqKNmIyW.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-BhPshset.js → McpRunsPage-D0RlOpzR.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-BhPshset.js.map → McpRunsPage-D0RlOpzR.js.map} +1 -1
- package/dashboard/dist/assets/NamespacePill-Dbtm9R2T.js +2 -0
- package/dashboard/dist/assets/{NamespacePill-DONj6eUU.js.map → NamespacePill-Dbtm9R2T.js.map} +1 -1
- package/dashboard/dist/assets/OperationsPage-BX0SFizr.js +3 -0
- package/dashboard/dist/assets/OperationsPage-BX0SFizr.js.map +1 -0
- package/dashboard/dist/assets/OperatorDashboard-vXG0TjAQ.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-DZOfHRE7.js.map → OperatorDashboard-vXG0TjAQ.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-CFVw67M6.js → PageHeader-xB92ELs3.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-CFVw67M6.js.map → PageHeader-xB92ELs3.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-D9tQxILm.js → PageHeaderWithStats-DVo_qqn1.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-D9tQxILm.js.map → PageHeaderWithStats-DVo_qqn1.js.map} +1 -1
- package/dashboard/dist/assets/PersonaDetailPage-w5TXcn4Q.js +2 -0
- package/dashboard/dist/assets/{PersonaDetailPage-eyHDupL0.js.map → PersonaDetailPage-w5TXcn4Q.js.map} +1 -1
- package/dashboard/dist/assets/PersonasPage-Dzcinl1L.js +2 -0
- package/dashboard/dist/assets/PersonasPage-Dzcinl1L.js.map +1 -0
- package/dashboard/dist/assets/{ProcessDetailPage-CKiAlpOc.js → ProcessDetailPage-BVXieFX1.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-CKiAlpOc.js.map → ProcessDetailPage-BVXieFX1.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-C4ueZJxU.js → ProcessesListPage-CKKNpk4z.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-C4ueZJxU.js.map → ProcessesListPage-CKKNpk4z.js.map} +1 -1
- package/dashboard/dist/assets/RoleDetailPage-BytSo-YE.js +8 -0
- package/dashboard/dist/assets/RoleDetailPage-BytSo-YE.js.map +1 -0
- package/dashboard/dist/assets/{RolePill-Di_5hfvw.js → RolePill-CYpL3a2d.js} +2 -2
- package/dashboard/dist/assets/{RolePill-Di_5hfvw.js.map → RolePill-CYpL3a2d.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-eayR9H4f.js +2 -0
- package/dashboard/dist/assets/{RolesPage-B3-9Ek0F.js.map → RolesPage-eayR9H4f.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-1k1J1_cv.js → RunAsSelector-D7RPwaAl.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-1k1J1_cv.js.map → RunAsSelector-D7RPwaAl.js.map} +1 -1
- package/dashboard/dist/assets/{ScanCodesPage-CeuVKnpu.js → ScanCodesPage-C8-ZBXF5.js} +2 -2
- package/dashboard/dist/assets/{ScanCodesPage-CeuVKnpu.js.map → ScanCodesPage-C8-ZBXF5.js.map} +1 -1
- package/dashboard/dist/assets/ScanSchemeDetailPage-tQhEgFKf.js +2 -0
- package/dashboard/dist/assets/{ScanSchemeDetailPage-BnivPUJY.js.map → ScanSchemeDetailPage-tQhEgFKf.js.map} +1 -1
- package/dashboard/dist/assets/ScanStationPage-CuhqsBKo.js +2 -0
- package/dashboard/dist/assets/{ScanStationPage-DCSA7pcV.js.map → ScanStationPage-CuhqsBKo.js.map} +1 -1
- package/dashboard/dist/assets/{ScopeBadge-CqIIeWjK.js → ScopeBadge-BmNzZlSj.js} +2 -2
- package/dashboard/dist/assets/{ScopeBadge-CqIIeWjK.js.map → ScopeBadge-BmNzZlSj.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-BWuKz8uB.js → StickyPagination-BIVTAMnP.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-BWuKz8uB.js.map → StickyPagination-BIVTAMnP.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-Cq6AGhgJ.js → StreamMessageDetail-CYSC2cO1.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-Cq6AGhgJ.js.map → StreamMessageDetail-CYSC2cO1.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-DM88avgt.js → SwimlaneTimeline-BMZAs_2K.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-DM88avgt.js.map → SwimlaneTimeline-BMZAs_2K.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-BLwxTNsI.js → TagInput-D1uszNd2.js} +2 -2
- package/dashboard/dist/assets/{TagInput-BLwxTNsI.js.map → TagInput-D1uszNd2.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-Caqe3fG8.js → TaskDetailPage-CVUDUU5Q.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-Caqe3fG8.js.map → TaskDetailPage-CVUDUU5Q.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-DVgcqd-h.js → TaskQueuePill-C2H8oRfn.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-DVgcqd-h.js.map → TaskQueuePill-C2H8oRfn.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-DlQwpXOL.js → TasksListPage-DEQymbXC.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-DlQwpXOL.js.map → TasksListPage-DEQymbXC.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-BinTjiVC.js → TimeAgo-CCxP67Rb.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-BinTjiVC.js.map → TimeAgo-CCxP67Rb.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-DDcfSVeQ.js → TimestampCell-CE5ZUYhV.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-DDcfSVeQ.js.map → TimestampCell-CE5ZUYhV.js.map} +1 -1
- package/dashboard/dist/assets/{ToolPill-C6hkOqPx.js → ToolPill-D-h8AoB8.js} +2 -2
- package/dashboard/dist/assets/{ToolPill-C6hkOqPx.js.map → ToolPill-D-h8AoB8.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-BHuQTyBY.js +2 -0
- package/dashboard/dist/assets/{ToolTestPanel-CZvegH_w.js.map → ToolTestPanel-BHuQTyBY.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-CShiCwz8.js → TopicDetailPage-SFuiludx.js} +3 -3
- package/dashboard/dist/assets/{TopicDetailPage-CShiCwz8.js.map → TopicDetailPage-SFuiludx.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-CAYxRRbI.js → TopicsPage-DO8pUmng.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-CAYxRRbI.js.map → TopicsPage-DO8pUmng.js.map} +1 -1
- package/dashboard/dist/assets/UserName-CsLnT75E.js +2 -0
- package/dashboard/dist/assets/UserName-CsLnT75E.js.map +1 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-DNdXEFcB.js → WorkflowExecutionPage-BttnEvOd.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DNdXEFcB.js.map → WorkflowExecutionPage-BttnEvOd.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowPill-CN-952iI.js → WorkflowPill-CZvBbkn4.js} +2 -2
- package/dashboard/dist/assets/{WorkflowPill-CN-952iI.js.map → WorkflowPill-CZvBbkn4.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-D7DPDeuQ.js → WorkflowsDashboard-BRboBhlK.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-D7DPDeuQ.js.map → WorkflowsDashboard-BRboBhlK.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-C7Z0SpDH.js → WorkflowsOverview-CDFTYeQo.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-C7Z0SpDH.js.map → WorkflowsOverview-CDFTYeQo.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Bxklswko.js → YamlWorkflowDetailPage-CmnZFevp.js} +11 -11
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Bxklswko.js.map → YamlWorkflowDetailPage-CmnZFevp.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-CkArsPbi.js → YamlWorkflowsPage-Qq1jfcrH.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-CkArsPbi.js.map → YamlWorkflowsPage-Qq1jfcrH.js.map} +1 -1
- package/dashboard/dist/assets/{agents-Ca0hOp2Y.js → agents-C7vUIO7e.js} +2 -2
- package/dashboard/dist/assets/{agents-Ca0hOp2Y.js.map → agents-C7vUIO7e.js.map} +1 -1
- package/dashboard/dist/assets/{bots-9GtbGtH9.js → bots-BaOblnW4.js} +2 -2
- package/dashboard/dist/assets/{bots-9GtbGtH9.js.map → bots-BaOblnW4.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-C0RpEvyY.js → capabilities-RZpmDWoy.js} +2 -2
- package/dashboard/dist/assets/{capabilities-C0RpEvyY.js.map → capabilities-RZpmDWoy.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-ClQiKGyQ.js → controlplane-BwGdcwXR.js} +2 -2
- package/dashboard/dist/assets/{controlplane-ClQiKGyQ.js.map → controlplane-BwGdcwXR.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-B4DG_5v8.js +2 -0
- package/dashboard/dist/assets/escalation-columns-B4DG_5v8.js.map +1 -0
- package/dashboard/dist/assets/index-8LIpvj2e.js +3 -0
- package/dashboard/dist/assets/index-8LIpvj2e.js.map +1 -0
- package/dashboard/dist/assets/index-BICLHYJJ.js +2 -0
- package/dashboard/dist/assets/{index-BLLK2mzy.js.map → index-BICLHYJJ.js.map} +1 -1
- package/dashboard/dist/assets/{index-BLCFN3YR.js → index-BQPUlmmz.js} +2 -2
- package/dashboard/dist/assets/{index-BLCFN3YR.js.map → index-BQPUlmmz.js.map} +1 -1
- package/dashboard/dist/assets/index-BaC3sbJH.js +67 -0
- package/dashboard/dist/assets/index-BaC3sbJH.js.map +1 -0
- package/dashboard/dist/assets/index-BuqpU6ow.js +2 -0
- package/dashboard/dist/assets/{index-DEr9QjVv.js.map → index-BuqpU6ow.js.map} +1 -1
- package/dashboard/dist/assets/index-CD6jtND1.css +1 -0
- package/dashboard/dist/assets/{index-Ba3UsZzz.js → index-CsIw-ZLk.js} +4 -4
- package/dashboard/dist/assets/{index-Ba3UsZzz.js.map → index-CsIw-ZLk.js.map} +1 -1
- package/dashboard/dist/assets/index-CtJkvX9e.js +5 -0
- package/dashboard/dist/assets/{index-Ct_8Tpec.js.map → index-CtJkvX9e.js.map} +1 -1
- package/dashboard/dist/assets/index-D9NtDRtp.js +2 -0
- package/dashboard/dist/assets/{index-BoQirCxt.js.map → index-D9NtDRtp.js.map} +1 -1
- package/dashboard/dist/assets/{index-CeHOGQM4.js → index-DU9-flEo.js} +2 -2
- package/dashboard/dist/assets/{index-CeHOGQM4.js.map → index-DU9-flEo.js.map} +1 -1
- package/dashboard/dist/assets/{index-P1g8r09L.js → index-G3NmdMjt.js} +2 -2
- package/dashboard/dist/assets/{index-P1g8r09L.js.map → index-G3NmdMjt.js.map} +1 -1
- package/dashboard/dist/assets/index-IWufkcH9.js +2 -0
- package/dashboard/dist/assets/{index-DlzW75L4.js.map → index-IWufkcH9.js.map} +1 -1
- package/dashboard/dist/assets/index-iegzyfMv.js +2 -0
- package/dashboard/dist/assets/{index-B-Qpr29t.js.map → index-iegzyfMv.js.map} +1 -1
- package/dashboard/dist/assets/index-xNFTmmsv.js +2 -0
- package/dashboard/dist/assets/{index-CG8oLNHo.js.map → index-xNFTmmsv.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-DzueDGkw.js → knowledge-CjwCbm3E.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DzueDGkw.js.map → knowledge-CjwCbm3E.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CCOzN8dH.js → mcp-C-DMktCT.js} +2 -2
- package/dashboard/dist/assets/{mcp-CCOzN8dH.js.map → mcp-C-DMktCT.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-UeMDiM6I.js → mcp-query-KBeBNHb4.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-UeMDiM6I.js.map → mcp-query-KBeBNHb4.js.map} +1 -1
- package/dashboard/dist/assets/{personas-CKcrzaQX.js → personas-B32sSCxm.js} +2 -2
- package/dashboard/dist/assets/{personas-CKcrzaQX.js.map → personas-B32sSCxm.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-orE-1gpj.js → pipelines-DNLwDumm.js} +2 -2
- package/dashboard/dist/assets/{pipelines-orE-1gpj.js.map → pipelines-DNLwDumm.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-ZOmzxynB.js → tasks-DrWSrjmj.js} +2 -2
- package/dashboard/dist/assets/{tasks-ZOmzxynB.js.map → tasks-DrWSrjmj.js.map} +1 -1
- package/dashboard/dist/assets/{topics-CdYaOCi_.js → topics-DgzGU-vR.js} +2 -2
- package/dashboard/dist/assets/{topics-CdYaOCi_.js.map → topics-DgzGU-vR.js.map} +1 -1
- package/dashboard/dist/assets/{useDebouncedValue-D-uGnSj5.js → useDebouncedValue-DG5JOj1F.js} +2 -2
- package/dashboard/dist/assets/{useDebouncedValue-D-uGnSj5.js.map → useDebouncedValue-DG5JOj1F.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-DMrjlrJJ.js → useNamespace-CdgF7Jxo.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-DMrjlrJJ.js.map → useNamespace-CdgF7Jxo.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-ByyQgu8S.js → useYamlActivityEvents-BEaOtgSZ.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-ByyQgu8S.js.map → useYamlActivityEvents-BEaOtgSZ.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-h-jlRSb9.js → vendor-icons-BCWsItQ7.js} +138 -133
- package/dashboard/dist/assets/{vendor-icons-h-jlRSb9.js.map → vendor-icons-BCWsItQ7.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-CLn05FRV.js → workflows-CX_oarls.js} +2 -2
- package/dashboard/dist/assets/{workflows-CLn05FRV.js.map → workflows-CX_oarls.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DFD_HO__.js → yaml-workflows-YASUDPo0.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DFD_HO__.js.map → yaml-workflows-YASUDPo0.js.map} +1 -1
- package/dashboard/dist/index.html +3 -3
- package/docs/dashboard.md +164 -69
- package/docs/faceted-routing.md +38 -0
- package/docs/hitl/x-lt-list-schema.md +3 -0
- package/docs/operations.md +61 -60
- package/docs/scan-codes.md +18 -0
- package/package.json +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-CjcAIm-d.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-CjcAIm-d.js.map +0 -1
- package/dashboard/dist/assets/BulkAssignModal-DNmji4l-.js +0 -2
- package/dashboard/dist/assets/BulkAssignModal-DNmji4l-.js.map +0 -1
- package/dashboard/dist/assets/CapabilitiesPage-Cewd6Uku.js +0 -2
- package/dashboard/dist/assets/CountdownTimer-BKMmFie6.js +0 -2
- package/dashboard/dist/assets/CountdownTimer-BKMmFie6.js.map +0 -1
- package/dashboard/dist/assets/CredentialsPage-CwtkQUG3.js +0 -2
- package/dashboard/dist/assets/EntityTimelinePanel-DzMuV7ZX.js +0 -2
- package/dashboard/dist/assets/EntityTimelinePanel-DzMuV7ZX.js.map +0 -1
- package/dashboard/dist/assets/GraphInvokePage-LACIxaiH.js +0 -2
- package/dashboard/dist/assets/HomePage-DP9Q-x4a.js +0 -2
- package/dashboard/dist/assets/HomePage-DP9Q-x4a.js.map +0 -1
- package/dashboard/dist/assets/McpQueryPage-Ck75ikSd.js +0 -2
- package/dashboard/dist/assets/Modal-BU7No9NH.js +0 -2
- package/dashboard/dist/assets/Modal-BU7No9NH.js.map +0 -1
- package/dashboard/dist/assets/NamespacePill-DONj6eUU.js +0 -2
- package/dashboard/dist/assets/OperationsPage-MlMzl0Bf.js +0 -3
- package/dashboard/dist/assets/OperationsPage-MlMzl0Bf.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-DZOfHRE7.js +0 -2
- package/dashboard/dist/assets/PersonaDetailPage-eyHDupL0.js +0 -2
- package/dashboard/dist/assets/PersonasPage-CCtRkWiP.js +0 -2
- package/dashboard/dist/assets/PersonasPage-CCtRkWiP.js.map +0 -1
- package/dashboard/dist/assets/RoleDetailPage-BOccQCkx.js +0 -8
- package/dashboard/dist/assets/RoleDetailPage-BOccQCkx.js.map +0 -1
- package/dashboard/dist/assets/RolesPage-B3-9Ek0F.js +0 -2
- package/dashboard/dist/assets/ScanSchemeDetailPage-BnivPUJY.js +0 -2
- package/dashboard/dist/assets/ScanStationPage-DCSA7pcV.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CZvegH_w.js +0 -2
- package/dashboard/dist/assets/UserName-BovQxdSY.js +0 -2
- package/dashboard/dist/assets/UserName-BovQxdSY.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-CZ12_oQF.js +0 -2
- package/dashboard/dist/assets/escalation-columns-CZ12_oQF.js.map +0 -1
- package/dashboard/dist/assets/index-B-Qpr29t.js +0 -2
- package/dashboard/dist/assets/index-BLLK2mzy.js +0 -2
- package/dashboard/dist/assets/index-BoQirCxt.js +0 -2
- package/dashboard/dist/assets/index-C1oOLjdF.js +0 -3
- package/dashboard/dist/assets/index-C1oOLjdF.js.map +0 -1
- package/dashboard/dist/assets/index-CG8oLNHo.js +0 -2
- package/dashboard/dist/assets/index-CdavRyaX.js +0 -67
- package/dashboard/dist/assets/index-CdavRyaX.js.map +0 -1
- package/dashboard/dist/assets/index-Ct_8Tpec.js +0 -5
- package/dashboard/dist/assets/index-DEr9QjVv.js +0 -2
- package/dashboard/dist/assets/index-DlzW75L4.js +0 -2
- package/dashboard/dist/assets/index-fUqvRHOe.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createEscalation } from './create';
|
|
2
|
-
export { listEscalations, listAvailableEscalations, listDistinctTypes, listFacetKeys, getEscalationStats, getStationMetrics } from './list';
|
|
2
|
+
export { listEscalations, listAvailableEscalations, listDistinctTypes, listFacetKeys, listFacetValues, getEscalationStats, getStationMetrics } from './list';
|
|
3
3
|
export { getEscalation, getEscalationsByWorkflowId, escalateToRole } from './single';
|
|
4
4
|
export { getEscalationLookups } from './lookups';
|
|
5
5
|
export { claimEscalation, releaseEscalation } from './claim';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timelineByFacet = exports.aggregateByFacets = exports.claimByFacets = exports.claimGroups = exports.searchByFacets = exports.bulkCancel = exports.cancelSingleEscalation = exports.resolveByMetadata = exports.claimByMetadata = exports.findByMetadata = exports.resolveBatchItemByMetadata = exports.resolveBatchItemBySignalKey = exports.resolveBatchItem = exports.resolveAllOrNone = exports.resolveByIds = exports.resolveBySignalKey = exports.resolveEscalation = exports.bulkTriage = exports.bulkEscalate = exports.bulkUnassign = exports.bulkAssign = exports.bulkClaim = exports.updatePriority = exports.releaseExpiredClaims = exports.releaseEscalation = exports.claimEscalation = exports.getEscalationLookups = exports.escalateToRole = exports.getEscalationsByWorkflowId = exports.getEscalation = exports.getStationMetrics = exports.getEscalationStats = exports.listFacetKeys = exports.listDistinctTypes = exports.listAvailableEscalations = exports.listEscalations = exports.createEscalation = void 0;
|
|
3
|
+
exports.timelineByFacet = exports.aggregateByFacets = exports.claimByFacets = exports.claimGroups = exports.searchByFacets = exports.bulkCancel = exports.cancelSingleEscalation = exports.resolveByMetadata = exports.claimByMetadata = exports.findByMetadata = exports.resolveBatchItemByMetadata = exports.resolveBatchItemBySignalKey = exports.resolveBatchItem = exports.resolveAllOrNone = exports.resolveByIds = exports.resolveBySignalKey = exports.resolveEscalation = exports.bulkTriage = exports.bulkEscalate = exports.bulkUnassign = exports.bulkAssign = exports.bulkClaim = exports.updatePriority = exports.releaseExpiredClaims = exports.releaseEscalation = exports.claimEscalation = exports.getEscalationLookups = exports.escalateToRole = exports.getEscalationsByWorkflowId = exports.getEscalation = exports.getStationMetrics = exports.getEscalationStats = exports.listFacetValues = exports.listFacetKeys = exports.listDistinctTypes = exports.listAvailableEscalations = exports.listEscalations = exports.createEscalation = void 0;
|
|
4
4
|
var create_1 = require("./create");
|
|
5
5
|
Object.defineProperty(exports, "createEscalation", { enumerable: true, get: function () { return create_1.createEscalation; } });
|
|
6
6
|
var list_1 = require("./list");
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "listEscalations", { enumerable: true, get: funct
|
|
|
8
8
|
Object.defineProperty(exports, "listAvailableEscalations", { enumerable: true, get: function () { return list_1.listAvailableEscalations; } });
|
|
9
9
|
Object.defineProperty(exports, "listDistinctTypes", { enumerable: true, get: function () { return list_1.listDistinctTypes; } });
|
|
10
10
|
Object.defineProperty(exports, "listFacetKeys", { enumerable: true, get: function () { return list_1.listFacetKeys; } });
|
|
11
|
+
Object.defineProperty(exports, "listFacetValues", { enumerable: true, get: function () { return list_1.listFacetValues; } });
|
|
11
12
|
Object.defineProperty(exports, "getEscalationStats", { enumerable: true, get: function () { return list_1.getEscalationStats; } });
|
|
12
13
|
Object.defineProperty(exports, "getStationMetrics", { enumerable: true, get: function () { return list_1.getStationMetrics; } });
|
|
13
14
|
var single_1 = require("./single");
|
|
@@ -90,6 +90,16 @@ export declare function listAvailableEscalations(input: {
|
|
|
90
90
|
* @returns `{ status: 200, data: { keys: string[] } }`
|
|
91
91
|
*/
|
|
92
92
|
export declare function listFacetKeys(_input: unknown, auth: LTApiAuth): Promise<LTApiResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Distinct VALUES for one metadata facet key, role-scoped — powers the facet
|
|
95
|
+
* value picker (e.g. facility → north|south). A missing/malformed key returns
|
|
96
|
+
* an empty list, never an error.
|
|
97
|
+
*
|
|
98
|
+
* @returns `{ status: 200, data: { values: string[] } }`
|
|
99
|
+
*/
|
|
100
|
+
export declare function listFacetValues(input: {
|
|
101
|
+
key?: string;
|
|
102
|
+
}, auth: LTApiAuth): Promise<LTApiResult>;
|
|
93
103
|
/**
|
|
94
104
|
* List all distinct escalation type values.
|
|
95
105
|
*
|
|
@@ -108,4 +118,5 @@ export declare function getEscalationStats(input: {
|
|
|
108
118
|
}, auth: LTApiAuth): Promise<LTApiResult>;
|
|
109
119
|
export declare function getStationMetrics(input: {
|
|
110
120
|
period?: string;
|
|
121
|
+
facets?: Record<string, unknown>;
|
|
111
122
|
}, auth: LTApiAuth): Promise<LTApiResult>;
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.listEscalations = listEscalations;
|
|
37
37
|
exports.listAvailableEscalations = listAvailableEscalations;
|
|
38
38
|
exports.listFacetKeys = listFacetKeys;
|
|
39
|
+
exports.listFacetValues = listFacetValues;
|
|
39
40
|
exports.listDistinctTypes = listDistinctTypes;
|
|
40
41
|
exports.getEscalationStats = getEscalationStats;
|
|
41
42
|
exports.getStationMetrics = getStationMetrics;
|
|
@@ -239,6 +240,34 @@ async function listFacetKeys(_input, auth) {
|
|
|
239
240
|
return { status: 500, error: err.message };
|
|
240
241
|
}
|
|
241
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Distinct VALUES for one metadata facet key, role-scoped — powers the facet
|
|
245
|
+
* value picker (e.g. facility → north|south). A missing/malformed key returns
|
|
246
|
+
* an empty list, never an error.
|
|
247
|
+
*
|
|
248
|
+
* @returns `{ status: 200, data: { values: string[] } }`
|
|
249
|
+
*/
|
|
250
|
+
async function listFacetValues(input, auth) {
|
|
251
|
+
try {
|
|
252
|
+
const key = input?.key;
|
|
253
|
+
if (!key)
|
|
254
|
+
return { status: 200, data: { values: [] } };
|
|
255
|
+
const scope = await (0, helpers_1.getEscalationReadScope)(auth.userId);
|
|
256
|
+
if (!scope.global && scope.allRoles.length === 0 && scope.selfRoles.length === 0) {
|
|
257
|
+
return { status: 200, data: { values: [] } };
|
|
258
|
+
}
|
|
259
|
+
const values = await escalationService.listFacetValues(key, {
|
|
260
|
+
global: scope.global,
|
|
261
|
+
visibleRoles: scope.global ? undefined : scope.allRoles,
|
|
262
|
+
selfRoles: scope.global ? undefined : scope.selfRoles,
|
|
263
|
+
meUserId: auth.userId,
|
|
264
|
+
});
|
|
265
|
+
return { status: 200, data: { values } };
|
|
266
|
+
}
|
|
267
|
+
catch (err) {
|
|
268
|
+
return { status: 500, error: err.message };
|
|
269
|
+
}
|
|
270
|
+
}
|
|
242
271
|
/**
|
|
243
272
|
* List all distinct escalation type values.
|
|
244
273
|
*
|
|
@@ -297,7 +326,7 @@ async function getStationMetrics(input, auth) {
|
|
|
297
326
|
// elsewhere) — without the selfRoles union, a self-scoped operator would
|
|
298
327
|
// see an empty board on their own lanes.
|
|
299
328
|
if ((0, features_1.getFeatureFlags)().publicPaceBoard) {
|
|
300
|
-
const stations = await escalationService.getStationMetrics(undefined, input.period);
|
|
329
|
+
const stations = await escalationService.getStationMetrics(undefined, input.period, input.facets);
|
|
301
330
|
return { status: 200, data: { stations } };
|
|
302
331
|
}
|
|
303
332
|
const scope = await (0, helpers_1.getEscalationReadScope)(auth.userId);
|
|
@@ -305,7 +334,7 @@ async function getStationMetrics(input, auth) {
|
|
|
305
334
|
if (!scope.global && memberRoles.length === 0) {
|
|
306
335
|
return { status: 200, data: { stations: [] } };
|
|
307
336
|
}
|
|
308
|
-
const stations = await escalationService.getStationMetrics(scope.global ? undefined : memberRoles, input.period);
|
|
337
|
+
const stations = await escalationService.getStationMetrics(scope.global ? undefined : memberRoles, input.period, input.facets);
|
|
309
338
|
return { status: 200, data: { stations } };
|
|
310
339
|
}
|
|
311
340
|
catch (err) {
|
package/build/api/settings.js
CHANGED
|
@@ -8,6 +8,7 @@ const socketio_1 = require("../lib/events/socketio");
|
|
|
8
8
|
const nats_ws_proxy_1 = require("../lib/events/nats-ws-proxy");
|
|
9
9
|
const config_1 = require("../modules/config");
|
|
10
10
|
const features_1 = require("../modules/features");
|
|
11
|
+
const search_1 = require("../modules/search");
|
|
11
12
|
const branding_1 = require("../modules/branding");
|
|
12
13
|
const version_1 = require("../modules/version");
|
|
13
14
|
const sso_1 = require("../modules/sso");
|
|
@@ -76,6 +77,7 @@ async function getSettings(req) {
|
|
|
76
77
|
enabled: (0, llm_1.hasLLMApiKey)(),
|
|
77
78
|
},
|
|
78
79
|
features: (0, features_1.getFeatureFlags)(),
|
|
80
|
+
search: (0, search_1.getSearchConfig)(),
|
|
79
81
|
branding: (0, branding_1.getBranding)(),
|
|
80
82
|
environment: {
|
|
81
83
|
longTailVersion: version_1.LONG_TAIL_VERSION,
|
package/build/api/users.d.ts
CHANGED
|
@@ -19,6 +19,17 @@ export declare function listUsers(input: {
|
|
|
19
19
|
limit?: number;
|
|
20
20
|
offset?: number;
|
|
21
21
|
}): Promise<LTApiResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve many user ids to display fields (id, display_name, external_id, email)
|
|
24
|
+
* in one call. Thin projection only — no secrets, scopes, or metadata. Non-UUID
|
|
25
|
+
* ids are dropped, ids deduped, and the batch capped by the service.
|
|
26
|
+
*
|
|
27
|
+
* @param input.ids — the user ids to resolve
|
|
28
|
+
* @returns `{ status: 200, data: { users: [{ id, display_name, external_id, email }] } }`
|
|
29
|
+
*/
|
|
30
|
+
export declare function getUserNames(input: {
|
|
31
|
+
ids?: string[];
|
|
32
|
+
}): Promise<LTApiResult>;
|
|
22
33
|
/**
|
|
23
34
|
* Retrieve a single user by ID.
|
|
24
35
|
*
|
package/build/api/users.js
CHANGED
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.listUsers = listUsers;
|
|
37
|
+
exports.getUserNames = getUserNames;
|
|
37
38
|
exports.getUser = getUser;
|
|
38
39
|
exports.createUser = createUser;
|
|
39
40
|
exports.updateUser = updateUser;
|
|
@@ -64,6 +65,24 @@ async function listUsers(input) {
|
|
|
64
65
|
return { status: 500, error: err.message };
|
|
65
66
|
}
|
|
66
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Resolve many user ids to display fields (id, display_name, external_id, email)
|
|
70
|
+
* in one call. Thin projection only — no secrets, scopes, or metadata. Non-UUID
|
|
71
|
+
* ids are dropped, ids deduped, and the batch capped by the service.
|
|
72
|
+
*
|
|
73
|
+
* @param input.ids — the user ids to resolve
|
|
74
|
+
* @returns `{ status: 200, data: { users: [{ id, display_name, external_id, email }] } }`
|
|
75
|
+
*/
|
|
76
|
+
async function getUserNames(input) {
|
|
77
|
+
try {
|
|
78
|
+
const ids = Array.isArray(input.ids) ? input.ids : [];
|
|
79
|
+
const users = await userService.getUserNames(ids);
|
|
80
|
+
return { status: 200, data: { users } };
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
return { status: 500, error: err.message };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
67
86
|
/**
|
|
68
87
|
* Retrieve a single user by ID.
|
|
69
88
|
*
|
package/build/index.js
CHANGED
|
@@ -172,6 +172,12 @@ async function main() {
|
|
|
172
172
|
// The examples ship the full scan demo (schemes 10/11); surface it.
|
|
173
173
|
scanCodes: true,
|
|
174
174
|
},
|
|
175
|
+
search: {
|
|
176
|
+
// The examples surface the global search bar with the seed data's
|
|
177
|
+
// primary facet; escalationId/workflowId are always present.
|
|
178
|
+
enabled: true,
|
|
179
|
+
facets: ['orderId'],
|
|
180
|
+
},
|
|
175
181
|
mcp: {
|
|
176
182
|
server: { enabled: true },
|
|
177
183
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UUID shape guard for open input reaching uuid-typed columns. Postgres
|
|
3
|
+
* throws `invalid input syntax for type uuid` on a bad cast, so every
|
|
4
|
+
* caller-supplied id must pass this gate BEFORE it reaches SQL — a
|
|
5
|
+
* non-UUID string is definitionally not-found, never a 500.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UUID_RE: RegExp;
|
|
8
|
+
export declare function isUuid(value: unknown): value is string;
|
|
9
|
+
/** The UUID members of a caller-supplied id list; non-UUIDs are dropped —
|
|
10
|
+
* they can match nothing, exactly like a well-formed id that does not exist. */
|
|
11
|
+
export declare function onlyUuids(ids: string[]): string[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UUID shape guard for open input reaching uuid-typed columns. Postgres
|
|
4
|
+
* throws `invalid input syntax for type uuid` on a bad cast, so every
|
|
5
|
+
* caller-supplied id must pass this gate BEFORE it reaches SQL — a
|
|
6
|
+
* non-UUID string is definitionally not-found, never a 500.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.UUID_RE = void 0;
|
|
10
|
+
exports.isUuid = isUuid;
|
|
11
|
+
exports.onlyUuids = onlyUuids;
|
|
12
|
+
exports.UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
13
|
+
function isUuid(value) {
|
|
14
|
+
return typeof value === 'string' && exports.UUID_RE.test(value);
|
|
15
|
+
}
|
|
16
|
+
/** The UUID members of a caller-supplied id list; non-UUIDs are dropped —
|
|
17
|
+
* they can match nothing, exactly like a well-formed id that does not exist. */
|
|
18
|
+
function onlyUuids(ids) {
|
|
19
|
+
return ids.filter((id) => isUuid(id));
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global search bar configuration surfaced to the dashboard via /api/settings.
|
|
3
|
+
*
|
|
4
|
+
* Opt-in (default off). `facets` lists the metadata facet names the search
|
|
5
|
+
* picklist offers; the dashboard prepends `escalationId` and `workflowId`
|
|
6
|
+
* unconditionally (long-tail-owned lookups), so `facets` is only the
|
|
7
|
+
* deployment's domain vocabulary. Configure through the `search` block of the
|
|
8
|
+
* `start()` config, or by env (`LT_SEARCH_BAR`, `LT_SEARCH_FACETS` csv) —
|
|
9
|
+
* env wins when set, so a deployment can flip the bar without a code change.
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchConfig {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
facets: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Apply the start-config block, then the env overrides. Called once at boot;
|
|
17
|
+
* callable again in tests.
|
|
18
|
+
*/
|
|
19
|
+
export declare function configureSearch(patch?: Partial<SearchConfig>): void;
|
|
20
|
+
/** The resolved search configuration reported to the dashboard. */
|
|
21
|
+
export declare function getSearchConfig(): SearchConfig;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global search bar configuration surfaced to the dashboard via /api/settings.
|
|
4
|
+
*
|
|
5
|
+
* Opt-in (default off). `facets` lists the metadata facet names the search
|
|
6
|
+
* picklist offers; the dashboard prepends `escalationId` and `workflowId`
|
|
7
|
+
* unconditionally (long-tail-owned lookups), so `facets` is only the
|
|
8
|
+
* deployment's domain vocabulary. Configure through the `search` block of the
|
|
9
|
+
* `start()` config, or by env (`LT_SEARCH_BAR`, `LT_SEARCH_FACETS` csv) —
|
|
10
|
+
* env wins when set, so a deployment can flip the bar without a code change.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.configureSearch = configureSearch;
|
|
14
|
+
exports.getSearchConfig = getSearchConfig;
|
|
15
|
+
// Mirrors the facet-key rule enforced by the faceted-query surface.
|
|
16
|
+
const FACET_KEY = /^[a-zA-Z0-9_]+$/;
|
|
17
|
+
const DEFAULTS = { enabled: false, facets: [] };
|
|
18
|
+
let search = { ...DEFAULTS };
|
|
19
|
+
function sanitizeFacets(names) {
|
|
20
|
+
if (!Array.isArray(names))
|
|
21
|
+
return [];
|
|
22
|
+
const out = [];
|
|
23
|
+
for (const n of names) {
|
|
24
|
+
if (typeof n !== 'string')
|
|
25
|
+
continue;
|
|
26
|
+
const trimmed = n.trim();
|
|
27
|
+
if (!FACET_KEY.test(trimmed)) {
|
|
28
|
+
console.warn(`[lt-search] dropping invalid search facet name: '${trimmed}'`);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (!out.includes(trimmed))
|
|
32
|
+
out.push(trimmed);
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Apply the start-config block, then the env overrides. Called once at boot;
|
|
38
|
+
* callable again in tests.
|
|
39
|
+
*/
|
|
40
|
+
function configureSearch(patch) {
|
|
41
|
+
search = {
|
|
42
|
+
enabled: patch?.enabled ?? DEFAULTS.enabled,
|
|
43
|
+
facets: sanitizeFacets(patch?.facets ?? DEFAULTS.facets),
|
|
44
|
+
};
|
|
45
|
+
const envEnabled = process.env.LT_SEARCH_BAR;
|
|
46
|
+
if (envEnabled !== undefined)
|
|
47
|
+
search.enabled = envEnabled === 'true';
|
|
48
|
+
const envFacets = process.env.LT_SEARCH_FACETS;
|
|
49
|
+
if (envFacets !== undefined)
|
|
50
|
+
search.facets = sanitizeFacets(envFacets.split(','));
|
|
51
|
+
}
|
|
52
|
+
/** The resolved search configuration reported to the dashboard. */
|
|
53
|
+
function getSearchConfig() {
|
|
54
|
+
return { enabled: search.enabled, facets: [...search.facets] };
|
|
55
|
+
}
|
|
@@ -158,6 +158,15 @@ function registerListRoutes(router) {
|
|
|
158
158
|
const result = await api.listFacetKeys(undefined, req.auth);
|
|
159
159
|
res.status(result.status).json(result.data ?? { error: result.error });
|
|
160
160
|
});
|
|
161
|
+
/**
|
|
162
|
+
* GET /api/escalations/facet-values?key=<facet>
|
|
163
|
+
* Distinct VALUES for one metadata facet key, visible to the caller
|
|
164
|
+
* (role-scoped). Powers the facet value picker (e.g. facility → north|south).
|
|
165
|
+
*/
|
|
166
|
+
router.get('/facet-values', async (req, res) => {
|
|
167
|
+
const result = await api.listFacetValues({ key: req.query.key }, req.auth);
|
|
168
|
+
res.status(result.status).json(result.data ?? { error: result.error });
|
|
169
|
+
});
|
|
161
170
|
/**
|
|
162
171
|
* GET /api/escalations/station-metrics
|
|
163
172
|
* Per-role P99/P50/avg/max wait + work times, resolved count, and in-arrears
|
|
@@ -165,7 +174,7 @@ function registerListRoutes(router) {
|
|
|
165
174
|
* RBAC: superadmin sees all; others scoped to their roles.
|
|
166
175
|
*/
|
|
167
176
|
router.get('/station-metrics', async (req, res) => {
|
|
168
|
-
const result = await api.getStationMetrics({ period: req.query.period || undefined }, req.auth);
|
|
177
|
+
const result = await api.getStationMetrics({ period: req.query.period || undefined, facets: jsonParam(req.query.facets) }, req.auth);
|
|
169
178
|
res.status(result.status).json(result.data ?? { error: result.error });
|
|
170
179
|
});
|
|
171
180
|
/**
|
package/build/routes/users.js
CHANGED
|
@@ -55,6 +55,15 @@ router.get('/', async (req, res) => {
|
|
|
55
55
|
});
|
|
56
56
|
res.status(result.status).json(result.data ?? { error: result.error });
|
|
57
57
|
});
|
|
58
|
+
/**
|
|
59
|
+
* POST /api/users/names
|
|
60
|
+
* Batch-resolve user ids to display fields. Body: { ids: string[] }.
|
|
61
|
+
* Any authenticated user — display names carry no secrets.
|
|
62
|
+
*/
|
|
63
|
+
router.post('/names', async (req, res) => {
|
|
64
|
+
const result = await api.getUserNames({ ids: req.body?.ids });
|
|
65
|
+
res.status(result.status).json(result.data ?? { error: result.error });
|
|
66
|
+
});
|
|
58
67
|
/**
|
|
59
68
|
* GET /api/users/system-property-keys
|
|
60
69
|
* The property keys the platform resolves identities against (enabled
|
|
@@ -100,7 +100,7 @@ declare function holdFor(esc: {
|
|
|
100
100
|
declare function api(method: string, path: string, body?: unknown): Promise<any>;
|
|
101
101
|
declare function login(): Promise<void>;
|
|
102
102
|
declare function ensureSideQuestRoles(): Promise<void>;
|
|
103
|
-
declare function createSideEscalation(role: string, workflowId: string, orderId: string, runId: string, description: string, authorizedAt: string): Promise<boolean>;
|
|
103
|
+
declare function createSideEscalation(role: string, workflowId: string, orderId: string, runId: string, description: string, authorizedAt: string, facility?: string): Promise<boolean>;
|
|
104
104
|
declare function claimBatch(batchTag: string): Promise<number>;
|
|
105
105
|
declare function resolveBatch(batchTag: string, runId: string): Promise<number>;
|
|
106
106
|
interface PlannedOrder {
|
|
@@ -108,7 +108,9 @@ interface PlannedOrder {
|
|
|
108
108
|
wfId: string;
|
|
109
109
|
orderId: string;
|
|
110
110
|
shoes: boolean;
|
|
111
|
+
facility: string;
|
|
111
112
|
}
|
|
113
|
+
declare const FACILITIES: readonly ["north", "south"];
|
|
112
114
|
declare function runOrders(batchTag: string, runId: string, plan: PlannedOrder[], target: {
|
|
113
115
|
value: number;
|
|
114
116
|
}): Promise<string[]>;
|
|
@@ -178,7 +178,7 @@ async function ensureSideQuestRoles() {
|
|
|
178
178
|
console.log(`[${ts()}] Entity declared on ${declared} role(s): order_id`);
|
|
179
179
|
}
|
|
180
180
|
// ── Side-quest escalations (standalone rows — no workflow behind them) ────────
|
|
181
|
-
async function createSideEscalation(role, workflowId, orderId, runId, description, authorizedAt) {
|
|
181
|
+
async function createSideEscalation(role, workflowId, orderId, runId, description, authorizedAt, facility) {
|
|
182
182
|
try {
|
|
183
183
|
await api('POST', '/api/escalations', {
|
|
184
184
|
type: 'ortho-stage',
|
|
@@ -186,8 +186,8 @@ async function createSideEscalation(role, workflowId, orderId, runId, descriptio
|
|
|
186
186
|
role,
|
|
187
187
|
description,
|
|
188
188
|
workflow_id: workflowId,
|
|
189
|
-
envelope: JSON.stringify({ order_id: orderId }),
|
|
190
|
-
metadata: { order_id: orderId, source: 'populate', run_id: runId, authorized_at: authorizedAt },
|
|
189
|
+
envelope: JSON.stringify({ order_id: orderId, ...(facility ? { facility } : {}) }),
|
|
190
|
+
metadata: { order_id: orderId, source: 'populate', run_id: runId, authorized_at: authorizedAt, ...(facility ? { facility } : {}) },
|
|
191
191
|
});
|
|
192
192
|
return true;
|
|
193
193
|
}
|
|
@@ -261,7 +261,7 @@ async function resolveBatch(batchTag, runId) {
|
|
|
261
261
|
// order's authorized_at rides along from the ordering escalation.
|
|
262
262
|
if (esc.role === 'ordering') {
|
|
263
263
|
const orderId = esc.metadata?.order_id ?? '';
|
|
264
|
-
await createSideEscalation('inserting', esc.workflow_id, orderId, runId, `Stuff inserts into shoes for ${orderId}`, esc.metadata?.authorized_at ?? new Date().toISOString());
|
|
264
|
+
await createSideEscalation('inserting', esc.workflow_id, orderId, runId, `Stuff inserts into shoes for ${orderId}`, esc.metadata?.authorized_at ?? new Date().toISOString(), esc.metadata?.facility);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
catch (err) {
|
|
@@ -275,6 +275,10 @@ async function resolveBatch(batchTag, runId) {
|
|
|
275
275
|
return 0;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
+
// Two manufacturing sites — each order is assigned one at arrival and every
|
|
279
|
+
// escalation it spawns carries it, so the Pace Board's facet scope
|
|
280
|
+
// (facility = north|south) has real data to narrow.
|
|
281
|
+
const FACILITIES = ['north', 'south'];
|
|
278
282
|
async function runOrders(batchTag, runId, plan, target) {
|
|
279
283
|
let done = false;
|
|
280
284
|
const workflowIds = [];
|
|
@@ -295,6 +299,9 @@ async function runOrders(batchTag, runId, plan, target) {
|
|
|
295
299
|
data: {
|
|
296
300
|
order_id: order.orderId,
|
|
297
301
|
item_type: 'insole-standard',
|
|
302
|
+
// Stamped on the envelope; the workflow applies it to every stage
|
|
303
|
+
// escalation's metadata as the facility facet.
|
|
304
|
+
facility: order.facility,
|
|
298
305
|
metadata: { source: 'populate', run_id: runId, authorized_at: authorizedAt },
|
|
299
306
|
},
|
|
300
307
|
metadata: { source: 'populate', run_id: runId, shoes: order.shoes },
|
|
@@ -308,7 +315,7 @@ async function runOrders(batchTag, runId, plan, target) {
|
|
|
308
315
|
continue;
|
|
309
316
|
}
|
|
310
317
|
if (order.shoes) {
|
|
311
|
-
const ok = await createSideEscalation('ordering', `${order.wfId}-shoes`, order.orderId, runId, `Order shoes for ${order.orderId}`, authorizedAt);
|
|
318
|
+
const ok = await createSideEscalation('ordering', `${order.wfId}-shoes`, order.orderId, runId, `Order shoes for ${order.orderId}`, authorizedAt, order.facility);
|
|
312
319
|
if (!ok)
|
|
313
320
|
target.value -= 2;
|
|
314
321
|
}
|
|
@@ -372,6 +379,9 @@ async function main() {
|
|
|
372
379
|
wfId: `${batchTag}-${i}`,
|
|
373
380
|
orderId: `ORD-${runId}-${i}`,
|
|
374
381
|
shoes: hasShoes(i),
|
|
382
|
+
// Pseudo-random per order (hashed on the workflow id): reproducible across
|
|
383
|
+
// re-runs, roughly balanced across both sites.
|
|
384
|
+
facility: FACILITIES[Math.floor(jitter(`${batchTag}-${i}`, 'facility') * FACILITIES.length)],
|
|
375
385
|
}));
|
|
376
386
|
const shoeCount = plan.filter((o) => o.shoes).length;
|
|
377
387
|
// Each order resolves 8 manufacturing stages; a shoe order adds
|
package/build/sdk/index.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ export declare function createClient(options?: LTClientOptions): {
|
|
|
123
123
|
}, auth?: LTApiAuth) => Promise<LTApiResult<any>>;
|
|
124
124
|
getStationMetrics: (input: {
|
|
125
125
|
period?: string;
|
|
126
|
+
facets?: Record<string, unknown>;
|
|
126
127
|
}, auth?: LTApiAuth) => Promise<LTApiResult<any>>;
|
|
127
128
|
get: (input: {
|
|
128
129
|
id: string;
|
|
@@ -4,6 +4,7 @@ exports.resolveBatchItem = resolveBatchItem;
|
|
|
4
4
|
exports.resolveBatchItemBySignalKey = resolveBatchItemBySignalKey;
|
|
5
5
|
exports.resolveBatchItemByMetadata = resolveBatchItemByMetadata;
|
|
6
6
|
const escalation_wire_1 = require("../../lib/events/escalation-wire");
|
|
7
|
+
const uuid_1 = require("../../lib/uuid");
|
|
7
8
|
const client_1 = require("./client");
|
|
8
9
|
const crud_1 = require("./crud");
|
|
9
10
|
const map_1 = require("./map");
|
|
@@ -15,6 +16,8 @@ const map_1 = require("./map");
|
|
|
15
16
|
* outcomes publish nothing — the row was untouched.
|
|
16
17
|
*/
|
|
17
18
|
async function resolveBatchItem(id, itemKey, payload, metadata, assertClaim, resolvedBy) {
|
|
19
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
20
|
+
return { outcome: 'not-found', remaining: -1, escalation: null };
|
|
18
21
|
const client = await (0, client_1.escalations)();
|
|
19
22
|
const result = await client.resolveBatchItem({
|
|
20
23
|
id,
|
|
@@ -8,6 +8,7 @@ exports.bulkUnassignEscalations = bulkUnassignEscalations;
|
|
|
8
8
|
exports.bulkEscalateToRole = bulkEscalateToRole;
|
|
9
9
|
exports.bulkCancelEscalations = bulkCancelEscalations;
|
|
10
10
|
exports.bulkResolveForTriage = bulkResolveForTriage;
|
|
11
|
+
const uuid_1 = require("../../lib/uuid");
|
|
11
12
|
const db_1 = require("../../lib/db");
|
|
12
13
|
const client_1 = require("./client");
|
|
13
14
|
const map_1 = require("./map");
|
|
@@ -17,6 +18,7 @@ const sql_1 = require("./sql");
|
|
|
17
18
|
* Items already claimed by another active user are skipped.
|
|
18
19
|
*/
|
|
19
20
|
async function bulkClaimEscalations(ids, userId, durationMinutes = 30) {
|
|
21
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
20
22
|
if (ids.length === 0)
|
|
21
23
|
return { claimed: 0, skipped: 0 };
|
|
22
24
|
const client = await (0, client_1.escalations)();
|
|
@@ -27,6 +29,7 @@ async function bulkClaimEscalations(ids, userId, durationMinutes = 30) {
|
|
|
27
29
|
* Items already claimed by another active user are skipped.
|
|
28
30
|
*/
|
|
29
31
|
async function bulkAssignEscalations(ids, targetUserId, durationMinutes = 30) {
|
|
32
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
30
33
|
if (ids.length === 0)
|
|
31
34
|
return { assigned: 0, skipped: 0 };
|
|
32
35
|
const client = await (0, client_1.escalations)();
|
|
@@ -60,6 +63,7 @@ async function bulkAssignEscalationsByQuery(query, targetUserId, durationMinutes
|
|
|
60
63
|
* returned row carries its pre-update assignee for the event.
|
|
61
64
|
*/
|
|
62
65
|
async function bulkReassignEscalations(ids, targetUserId, durationMinutes = 30) {
|
|
66
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
63
67
|
if (ids.length === 0)
|
|
64
68
|
return { assigned: 0, skipped: 0, changes: [] };
|
|
65
69
|
await (0, client_1.ensureEscalationCompatView)();
|
|
@@ -77,6 +81,7 @@ async function bulkReassignEscalations(ids, targetUserId, durationMinutes = 30)
|
|
|
77
81
|
* statement; unclaimed and terminal rows are skipped.
|
|
78
82
|
*/
|
|
79
83
|
async function bulkUnassignEscalations(ids) {
|
|
84
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
80
85
|
if (ids.length === 0)
|
|
81
86
|
return { unassigned: 0, skipped: 0, changes: [] };
|
|
82
87
|
await (0, client_1.ensureEscalationCompatView)();
|
|
@@ -93,6 +98,7 @@ async function bulkUnassignEscalations(ids) {
|
|
|
93
98
|
* Clears assignment on all affected rows.
|
|
94
99
|
*/
|
|
95
100
|
async function bulkEscalateToRole(ids, targetRole) {
|
|
101
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
96
102
|
if (ids.length === 0)
|
|
97
103
|
return 0;
|
|
98
104
|
const client = await (0, client_1.escalations)();
|
|
@@ -104,6 +110,7 @@ async function bulkEscalateToRole(ids, targetRole) {
|
|
|
104
110
|
* successfully cancelled.
|
|
105
111
|
*/
|
|
106
112
|
async function bulkCancelEscalations(ids) {
|
|
113
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
107
114
|
if (ids.length === 0)
|
|
108
115
|
return { cancelled: 0, skipped: 0 };
|
|
109
116
|
const client = await (0, client_1.escalations)();
|
|
@@ -126,6 +133,7 @@ async function bulkCancelEscalations(ids) {
|
|
|
126
133
|
* `pending`; only the returned rows enter triage.
|
|
127
134
|
*/
|
|
128
135
|
async function bulkResolveForTriage(ids, hint) {
|
|
136
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
129
137
|
if (ids.length === 0)
|
|
130
138
|
return [];
|
|
131
139
|
const client = await (0, client_1.escalations)();
|
|
@@ -29,6 +29,7 @@ const db_1 = require("../../lib/db");
|
|
|
29
29
|
const publish_1 = require("../../lib/events/publish");
|
|
30
30
|
const escalation_wire_1 = require("../../lib/events/escalation-wire");
|
|
31
31
|
const escalation_1 = require("../../types/escalation");
|
|
32
|
+
const uuid_1 = require("../../lib/uuid");
|
|
32
33
|
const client_1 = require("./client");
|
|
33
34
|
const queries_1 = require("./queries");
|
|
34
35
|
const map_1 = require("./map");
|
|
@@ -95,6 +96,8 @@ async function createEscalation(input) {
|
|
|
95
96
|
* user re-claims (extends expiry). Returns null when the row is not claimable.
|
|
96
97
|
*/
|
|
97
98
|
async function claimEscalation(id, userId, durationMinutes = 30) {
|
|
99
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
100
|
+
return null;
|
|
98
101
|
const client = await (0, client_1.escalations)();
|
|
99
102
|
const result = await client.claim({ id, assignee: userId, durationMinutes });
|
|
100
103
|
if (!result.ok)
|
|
@@ -132,6 +135,8 @@ async function claimEscalation(id, userId, durationMinutes = 30) {
|
|
|
132
135
|
* the stored `resolver_payload`.
|
|
133
136
|
*/
|
|
134
137
|
async function resolveEscalation(id, resolverPayload, metadata, assertClaim, resolvedBy) {
|
|
138
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
139
|
+
return null;
|
|
135
140
|
const client = await (0, client_1.escalations)();
|
|
136
141
|
// `assertClaim` rides the SDK's guarded UPDATE: no active claim lock may
|
|
137
142
|
// stand against this assignee, or the resolve blocks (claim-expired /
|
|
@@ -169,6 +174,7 @@ async function resolveEscalation(id, resolverPayload, metadata, assertClaim, res
|
|
|
169
174
|
* `resolveEscalation` (which delivers the signal).
|
|
170
175
|
*/
|
|
171
176
|
async function resolveEscalationsByIds(ids, resolverPayload, metadata) {
|
|
177
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
172
178
|
if (ids.length === 0)
|
|
173
179
|
return [];
|
|
174
180
|
const client = await (0, client_1.escalations)();
|
|
@@ -209,6 +215,12 @@ async function resolveEscalationsByIds(ids, resolverPayload, metadata) {
|
|
|
209
215
|
async function resolveEscalationsAllOrNone(items, metadata, assertAssignee, resolvedBy) {
|
|
210
216
|
if (items.length === 0)
|
|
211
217
|
return { ok: true, escalations: [] };
|
|
218
|
+
// A malformed id blocks the batch exactly like a well-formed missing one —
|
|
219
|
+
// and never reaches the uuid cast.
|
|
220
|
+
const malformed = items.filter((i) => !(0, uuid_1.isUuid)(i.id));
|
|
221
|
+
if (malformed.length > 0) {
|
|
222
|
+
return { ok: false, failed: malformed.map((i) => ({ id: i.id, reason: 'not-found' })) };
|
|
223
|
+
}
|
|
212
224
|
const client = await (0, client_1.escalations)();
|
|
213
225
|
const result = await client.resolveAllOrNone({ items, metadata, assertAssignee, resolvedBy });
|
|
214
226
|
if (!result.ok)
|
|
@@ -235,6 +247,7 @@ async function resolveEscalationsAllOrNone(items, metadata, assertAssignee, reso
|
|
|
235
247
|
* fields — signal routing shape, `metadata.form_schema` for redaction.
|
|
236
248
|
*/
|
|
237
249
|
async function getEscalationsByIds(ids) {
|
|
250
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
238
251
|
if (ids.length === 0)
|
|
239
252
|
return [];
|
|
240
253
|
const client = await (0, client_1.escalations)();
|
|
@@ -278,6 +291,8 @@ async function resolveEscalationBySignalKey(signalKey, resolverPayload, metadata
|
|
|
278
291
|
* already terminal.
|
|
279
292
|
*/
|
|
280
293
|
async function cancelEscalation(id) {
|
|
294
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
295
|
+
return null;
|
|
281
296
|
const client = await (0, client_1.escalations)();
|
|
282
297
|
const result = await client.cancel(id);
|
|
283
298
|
if (!result.ok)
|
|
@@ -301,6 +316,7 @@ async function cancelEscalation(id) {
|
|
|
301
316
|
* updated.
|
|
302
317
|
*/
|
|
303
318
|
async function updateEscalationsPriority(ids, priority) {
|
|
319
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
304
320
|
if (ids.length === 0)
|
|
305
321
|
return 0;
|
|
306
322
|
const client = await (0, client_1.escalations)();
|
|
@@ -311,6 +327,7 @@ async function updateEscalationsPriority(ids, priority) {
|
|
|
311
327
|
* Used for permission validation before bulk operations.
|
|
312
328
|
*/
|
|
313
329
|
async function getEscalationRoles(ids) {
|
|
330
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
314
331
|
if (ids.length === 0)
|
|
315
332
|
return [];
|
|
316
333
|
const client = await (0, client_1.escalations)();
|
|
@@ -323,6 +340,7 @@ async function getEscalationRoles(ids) {
|
|
|
323
340
|
* write_self by ownership (assigned_to = caller). One query, no N+1.
|
|
324
341
|
*/
|
|
325
342
|
async function getEscalationScopeRows(ids) {
|
|
343
|
+
ids = (0, uuid_1.onlyUuids)(ids);
|
|
326
344
|
if (ids.length === 0)
|
|
327
345
|
return [];
|
|
328
346
|
const client = await (0, client_1.escalations)();
|
|
@@ -344,6 +362,8 @@ async function getEscalationScopeRows(ids) {
|
|
|
344
362
|
* stays loud.
|
|
345
363
|
*/
|
|
346
364
|
async function releaseEscalation(id, userId, opts) {
|
|
365
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
366
|
+
return null;
|
|
347
367
|
const client = await (0, client_1.escalations)();
|
|
348
368
|
const result = await client.release({ id, assignee: userId });
|
|
349
369
|
if (!result.ok)
|
|
@@ -381,6 +401,8 @@ async function releaseExpiredClaims() {
|
|
|
381
401
|
* Clears the current assignment so it becomes available to the new role.
|
|
382
402
|
*/
|
|
383
403
|
async function escalateToRole(id, targetRole) {
|
|
404
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
405
|
+
return null;
|
|
384
406
|
const client = await (0, client_1.escalations)();
|
|
385
407
|
// The departing role is read before the move: the returned entry already
|
|
386
408
|
// carries the target role, and role-scoped subscribers of the OLD queue
|
|
@@ -414,6 +436,8 @@ async function escalateToRole(id, targetRole) {
|
|
|
414
436
|
return escalation;
|
|
415
437
|
}
|
|
416
438
|
async function getEscalation(id) {
|
|
439
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
440
|
+
return null;
|
|
417
441
|
const client = await (0, client_1.escalations)();
|
|
418
442
|
const entry = await client.get(id);
|
|
419
443
|
return entry ? (0, map_1.toEscalationRecord)(entry) : null;
|
|
@@ -474,6 +498,8 @@ async function cancelEscalationsByWorkflowId(workflowId) {
|
|
|
474
498
|
return rows.length;
|
|
475
499
|
}
|
|
476
500
|
async function enrichEscalationRouting(id, metadataPatch, workflowFields) {
|
|
501
|
+
if (!(0, uuid_1.isUuid)(id))
|
|
502
|
+
return null;
|
|
477
503
|
const client = await (0, client_1.escalations)();
|
|
478
504
|
const entry = await client.update({
|
|
479
505
|
id,
|