@acorex/connectivity 21.0.0-next.53 → 21.0.0-next.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.
- package/fesm2022/{acorex-connectivity-mock-acorex-connectivity-mock-DYj9f3l9.mjs → acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs} +3576 -1395
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-assign-to-manager.activity-6uYh64Bk.mjs → acorex-connectivity-mock-assign-to-manager.activity-DxupR-Z9.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-assign-to-manager.activity-6uYh64Bk.mjs.map → acorex-connectivity-mock-assign-to-manager.activity-DxupR-Z9.mjs.map} +1 -1
- package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-BL_DN7ws.mjs → acorex-connectivity-mock-chat-generate-image.command-D06JG6pi.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-BL_DN7ws.mjs.map → acorex-connectivity-mock-chat-generate-image.command-D06JG6pi.mjs.map} +1 -1
- package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-BJDFyBbg.mjs → acorex-connectivity-mock-chat-synthesize-speech.command-Dg9vTzNn.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-BJDFyBbg.mjs.map → acorex-connectivity-mock-chat-synthesize-speech.command-Dg9vTzNn.mjs.map} +1 -1
- package/fesm2022/{acorex-connectivity-mock-chat-transcribe-speech.command-OytOFkmT.mjs → acorex-connectivity-mock-chat-transcribe-speech.command-CAB1Hub8.mjs} +6 -3
- package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-CAB1Hub8.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs.map +1 -1
- package/fesm2022/{acorex-connectivity-mock-user-roles-for-list-column.query-CnRfCNy7.mjs → acorex-connectivity-mock-user-roles-for-list-column.query-qV634a56.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-user-roles-for-list-column.query-CnRfCNy7.mjs.map → acorex-connectivity-mock-user-roles-for-list-column.query-qV634a56.mjs.map} +1 -1
- package/fesm2022/acorex-connectivity-mock.mjs +1 -1
- package/package.json +2 -2
- package/types/acorex-connectivity-mock.d.ts +38 -3
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-DYj9f3l9.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-OytOFkmT.mjs.map +0 -1
|
@@ -5,7 +5,7 @@ import { RootConfig as RootConfig$2 } from '@acorex/modules/organization-managem
|
|
|
5
5
|
import { RootConfig as RootConfig$1 } from '@acorex/modules/person-core';
|
|
6
6
|
import { AXPSessionService } from '@acorex/platform/auth';
|
|
7
7
|
import { AXPEntityStorageService } from '@acorex/platform/layout/entity';
|
|
8
|
-
import {
|
|
8
|
+
import { d as axcSyncSingleEmployeeDenormalizedOrgFields } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
9
9
|
|
|
10
10
|
const EMPLOYEE_ENTITY = RootConfig.entities.employee.source;
|
|
11
11
|
const PERSON_ENTITY = `${RootConfig$1.module.name}.${RootConfig$1.entities.person.name}`;
|
|
@@ -285,4 +285,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
285
285
|
}] });
|
|
286
286
|
|
|
287
287
|
export { AssignToManagerActivity };
|
|
288
|
-
//# sourceMappingURL=acorex-connectivity-mock-assign-to-manager.activity-
|
|
288
|
+
//# sourceMappingURL=acorex-connectivity-mock-assign-to-manager.activity-DxupR-Z9.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-assign-to-manager.activity-6uYh64Bk.mjs","sources":["../../../../libs/connectivity/mock/src/lib/workflow-management/activities/assign-to-manager.activity.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { RootConfig as HcmRootConfig } from '@acorex/modules/human-capital-management';\nimport { RootConfig as OrgRootConfig } from '@acorex/modules/organization-management';\nimport { RootConfig as PersonRootConfig } from '@acorex/modules/person-core';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPEntityStorageService } from '@acorex/platform/layout/entity';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { axcSyncSingleEmployeeDenormalizedOrgFields } from '../../organization-management/org-chart/employee-manager-resolution';\n\nconst EMPLOYEE_ENTITY = HcmRootConfig.entities.employee.source;\nconst PERSON_ENTITY = `${PersonRootConfig.module.name}.${PersonRootConfig.entities.person.name}`;\n\n//#region ---- Helpers ----\n\n/**\n * Resolves a persisted FK or lookup snapshot to a scalar id (avoids `String([object Object])` from expanded rows).\n */\nfunction axcScalarEntityId(value: unknown): string | null {\n if (value == null || value === '') {\n return null;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n const s = String(value).trim();\n return s.length > 0 ? s : null;\n }\n if (typeof value === 'object' && value !== null && 'id' in value) {\n const id = (value as { id: unknown }).id;\n if (id == null || id === '') {\n return null;\n }\n const s = String(id).trim();\n return s.length > 0 ? s : null;\n }\n return null;\n}\n\n/** Non-empty trimmed string or undefined (for optional workflow command inputs). */\nfunction axcOptionalTrimmedString(raw: unknown): string | undefined {\n if (raw == null || raw === '') {\n return undefined;\n }\n const s = typeof raw === 'string' ? raw.trim() : String(raw).trim();\n return s.length > 0 ? s : undefined;\n}\n\ntype EmployeeOutputShape = { displayName: string; [key: string]: unknown };\n\n/**\n * Reads subject employee FK from any aggregate row (leave request, lifecycle process, etc.).\n */\nfunction axcExtractSubjectEmployeeIdFromRecord(record: Record<string, unknown>): {\n subjectEmployeeId: string | null;\n nestedEmployeeHint: EmployeeOutputShape | null;\n nameHint: string | undefined;\n} {\n const scalarFields = [\n 'employeeId',\n 'assigneeEmployeeId',\n 'subjectEmployeeId',\n 'requesterEmployeeId',\n 'ownerEmployeeId',\n ] as const;\n\n for (const field of scalarFields) {\n const id = axcScalarEntityId(record[field]);\n if (id) {\n return { subjectEmployeeId: id, nestedEmployeeHint: null, nameHint: undefined };\n }\n }\n\n const nestedFields = ['employee', 'assignee', 'subject'] as const;\n for (const field of nestedFields) {\n const nested = record[field];\n const id = axcScalarEntityId(nested);\n if (!id) {\n continue;\n }\n let hint: EmployeeOutputShape | null = null;\n if (nested !== null && typeof nested === 'object') {\n const o = nested as {\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n };\n hint = {\n displayName: o.person?.displayName ?? o.displayName ?? '',\n ...o,\n };\n }\n return { subjectEmployeeId: id, nestedEmployeeHint: hint, nameHint: undefined };\n }\n\n const nameHintRaw = record['employeeName'];\n const nameHint =\n typeof nameHintRaw === 'string' && nameHintRaw.trim() !== ''\n ? nameHintRaw.trim()\n : typeof nameHintRaw === 'object' &&\n nameHintRaw !== null &&\n 'en-US' in (nameHintRaw as object)\n ? String((nameHintRaw as { 'en-US'?: unknown })['en-US'] ?? '').trim() || undefined\n : undefined;\n\n return {\n subjectEmployeeId: null,\n nestedEmployeeHint: null,\n nameHint,\n };\n}\n\n//#endregion\n\nexport interface AssignToManagerInput {\n /** When set (scalar or `{ id }`), resolves manager for this employee (highest precedence). */\n employeeId?: unknown;\n /**\n * Full entity source key for the workflow aggregate (e.g. `HumanCapitalManagement.LeaveRequest`).\n * Used with `sourceRecordId` when `employeeId` is not set.\n */\n sourceEntity?: unknown;\n /** Primary key of the record under `sourceEntity`. */\n sourceRecordId?: unknown;\n /** When org manager cannot be resolved, this platform user id is returned as `managerId` (e.g. initiator for review fallback). */\n fallbackUserId?: unknown;\n}\n\nexport interface AssignToManagerOutput {\n /** Manager's login **user** id — use for `assignedUserIds` / `candidateUserIds`. */\n managerId: string | null;\n /** HumanCapitalManagement.Employee id for the line manager when resolved from org chart. */\n managerEmployeeId: string | null;\n /** Resolved manager employee row (displayName + stored fields). */\n manager: EmployeeOutputShape;\n /** Subject employee under evaluation (whose manager was resolved). */\n employee: EmployeeOutputShape;\n}\n\n/**\n * Assign To Manager Activity (Backend - Mock)\n *\n * Resolves the line-manager **employee** from org chart storage, then the manager's **login user id**\n * (`Employee.userId` or `Person.userId`). Works for any workflow: pass `employeeId`, or `sourceEntity` + `sourceRecordId`\n * for an aggregate that carries an employee FK / nested employee.\n *\n * Execution Mode: backend\n * Activity Type: workflow-activity:assign-to-manager\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AssignToManagerActivity implements AXPCommand<AssignToManagerInput, AssignToManagerOutput> {\n private readonly entityStorage = inject(AXPEntityStorageService);\n private readonly sessionService = inject(AXPSessionService);\n\n //#region ---- Employee / manager resolution ----\n\n /**\n * Resolves login user id for an employee row (storage may omit `userId` while Person still links the account).\n */\n private async resolveLoginUserIdForEmployeeRow(\n managerEmp: { userId?: string | null; personId?: string | null } | null,\n ): Promise<string | null> {\n const direct =\n managerEmp?.userId != null && String(managerEmp.userId).trim() !== '' ? String(managerEmp.userId).trim() : null;\n if (direct) {\n return direct;\n }\n const personId =\n managerEmp?.personId != null && String(managerEmp.personId).trim() !== ''\n ? String(managerEmp.personId).trim()\n : null;\n if (!personId) {\n return null;\n }\n try {\n const person = (await this.entityStorage.getOne(PERSON_ENTITY, personId)) as { userId?: string | null } | null;\n const uid =\n person?.userId != null && String(person.userId).trim() !== '' ? String(person.userId).trim() : null;\n return uid;\n } catch {\n return null;\n }\n }\n\n private mapEmployeeRowToOutput(\n emp:\n | ({\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } & { id?: string })\n | null,\n ): EmployeeOutputShape {\n if (!emp) {\n return { displayName: '' };\n }\n return {\n displayName: emp.person?.displayName ?? emp.displayName ?? '',\n ...emp,\n };\n }\n\n /**\n * Syncs denormalized manager on the subject employee, loads manager employee, returns ids + row shape.\n */\n private async resolveManagerDetails(employeeId: string): Promise<{\n managerUserId: string | null;\n managerEmployeeId: string | null;\n manager: EmployeeOutputShape;\n }> {\n await axcSyncSingleEmployeeDenormalizedOrgFields(\n this.entityStorage,\n OrgRootConfig,\n HcmRootConfig,\n String(employeeId),\n true,\n );\n\n const emp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, String(employeeId))) as {\n managerId?: string | null;\n } | null;\n\n const managerEmployeeIdRaw = emp?.managerId != null ? String(emp.managerId).trim() : '';\n if (!managerEmployeeIdRaw) {\n return {\n managerUserId: null,\n managerEmployeeId: null,\n manager: { displayName: '' },\n };\n }\n\n const managerEmp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, managerEmployeeIdRaw)) as {\n userId?: string | null;\n personId?: string | null;\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } | null;\n\n const managerUserId = await this.resolveLoginUserIdForEmployeeRow(managerEmp);\n\n return {\n managerUserId,\n managerEmployeeId: managerEmployeeIdRaw,\n manager: this.mapEmployeeRowToOutput(managerEmp),\n };\n }\n\n private async findEmployeeIdByUserId(userId: string): Promise<string | null> {\n try {\n const result = await this.entityStorage.query(EMPLOYEE_ENTITY, {\n skip: 0,\n take: 1,\n filter: {\n field: 'userId',\n operator: { type: 'equal' },\n value: userId,\n },\n });\n const row = result.items?.[0] as { id?: string } | undefined;\n return row?.id != null ? String(row.id) : null;\n } catch {\n return null;\n }\n }\n\n private async loadSubjectEmployeeOutput(subjectEmployeeId: string): Promise<EmployeeOutputShape> {\n try {\n const emp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, subjectEmployeeId)) as {\n managerId?: string;\n userId?: string;\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } | null;\n return emp ? this.mapEmployeeRowToOutput(emp) : { displayName: '' };\n } catch {\n return { displayName: '' };\n }\n }\n\n //#endregion\n\n async execute(input: AssignToManagerInput): Promise<AXPExecuteCommandResult<AssignToManagerOutput>> {\n const sourceEntity = axcOptionalTrimmedString(input.sourceEntity);\n const sourceRecordId = axcOptionalTrimmedString(input.sourceRecordId);\n\n let managerId: string | null = null;\n let managerEmployeeId: string | null = null;\n let manager: EmployeeOutputShape = { displayName: '' };\n let employee: EmployeeOutputShape = { displayName: '' };\n\n let subjectEmployeeId: string | null = null;\n\n const employeeIdFromInput = axcScalarEntityId(input.employeeId);\n\n const applyManagerResolution = async (empId: string): Promise<void> => {\n subjectEmployeeId = empId;\n employee = await this.loadSubjectEmployeeOutput(empId);\n const details = await this.resolveManagerDetails(empId);\n managerId = details.managerUserId;\n managerEmployeeId = details.managerEmployeeId;\n manager = details.manager;\n };\n\n if (employeeIdFromInput) {\n try {\n await applyManagerResolution(employeeIdFromInput);\n } catch {\n // keep defaults\n }\n } else if (sourceEntity && sourceRecordId) {\n try {\n const record = (await this.entityStorage.getOne(sourceEntity, sourceRecordId)) as Record<string, unknown> | null;\n if (record) {\n const { subjectEmployeeId: fromRecord, nestedEmployeeHint, nameHint } =\n axcExtractSubjectEmployeeIdFromRecord(record);\n\n if (fromRecord) {\n await applyManagerResolution(fromRecord);\n if (!employee.displayName && nestedEmployeeHint) {\n employee = {\n ...nestedEmployeeHint,\n displayName: nestedEmployeeHint.displayName || employee.displayName,\n };\n }\n }\n\n if (!employee.displayName && nameHint) {\n employee = {\n ...employee,\n displayName: nameHint,\n };\n }\n }\n } catch {\n // keep defaults\n }\n }\n\n const sessionUserId = this.sessionService.user?.id;\n if (managerId == null && sessionUserId && !subjectEmployeeId) {\n const initiatorEmployeeId = await this.findEmployeeIdByUserId(String(sessionUserId));\n if (initiatorEmployeeId) {\n try {\n await applyManagerResolution(initiatorEmployeeId);\n } catch {\n // ignore\n }\n }\n }\n\n const fallbackUserId = axcScalarEntityId(input.fallbackUserId);\n if (managerId == null && fallbackUserId) {\n managerId = fallbackUserId;\n }\n\n console.log('[WFM-LifecycleTaskTrace] assign-to-manager', {\n subjectEmployeeId,\n managerEmployeeId,\n managerId,\n fallbackUserId: fallbackUserId ?? null,\n usedSourceRecordPath: !!(sourceEntity && sourceRecordId) && !employeeIdFromInput,\n sourceEntity: sourceEntity ?? null,\n sourceRecordId: sourceRecordId ?? null,\n });\n\n return {\n success: true,\n data: {\n managerId,\n managerEmployeeId,\n manager,\n employee,\n },\n metadata: {\n outcome: 'done',\n },\n };\n }\n}\n"],"names":["HcmRootConfig","PersonRootConfig","OrgRootConfig"],"mappings":";;;;;;;;;AAUA,MAAM,eAAe,GAAGA,UAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAC9D,MAAM,aAAa,GAAG,CAAA,EAAGC,YAAgB,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAIA,YAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE;AAEhG;AAEA;;AAEG;AACH,SAAS,iBAAiB,CAAC,KAAc,EAAA;IACvC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;AACjC,QAAA,OAAO,IAAI;IACb;IACA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC1D,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;AAC9B,QAAA,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI;IAChC;AACA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE;AAChE,QAAA,MAAM,EAAE,GAAI,KAAyB,CAAC,EAAE;QACxC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,EAAE,EAAE;AAC3B,YAAA,OAAO,IAAI;QACb;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;AAC3B,QAAA,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI;IAChC;AACA,I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G,cAAc;QAC5B;AAEA,QAAA,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE;YACxD,iBAAiB;YACjB,iBAAiB;YACjB,SAAS;YACT,cAAc,EAAE,cAAc,IAAI,IAAI;YACtC,oBAAoB,EAAE,CAAC,EAAE,YAAY,IAAI,cAAc,CAAC,IAAI,CAAC,mBAAmB;YAChF,YAAY,EAAE,YAAY,IAAI,IAAI;YAClC,cAAc,EAAE,cAAc,IAAI,IAAI;AACvC,SAAA,CAAC;QAEF,OAAO;AACL,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,IAAI,EAAE;gBACJ,SAAS;gBACT,iBAAiB;gBACjB,OAAO;gBACP,QAAQ;AACT,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,MAAM;AAChB,aAAA;SACF;IACH;8GArOW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFtB,MAAM,EAAA,CAAA,CAAA;;2FAEP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-assign-to-manager.activity-DxupR-Z9.mjs","sources":["../../../../libs/connectivity/mock/src/lib/workflow-management/activities/assign-to-manager.activity.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { RootConfig as HcmRootConfig } from '@acorex/modules/human-capital-management';\nimport { RootConfig as OrgRootConfig } from '@acorex/modules/organization-management';\nimport { RootConfig as PersonRootConfig } from '@acorex/modules/person-core';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPEntityStorageService } from '@acorex/platform/layout/entity';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { axcSyncSingleEmployeeDenormalizedOrgFields } from '../../organization-management/org-chart/employee-manager-resolution';\n\nconst EMPLOYEE_ENTITY = HcmRootConfig.entities.employee.source;\nconst PERSON_ENTITY = `${PersonRootConfig.module.name}.${PersonRootConfig.entities.person.name}`;\n\n//#region ---- Helpers ----\n\n/**\n * Resolves a persisted FK or lookup snapshot to a scalar id (avoids `String([object Object])` from expanded rows).\n */\nfunction axcScalarEntityId(value: unknown): string | null {\n if (value == null || value === '') {\n return null;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n const s = String(value).trim();\n return s.length > 0 ? s : null;\n }\n if (typeof value === 'object' && value !== null && 'id' in value) {\n const id = (value as { id: unknown }).id;\n if (id == null || id === '') {\n return null;\n }\n const s = String(id).trim();\n return s.length > 0 ? s : null;\n }\n return null;\n}\n\n/** Non-empty trimmed string or undefined (for optional workflow command inputs). */\nfunction axcOptionalTrimmedString(raw: unknown): string | undefined {\n if (raw == null || raw === '') {\n return undefined;\n }\n const s = typeof raw === 'string' ? raw.trim() : String(raw).trim();\n return s.length > 0 ? s : undefined;\n}\n\ntype EmployeeOutputShape = { displayName: string; [key: string]: unknown };\n\n/**\n * Reads subject employee FK from any aggregate row (leave request, lifecycle process, etc.).\n */\nfunction axcExtractSubjectEmployeeIdFromRecord(record: Record<string, unknown>): {\n subjectEmployeeId: string | null;\n nestedEmployeeHint: EmployeeOutputShape | null;\n nameHint: string | undefined;\n} {\n const scalarFields = [\n 'employeeId',\n 'assigneeEmployeeId',\n 'subjectEmployeeId',\n 'requesterEmployeeId',\n 'ownerEmployeeId',\n ] as const;\n\n for (const field of scalarFields) {\n const id = axcScalarEntityId(record[field]);\n if (id) {\n return { subjectEmployeeId: id, nestedEmployeeHint: null, nameHint: undefined };\n }\n }\n\n const nestedFields = ['employee', 'assignee', 'subject'] as const;\n for (const field of nestedFields) {\n const nested = record[field];\n const id = axcScalarEntityId(nested);\n if (!id) {\n continue;\n }\n let hint: EmployeeOutputShape | null = null;\n if (nested !== null && typeof nested === 'object') {\n const o = nested as {\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n };\n hint = {\n displayName: o.person?.displayName ?? o.displayName ?? '',\n ...o,\n };\n }\n return { subjectEmployeeId: id, nestedEmployeeHint: hint, nameHint: undefined };\n }\n\n const nameHintRaw = record['employeeName'];\n const nameHint =\n typeof nameHintRaw === 'string' && nameHintRaw.trim() !== ''\n ? nameHintRaw.trim()\n : typeof nameHintRaw === 'object' &&\n nameHintRaw !== null &&\n 'en-US' in (nameHintRaw as object)\n ? String((nameHintRaw as { 'en-US'?: unknown })['en-US'] ?? '').trim() || undefined\n : undefined;\n\n return {\n subjectEmployeeId: null,\n nestedEmployeeHint: null,\n nameHint,\n };\n}\n\n//#endregion\n\nexport interface AssignToManagerInput {\n /** When set (scalar or `{ id }`), resolves manager for this employee (highest precedence). */\n employeeId?: unknown;\n /**\n * Full entity source key for the workflow aggregate (e.g. `HumanCapitalManagement.LeaveRequest`).\n * Used with `sourceRecordId` when `employeeId` is not set.\n */\n sourceEntity?: unknown;\n /** Primary key of the record under `sourceEntity`. */\n sourceRecordId?: unknown;\n /** When org manager cannot be resolved, this platform user id is returned as `managerId` (e.g. initiator for review fallback). */\n fallbackUserId?: unknown;\n}\n\nexport interface AssignToManagerOutput {\n /** Manager's login **user** id — use for `assignedUserIds` / `candidateUserIds`. */\n managerId: string | null;\n /** HumanCapitalManagement.Employee id for the line manager when resolved from org chart. */\n managerEmployeeId: string | null;\n /** Resolved manager employee row (displayName + stored fields). */\n manager: EmployeeOutputShape;\n /** Subject employee under evaluation (whose manager was resolved). */\n employee: EmployeeOutputShape;\n}\n\n/**\n * Assign To Manager Activity (Backend - Mock)\n *\n * Resolves the line-manager **employee** from org chart storage, then the manager's **login user id**\n * (`Employee.userId` or `Person.userId`). Works for any workflow: pass `employeeId`, or `sourceEntity` + `sourceRecordId`\n * for an aggregate that carries an employee FK / nested employee.\n *\n * Execution Mode: backend\n * Activity Type: workflow-activity:assign-to-manager\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AssignToManagerActivity implements AXPCommand<AssignToManagerInput, AssignToManagerOutput> {\n private readonly entityStorage = inject(AXPEntityStorageService);\n private readonly sessionService = inject(AXPSessionService);\n\n //#region ---- Employee / manager resolution ----\n\n /**\n * Resolves login user id for an employee row (storage may omit `userId` while Person still links the account).\n */\n private async resolveLoginUserIdForEmployeeRow(\n managerEmp: { userId?: string | null; personId?: string | null } | null,\n ): Promise<string | null> {\n const direct =\n managerEmp?.userId != null && String(managerEmp.userId).trim() !== '' ? String(managerEmp.userId).trim() : null;\n if (direct) {\n return direct;\n }\n const personId =\n managerEmp?.personId != null && String(managerEmp.personId).trim() !== ''\n ? String(managerEmp.personId).trim()\n : null;\n if (!personId) {\n return null;\n }\n try {\n const person = (await this.entityStorage.getOne(PERSON_ENTITY, personId)) as { userId?: string | null } | null;\n const uid =\n person?.userId != null && String(person.userId).trim() !== '' ? String(person.userId).trim() : null;\n return uid;\n } catch {\n return null;\n }\n }\n\n private mapEmployeeRowToOutput(\n emp:\n | ({\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } & { id?: string })\n | null,\n ): EmployeeOutputShape {\n if (!emp) {\n return { displayName: '' };\n }\n return {\n displayName: emp.person?.displayName ?? emp.displayName ?? '',\n ...emp,\n };\n }\n\n /**\n * Syncs denormalized manager on the subject employee, loads manager employee, returns ids + row shape.\n */\n private async resolveManagerDetails(employeeId: string): Promise<{\n managerUserId: string | null;\n managerEmployeeId: string | null;\n manager: EmployeeOutputShape;\n }> {\n await axcSyncSingleEmployeeDenormalizedOrgFields(\n this.entityStorage,\n OrgRootConfig,\n HcmRootConfig,\n String(employeeId),\n true,\n );\n\n const emp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, String(employeeId))) as {\n managerId?: string | null;\n } | null;\n\n const managerEmployeeIdRaw = emp?.managerId != null ? String(emp.managerId).trim() : '';\n if (!managerEmployeeIdRaw) {\n return {\n managerUserId: null,\n managerEmployeeId: null,\n manager: { displayName: '' },\n };\n }\n\n const managerEmp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, managerEmployeeIdRaw)) as {\n userId?: string | null;\n personId?: string | null;\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } | null;\n\n const managerUserId = await this.resolveLoginUserIdForEmployeeRow(managerEmp);\n\n return {\n managerUserId,\n managerEmployeeId: managerEmployeeIdRaw,\n manager: this.mapEmployeeRowToOutput(managerEmp),\n };\n }\n\n private async findEmployeeIdByUserId(userId: string): Promise<string | null> {\n try {\n const result = await this.entityStorage.query(EMPLOYEE_ENTITY, {\n skip: 0,\n take: 1,\n filter: {\n field: 'userId',\n operator: { type: 'equal' },\n value: userId,\n },\n });\n const row = result.items?.[0] as { id?: string } | undefined;\n return row?.id != null ? String(row.id) : null;\n } catch {\n return null;\n }\n }\n\n private async loadSubjectEmployeeOutput(subjectEmployeeId: string): Promise<EmployeeOutputShape> {\n try {\n const emp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, subjectEmployeeId)) as {\n managerId?: string;\n userId?: string;\n displayName?: string;\n person?: { displayName?: string };\n [key: string]: unknown;\n } | null;\n return emp ? this.mapEmployeeRowToOutput(emp) : { displayName: '' };\n } catch {\n return { displayName: '' };\n }\n }\n\n //#endregion\n\n async execute(input: AssignToManagerInput): Promise<AXPExecuteCommandResult<AssignToManagerOutput>> {\n const sourceEntity = axcOptionalTrimmedString(input.sourceEntity);\n const sourceRecordId = axcOptionalTrimmedString(input.sourceRecordId);\n\n let managerId: string | null = null;\n let managerEmployeeId: string | null = null;\n let manager: EmployeeOutputShape = { displayName: '' };\n let employee: EmployeeOutputShape = { displayName: '' };\n\n let subjectEmployeeId: string | null = null;\n\n const employeeIdFromInput = axcScalarEntityId(input.employeeId);\n\n const applyManagerResolution = async (empId: string): Promise<void> => {\n subjectEmployeeId = empId;\n employee = await this.loadSubjectEmployeeOutput(empId);\n const details = await this.resolveManagerDetails(empId);\n managerId = details.managerUserId;\n managerEmployeeId = details.managerEmployeeId;\n manager = details.manager;\n };\n\n if (employeeIdFromInput) {\n try {\n await applyManagerResolution(employeeIdFromInput);\n } catch {\n // keep defaults\n }\n } else if (sourceEntity && sourceRecordId) {\n try {\n const record = (await this.entityStorage.getOne(sourceEntity, sourceRecordId)) as Record<string, unknown> | null;\n if (record) {\n const { subjectEmployeeId: fromRecord, nestedEmployeeHint, nameHint } =\n axcExtractSubjectEmployeeIdFromRecord(record);\n\n if (fromRecord) {\n await applyManagerResolution(fromRecord);\n if (!employee.displayName && nestedEmployeeHint) {\n employee = {\n ...nestedEmployeeHint,\n displayName: nestedEmployeeHint.displayName || employee.displayName,\n };\n }\n }\n\n if (!employee.displayName && nameHint) {\n employee = {\n ...employee,\n displayName: nameHint,\n };\n }\n }\n } catch {\n // keep defaults\n }\n }\n\n const sessionUserId = this.sessionService.user?.id;\n if (managerId == null && sessionUserId && !subjectEmployeeId) {\n const initiatorEmployeeId = await this.findEmployeeIdByUserId(String(sessionUserId));\n if (initiatorEmployeeId) {\n try {\n await applyManagerResolution(initiatorEmployeeId);\n } catch {\n // ignore\n }\n }\n }\n\n const fallbackUserId = axcScalarEntityId(input.fallbackUserId);\n if (managerId == null && fallbackUserId) {\n managerId = fallbackUserId;\n }\n\n console.log('[WFM-LifecycleTaskTrace] assign-to-manager', {\n subjectEmployeeId,\n managerEmployeeId,\n managerId,\n fallbackUserId: fallbackUserId ?? null,\n usedSourceRecordPath: !!(sourceEntity && sourceRecordId) && !employeeIdFromInput,\n sourceEntity: sourceEntity ?? null,\n sourceRecordId: sourceRecordId ?? null,\n });\n\n return {\n success: true,\n data: {\n managerId,\n managerEmployeeId,\n manager,\n employee,\n },\n metadata: {\n outcome: 'done',\n },\n };\n }\n}\n"],"names":["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YAChF,YAAY,EAAE,YAAY,IAAI,IAAI;YAClC,cAAc,EAAE,cAAc,IAAI,IAAI;AACvC,SAAA,CAAC;QAEF,OAAO;AACL,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,IAAI,EAAE;gBACJ,SAAS;gBACT,iBAAiB;gBACjB,OAAO;gBACP,QAAQ;AACT,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,MAAM;AAChB,aAAA;SACF;IACH;8GArOW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFtB,MAAM,EAAA,CAAA,CAAA;;2FAEP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
|
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXPFileStorageService } from '@acorex/platform/common';
|
|
5
5
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
6
|
-
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel, a as AXMAiModelStableIds } from './acorex-connectivity-mock-acorex-connectivity-mock-
|
|
6
|
+
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel, a as AXMAiModelStableIds } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ---- Imports ----
|
|
9
9
|
function parseGenerateImageInput(args) {
|
|
@@ -105,4 +105,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
105
105
|
}] });
|
|
106
106
|
|
|
107
107
|
export { AiManagementChatGenerateImageCommand };
|
|
108
|
-
//# sourceMappingURL=acorex-connectivity-mock-chat-generate-image.command-
|
|
108
|
+
//# sourceMappingURL=acorex-connectivity-mock-chat-generate-image.command-D06JG6pi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-chat-generate-image.command-
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-chat-generate-image.command-D06JG6pi.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/chat-generate-image.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AI_CHAT_GENERATED_IMAGE_REF_TYPE,\n AI_GENERATED_IMAGE_MAX_REMOTE_URL_IN_TOOL,\n AXPAiChatToolRunContextService,\n blobOrFileFromImageResult,\n persistAiGeneratedImage,\n RootConfig,\n} from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPFileStorageService } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\n\nimport type { AXMAiAssistRow } from '../ai-agent-engine.types';\nimport { resolveDelegatedAssistOptionModel } from '../ai-delegated-agent-parameters.util';\nimport { AXCAiChatRouterService } from '../chat/ai-chat-router.service';\nimport { AXMAiModelStableIds } from '../model/model.mock';\n\n//#endregion\n\n//#region ---- Command: AiManagement:ChatGenerateImage ----\n\nexport interface AiManagementChatGenerateImageInput {\n /**\n * Catalog `AiModel` row id for an image-purpose model. When omitted, uses\n * `delegatedAgents[].options.model` for the active delegated specialist (`agentId` in run context),\n * then falls back to the mock catalog default (OpenAI gpt-image-1).\n */\n model?: string;\n prompt?: string;\n size?: string;\n style?: string;\n}\n\nfunction parseGenerateImageInput(args: unknown):\n | { ok: true; model?: string; prompt: string; size?: string; style?: string }\n | { ok: false; error: string } {\n const obj =\n args != null && typeof args === 'object' && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n const prompt = typeof obj['prompt'] === 'string' ? obj['prompt'].trim() : '';\n if (!prompt) {\n return { ok: false, error: 'Invalid arguments: \"prompt\" is required and must be non-empty.' };\n }\n const model = typeof obj['model'] === 'string' ? obj['model'].trim() : undefined;\n const size = typeof obj['size'] === 'string' ? obj['size'].trim() : undefined;\n const style = typeof obj['style'] === 'string' ? obj['style'].trim() : undefined;\n return {\n ok: true,\n prompt,\n ...(model ? { model } : {}),\n ...(size ? { size } : {}),\n ...(style ? { style } : {}),\n };\n}\n\n@Injectable()\nexport class AiManagementChatGenerateImageCommand\n implements AXPCommand<AiManagementChatGenerateImageInput, { fileId?: string; prompt: string; imageUrl?: string }>\n{\n private readonly aiChatRouter = inject(AXCAiChatRouterService);\n private readonly runContext = inject(AXPAiChatToolRunContextService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n\n private readonly assistData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assist.name)\n .data<string, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow>();\n\n async execute(\n input: AiManagementChatGenerateImageInput,\n ): Promise<AXPExecuteCommandResult<{ fileId?: string; prompt: string; imageUrl?: string }>> {\n const ctx = this.runContext.getContext();\n if (!ctx?.assistId?.trim()) {\n return {\n success: false,\n message: {\n text: 'Image generation requires an active AI chat run context (assist id).',\n },\n };\n }\n\n const parsed = parseGenerateImageInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n try {\n const assist = await this.assistData.byKey(ctx.assistId.trim());\n if (!assist) {\n return {\n success: false,\n message: { text: `Assist row was not found (id: ${ctx.assistId.trim()}).` },\n };\n }\n\n const modelEntityId =\n parsed.model?.trim() ||\n resolveDelegatedAssistOptionModel(assist, ctx.agentId) ||\n AXMAiModelStableIds.openaiGptImage1;\n\n let composedPrompt = parsed.prompt;\n if (parsed.style?.trim()) {\n composedPrompt = `${composedPrompt}\\nStyle: ${parsed.style.trim()}`;\n }\n\n const { imageUrl } = await this.aiChatRouter.generateImage({\n modelEntityId,\n prompt: composedPrompt,\n size: parsed.size?.trim() || undefined,\n });\n\n try {\n const file = await blobOrFileFromImageResult(imageUrl);\n const { fileId } = await persistAiGeneratedImage(this.fileStorage, file, {\n refId: assist.id,\n refType: AI_CHAT_GENERATED_IMAGE_REF_TYPE,\n });\n return { success: true, data: { fileId, prompt: parsed.prompt } };\n } catch (persistErr) {\n const u = imageUrl.trim();\n if (u.startsWith('https://') && u.length <= AI_GENERATED_IMAGE_MAX_REMOTE_URL_IN_TOOL) {\n return {\n success: true,\n data: { prompt: parsed.prompt, imageUrl: u },\n };\n }\n const pmsg = persistErr instanceof Error ? persistErr.message : String(persistErr);\n throw new Error(`Could not store generated image for chat replay. ${pmsg}`);\n }\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAqCA,SAAS,uBAAuB,CAAC,IAAa,EAAA;AAG5C,IAAA,MAAM,GAAG,GACP,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;AAC7D,UAAG;UACD,IAAI;IACV,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE;IACvE;IACA,MAAM,MAAM,GAAG,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE;IAC5E,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,EAAE,EAAE,EAAE,KA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E,IAAI,EAAE,GAAG,EAAE,EAAE;QACnD;IACF;8GA7EW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;;;"}
|
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXPFileStorageService } from '@acorex/platform/common';
|
|
5
5
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
6
|
-
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel,
|
|
6
|
+
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel, c as resolveDelegatedAssistOptionString } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ---- Imports ----
|
|
9
9
|
function extForMime(mime) {
|
|
@@ -127,4 +127,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
127
127
|
}] });
|
|
128
128
|
|
|
129
129
|
export { AiManagementChatSynthesizeSpeechCommand };
|
|
130
|
-
//# sourceMappingURL=acorex-connectivity-mock-chat-synthesize-speech.command-
|
|
130
|
+
//# sourceMappingURL=acorex-connectivity-mock-chat-synthesize-speech.command-Dg9vTzNn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-chat-synthesize-speech.command-BJDFyBbg.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/chat-synthesize-speech.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AI_CHAT_GENERATED_SPEECH_REF_TYPE,\n AXPAiChatToolRunContextService,\n persistAiGeneratedSpeech,\n RootConfig,\n} from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPFileStorageService } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\n\nimport type { AXMAiAssistRow } from '../ai-agent-engine.types';\nimport {\n resolveDelegatedAssistOptionModel,\n resolveDelegatedAssistOptionString,\n} from '../ai-delegated-agent-parameters.util';\nimport { AXCAiChatRouterService } from '../chat/ai-chat-router.service';\n\n//#endregion\n\n//#region ---- Command: AiManagement:ChatSynthesizeSpeech ----\n\nexport interface AiManagementChatSynthesizeSpeechInput {\n /** Catalog `AiModel` row id (purpose `tts`). When omitted, uses `delegatedAgents[].options.model` for the active delegated specialist. */\n model?: string;\n text?: string;\n voice?: string;\n responseFormat?: string;\n}\n\nfunction extForMime(mime: string): string {\n const m = mime.toLowerCase();\n if (m.includes('mpeg') || m.includes('mp3')) {\n return 'mp3';\n }\n if (m.includes('wav')) {\n return 'wav';\n }\n if (m.includes('opus')) {\n return 'opus';\n }\n if (m.includes('ogg')) {\n return 'ogg';\n }\n if (m.includes('aac')) {\n return 'aac';\n }\n if (m.includes('flac')) {\n return 'flac';\n }\n return 'bin';\n}\n\nfunction parseSynthesizeInput(args: unknown):\n | { ok: true; model?: string; text: string; voice?: string; responseFormat?: string }\n | { ok: false; error: string } {\n const obj =\n args != null && typeof args === 'object' && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n const text = typeof obj['text'] === 'string' ? obj['text'].trim() : '';\n if (!text) {\n return { ok: false, error: 'Invalid arguments: \"text\" is required and must be non-empty.' };\n }\n const model = typeof obj['model'] === 'string' ? obj['model'].trim() : undefined;\n const voice = typeof obj['voice'] === 'string' ? obj['voice'].trim() : undefined;\n const responseFormat =\n typeof obj['responseFormat'] === 'string' ? obj['responseFormat'].trim() : undefined;\n return {\n ok: true,\n text,\n ...(model ? { model } : {}),\n ...(voice ? { voice } : {}),\n ...(responseFormat ? { responseFormat } : {}),\n };\n}\n\n@Injectable()\nexport class AiManagementChatSynthesizeSpeechCommand\n implements\n AXPCommand<\n AiManagementChatSynthesizeSpeechInput,\n { fileId?: string; text: string; mimeType?: string }\n >\n{\n private readonly aiChatRouter = inject(AXCAiChatRouterService);\n private readonly runContext = inject(AXPAiChatToolRunContextService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n\n private readonly assistData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assist.name)\n .data<string, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow>();\n\n async execute(\n input: AiManagementChatSynthesizeSpeechInput,\n ): Promise<AXPExecuteCommandResult<{ fileId?: string; text: string; mimeType?: string }>> {\n const ctx = this.runContext.getContext();\n if (!ctx?.assistId?.trim()) {\n return {\n success: false,\n message: {\n text: 'Text-to-speech requires an active AI chat run context (assist id).',\n },\n };\n }\n\n const parsed = parseSynthesizeInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n try {\n const assist = await this.assistData.byKey(ctx.assistId.trim());\n if (!assist) {\n return {\n success: false,\n message: { text: `Assist row was not found (id: ${ctx.assistId.trim()}).` },\n };\n }\n\n const modelEntityId =\n parsed.model?.trim() || resolveDelegatedAssistOptionModel(assist, ctx.agentId) || '';\n if (!modelEntityId) {\n return {\n success: false,\n message: {\n text:\n 'No TTS model: pass \"model\" (catalog id) or set options.model on the text-to-speech delegated specialist row for this assist.',\n },\n };\n }\n\n const voiceFromAssist =\n resolveDelegatedAssistOptionString(assist, ctx.agentId, 'voice') || undefined;\n const voice = parsed.voice?.trim() || voiceFromAssist || 'alloy';\n\n const { audioBytes, mimeType } = await this.aiChatRouter.synthesizeSpeech({\n modelEntityId,\n text: parsed.text,\n voice,\n ...(parsed.responseFormat?.trim() ? { responseFormat: parsed.responseFormat.trim() } : {}),\n });\n\n const mt = mimeType?.trim() || 'application/octet-stream';\n const ext = extForMime(mt);\n const file = new File([audioBytes], `ai-tts.${ext}`, { type: mt });\n\n try {\n const { fileId } = await persistAiGeneratedSpeech(this.fileStorage, file, {\n refId: assist.id,\n refType: AI_CHAT_GENERATED_SPEECH_REF_TYPE,\n });\n return { success: true, data: { fileId, text: parsed.text, mimeType: mt } };\n } catch (persistErr) {\n const pmsg = persistErr instanceof Error ? persistErr.message : String(persistErr);\n throw new Error(`Could not store synthesized speech for chat replay. ${pmsg}`);\n }\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAiCA,SAAS,UAAU,CAAC,IAAY,EAAA;AAC9B,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;AAC5B,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC3C,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtB,QAAA,OAAO,MAAM;IACf;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtB,QAAA,OAAO,MAAM;IACf;AACA,IAAA,OAAO,KAAK;AACd;AAEA,SAAS,oBAAoB,CAAC,IAAa,EAAA;AAGzC,IAAA,MAAM,GAAG,GACP,IAAI,IAAI,IAAI,IAAI,O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,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;YAC7E;YAAE,OAAO,UAAU,EAAE;AACnB,gBAAA,MAAM,IAAI,GAAG,UAAU,YAAY,KAAK,GAAG,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAClF,gBAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,IAAI,CAAA,CAAE,CAAC;YAChF;QACF;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QACnD;IACF;8GApFW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-chat-synthesize-speech.command-Dg9vTzNn.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/chat-synthesize-speech.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AI_CHAT_GENERATED_SPEECH_REF_TYPE,\n AXPAiChatToolRunContextService,\n persistAiGeneratedSpeech,\n RootConfig,\n} from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPFileStorageService } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\n\nimport type { AXMAiAssistRow } from '../ai-agent-engine.types';\nimport {\n resolveDelegatedAssistOptionModel,\n resolveDelegatedAssistOptionString,\n} from '../ai-delegated-agent-parameters.util';\nimport { AXCAiChatRouterService } from '../chat/ai-chat-router.service';\n\n//#endregion\n\n//#region ---- Command: AiManagement:ChatSynthesizeSpeech ----\n\nexport interface AiManagementChatSynthesizeSpeechInput {\n /** Catalog `AiModel` row id (purpose `tts`). When omitted, uses `delegatedAgents[].options.model` for the active delegated specialist. */\n model?: string;\n text?: string;\n voice?: string;\n responseFormat?: string;\n}\n\nfunction extForMime(mime: string): string {\n const m = mime.toLowerCase();\n if (m.includes('mpeg') || m.includes('mp3')) {\n return 'mp3';\n }\n if (m.includes('wav')) {\n return 'wav';\n }\n if (m.includes('opus')) {\n return 'opus';\n }\n if (m.includes('ogg')) {\n return 'ogg';\n }\n if (m.includes('aac')) {\n return 'aac';\n }\n if (m.includes('flac')) {\n return 'flac';\n }\n return 'bin';\n}\n\nfunction parseSynthesizeInput(args: unknown):\n | { ok: true; model?: string; text: string; voice?: string; responseFormat?: string }\n | { ok: false; error: string } {\n const obj =\n args != null && typeof args === 'object' && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n const text = typeof obj['text'] === 'string' ? obj['text'].trim() : '';\n if (!text) {\n return { ok: false, error: 'Invalid arguments: \"text\" is required and must be non-empty.' };\n }\n const model = typeof obj['model'] === 'string' ? obj['model'].trim() : undefined;\n const voice = typeof obj['voice'] === 'string' ? obj['voice'].trim() : undefined;\n const responseFormat =\n typeof obj['responseFormat'] === 'string' ? obj['responseFormat'].trim() : undefined;\n return {\n ok: true,\n text,\n ...(model ? { model } : {}),\n ...(voice ? { voice } : {}),\n ...(responseFormat ? { responseFormat } : {}),\n };\n}\n\n@Injectable()\nexport class AiManagementChatSynthesizeSpeechCommand\n implements\n AXPCommand<\n AiManagementChatSynthesizeSpeechInput,\n { fileId?: string; text: string; mimeType?: string }\n >\n{\n private readonly aiChatRouter = inject(AXCAiChatRouterService);\n private readonly runContext = inject(AXPAiChatToolRunContextService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n\n private readonly assistData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assist.name)\n .data<string, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow>();\n\n async execute(\n input: AiManagementChatSynthesizeSpeechInput,\n ): Promise<AXPExecuteCommandResult<{ fileId?: string; text: string; mimeType?: string }>> {\n const ctx = this.runContext.getContext();\n if (!ctx?.assistId?.trim()) {\n return {\n success: false,\n message: {\n text: 'Text-to-speech requires an active AI chat run context (assist id).',\n },\n };\n }\n\n const parsed = parseSynthesizeInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n try {\n const assist = await this.assistData.byKey(ctx.assistId.trim());\n if (!assist) {\n return {\n success: false,\n message: { text: `Assist row was not found (id: ${ctx.assistId.trim()}).` },\n };\n }\n\n const modelEntityId =\n parsed.model?.trim() || resolveDelegatedAssistOptionModel(assist, ctx.agentId) || '';\n if (!modelEntityId) {\n return {\n success: false,\n message: {\n text:\n 'No TTS model: pass \"model\" (catalog id) or set options.model on the text-to-speech delegated specialist row for this assist.',\n },\n };\n }\n\n const voiceFromAssist =\n resolveDelegatedAssistOptionString(assist, ctx.agentId, 'voice') || undefined;\n const voice = parsed.voice?.trim() || voiceFromAssist || 'alloy';\n\n const { audioBytes, mimeType } = await this.aiChatRouter.synthesizeSpeech({\n modelEntityId,\n text: parsed.text,\n voice,\n ...(parsed.responseFormat?.trim() ? { responseFormat: parsed.responseFormat.trim() } : {}),\n });\n\n const mt = mimeType?.trim() || 'application/octet-stream';\n const ext = extForMime(mt);\n const file = new File([audioBytes], `ai-tts.${ext}`, { type: mt });\n\n try {\n const { fileId } = await persistAiGeneratedSpeech(this.fileStorage, file, {\n refId: assist.id,\n refType: AI_CHAT_GENERATED_SPEECH_REF_TYPE,\n });\n return { success: true, data: { fileId, text: parsed.text, mimeType: mt } };\n } catch (persistErr) {\n const pmsg = persistErr instanceof Error ? persistErr.message : String(persistErr);\n throw new Error(`Could not store synthesized speech for chat replay. ${pmsg}`);\n }\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAiCA,SAAS,UAAU,CAAC,IAAY,EAAA;AAC9B,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;AAC5B,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC3C,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtB,QAAA,OAAO,MAAM;IACf;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtB,QAAA,OAAO,MAAM;IACf;AACA,IAAA,OAAO,KAAK;AACd;AAEA,SAAS,oBAAoB,CAAC,IAAa,EAAA;AAGzC,IAAA,MAAM,GAAG,GACP,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;AAC7D,UAAG;UACD,IAAI;IACV,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE;IACvE;IACA,M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AAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAClF,gBAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,IAAI,CAAA,CAAE,CAAC;YAChF;QACF;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QACnD;IACF;8GApFW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;;;"}
|
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXPFileStorageService } from '@acorex/platform/common';
|
|
5
5
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
6
|
-
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel, b as resolveDelegatedAssistOptionString } from './acorex-connectivity-mock-acorex-connectivity-mock-
|
|
6
|
+
import { A as AXCAiChatRouterService, r as resolveDelegatedAssistOptionModel, b as resolveAssistSpeechModelId, c as resolveDelegatedAssistOptionString } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ---- Imports ----
|
|
9
9
|
function parseTranscribeInput(args) {
|
|
@@ -58,7 +58,10 @@ class AiManagementChatTranscribeSpeechCommand {
|
|
|
58
58
|
message: { text: `Assist row was not found (id: ${ctx.assistId.trim()}).` },
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const modelEntityId = parsed.model?.trim() ||
|
|
61
|
+
const modelEntityId = parsed.model?.trim() ||
|
|
62
|
+
resolveDelegatedAssistOptionModel(assist, ctx.agentId) ||
|
|
63
|
+
resolveAssistSpeechModelId(assist) ||
|
|
64
|
+
'';
|
|
62
65
|
if (!modelEntityId) {
|
|
63
66
|
return {
|
|
64
67
|
success: false,
|
|
@@ -115,4 +118,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
115
118
|
}] });
|
|
116
119
|
|
|
117
120
|
export { AiManagementChatTranscribeSpeechCommand };
|
|
118
|
-
//# sourceMappingURL=acorex-connectivity-mock-chat-transcribe-speech.command-
|
|
121
|
+
//# sourceMappingURL=acorex-connectivity-mock-chat-transcribe-speech.command-CAB1Hub8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-chat-transcribe-speech.command-CAB1Hub8.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/chat-transcribe-speech.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPAiChatToolRunContextService, RootConfig } from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPFileStorageService } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\n\nimport type { AXMAiAssistRow } from '../ai-agent-engine.types';\nimport {\n resolveAssistSpeechModelId,\n resolveDelegatedAssistOptionModel,\n resolveDelegatedAssistOptionString,\n} from '../ai-delegated-agent-parameters.util';\nimport { AXCAiChatRouterService } from '../chat/ai-chat-router.service';\n\n//#endregion\n\n//#region ---- Command: AiManagement:ChatTranscribeSpeech ----\n\nexport interface AiManagementChatTranscribeSpeechInput {\n /** Catalog `AiModel` row id for a speech-purpose model. When omitted, uses `delegatedAgents[].options.model` for the active delegated specialist (`agentId` in run context). */\n model?: string;\n fileId?: string;\n language?: string;\n}\n\nfunction parseTranscribeInput(args: unknown):\n | { ok: true; model?: string; fileId: string; language?: string }\n | { ok: false; error: string } {\n const obj =\n args != null && typeof args === 'object' && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n const fileId = typeof obj['fileId'] === 'string' ? obj['fileId'].trim() : '';\n if (!fileId) {\n return { ok: false, error: 'Invalid arguments: \"fileId\" is required and must be non-empty.' };\n }\n const model = typeof obj['model'] === 'string' ? obj['model'].trim() : undefined;\n const language = typeof obj['language'] === 'string' ? obj['language'].trim() : undefined;\n return {\n ok: true,\n fileId,\n ...(model ? { model } : {}),\n ...(language ? { language } : {}),\n };\n}\n\n@Injectable()\nexport class AiManagementChatTranscribeSpeechCommand\n implements AXPCommand<AiManagementChatTranscribeSpeechInput, { text: string }>\n{\n private readonly aiChatRouter = inject(AXCAiChatRouterService);\n private readonly runContext = inject(AXPAiChatToolRunContextService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n\n private readonly assistData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assist.name)\n .data<string, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow, AXMAiAssistRow>();\n\n async execute(\n input: AiManagementChatTranscribeSpeechInput,\n ): Promise<AXPExecuteCommandResult<{ text: string }>> {\n const ctx = this.runContext.getContext();\n if (!ctx?.assistId?.trim()) {\n return {\n success: false,\n message: {\n text: 'Speech transcription requires an active AI chat run context (assist id).',\n },\n };\n }\n\n const parsed = parseTranscribeInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n try {\n const assist = await this.assistData.byKey(ctx.assistId.trim());\n if (!assist) {\n return {\n success: false,\n message: { text: `Assist row was not found (id: ${ctx.assistId.trim()}).` },\n };\n }\n\n const modelEntityId =\n parsed.model?.trim() ||\n resolveDelegatedAssistOptionModel(assist, ctx.agentId) ||\n resolveAssistSpeechModelId(assist) ||\n '';\n if (!modelEntityId) {\n return {\n success: false,\n message: {\n text:\n 'No speech model: pass \"model\" (catalog id) or set options.model on the speech-to-text delegated specialist row for this assist.',\n },\n };\n }\n\n let mimeType = 'application/octet-stream';\n let audioBytes: ArrayBuffer;\n let uploadFileName: string | undefined;\n try {\n const info = await this.fileStorage.getInfo(parsed.fileId);\n const file = info.binary;\n mimeType = info.mimeType?.trim() || file.type?.trim() || mimeType;\n uploadFileName = info.name?.trim() || file.name?.trim() || undefined;\n audioBytes = await file.arrayBuffer();\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return {\n success: false,\n message: { text: `Could not read audio file (fileId: ${parsed.fileId}). ${msg}` },\n };\n }\n\n if (audioBytes.byteLength === 0) {\n return {\n success: false,\n message: { text: `Audio file is empty (fileId: ${parsed.fileId}).` },\n };\n }\n\n const language =\n parsed.language?.trim() ||\n resolveDelegatedAssistOptionString(assist, ctx.agentId, 'language') ||\n undefined;\n\n const { text } = await this.aiChatRouter.transcribeSpeech({\n modelEntityId,\n audioBytes,\n mimeType,\n ...(uploadFileName ? { fileName: uploadFileName } : {}),\n ...(language ? { language } : {}),\n });\n\n return { success: true, data: { text } };\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AA4BA,SAAS,oBAAoB,CAAC,IAAa,EAAA;AAGzC,IAAA,MAAM,GAAG,GACP,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;AAC7D,UAAG;UACD,IAAI;IACV,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE;IACvE;IACA,MAAM,MAAM,GAAG,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,IA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G,EAAE,CAAC;AAClC,aAAA,CAAC;YAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE;QAC1C;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QACnD;IACF;8GAhGW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/extract-document-text.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPAiChatTransport } from '@acorex/modules/ai-management';\nimport { AXPAiChatToolRunContextService } from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPAiEngine } from '@acorex/modules/ai-management';\n\nimport type { AXCAiEngine } from '../ai-agent-engine
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/extract-document-text.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPAiChatTransport } from '@acorex/modules/ai-management';\nimport { AXPAiChatToolRunContextService } from '@acorex/modules/ai-management';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPAiEngine } from '@acorex/modules/ai-management';\n\nimport type { AXCAiEngine } from '../ai-agent-engine';\n\n//#endregion\n\n//#region ---- Command ----\n\nexport interface AiManagementExtractDocumentTextInput {\n fileId?: string;\n instruction?: string;\n /** When not in an AI chat run context (e.g. document metadata prefill). */\n assistId?: string;\n chatTransport?: AXPAiChatTransport;\n modelEntityId?: string;\n}\n\nfunction parseExtractInput(args: unknown):\n | { ok: true; fileId: string; instruction?: string }\n | { ok: false; error: string } {\n const obj =\n args != null && typeof args === 'object' && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n const fileId = typeof obj['fileId'] === 'string' ? obj['fileId'].trim() : '';\n if (!fileId) {\n return { ok: false, error: 'Invalid arguments: \"fileId\" is required.' };\n }\n const instruction = typeof obj['instruction'] === 'string' ? obj['instruction'].trim() : undefined;\n return { ok: true, fileId, ...(instruction ? { instruction } : {}) };\n}\n\n@Injectable()\nexport class AiManagementExtractDocumentTextCommand\n implements AXPCommand<AiManagementExtractDocumentTextInput, { text: string }>\n{\n private readonly engine = inject(AXPAiEngine) as AXCAiEngine;\n private readonly runContext = inject(AXPAiChatToolRunContextService);\n\n async execute(\n input: AiManagementExtractDocumentTextInput,\n ): Promise<AXPExecuteCommandResult<{ text: string }>> {\n const ctx = this.runContext.getContext();\n const parsed = parseExtractInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n const assistId = ctx?.assistId?.trim() ?? input.assistId?.trim();\n const chatTransport = ctx?.chatTransport ?? input.chatTransport;\n const modelEntityId = ctx?.modelEntityId ?? input.modelEntityId;\n\n if (!assistId || !chatTransport) {\n return {\n success: false,\n message: {\n text: 'Document extraction requires assist id and chat transport (active chat context or input fields).',\n },\n };\n }\n\n try {\n const data = await this.engine.extractDocumentTextFromStoredFile({\n assistId,\n chatTransport,\n modelEntityId,\n fileId: parsed.fileId,\n instruction: parsed.instruction,\n });\n return { success: true, data };\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAwBA,SAAS,iBAAiB,CAAC,IAAa,EAAA;AAGtC,IAAA,MAAM,GAAG,GACP,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;AAC7D,UAAG;UACD,IAAI;IACV,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE;IACvE;IACA,MAAM,MAAM,GAAG,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE;IAC5E,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,0CAA0C,EAAE;IACzE;IACA,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,aAAa,CAAC,KAAK,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,GAAG,SAAS;IAClG,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,WAAW,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE;AACtE;MAGa,sCAAsC,CAAA;AADnD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,WAAW,CAAgB;AAC3C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,8BAA8B,CAAC;AAsCrE,IAAA;IApCC,MAAM,OAAO,CACX,KAA2C,EAAA;QAE3C,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;AACxC,QAAA,MAAM,MAA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AAA,CAAA;kHAAtC,sCAAsC,EAAA,CAAA,CAAA;;2FAAtC,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBADlD;;;;;"}
|
package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/structured-text-completion.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPAiChatMessage
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs","sources":["../../../../libs/connectivity/mock/src/lib/ai-management/commands/structured-text-completion.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPAiChatMessage } from '@acorex/modules/ai-management';\nimport type { AXPAiStructuredTextCompletionOptions } from '../ai-engine.mock-types';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPAiEngine } from '@acorex/modules/ai-management';\n\nimport type { AXCAiEngine } from '../ai-agent-engine';\n\n//#endregion\n\n//#region ---- Command ----\n\nexport interface AiManagementStructuredTextCompletionInput {\n assistId?: string;\n modelEntityId?: string;\n modelId?: string;\n messages: AXPAiChatMessage[];\n maxTokens?: number;\n temperature?: number;\n}\n\n@Injectable()\nexport class AiManagementStructuredTextCompletionCommand\n implements AXPCommand<AiManagementStructuredTextCompletionInput, { text: string }>\n{\n private readonly engine = inject(AXPAiEngine) as AXCAiEngine;\n\n async execute(\n input: AiManagementStructuredTextCompletionInput,\n ): Promise<AXPExecuteCommandResult<{ text: string }>> {\n if (!Array.isArray(input.messages) || input.messages.length === 0) {\n return { success: false, message: { text: 'Invalid arguments: \"messages\" is required.' } };\n }\n const options: AXPAiStructuredTextCompletionOptions = {\n assistId: input.assistId,\n modelEntityId: input.modelEntityId,\n modelId: input.modelId,\n messages: input.messages,\n maxTokens: input.maxTokens,\n temperature: input.temperature,\n };\n try {\n const { text } = await this.engine.completeStructuredText(options);\n return { success: true, data: { text } };\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n return { success: false, message: { text: msg } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;MAyBa,2CAA2C,CAAA;AADxD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,WAAW,CAAgB;AAwB7D,IAAA;IAtBC,MAAM,OAAO,CACX,KAAgD,EAAA;AAEhD,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACjE,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,4CAA4C,EAAE,EAAE;QAC5F;AACA,QAAA,MAAM,OAAO,GAAyC;YACpD,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B;AACD,QAAA,IAAI;AACF,YAAA,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,OAAO,CAAC;YAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE;QAC1C;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QACnD;IACF;8GA1BW,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA3C,2CAA2C,EAAA,CAAA,CAAA;;2FAA3C,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBADvD;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
|
-
import { m as mockUsers } from './acorex-connectivity-mock-acorex-connectivity-mock-
|
|
3
|
+
import { m as mockUsers } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
/**
|
|
@@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
27
27
|
}] });
|
|
28
28
|
|
|
29
29
|
export { UserRolesForListColumnQuery };
|
|
30
|
-
//# sourceMappingURL=acorex-connectivity-mock-user-roles-for-list-column.query-
|
|
30
|
+
//# sourceMappingURL=acorex-connectivity-mock-user-roles-for-list-column.query-qV634a56.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-connectivity-mock-user-roles-for-list-column.query-
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-mock-user-roles-for-list-column.query-qV634a56.mjs","sources":["../../../../libs/connectivity/mock/src/lib/security-management/user/user-roles-for-list-column.query.ts"],"sourcesContent":["import { AXPQuery } from '@acorex/platform/runtime';\nimport { Injectable } from '@angular/core';\nimport { mockUsers } from './user.mock';\n\n//#region ---- Types ----\n\nexport interface UserRolesForListColumnQueryInput {\n userId?: string;\n}\n\nexport interface UserRolesForListColumnQueryResult {\n items: { id: string; title: unknown }[];\n}\n\n//#endregion\n\n/**\n * Resolves role rows for the user list lookup column when using {@link countOnly} column resolve.\n */\n@Injectable({ providedIn: 'root' })\nexport class UserRolesForListColumnQuery implements AXPQuery<UserRolesForListColumnQueryInput, UserRolesForListColumnQueryResult> {\n async fetch(input: UserRolesForListColumnQueryInput): Promise<UserRolesForListColumnQueryResult> {\n const userId = input?.userId?.trim();\n if (!userId) {\n return { items: [] };\n }\n const user = mockUsers.find((u) => u.id === userId);\n if (!user?.roles?.length) {\n return { items: [] };\n }\n return { items: user.roles };\n }\n}\n"],"names":[],"mappings":";;;;AAcA;AAEA;;AAEG;MAEU,2BAA2B,CAAA;IACtC,MAAM,KAAK,CAAC,KAAuC,EAAA;QACjD,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QACpC,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACtB;AACA,QAAA,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC;AACnD,QAAA,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;AACxB,YAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACtB;AACA,QAAA,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;IAC9B;8GAXW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { d as ACTIVITY_CATEGORIES, e as ACTIVITY_CATEGORY_ID_BY_KEY, f as ACTIVITY_DEFINITIONS, g as AI_ASSIST_MOCK, h as AI_MODEL_MOCK, i as APPLICATIONS, j as APPLICATION_CATEGORY_IDS, k as APPLICATION_CATEGORY_MOCKS, l as AXCActivityCategorySeeder, n as AXCActivityDefinitionSeeder, o as AXCAiAssistSeeder, p as AXCAiManagementMockModule, q as AXCAiModelSeeder, s as AXCAppTermDataSeeder, t as AXCAppVersionDataSeeder, u as AXCApplicationCategoryDataSeeder, v as AXCApplicationDataSeeder, w as AXCApplicationManagementMockModule, x as AXCAssessmentManagementMockModule, y as AXCAssetManagementMockModule, z as AXCAuthMockModule, B as AXCCalendarDataSeeder, C as AXCCalendarEventDataSeeder, D as AXCCalendarManagementMockModule, E as AXCCommandRegistryDataSeeder, F as AXCCommonMockModule, G as AXCContactCoreMockModule, H as AXCContentManagementMockModule, I as AXCConversationDataSeeder, J as AXCConversationMockConversationApi, K as AXCConversationMockMessageApi, L as AXCConversationMockModule, M as AXCConversationMockRealtimeApi, N as AXCConversationMockUserApi, O as AXCCustomerManagementMockModule, P as AXCDashboardManagementMockModule, Q as AXCDataManagementMockModule, R as AXCDexieEntityStorageService, S as AXCDocumentManagementMockModule, T as AXCEditionDataSeeder, U as AXCEntityDefinitionSeederService, V as AXCEntityDefinitionsModule, W as AXCEntityStorageInsertCommand, X as AXCEntityStorageModule, Y as AXCEntityStorageQueryQuery, Z as AXCFileStorageServiceDexie, _ as AXCFileStorageServiceFirestore, $ as AXCFinancialCoreMockModule, a0 as AXCFirestoreEntityStorageService, a1 as AXCFormTemplateManagementMockModule, a2 as AXCGoogleStrategyMock, a3 as AXCHealthCoreMockModule, a4 as AXCHelpDeskMockModule, a5 as AXCHumanCapitalManagementMockModule, a6 as AXCIdentifierManagementMockModule, a7 as AXCImageCaptchaChallengeProviderMock, a8 as AXCLearningManagementMockModule, a9 as AXCLocaleManagementMockModule, aa as AXCLocationManagementMockModule, ab as AXCLockService, ac as AXCMeasurementCoreMockModule, ad as AXCMeetingManagementMockModule, ae as AXCMetaDataDefinitionDataSeeder, af as AXCMetadataCategorySeeder, ag as AXCMiddlewaresModule, ah as AXCMockCaptchaChallengeComponent, ai as AXCMockEntityLogListener, aj as AXCMockModule, ak as AXCMockShowMetaDataFormPopupCommand, al as AXCNotificationManagementMockModule, am as AXCOrderManagementMockModule, an as AXCOrganizationManagementMockModule, ao as AXCPersonCoreMockModule, ap as AXCPlatformManagementMockModule, aq as AXCProcurementManagementMockModule, ar as AXCProductCatalogMockModule, as as AXCProjectManagementMockModule, at as AXCQueryRegistryDataSeeder, au as AXCReportManagementMockModule, av as AXCSecurityManagementMockModule, aw as AXCStoredEntityDefinitionLoader, ax as AXCSubscriptionManagementMockModule, ay as AXCSupplierManagementMockModule, az as AXCTaskManagementMockModule, aA as AXCTenantManagementMockModule, aB as AXCTenantSeeder, aC as AXCTextTemplateRenderBackend, aD as AXCTokensDataSeeder, aE as AXCUserPassStrategyMock, aF as AXCVersionDB, aG as AXCVersioningService, aH as AXCWidgetCatalogDataSeeder, aI as AXCWorkflowCategorySeeder, aJ as AXCWorkflowDefinitionDataSeeder, aK as AXCWorkflowEngine, aL as AXCWorkflowExecutionDB, aM as AXCWorkflowExecutionStoreDexie, aN as AXCWorkflowExecutionStoreFirestore, aO as AXCWorkflowInstanceCartableDemoSeeder, aP as AXCWorkflowManagementMockModule, aQ as AXC_ENTITY_STORAGE_BACKEND_TYPE, aR as AXC_FIRESTORE_CONFIG, aS as AXC_FIRESTORE_DB, aT as AXC_WORKFLOW_EXECUTION_STORE, aU as AXMAiDemisAssistAgentUuid, aV as AXMAiDemisAssistId, a as AXMAiModelStableIds, aW as AXMAiPlatformAssistantAssistId, aX as AXMAutomationDataSeeder, aY as AXMBusinessUnitDataSeeder, aZ as AXMCalendarEventTypeSeeder, a_ as AXMDashboardChartDataSourceDefinition, a$ as AXMEmployeeDataSeeder, b0 as AXMEmploymentTypeDataSeeder, b1 as AXMFormDataSourcesProvider, b2 as AXMJobDefinitionDataSeeder, b3 as AXMJobLevelDataSeeder, b4 as AXMLeaveRequestDataSeeder, b5 as AXMMeetingDataSeeder, b6 as AXMMeetingFilesDataSeeder, b7 as AXMMeetingParticipantDataSeeder, b8 as AXMMeetingRoleTypeDataSeeder, b9 as AXMMeetingSessionDataSeeder, ba as AXMMeetingTypeDataSeeder, bb as AXMMeetingTypeFileTemplateDataSeeder, bc as AXMPositionAssignmentDataSeeder, bd as AXMPositionDataSeeder, be as AXMQuestionBankItemCategoryDataSeeder, bf as AXMQuestionBankItemDataSeeder, bg as AXMQuestionnaireCalculationDataSeeder, bh as AXMQuestionnaireCategoryDataSeeder, bi as AXMQuestionnaireDataSeeder, bj as AXMResponsibilityDataSeeder, bk as AXMTagDataSeeder, bl as AXMTeamBusinessUnitDataSeeder, bm as AXMTeamDataSeeder, bn as AXMTeamMemberDataSeeder, bo as AXMTeamMemberRoleDataSeeder, bp as AXMWorkflowDashboardChartDataSourceDefinition, bq as AXM_AI_REGISTRY_COMMAND_NAME, br as AXM_AI_REGISTRY_QUERY_NAME, bs as AXM_CORPORATE_BUSINESS_UNIT_ID, bt as AXPDashboardDataSeeder, bu as AXPIdentifierDB, bv as AXPMessageDataSeeder, bw as AXPMockChecksumProvider, bx as AXPMockClockProvider, by as AXPMockIdentifierService, bz as AXPMockLookupProvider, bA as AXPMockPolicyProvider, bB as AXPMockSequenceProvider, bC as AXPRoomDataSeeder, bD as AXPSecurityManagementRoleDataSeeder, bE as AXPSecurityManagementUserDataSeeder, bF as AXPTaskBoardPlatformManagementTaskProvider, bG as AXPTaskBoardProjectManagementTaskProvider, bH as AXVChangeType, bI as BCC, bJ as BOC, bK as BUSINESS_UNITS_MOCK, bL as CHAT_LAST_MESSAGE_IDS, bM as COLLABORATION_STANDARD, bN as COSTMANAGER_ENTERPRISE, bO as COSTMANAGER_PROFESSIONAL, bP as COSTMANAGER_STANDARD, bQ as CP, bR as CRM_ENTERPRISE, bS as DASHBOARDS, bT as EDITIONS, bU as EMPLOYEES_MOCK, bV as EMPLOYMENT_TYPES_MOCK, bW as ENTITY_DEFINITION_MAP, bX as ENTITY_REGISTRY, bY as FINANCE_BASIC, bZ as FINANCE_ENTERPRISE, b_ as FINANCE_PRO, b$ as G, c0 as HR_ENTERPRISE, c1 as HW, c2 as JOB_DEFINITIONS_CATEGORY_MOCK, c3 as JOB_DEFINITIONS_MOCK, c4 as JOB_DEFINITION_CATEGORY_KEY_TO_ID, c5 as JOB_LEVELS_MOCK, c6 as LASER_PLUMBING_TENANT_ID, c7 as LEAVE_REQUESTS_MOCK, c8 as MAGFA_COMMERCE_STANDARD, c9 as MAGFA_CONVERSATION_DASHBOARD, ca as MAGFA_TENANT_ID, cb as METADATA_CATEGORY_IDS, cc as METADATA_GENERAL_CATEGORY_REFS, cd as METADATA_SYSTEM_CATEGORY_REFS, ce as MLC, cf as OHR, cg as ORDERING_BASIC, ch as ORDERING_ENTERPRISE, ci as ORDERING_STANDARD, cj as OWNERSHIP_FILTER_BYPASS, ck as PLATFORM_CONSOLE, cl as PLATFORM_TENANT_ID, cm as PM, cn as POSITIONS_CATEGORY_MOCK, co as POSITIONS_MOCK, cp as POSITION_ASSIGNMENTS_MOCK, cq as QCP, cr as QGEN, cs as QHW, ct as QOHR, cu as QPM, cv as QTLE, cw as QUESTIONNAIRE_CATEGORY_MOCK, cx as QUESTION_BANK_ITEM_CATEGORY_MOCK, cy as QWS, cz as RESPONSIBILITIES_CATEGORY_MOCK, cA as RESPONSIBILITIES_MOCK, cB as RESPONSIBILITY_CATEGORY_KEY_TO_ID, cC as SAFETYMINDER_BASIC, cD as SAFETYMINDER_ENTERPRISE, cE as SAFETYMINDER_PROFESSIONAL, cF as SHOP_BASIC, cG as SHOP_ENTERPRISE, cH as SHOP_PRO, cI as TAGS_MOCK, cJ as TASKS, cK as TASK_STATUSES, cL as TASK_TEMPLATES, cM as TASK_TYPES, cN as TEAMS_CATEGORY_MOCK, cO as TEAMS_MOCK, cP as TEAM_BUSINESS_UNITS_MOCK, cQ as TEAM_CATEGORY_KEY_TO_ID, cR as TEAM_MEMBERS_MOCK, cS as TEAM_MEMBER_ROLES_MOCK, cT as TIMEPLICITY_TENANT_ID, cU as TLA, cV as TOKENS, cW as TPC, cX as VISIBILITY_FILTER_BYPASS, cY as WORKFLOW_CATEGORIES, cZ as WS, c_ as activityCategoryMocks, c$ as activityDefinitionEntityMock, d0 as applyEntityDefinitionFirestoreSnapshot, d1 as automationCommandMiddleware, d2 as automationMock, d3 as avatarInterface, d4 as awaitConversationMockSharedStorage, d5 as axVersionDB, d6 as axWorkflowExecutionDB, d7 as axcPatchEmployeeActivePrimaryBusinessUnitRefsFromRows, d8 as axcPatchEmployeeActivePrimaryPositionRefsFromRows, d9 as axcPatchEmployeeManagerRefsFromRows, da as axcResolveCommandRegistrySeedId, db as axcResolveQueryRegistrySeedId, dc as axcResolveWidgetCatalogSeedId, dd as bankCategory, de as buildEntityStorageQuickSearchFilter, df as buildWorkflowInstanceCartableDemoRows, dg as bypassAllFilters, dh as bypassOwnershipFilter, di as bypassVisibilityFilter, dj as calendarEventMock, dk as calendarEventTypeMockData, dl as calendarMock, dm as chatMessageMock, dn as chatMock, dp as checkboxInterface, dq as childCountMiddleware, dr as clearEntityDefinitionFirestoreCollections, ds as colorInterface, dt as computeDiff, du as contactInterface, dv as conversationDemoSeedUserIds, dw as createFileCastMiddleware, dx as createWidgetLayoutConfig, dy as createWorkflowDefinitionEntityMock, dz as dateInterface, dA as dateTimeInterface, dB as descriptionInterface, dC as documentFolderSyncMiddleware, dD as emailInterface, dE as entityDefDb, dF as entityValidationMiddleware, dG as fileUploaderInterface, dH as finalizeActivityCategoryItemCounts, dI as findEmployeeById, dJ as folderStorageMiddleware, dK as groupOrderItemCalculatorMiddleware, dL as historyMiddleware, dM as identifierCommitMiddleware, dN as imageInterface, dO as inspectionOkXNaInterface, dP as loadMockPropertyDefinitions, dQ as lockGuardMiddleware, dR as longTextAnswerInterface, dS as lookupInterface, dT as lookupResolverMiddleware, dU as mapInterface, dV as meetingFilesMock, dW as meetingIds, dX as meetingMock, dY as meetingParticipantMock, dZ as meetingRoleTypeMock, d_ as meetingSessionMock, d$ as meetingTimeSlotMock, e0 as meetingTypeFileTemplateMock, e1 as meetingTypeMock, e2 as mergeDetailRelationMiddleware, e3 as mergeQuickSearchIntoRequest, e4 as metadataCategoryMocks, e5 as mockParticipantIndexForSecurityUserId, e6 as mockQuestionBankItemByName, e7 as mockRoleDefinitions, m as mockUsers, e8 as multipleChoiceInterface, e9 as multipleSelectInterface, ea as normalizeAnyFileArrayForView, eb as normalizeSnapshotFileFieldsForView, ec as numberInterface, ed as parseEntityStorageInsertData, ee as parseEntityStorageQueryRequest, ef as participantIds, eg as participantMock, eh as passwordInterface, ei as personIdentifierTypeMock, ej as personIds, ek as personLegalIds, el as personMock, em as personNaturalIds, en as phoneInterface, eo as primaryMiddleware, ep as provideMockPropertySetups, eq as qrcodeInterface, er as questionBankItemMock, es as questionnaireCalculationMock, et as questionnaireMock, eu as ratingInterface, ev as richTextInterface, ew as scaleInterface, ex as selectInterface, ey as selectionListInterface, ez as sexAtBirthInterface, eA as signatureInterface, eB as signatureLoaderMiddleware, eC as statusDefaultMiddleware, eD as tagInterface, eE as tenantMocks, eF as textAreaInterface, eG as textInterface, eH as timeDurationInterface, eI as titleInterface, eJ as toUiRows, eK as toggleInterface, eL as tokenCategoryIds, eM as tokenCategoryMocks, eN as urlInterface, eO as versionInterface, eP as visibilityFilterMiddleware, eQ as workflowDefinitionEntityMock, eR as workflowDefinitionIds, eS as workflowDefinitionMock, eT as yesNoInterface } from './acorex-connectivity-mock-acorex-connectivity-mock-DYj9f3l9.mjs';
|
|
1
|
+
export { e as ACTIVITY_CATEGORIES, f as ACTIVITY_CATEGORY_ID_BY_KEY, g as ACTIVITY_DEFINITIONS, h as AI_ASSIST_MOCK, i as AI_MODEL_MOCK, j as APPLICATIONS, k as APPLICATION_CATEGORY_IDS, l as APPLICATION_CATEGORY_MOCKS, n as AXCActivityCategorySeeder, o as AXCActivityDefinitionSeeder, p as AXCAiAssistSeeder, q as AXCAiManagementMockModule, s as AXCAiModelSeeder, t as AXCAppTermDataSeeder, u as AXCAppVersionDataSeeder, v as AXCApplicationCategoryDataSeeder, w as AXCApplicationDataSeeder, x as AXCApplicationManagementMockModule, y as AXCAssessmentManagementMockModule, z as AXCAssetManagementMockModule, B as AXCAuthMockModule, C as AXCCalendarDataSeeder, D as AXCCalendarEventDataSeeder, E as AXCCalendarManagementMockModule, F as AXCCommandRegistryDataSeeder, G as AXCCommonMockModule, H as AXCContactCoreMockModule, I as AXCContentManagementMockModule, J as AXCConversationDataSeeder, K as AXCConversationMockConversationApi, L as AXCConversationMockMessageApi, M as AXCConversationMockModule, N as AXCConversationMockRealtimeApi, O as AXCConversationMockUserApi, P as AXCCustomerManagementMockModule, Q as AXCDashboardManagementMockModule, R as AXCDataManagementMockModule, S as AXCDexieEntityStorageService, T as AXCDocumentManagementMockModule, U as AXCEditionDataSeeder, V as AXCEntityDefinitionSeederService, W as AXCEntityDefinitionsModule, X as AXCEntityStorageInsertCommand, Y as AXCEntityStorageModule, Z as AXCEntityStorageQueryQuery, _ as AXCFileStorageServiceDexie, $ as AXCFileStorageServiceFirestore, a0 as AXCFinancialCoreMockModule, a1 as AXCFirestoreEntityStorageService, a2 as AXCFormTemplateManagementMockModule, a3 as AXCGoogleStrategyMock, a4 as AXCHealthCoreMockModule, a5 as AXCHelpDeskMockModule, a6 as AXCHumanCapitalManagementMockModule, a7 as AXCIdentifierManagementMockModule, a8 as AXCImageCaptchaChallengeProviderMock, a9 as AXCLearningManagementMockModule, aa as AXCLocaleManagementMockModule, ab as AXCLocationManagementMockModule, ac as AXCLockService, ad as AXCMeasurementCoreMockModule, ae as AXCMeetingManagementMockModule, af as AXCMetaDataDefinitionDataSeeder, ag as AXCMetadataCategorySeeder, ah as AXCMiddlewaresModule, ai as AXCMockCaptchaChallengeComponent, aj as AXCMockEntityLogListener, ak as AXCMockModule, al as AXCMockShowMetaDataFormPopupCommand, am as AXCNotificationManagementMockModule, an as AXCOrderManagementMockModule, ao as AXCOrganizationManagementMockModule, ap as AXCPersonCoreMockModule, aq as AXCPlatformManagementMockModule, ar as AXCProcurementManagementMockModule, as as AXCProductCatalogMockModule, at as AXCProjectManagementMockModule, au as AXCQueryRegistryDataSeeder, av as AXCReportManagementMockModule, aw as AXCSecurityManagementMockModule, ax as AXCStoredEntityDefinitionLoader, ay as AXCSubscriptionManagementMockModule, az as AXCSupplierManagementMockModule, aA as AXCTaskManagementMockModule, aB as AXCTenantManagementMockModule, aC as AXCTenantSeeder, aD as AXCTextTemplateRenderBackend, aE as AXCTokensDataSeeder, aF as AXCUserPassStrategyMock, aG as AXCVersionDB, aH as AXCVersioningService, aI as AXCWidgetCatalogDataSeeder, aJ as AXCWorkflowCategorySeeder, aK as AXCWorkflowDefinitionDataSeeder, aL as AXCWorkflowEngine, aM as AXCWorkflowExecutionDB, aN as AXCWorkflowExecutionStoreDexie, aO as AXCWorkflowExecutionStoreFirestore, aP as AXCWorkflowInstanceCartableDemoSeeder, aQ as AXCWorkflowManagementMockModule, aR as AXC_ENTITY_STORAGE_BACKEND_TYPE, aS as AXC_FIRESTORE_CONFIG, aT as AXC_FIRESTORE_DB, aU as AXC_WORKFLOW_EXECUTION_STORE, aV as AXMAiDemisAssistAgentUuid, aW as AXMAiDemisAssistId, aX as AXMAiDemisGeneralAssistId, a as AXMAiModelStableIds, aY as AXMAiPlatformAssistantAssistId, aZ as AXMAutomationDataSeeder, a_ as AXMBusinessUnitDataSeeder, a$ as AXMCalendarEventTypeSeeder, b0 as AXMDashboardChartDataSourceDefinition, b1 as AXMEmployeeDataSeeder, b2 as AXMEmploymentTypeDataSeeder, b3 as AXMFormDataSourcesProvider, b4 as AXMJobDefinitionDataSeeder, b5 as AXMJobLevelDataSeeder, b6 as AXMLeaveRequestDataSeeder, b7 as AXMMeetingDataSeeder, b8 as AXMMeetingFilesDataSeeder, b9 as AXMMeetingParticipantDataSeeder, ba as AXMMeetingRoleTypeDataSeeder, bb as AXMMeetingSessionDataSeeder, bc as AXMMeetingTypeDataSeeder, bd as AXMMeetingTypeFileTemplateDataSeeder, be as AXMPositionAssignmentDataSeeder, bf as AXMPositionDataSeeder, bg as AXMQuestionBankItemCategoryDataSeeder, bh as AXMQuestionBankItemDataSeeder, bi as AXMQuestionnaireCalculationDataSeeder, bj as AXMQuestionnaireCategoryDataSeeder, bk as AXMQuestionnaireDataSeeder, bl as AXMResponsibilityDataSeeder, bm as AXMTagDataSeeder, bn as AXMTeamBusinessUnitDataSeeder, bo as AXMTeamDataSeeder, bp as AXMTeamMemberDataSeeder, bq as AXMTeamMemberRoleDataSeeder, br as AXMWorkflowDashboardChartDataSourceDefinition, bs as AXM_AI_REGISTRY_COMMAND_NAME, bt as AXM_AI_REGISTRY_QUERY_NAME, bu as AXM_CORPORATE_BUSINESS_UNIT_ID, bv as AXPDashboardDataSeeder, bw as AXPIdentifierDB, bx as AXPMessageDataSeeder, by as AXPMockChecksumProvider, bz as AXPMockClockProvider, bA as AXPMockIdentifierService, bB as AXPMockLookupProvider, bC as AXPMockPolicyProvider, bD as AXPMockSequenceProvider, bE as AXPRoomDataSeeder, bF as AXPSecurityManagementRoleDataSeeder, bG as AXPSecurityManagementUserDataSeeder, bH as AXPTaskBoardPlatformManagementTaskProvider, bI as AXPTaskBoardProjectManagementTaskProvider, bJ as AXVChangeType, bK as BCC, bL as BOC, bM as BUSINESS_UNITS_MOCK, bN as CHAT_LAST_MESSAGE_IDS, bO as COLLABORATION_STANDARD, bP as COSTMANAGER_ENTERPRISE, bQ as COSTMANAGER_PROFESSIONAL, bR as COSTMANAGER_STANDARD, bS as CP, bT as CRM_ENTERPRISE, bU as DASHBOARDS, bV as EDITIONS, bW as EMPLOYEES_MOCK, bX as EMPLOYMENT_TYPES_MOCK, bY as ENTITY_DEFINITION_MAP, bZ as ENTITY_REGISTRY, b_ as FINANCE_BASIC, b$ as FINANCE_ENTERPRISE, c0 as FINANCE_PRO, c1 as G, c2 as HR_ENTERPRISE, c3 as HW, c4 as JOB_DEFINITIONS_CATEGORY_MOCK, c5 as JOB_DEFINITIONS_MOCK, c6 as JOB_DEFINITION_CATEGORY_KEY_TO_ID, c7 as JOB_LEVELS_MOCK, c8 as LASER_PLUMBING_TENANT_ID, c9 as LEAVE_REQUESTS_MOCK, ca as MAGFA_COMMERCE_STANDARD, cb as MAGFA_CONVERSATION_DASHBOARD, cc as MAGFA_TENANT_ID, cd as METADATA_CATEGORY_IDS, ce as METADATA_GENERAL_CATEGORY_REFS, cf as METADATA_SYSTEM_CATEGORY_REFS, cg as MLC, ch as OHR, ci as ORDERING_BASIC, cj as ORDERING_ENTERPRISE, ck as ORDERING_STANDARD, cl as OWNERSHIP_FILTER_BYPASS, cm as PLATFORM_CONSOLE, cn as PLATFORM_TENANT_ID, co as PM, cp as POSITIONS_CATEGORY_MOCK, cq as POSITIONS_MOCK, cr as POSITION_ASSIGNMENTS_MOCK, cs as QCP, ct as QGEN, cu as QHW, cv as QOHR, cw as QPM, cx as QTLE, cy as QUESTIONNAIRE_CATEGORY_MOCK, cz as QUESTION_BANK_ITEM_CATEGORY_MOCK, cA as QWS, cB as RESPONSIBILITIES_CATEGORY_MOCK, cC as RESPONSIBILITIES_MOCK, cD as RESPONSIBILITY_CATEGORY_KEY_TO_ID, cE as SAFETYMINDER_BASIC, cF as SAFETYMINDER_ENTERPRISE, cG as SAFETYMINDER_PROFESSIONAL, cH as SHOP_BASIC, cI as SHOP_ENTERPRISE, cJ as SHOP_PRO, cK as TAGS_MOCK, cL as TASKS, cM as TASK_STATUSES, cN as TASK_TEMPLATES, cO as TASK_TYPES, cP as TEAMS_CATEGORY_MOCK, cQ as TEAMS_MOCK, cR as TEAM_BUSINESS_UNITS_MOCK, cS as TEAM_CATEGORY_KEY_TO_ID, cT as TEAM_MEMBERS_MOCK, cU as TEAM_MEMBER_ROLES_MOCK, cV as TIMEPLICITY_TENANT_ID, cW as TLA, cX as TOKENS, cY as TPC, cZ as VISIBILITY_FILTER_BYPASS, c_ as WORKFLOW_CATEGORIES, c$ as WS, d0 as activityCategoryMocks, d1 as activityDefinitionEntityMock, d2 as applyEntityDefinitionFirestoreSnapshot, d3 as automationCommandMiddleware, d4 as automationMock, d5 as avatarInterface, d6 as awaitConversationMockSharedStorage, d7 as axVersionDB, d8 as axWorkflowExecutionDB, d9 as axcPatchEmployeeActivePrimaryBusinessUnitRefsFromRows, da as axcPatchEmployeeActivePrimaryPositionRefsFromRows, db as axcPatchEmployeeManagerRefsFromRows, dc as axcResolveCommandRegistrySeedId, dd as axcResolveQueryRegistrySeedId, de as axcResolveWidgetCatalogSeedId, df as bankCategory, dg as buildEntityStorageQuickSearchFilter, dh as buildWorkflowInstanceCartableDemoRows, di as bypassAllFilters, dj as bypassOwnershipFilter, dk as bypassVisibilityFilter, dl as calendarEventMock, dm as calendarEventTypeMockData, dn as calendarMock, dp as chatMessageMock, dq as chatMock, dr as checkboxInterface, ds as childCountMiddleware, dt as clearEntityDefinitionFirestoreCollections, du as colorInterface, dv as computeDiff, dw as contactInterface, dx as conversationDemoSeedUserIds, dy as createFileCastMiddleware, dz as createWidgetLayoutConfig, dA as createWorkflowDefinitionEntityMock, dB as dateInterface, dC as dateTimeInterface, dD as descriptionInterface, dE as documentFolderSyncMiddleware, dF as emailInterface, dG as entityDefDb, dH as entityValidationMiddleware, dI as fileUploaderInterface, dJ as finalizeActivityCategoryItemCounts, dK as findEmployeeById, dL as folderStorageMiddleware, dM as groupOrderItemCalculatorMiddleware, dN as historyMiddleware, dO as identifierCommitMiddleware, dP as imageInterface, dQ as inspectionOkXNaInterface, dR as loadMockPropertyDefinitions, dS as lockGuardMiddleware, dT as longTextAnswerInterface, dU as lookupInterface, dV as lookupResolverMiddleware, dW as mapInterface, dX as meetingFilesMock, dY as meetingIds, dZ as meetingMock, d_ as meetingParticipantMock, d$ as meetingRoleTypeMock, e0 as meetingSessionMock, e1 as meetingTimeSlotMock, e2 as meetingTypeFileTemplateMock, e3 as meetingTypeMock, e4 as mergeDetailRelationMiddleware, e5 as mergeQuickSearchIntoRequest, e6 as metadataCategoryMocks, e7 as mockParticipantIndexForSecurityUserId, e8 as mockQuestionBankItemByName, e9 as mockRoleDefinitions, m as mockUsers, ea as multipleChoiceInterface, eb as multipleSelectInterface, ec as normalizeAnyFileArrayForView, ed as normalizeSnapshotFileFieldsForView, ee as numberInterface, ef as parseEntityStorageInsertData, eg as parseEntityStorageQueryRequest, eh as participantIds, ei as participantMock, ej as passwordInterface, ek as personIdentifierTypeMock, el as personIds, em as personLegalIds, en as personMock, eo as personNaturalIds, ep as phoneInterface, eq as primaryMiddleware, er as provideMockPropertySetups, es as qrcodeInterface, et as questionBankItemMock, eu as questionnaireCalculationMock, ev as questionnaireMock, ew as ratingInterface, ex as richTextInterface, ey as scaleInterface, ez as selectInterface, eA as selectionListInterface, eB as sexAtBirthInterface, eC as signatureInterface, eD as signatureLoaderMiddleware, eE as statusDefaultMiddleware, eF as tagInterface, eG as tenantMocks, eH as textAreaInterface, eI as textInterface, eJ as timeDurationInterface, eK as titleInterface, eL as toUiRows, eM as toggleInterface, eN as tokenCategoryIds, eO as tokenCategoryMocks, eP as urlInterface, eQ as versionInterface, eR as visibilityFilterMiddleware, eS as workflowDefinitionEntityMock, eT as workflowDefinitionIds, eU as workflowDefinitionMock, eV as yesNoInterface } from './acorex-connectivity-mock-acorex-connectivity-mock-CwWWAGPc.mjs';
|
|
2
2
|
export { AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY } from '@acorex/modules/content-management';
|
|
3
3
|
//# sourceMappingURL=acorex-connectivity-mock.mjs.map
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/connectivity",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.55",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/modules": "21.0.0-next.
|
|
5
|
+
"@acorex/modules": "21.0.0-next.55"
|
|
6
6
|
},
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"module": "fesm2022/acorex-connectivity.mjs",
|
|
@@ -993,6 +993,11 @@ declare class AXCAiModelSeeder implements AXPDataSeeder {
|
|
|
993
993
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXCAiModelSeeder>;
|
|
994
994
|
}
|
|
995
995
|
|
|
996
|
+
/** Mock-only Demisco options (not on the assist entity schema). */
|
|
997
|
+
interface AXMAiManagementAssistDemisMockMetadata {
|
|
998
|
+
/** Demisco `/core/agent/chat/` `agent_uuid` when this assist uses a configured agent. */
|
|
999
|
+
agent_uuid?: string;
|
|
1000
|
+
}
|
|
996
1001
|
interface AXMAiManagementAssistMockModel extends AXMAiManagementAssistEntityModel {
|
|
997
1002
|
/** Optional legacy tool hints (not persisted on the assist entity). */
|
|
998
1003
|
tools?: {
|
|
@@ -1002,13 +1007,19 @@ interface AXMAiManagementAssistMockModel extends AXMAiManagementAssistEntityMode
|
|
|
1002
1007
|
}[];
|
|
1003
1008
|
/** Catalog id of a row whose `modelPurposes` includes `image`; must match chat transport when generating images. */
|
|
1004
1009
|
imageModelId?: string | null;
|
|
1010
|
+
/** Catalog id of a row whose `modelPurposes` includes `speech` (Demis inline audio transcription). */
|
|
1011
|
+
speechModelId?: string | null;
|
|
1012
|
+
/** Mock-only transport metadata (e.g. Demisco `agent_uuid`). */
|
|
1013
|
+
metadata?: AXMAiManagementAssistDemisMockMetadata;
|
|
1005
1014
|
}
|
|
1006
1015
|
/** Deterministic id for the platform assistant assist row. */
|
|
1007
1016
|
declare const AXMAiPlatformAssistantAssistId = "b0000001-0000-4000-8000-000000000001";
|
|
1008
1017
|
/** Demisco centralized payment guide — Conversation “Chat with AI” and Demis transport. */
|
|
1009
1018
|
declare const AXMAiDemisAssistId = "c0000001-0000-4000-8000-000000000009";
|
|
1019
|
+
/** General Demisco chat assist (Demis AI model, no configured agent). */
|
|
1020
|
+
declare const AXMAiDemisGeneralAssistId = "c0000001-0000-4000-8000-00000000000a";
|
|
1010
1021
|
/**
|
|
1011
|
-
* Demisco `agent_uuid`
|
|
1022
|
+
* Demisco `agent_uuid` for the payment-guide assist (`metadata.agent_uuid` in mock seed only).
|
|
1012
1023
|
*/
|
|
1013
1024
|
declare const AXMAiDemisAssistAgentUuid = "2a0e1e4d-ddfe-4f04-b7ba-2fd307eb5967";
|
|
1014
1025
|
declare const AI_ASSIST_MOCK: AXMAiManagementAssistMockModel[];
|
|
@@ -2757,6 +2768,27 @@ declare class AXCConversationMockMessageApi extends AXMChatMessageApi {
|
|
|
2757
2768
|
private generateAssistConversationTitle;
|
|
2758
2769
|
private normalizeConversationTitle;
|
|
2759
2770
|
private generateAiChatResponse;
|
|
2771
|
+
/**
|
|
2772
|
+
* Demis has no delegated follow-up agent — run {@link AXMAiDemisGeneralAssistId} (no `agent_uuid`)
|
|
2773
|
+
* with an inline JSON contract prompt, then merge {@code followUp} onto the main assist turn.
|
|
2774
|
+
*/
|
|
2775
|
+
private maybeAppendDemisAssistFollowUp;
|
|
2776
|
+
/** Demis follow-up: inline JSON contract (no follow-up agent / no Demisco agent_uuid). */
|
|
2777
|
+
private buildDemisFollowUpUserQuery;
|
|
2778
|
+
private extractLastUserPlainText;
|
|
2779
|
+
private extractLastAssistantPlainText;
|
|
2780
|
+
private parseFollowUpSuggestionsFromDemisPlainText;
|
|
2781
|
+
private stripDemisFollowUpBoilerplate;
|
|
2782
|
+
private isDemisFollowUpBoilerplateLine;
|
|
2783
|
+
private parseFollowUpItemsFromAssistantText;
|
|
2784
|
+
private turnTranscriptHasFollowUpSegment;
|
|
2785
|
+
private appendFollowUpToDemisAssistantTurn;
|
|
2786
|
+
/**
|
|
2787
|
+
* Non-debug UI reads {@link axmParseAssistTranscriptLinePayload} before metadata transcripts;
|
|
2788
|
+
* merge follow-up chips from completed delegated tool output when the payload line missed them.
|
|
2789
|
+
*/
|
|
2790
|
+
private enrichAssistPayloadLineWithFollowUpFromToolCalls;
|
|
2791
|
+
private mergeAssistRunUsageTotals;
|
|
2760
2792
|
private createPlaceholderMessage;
|
|
2761
2793
|
private applyStreamDeltas;
|
|
2762
2794
|
private publishPlaceholderMessage;
|
|
@@ -2784,6 +2816,9 @@ declare class AXCConversationMockMessageApi extends AXMChatMessageApi {
|
|
|
2784
2816
|
*/
|
|
2785
2817
|
private resolveModelDisplayTitle;
|
|
2786
2818
|
private resolveModelEntityId;
|
|
2819
|
+
private resolveDemisSessionUuidForConversation;
|
|
2820
|
+
private persistDemisSessionUuidFromRun;
|
|
2821
|
+
private modelEntityUsesDemisTransport;
|
|
2787
2822
|
/**
|
|
2788
2823
|
* Build chat lines for the AI engine. Only plain user/assistant text from each message
|
|
2789
2824
|
* {@link #extractMessageText} is included — never assist message metadata
|
|
@@ -4158,5 +4193,5 @@ declare function bypassAllFilters<T extends AXPQueryRequest>(request: T): T;
|
|
|
4158
4193
|
|
|
4159
4194
|
declare const AXCMockEntityLogListener: AXPDistributedEventListenerProvider<any>;
|
|
4160
4195
|
|
|
4161
|
-
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_ID_BY_KEY, ACTIVITY_DEFINITIONS, AI_ASSIST_MOCK, AI_MODEL_MOCK, APPLICATIONS, APPLICATION_CATEGORY_IDS, APPLICATION_CATEGORY_MOCKS, AXCActivityCategorySeeder, AXCActivityDefinitionSeeder, AXCAiAssistSeeder, AXCAiManagementMockModule, AXCAiModelSeeder, AXCAppTermDataSeeder, AXCAppVersionDataSeeder, AXCApplicationCategoryDataSeeder, AXCApplicationDataSeeder, AXCApplicationManagementMockModule, AXCAssessmentManagementMockModule, AXCAssetManagementMockModule, AXCAuthMockModule, AXCCalendarDataSeeder, AXCCalendarEventDataSeeder, AXCCalendarManagementMockModule, AXCCommandRegistryDataSeeder, AXCCommonMockModule, AXCContactCoreMockModule, AXCContentManagementMockModule, AXCConversationDataSeeder, AXCConversationMockConversationApi, AXCConversationMockMessageApi, AXCConversationMockModule, AXCConversationMockRealtimeApi, AXCConversationMockUserApi, AXCCustomerManagementMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDexieEntityStorageService, AXCDocumentManagementMockModule, AXCEditionDataSeeder, AXCEntityDefinitionSeederService, AXCEntityDefinitionsModule, AXCEntityStorageInsertCommand, AXCEntityStorageModule, AXCEntityStorageQueryQuery, AXCFileStorageServiceDexie, AXCFileStorageServiceFirestore, AXCFinancialCoreMockModule, AXCFirestoreEntityStorageService, AXCFormTemplateManagementMockModule, AXCGoogleStrategyMock, AXCHealthCoreMockModule, AXCHelpDeskMockModule, AXCHumanCapitalManagementMockModule, AXCIdentifierManagementMockModule, AXCImageCaptchaChallengeProviderMock, AXCLearningManagementMockModule, AXCLocaleManagementMockModule, AXCLocationManagementMockModule, AXCLockService, AXCMeasurementCoreMockModule, AXCMeetingManagementMockModule, AXCMetaDataDefinitionDataSeeder, AXCMetadataCategorySeeder, AXCMiddlewaresModule, AXCMockCaptchaChallengeComponent, AXCMockEntityLogListener, AXCMockModule, AXCMockShowMetaDataFormPopupCommand, AXCNotificationManagementMockModule, AXCOrderManagementMockModule, AXCOrganizationManagementMockModule, AXCPersonCoreMockModule, AXCPlatformManagementMockModule, AXCProcurementManagementMockModule, AXCProductCatalogMockModule, AXCProjectManagementMockModule, AXCQueryRegistryDataSeeder, AXCReportManagementMockModule, AXCSecurityManagementMockModule, AXCStoredEntityDefinitionLoader, AXCSubscriptionManagementMockModule, AXCSupplierManagementMockModule, AXCTaskManagementMockModule, AXCTenantManagementMockModule, AXCTenantSeeder, AXCTextTemplateRenderBackend, AXCTokensDataSeeder, AXCUserPassStrategyMock, AXCVersionDB, AXCVersioningService, AXCWidgetCatalogDataSeeder, AXCWorkflowCategorySeeder, AXCWorkflowDefinitionDataSeeder, AXCWorkflowEngine, AXCWorkflowExecutionDB, AXCWorkflowExecutionStoreDexie, AXCWorkflowExecutionStoreFirestore, AXCWorkflowInstanceCartableDemoSeeder, AXCWorkflowManagementMockModule, AXC_ENTITY_STORAGE_BACKEND_TYPE, AXC_FIRESTORE_CONFIG, AXC_FIRESTORE_DB, AXC_WORKFLOW_EXECUTION_STORE, AXMAiDemisAssistAgentUuid, AXMAiDemisAssistId, AXMAiModelStableIds, AXMAiPlatformAssistantAssistId, AXMAutomationDataSeeder, AXMBusinessUnitDataSeeder, AXMCalendarEventTypeSeeder, AXMDashboardChartDataSourceDefinition, AXMEmployeeDataSeeder, AXMEmploymentTypeDataSeeder, AXMFormDataSourcesProvider, AXMJobDefinitionDataSeeder, AXMJobLevelDataSeeder, AXMLeaveRequestDataSeeder, AXMMeetingDataSeeder, AXMMeetingFilesDataSeeder, AXMMeetingParticipantDataSeeder, AXMMeetingRoleTypeDataSeeder, AXMMeetingSessionDataSeeder, AXMMeetingTypeDataSeeder, AXMMeetingTypeFileTemplateDataSeeder, AXMPositionAssignmentDataSeeder, AXMPositionDataSeeder, AXMQuestionBankItemCategoryDataSeeder, AXMQuestionBankItemDataSeeder, AXMQuestionnaireCalculationDataSeeder, AXMQuestionnaireCategoryDataSeeder, AXMQuestionnaireDataSeeder, AXMResponsibilityDataSeeder, AXMTagDataSeeder, AXMTeamBusinessUnitDataSeeder, AXMTeamDataSeeder, AXMTeamMemberDataSeeder, AXMTeamMemberRoleDataSeeder, AXMWorkflowDashboardChartDataSourceDefinition, AXM_AI_REGISTRY_COMMAND_NAME, AXM_AI_REGISTRY_QUERY_NAME, AXM_CORPORATE_BUSINESS_UNIT_ID, AXPDashboardDataSeeder, AXPIdentifierDB, AXPMessageDataSeeder, AXPMockChecksumProvider, AXPMockClockProvider, AXPMockIdentifierService, AXPMockLookupProvider, AXPMockPolicyProvider, AXPMockSequenceProvider, AXPRoomDataSeeder, AXPSecurityManagementRoleDataSeeder, AXPSecurityManagementUserDataSeeder, AXPTaskBoardPlatformManagementTaskProvider, AXPTaskBoardProjectManagementTaskProvider, AXVChangeType, BCC, BOC, BUSINESS_UNITS_MOCK, CHAT_LAST_MESSAGE_IDS, COLLABORATION_STANDARD, COSTMANAGER_ENTERPRISE, COSTMANAGER_PROFESSIONAL, COSTMANAGER_STANDARD, CP, CRM_ENTERPRISE, DASHBOARDS, EDITIONS, EMPLOYEES_MOCK, EMPLOYMENT_TYPES_MOCK, ENTITY_DEFINITION_MAP, ENTITY_REGISTRY, FINANCE_BASIC, FINANCE_ENTERPRISE, FINANCE_PRO, G, HR_ENTERPRISE, HW, JOB_DEFINITIONS_CATEGORY_MOCK, JOB_DEFINITIONS_MOCK, JOB_DEFINITION_CATEGORY_KEY_TO_ID, JOB_LEVELS_MOCK, LASER_PLUMBING_TENANT_ID, LEAVE_REQUESTS_MOCK, MAGFA_COMMERCE_STANDARD, MAGFA_CONVERSATION_DASHBOARD, MAGFA_TENANT_ID, METADATA_CATEGORY_IDS, METADATA_GENERAL_CATEGORY_REFS, METADATA_SYSTEM_CATEGORY_REFS, MLC, OHR, ORDERING_BASIC, ORDERING_ENTERPRISE, ORDERING_STANDARD, OWNERSHIP_FILTER_BYPASS, PLATFORM_CONSOLE, PLATFORM_TENANT_ID, PM, POSITIONS_CATEGORY_MOCK, POSITIONS_MOCK, POSITION_ASSIGNMENTS_MOCK, QCP, QGEN, QHW, QOHR, QPM, QTLE, QUESTIONNAIRE_CATEGORY_MOCK, QUESTION_BANK_ITEM_CATEGORY_MOCK, QWS, RESPONSIBILITIES_CATEGORY_MOCK, RESPONSIBILITIES_MOCK, RESPONSIBILITY_CATEGORY_KEY_TO_ID, SAFETYMINDER_BASIC, SAFETYMINDER_ENTERPRISE, SAFETYMINDER_PROFESSIONAL, SHOP_BASIC, SHOP_ENTERPRISE, SHOP_PRO, TAGS_MOCK, TASKS, TASK_STATUSES, TASK_TEMPLATES, TASK_TYPES, TEAMS_CATEGORY_MOCK, TEAMS_MOCK, TEAM_BUSINESS_UNITS_MOCK, TEAM_CATEGORY_KEY_TO_ID, TEAM_MEMBERS_MOCK, TEAM_MEMBER_ROLES_MOCK, TIMEPLICITY_TENANT_ID, TLA, TOKENS, TPC, VISIBILITY_FILTER_BYPASS, WORKFLOW_CATEGORIES, WS, activityCategoryMocks, activityDefinitionEntityMock, applyEntityDefinitionFirestoreSnapshot, automationCommandMiddleware, automationMock, avatarInterface, awaitConversationMockSharedStorage, axVersionDB, axWorkflowExecutionDB, axcPatchEmployeeActivePrimaryBusinessUnitRefsFromRows, axcPatchEmployeeActivePrimaryPositionRefsFromRows, axcPatchEmployeeManagerRefsFromRows, axcResolveCommandRegistrySeedId, axcResolveQueryRegistrySeedId, axcResolveWidgetCatalogSeedId, bankCategory, buildEntityStorageQuickSearchFilter, buildWorkflowInstanceCartableDemoRows, bypassAllFilters, bypassOwnershipFilter, bypassVisibilityFilter, calendarEventMock, calendarEventTypeMockData, calendarMock, chatMessageMock, chatMock, checkboxInterface, childCountMiddleware, clearEntityDefinitionFirestoreCollections, colorInterface, computeDiff, contactInterface, conversationDemoSeedUserIds, createFileCastMiddleware, createWidgetLayoutConfig, createWorkflowDefinitionEntityMock, dateInterface, dateTimeInterface, descriptionInterface, documentFolderSyncMiddleware, emailInterface, entityDefDb, entityValidationMiddleware, fileUploaderInterface, finalizeActivityCategoryItemCounts, findEmployeeById, folderStorageMiddleware, groupOrderItemCalculatorMiddleware, historyMiddleware, identifierCommitMiddleware, imageInterface, inspectionOkXNaInterface, loadMockPropertyDefinitions, lockGuardMiddleware, longTextAnswerInterface, lookupInterface, lookupResolverMiddleware, mapInterface, meetingFilesMock, meetingIds, meetingMock, meetingParticipantMock, meetingRoleTypeMock, meetingSessionMock, meetingTimeSlotMock, meetingTypeFileTemplateMock, meetingTypeMock, mergeDetailRelationMiddleware, mergeQuickSearchIntoRequest, metadataCategoryMocks, mockParticipantIndexForSecurityUserId, mockQuestionBankItemByName, mockRoleDefinitions, mockUsers, multipleChoiceInterface, multipleSelectInterface, normalizeAnyFileArrayForView, normalizeSnapshotFileFieldsForView, numberInterface, parseEntityStorageInsertData, parseEntityStorageQueryRequest, participantIds, participantMock, passwordInterface, personIdentifierTypeMock, personIds, personLegalIds, personMock, personNaturalIds, phoneInterface, primaryMiddleware, provideMockPropertySetups, qrcodeInterface, questionBankItemMock, questionnaireCalculationMock, questionnaireMock, ratingInterface, richTextInterface, scaleInterface, selectInterface, selectionListInterface, sexAtBirthInterface, signatureInterface, signatureLoaderMiddleware, statusDefaultMiddleware, tagInterface, tenantMocks, textAreaInterface, textInterface, timeDurationInterface, titleInterface, toUiRows, toggleInterface, tokenCategoryIds, tokenCategoryMocks, urlInterface, versionInterface, visibilityFilterMiddleware, workflowDefinitionEntityMock, workflowDefinitionIds, workflowDefinitionMock, yesNoInterface };
|
|
4162
|
-
export type { AXCBookmarkEntity, AXCEntityStorageBackendType, AXCEntityStorageInsertInput, AXCEntityStorageInsertOutput, AXCEntityStorageQueryInput, AXCEntityStorageQueryResult, AXCFirestoreConfig, AXCLeaveRequestMockDto, AXCPositionAssignmentMockDto, AXCWorkflowExecutionStore, AXMAiManagementAssistMockModel, AXMAiManagementModelMockModel, AXMApplicationManagementApplicationCategoryMockModel, AXMOrganizationManagementBusinessUnitMockModel, AXMOrganizationManagementJobDefinitionMockModel, AXMOrganizationManagementJobLevelMockModel, AXMOrganizationManagementPositionMockModel, AXMOrganizationManagementResponsibilityMockModel, AXMOrganizationManagementTeamBusinessUnitMockModel, AXMOrganizationManagementTeamMemberMockModel, AXMOrganizationManagementTeamMemberRoleMockModel, AXMOrganizationManagementTeamMockModel, AXMTag, AXPLogRow, AXPRuleRow, AXPSeqRow, AXPTextTemplateRenderRequest, AXPTextTemplateRenderResult, AXPVersionChange, AXPVersionEntry, AXPVersionStream, AutomationCommandDto, AutomationMockDto, CanonicalChange, CanonicalChangeOp, CreateWorkflowDefinitionEntityMockOptions, EntityDefinitionFirestoreSnapshotFile, FirestoreSnapshotOperation, MockUserPassCredentials, QuestionBankItemCategoryTitle, QuestionBankItemMockDto, QuestionnaireCalculationMockDto, QuestionnaireCalculationMockResultKind, QuestionnaireCategoryTitle, QuestionnaireMockDto, ShowMetaDataFormPopupMockInput, Task, TaskStatus, TaskTemplate, TaskType, UIDiffRow, VersionedFileInfo, WorkflowInstanceEntityBookmark };
|
|
4196
|
+
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_ID_BY_KEY, ACTIVITY_DEFINITIONS, AI_ASSIST_MOCK, AI_MODEL_MOCK, APPLICATIONS, APPLICATION_CATEGORY_IDS, APPLICATION_CATEGORY_MOCKS, AXCActivityCategorySeeder, AXCActivityDefinitionSeeder, AXCAiAssistSeeder, AXCAiManagementMockModule, AXCAiModelSeeder, AXCAppTermDataSeeder, AXCAppVersionDataSeeder, AXCApplicationCategoryDataSeeder, AXCApplicationDataSeeder, AXCApplicationManagementMockModule, AXCAssessmentManagementMockModule, AXCAssetManagementMockModule, AXCAuthMockModule, AXCCalendarDataSeeder, AXCCalendarEventDataSeeder, AXCCalendarManagementMockModule, AXCCommandRegistryDataSeeder, AXCCommonMockModule, AXCContactCoreMockModule, AXCContentManagementMockModule, AXCConversationDataSeeder, AXCConversationMockConversationApi, AXCConversationMockMessageApi, AXCConversationMockModule, AXCConversationMockRealtimeApi, AXCConversationMockUserApi, AXCCustomerManagementMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDexieEntityStorageService, AXCDocumentManagementMockModule, AXCEditionDataSeeder, AXCEntityDefinitionSeederService, AXCEntityDefinitionsModule, AXCEntityStorageInsertCommand, AXCEntityStorageModule, AXCEntityStorageQueryQuery, AXCFileStorageServiceDexie, AXCFileStorageServiceFirestore, AXCFinancialCoreMockModule, AXCFirestoreEntityStorageService, AXCFormTemplateManagementMockModule, AXCGoogleStrategyMock, AXCHealthCoreMockModule, AXCHelpDeskMockModule, AXCHumanCapitalManagementMockModule, AXCIdentifierManagementMockModule, AXCImageCaptchaChallengeProviderMock, AXCLearningManagementMockModule, AXCLocaleManagementMockModule, AXCLocationManagementMockModule, AXCLockService, AXCMeasurementCoreMockModule, AXCMeetingManagementMockModule, AXCMetaDataDefinitionDataSeeder, AXCMetadataCategorySeeder, AXCMiddlewaresModule, AXCMockCaptchaChallengeComponent, AXCMockEntityLogListener, AXCMockModule, AXCMockShowMetaDataFormPopupCommand, AXCNotificationManagementMockModule, AXCOrderManagementMockModule, AXCOrganizationManagementMockModule, AXCPersonCoreMockModule, AXCPlatformManagementMockModule, AXCProcurementManagementMockModule, AXCProductCatalogMockModule, AXCProjectManagementMockModule, AXCQueryRegistryDataSeeder, AXCReportManagementMockModule, AXCSecurityManagementMockModule, AXCStoredEntityDefinitionLoader, AXCSubscriptionManagementMockModule, AXCSupplierManagementMockModule, AXCTaskManagementMockModule, AXCTenantManagementMockModule, AXCTenantSeeder, AXCTextTemplateRenderBackend, AXCTokensDataSeeder, AXCUserPassStrategyMock, AXCVersionDB, AXCVersioningService, AXCWidgetCatalogDataSeeder, AXCWorkflowCategorySeeder, AXCWorkflowDefinitionDataSeeder, AXCWorkflowEngine, AXCWorkflowExecutionDB, AXCWorkflowExecutionStoreDexie, AXCWorkflowExecutionStoreFirestore, AXCWorkflowInstanceCartableDemoSeeder, AXCWorkflowManagementMockModule, AXC_ENTITY_STORAGE_BACKEND_TYPE, AXC_FIRESTORE_CONFIG, AXC_FIRESTORE_DB, AXC_WORKFLOW_EXECUTION_STORE, AXMAiDemisAssistAgentUuid, AXMAiDemisAssistId, AXMAiDemisGeneralAssistId, AXMAiModelStableIds, AXMAiPlatformAssistantAssistId, AXMAutomationDataSeeder, AXMBusinessUnitDataSeeder, AXMCalendarEventTypeSeeder, AXMDashboardChartDataSourceDefinition, AXMEmployeeDataSeeder, AXMEmploymentTypeDataSeeder, AXMFormDataSourcesProvider, AXMJobDefinitionDataSeeder, AXMJobLevelDataSeeder, AXMLeaveRequestDataSeeder, AXMMeetingDataSeeder, AXMMeetingFilesDataSeeder, AXMMeetingParticipantDataSeeder, AXMMeetingRoleTypeDataSeeder, AXMMeetingSessionDataSeeder, AXMMeetingTypeDataSeeder, AXMMeetingTypeFileTemplateDataSeeder, AXMPositionAssignmentDataSeeder, AXMPositionDataSeeder, AXMQuestionBankItemCategoryDataSeeder, AXMQuestionBankItemDataSeeder, AXMQuestionnaireCalculationDataSeeder, AXMQuestionnaireCategoryDataSeeder, AXMQuestionnaireDataSeeder, AXMResponsibilityDataSeeder, AXMTagDataSeeder, AXMTeamBusinessUnitDataSeeder, AXMTeamDataSeeder, AXMTeamMemberDataSeeder, AXMTeamMemberRoleDataSeeder, AXMWorkflowDashboardChartDataSourceDefinition, AXM_AI_REGISTRY_COMMAND_NAME, AXM_AI_REGISTRY_QUERY_NAME, AXM_CORPORATE_BUSINESS_UNIT_ID, AXPDashboardDataSeeder, AXPIdentifierDB, AXPMessageDataSeeder, AXPMockChecksumProvider, AXPMockClockProvider, AXPMockIdentifierService, AXPMockLookupProvider, AXPMockPolicyProvider, AXPMockSequenceProvider, AXPRoomDataSeeder, AXPSecurityManagementRoleDataSeeder, AXPSecurityManagementUserDataSeeder, AXPTaskBoardPlatformManagementTaskProvider, AXPTaskBoardProjectManagementTaskProvider, AXVChangeType, BCC, BOC, BUSINESS_UNITS_MOCK, CHAT_LAST_MESSAGE_IDS, COLLABORATION_STANDARD, COSTMANAGER_ENTERPRISE, COSTMANAGER_PROFESSIONAL, COSTMANAGER_STANDARD, CP, CRM_ENTERPRISE, DASHBOARDS, EDITIONS, EMPLOYEES_MOCK, EMPLOYMENT_TYPES_MOCK, ENTITY_DEFINITION_MAP, ENTITY_REGISTRY, FINANCE_BASIC, FINANCE_ENTERPRISE, FINANCE_PRO, G, HR_ENTERPRISE, HW, JOB_DEFINITIONS_CATEGORY_MOCK, JOB_DEFINITIONS_MOCK, JOB_DEFINITION_CATEGORY_KEY_TO_ID, JOB_LEVELS_MOCK, LASER_PLUMBING_TENANT_ID, LEAVE_REQUESTS_MOCK, MAGFA_COMMERCE_STANDARD, MAGFA_CONVERSATION_DASHBOARD, MAGFA_TENANT_ID, METADATA_CATEGORY_IDS, METADATA_GENERAL_CATEGORY_REFS, METADATA_SYSTEM_CATEGORY_REFS, MLC, OHR, ORDERING_BASIC, ORDERING_ENTERPRISE, ORDERING_STANDARD, OWNERSHIP_FILTER_BYPASS, PLATFORM_CONSOLE, PLATFORM_TENANT_ID, PM, POSITIONS_CATEGORY_MOCK, POSITIONS_MOCK, POSITION_ASSIGNMENTS_MOCK, QCP, QGEN, QHW, QOHR, QPM, QTLE, QUESTIONNAIRE_CATEGORY_MOCK, QUESTION_BANK_ITEM_CATEGORY_MOCK, QWS, RESPONSIBILITIES_CATEGORY_MOCK, RESPONSIBILITIES_MOCK, RESPONSIBILITY_CATEGORY_KEY_TO_ID, SAFETYMINDER_BASIC, SAFETYMINDER_ENTERPRISE, SAFETYMINDER_PROFESSIONAL, SHOP_BASIC, SHOP_ENTERPRISE, SHOP_PRO, TAGS_MOCK, TASKS, TASK_STATUSES, TASK_TEMPLATES, TASK_TYPES, TEAMS_CATEGORY_MOCK, TEAMS_MOCK, TEAM_BUSINESS_UNITS_MOCK, TEAM_CATEGORY_KEY_TO_ID, TEAM_MEMBERS_MOCK, TEAM_MEMBER_ROLES_MOCK, TIMEPLICITY_TENANT_ID, TLA, TOKENS, TPC, VISIBILITY_FILTER_BYPASS, WORKFLOW_CATEGORIES, WS, activityCategoryMocks, activityDefinitionEntityMock, applyEntityDefinitionFirestoreSnapshot, automationCommandMiddleware, automationMock, avatarInterface, awaitConversationMockSharedStorage, axVersionDB, axWorkflowExecutionDB, axcPatchEmployeeActivePrimaryBusinessUnitRefsFromRows, axcPatchEmployeeActivePrimaryPositionRefsFromRows, axcPatchEmployeeManagerRefsFromRows, axcResolveCommandRegistrySeedId, axcResolveQueryRegistrySeedId, axcResolveWidgetCatalogSeedId, bankCategory, buildEntityStorageQuickSearchFilter, buildWorkflowInstanceCartableDemoRows, bypassAllFilters, bypassOwnershipFilter, bypassVisibilityFilter, calendarEventMock, calendarEventTypeMockData, calendarMock, chatMessageMock, chatMock, checkboxInterface, childCountMiddleware, clearEntityDefinitionFirestoreCollections, colorInterface, computeDiff, contactInterface, conversationDemoSeedUserIds, createFileCastMiddleware, createWidgetLayoutConfig, createWorkflowDefinitionEntityMock, dateInterface, dateTimeInterface, descriptionInterface, documentFolderSyncMiddleware, emailInterface, entityDefDb, entityValidationMiddleware, fileUploaderInterface, finalizeActivityCategoryItemCounts, findEmployeeById, folderStorageMiddleware, groupOrderItemCalculatorMiddleware, historyMiddleware, identifierCommitMiddleware, imageInterface, inspectionOkXNaInterface, loadMockPropertyDefinitions, lockGuardMiddleware, longTextAnswerInterface, lookupInterface, lookupResolverMiddleware, mapInterface, meetingFilesMock, meetingIds, meetingMock, meetingParticipantMock, meetingRoleTypeMock, meetingSessionMock, meetingTimeSlotMock, meetingTypeFileTemplateMock, meetingTypeMock, mergeDetailRelationMiddleware, mergeQuickSearchIntoRequest, metadataCategoryMocks, mockParticipantIndexForSecurityUserId, mockQuestionBankItemByName, mockRoleDefinitions, mockUsers, multipleChoiceInterface, multipleSelectInterface, normalizeAnyFileArrayForView, normalizeSnapshotFileFieldsForView, numberInterface, parseEntityStorageInsertData, parseEntityStorageQueryRequest, participantIds, participantMock, passwordInterface, personIdentifierTypeMock, personIds, personLegalIds, personMock, personNaturalIds, phoneInterface, primaryMiddleware, provideMockPropertySetups, qrcodeInterface, questionBankItemMock, questionnaireCalculationMock, questionnaireMock, ratingInterface, richTextInterface, scaleInterface, selectInterface, selectionListInterface, sexAtBirthInterface, signatureInterface, signatureLoaderMiddleware, statusDefaultMiddleware, tagInterface, tenantMocks, textAreaInterface, textInterface, timeDurationInterface, titleInterface, toUiRows, toggleInterface, tokenCategoryIds, tokenCategoryMocks, urlInterface, versionInterface, visibilityFilterMiddleware, workflowDefinitionEntityMock, workflowDefinitionIds, workflowDefinitionMock, yesNoInterface };
|
|
4197
|
+
export type { AXCBookmarkEntity, AXCEntityStorageBackendType, AXCEntityStorageInsertInput, AXCEntityStorageInsertOutput, AXCEntityStorageQueryInput, AXCEntityStorageQueryResult, AXCFirestoreConfig, AXCLeaveRequestMockDto, AXCPositionAssignmentMockDto, AXCWorkflowExecutionStore, AXMAiManagementAssistDemisMockMetadata, AXMAiManagementAssistMockModel, AXMAiManagementModelMockModel, AXMApplicationManagementApplicationCategoryMockModel, AXMOrganizationManagementBusinessUnitMockModel, AXMOrganizationManagementJobDefinitionMockModel, AXMOrganizationManagementJobLevelMockModel, AXMOrganizationManagementPositionMockModel, AXMOrganizationManagementResponsibilityMockModel, AXMOrganizationManagementTeamBusinessUnitMockModel, AXMOrganizationManagementTeamMemberMockModel, AXMOrganizationManagementTeamMemberRoleMockModel, AXMOrganizationManagementTeamMockModel, AXMTag, AXPLogRow, AXPRuleRow, AXPSeqRow, AXPTextTemplateRenderRequest, AXPTextTemplateRenderResult, AXPVersionChange, AXPVersionEntry, AXPVersionStream, AutomationCommandDto, AutomationMockDto, CanonicalChange, CanonicalChangeOp, CreateWorkflowDefinitionEntityMockOptions, EntityDefinitionFirestoreSnapshotFile, FirestoreSnapshotOperation, MockUserPassCredentials, QuestionBankItemCategoryTitle, QuestionBankItemMockDto, QuestionnaireCalculationMockDto, QuestionnaireCalculationMockResultKind, QuestionnaireCategoryTitle, QuestionnaireMockDto, ShowMetaDataFormPopupMockInput, Task, TaskStatus, TaskTemplate, TaskType, UIDiffRow, VersionedFileInfo, WorkflowInstanceEntityBookmark };
|