@elqnt/agents 3.1.0 → 3.2.1
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/README.md +40 -0
- package/dist/{agent-models-C36pvpUb.d.mts → agent-models-DLQlC7N6.d.mts} +143 -2
- package/dist/{agent-models-C36pvpUb.d.ts → agent-models-DLQlC7N6.d.ts} +143 -2
- package/dist/api/index.d.mts +227 -5
- package/dist/api/index.d.ts +227 -5
- package/dist/api/index.js +54 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +53 -1
- package/dist/api/server.d.mts +4 -2
- package/dist/api/server.d.ts +4 -2
- package/dist/api/server.js +9 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/server.mjs +8 -0
- package/dist/api/server.mjs.map +1 -1
- package/dist/chunk-2JDVRL35.js +133 -0
- package/dist/chunk-2JDVRL35.js.map +1 -0
- package/dist/chunk-2QL3LLC3.mjs +1075 -0
- package/dist/chunk-2QL3LLC3.mjs.map +1 -0
- package/dist/chunk-3EHE4O57.mjs +133 -0
- package/dist/chunk-3EHE4O57.mjs.map +1 -0
- package/dist/{chunk-TPQS2XAW.js → chunk-3VM5TCJR.js} +8 -2
- package/dist/chunk-3VM5TCJR.js.map +1 -0
- package/dist/chunk-AF4QJD73.js +1075 -0
- package/dist/chunk-AF4QJD73.js.map +1 -0
- package/dist/{chunk-RAA5NKA7.js → chunk-BH2FIDFK.js} +224 -2
- package/dist/chunk-BH2FIDFK.js.map +1 -0
- package/dist/{chunk-NF6PGOXP.mjs → chunk-GOHHT3ET.mjs} +224 -2
- package/dist/chunk-GOHHT3ET.mjs.map +1 -0
- package/dist/{chunk-SXYTVNKJ.mjs → chunk-ZK27UGO6.mjs} +7 -1
- package/dist/{chunk-SXYTVNKJ.mjs.map → chunk-ZK27UGO6.mjs.map} +1 -1
- package/dist/hooks/index.d.mts +224 -67
- package/dist/hooks/index.d.ts +224 -67
- package/dist/hooks/index.js +8 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +11 -6
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +67 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -7
- package/dist/models/index.d.mts +3 -131
- package/dist/models/index.d.ts +3 -131
- package/dist/models/index.js +8 -2
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +7 -1
- package/dist/{integration-21IuOOeV.d.mts → sandbox-DOxoM2Ge.d.mts} +132 -1
- package/dist/{integration-21IuOOeV.d.ts → sandbox-DOxoM2Ge.d.ts} +132 -1
- package/dist/transport/index.d.mts +36 -0
- package/dist/transport/index.d.ts +36 -0
- package/dist/transport/index.js +8 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/index.mjs +8 -0
- package/dist/transport/index.mjs.map +1 -0
- package/dist/types-C2qd5f-E.d.mts +51 -0
- package/dist/types-k9PszCzt.d.ts +51 -0
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +10 -4
- package/dist/chunk-NF6PGOXP.mjs.map +0 -1
- package/dist/chunk-RAA5NKA7.js.map +0 -1
- package/dist/chunk-RWFVHX2J.js +0 -585
- package/dist/chunk-RWFVHX2J.js.map +0 -1
- package/dist/chunk-TPQS2XAW.js.map +0 -1
- package/dist/chunk-X4MSBDTZ.mjs +0 -585
- package/dist/chunk-X4MSBDTZ.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/chunk-RAA5NKA7.js","../api/index.ts"],"names":[],"mappings":"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AAA;AACa,MAAA;AACQ,MAAA;AACJ,MAAA;AACvB,IAAA;AACG,IAAA;AACJ,EAAA;AACH;AAQE;AAEyB,EAAA;AACf,IAAA;AACF,IAAA;AACH,IAAA;AACJ,EAAA;AACH;AAOE;AAEyB,EAAA;AACf,IAAA;AACF,IAAA;AACa,MAAA;AACQ,MAAA;AAC3B,IAAA;AACG,IAAA;AACJ,EAAA;AACH;AAOE;AAEyB,EAAA;AACf,IAAA;AACF,IAAA;AACa,MAAA;AACQ,MAAA;AAC3B,IAAA;AACG,IAAA;AACJ,EAAA;AACH;AAQE;AAEyB,EAAA;AACf,IAAA;AACF,IAAA;AACa,MAAA;AACQ,MAAA;AACF,MAAA;AACzB,IAAA;AACG,IAAA;AACJ,EAAA;AACH;AAIgD;AACrB,EAAA;AACf,IAAA;AACD,IAAA;AACJ,IAAA;AACJ,EAAA;AACH;ADhSqD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/eloquent/eloquent/packages/@elqnt/agents/dist/chunk-RAA5NKA7.js","sourcesContent":[null,"/**\n * Agents API functions\n *\n * Browser-side API client for agent operations.\n * Uses @elqnt/api-client for HTTP requests with automatic token management.\n */\n\nimport { browserApiRequest } from \"@elqnt/api-client/browser\";\nimport type { ApiResponse, ApiClientOptions } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n Agent,\n AgentSummary,\n AgentResponse,\n ListAgentsResponse,\n ListAgentsSummaryResponse,\n Skill,\n SkillResponse,\n SkillsListResponse,\n GetSkillsByIDsResponse,\n SubAgent,\n SubAgentResponse,\n SubAgentsListResponse,\n AgentWidget,\n AgentWidgetResponse,\n ListAgentWidgetsResponse,\n SkillUserConfig,\n SkillUserConfigResponse,\n SkillUserConfigListResponse,\n ResolveSkillConfigResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n GetToolDefinitionsByIDsResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n} from \"../models\";\n\n// =============================================================================\n// AGENTS\n// =============================================================================\n\nexport async function listAgentsApi(options: ApiClientOptions): Promise<ApiResponse<ListAgentsResponse>> {\n return browserApiRequest(\"/api/v1/agents\", { method: \"GET\", ...options });\n}\n\nexport async function listAgentsSummaryApi(options: ApiClientOptions): Promise<ApiResponse<ListAgentsSummaryResponse>> {\n return browserApiRequest(\"/api/v1/agents/summary\", { method: \"GET\", ...options });\n}\n\nexport async function getAgentApi(agentId: string, options: ApiClientOptions): Promise<ApiResponse<AgentResponse>> {\n return browserApiRequest(`/api/v1/agents/${agentId}`, { method: \"GET\", ...options });\n}\n\nexport async function createAgentApi(agent: Partial<Agent>, options: ApiClientOptions): Promise<ApiResponse<AgentResponse>> {\n return browserApiRequest(\"/api/v1/agents\", { method: \"POST\", body: agent, ...options });\n}\n\nexport async function updateAgentApi(agentId: string, agent: Partial<Agent>, options: ApiClientOptions): Promise<ApiResponse<AgentResponse>> {\n return browserApiRequest(`/api/v1/agents/${agentId}`, { method: \"PUT\", body: agent, ...options });\n}\n\nexport async function deleteAgentApi(agentId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/agents/${agentId}`, { method: \"DELETE\", ...options });\n}\n\nexport async function getDefaultAgentApi(options: ApiClientOptions): Promise<ApiResponse<AgentResponse>> {\n return browserApiRequest(\"/api/v1/agents/default\", { method: \"GET\", ...options });\n}\n\nexport async function getAgentByNameApi(\n name: string,\n options: ApiClientOptions\n): Promise<ApiResponse<AgentResponse>> {\n return browserApiRequest(`/api/v1/agents/by-name?name=${encodeURIComponent(name)}`, {\n method: \"GET\",\n ...options,\n });\n}\n\n// =============================================================================\n// SKILLS\n// =============================================================================\n\nexport async function listSkillsApi(options: ApiClientOptions): Promise<ApiResponse<SkillsListResponse>> {\n return browserApiRequest(\"/api/v1/skills\", { method: \"GET\", ...options });\n}\n\nexport async function getSkillApi(skillId: string, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>> {\n return browserApiRequest(`/api/v1/skills/${skillId}`, { method: \"GET\", ...options });\n}\n\nexport async function getSkillsByIdsApi(ids: string[], options: ApiClientOptions): Promise<ApiResponse<GetSkillsByIDsResponse>> {\n return browserApiRequest(\"/api/v1/skills/by-ids\", { method: \"POST\", body: { ids }, ...options });\n}\n\nexport async function createSkillApi(skill: Partial<Skill>, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>> {\n return browserApiRequest(\"/api/v1/skills\", { method: \"POST\", body: skill, ...options });\n}\n\nexport async function updateSkillApi(skillId: string, skill: Partial<Skill>, options: ApiClientOptions): Promise<ApiResponse<SkillResponse>> {\n return browserApiRequest(`/api/v1/skills/${skillId}`, { method: \"PUT\", body: skill, ...options });\n}\n\nexport async function deleteSkillApi(skillId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/skills/${skillId}`, { method: \"DELETE\", ...options });\n}\n\nexport async function searchSkillsApi(\n query: string,\n options: ApiClientOptions & { category?: string; limit?: number }\n): Promise<ApiResponse<SkillsListResponse>> {\n const params = new URLSearchParams();\n params.set(\"q\", query);\n if (options.category) params.set(\"category\", options.category);\n if (options.limit) params.set(\"limit\", String(options.limit));\n return browserApiRequest(`/api/v1/skills/search?${params.toString()}`, { method: \"GET\", ...options });\n}\n\n// =============================================================================\n// SKILL USER CONFIG\n// =============================================================================\n\nexport async function getSkillUserConfigApi(\n skillId: string,\n options: ApiClientOptions & { agentId?: string }\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return browserApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, {\n method: \"GET\",\n ...options,\n });\n}\n\nexport async function updateSkillUserConfigApi(\n skillId: string,\n data: {\n enabled?: boolean;\n displayOrder?: number;\n config?: Record<string, unknown>;\n agentId?: string;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n return browserApiRequest(`/api/v1/skills/${skillId}/user-config`, {\n method: \"PUT\",\n body: data,\n ...options,\n });\n}\n\nexport async function deleteSkillUserConfigApi(\n skillId: string,\n options: ApiClientOptions & { agentId?: string }\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n const query = params.toString();\n return browserApiRequest(`/api/v1/skills/${skillId}/user-config${query ? `?${query}` : \"\"}`, {\n method: \"DELETE\",\n ...options,\n });\n}\n\nexport async function listSkillUserConfigsApi(\n options: ApiClientOptions & { agentId?: string; limit?: number; offset?: number }\n): Promise<ApiResponse<SkillUserConfigListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.limit) params.set(\"limit\", String(options.limit));\n if (options.offset) params.set(\"offset\", String(options.offset));\n const query = params.toString();\n return browserApiRequest(`/api/v1/skills/user-configs${query ? `?${query}` : \"\"}`, {\n method: \"GET\",\n ...options,\n });\n}\n\nexport async function resolveSkillConfigApi(\n skillId: string,\n agentId: string,\n options: ApiClientOptions\n): Promise<ApiResponse<ResolveSkillConfigResponse>> {\n return browserApiRequest(`/api/v1/skills/${skillId}/resolve-config?agentId=${agentId}`, {\n method: \"GET\",\n ...options,\n });\n}\n\nexport async function updateSkillOrgConfigApi(\n skillId: string,\n data: {\n enabled?: boolean;\n displayOrder?: number;\n config?: Record<string, unknown>;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<SkillUserConfigResponse>> {\n return browserApiRequest(`/api/v1/skills/${skillId}/org-config`, {\n method: \"PUT\",\n body: data,\n ...options,\n });\n}\n\n// =============================================================================\n// SUB-AGENTS\n// =============================================================================\n\nexport async function listSubAgentsApi(\n options: ApiClientOptions & { onlySystem?: boolean; enabled?: boolean }\n): Promise<ApiResponse<SubAgentsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n const queryString = params.toString();\n return browserApiRequest(`/api/v1/subagents${queryString ? `?${queryString}` : \"\"}`, { method: \"GET\", ...options });\n}\n\nexport async function getSubAgentApi(subAgentId: string, options: ApiClientOptions): Promise<ApiResponse<SubAgentResponse>> {\n return browserApiRequest(`/api/v1/subagents/${subAgentId}`, { method: \"GET\", ...options });\n}\n\nexport async function createSubAgentApi(subAgent: Partial<SubAgent>, options: ApiClientOptions): Promise<ApiResponse<SubAgentResponse>> {\n return browserApiRequest(\"/api/v1/subagents\", { method: \"POST\", body: { subAgent }, ...options });\n}\n\nexport async function updateSubAgentApi(subAgentId: string, subAgent: Partial<SubAgent>, options: ApiClientOptions): Promise<ApiResponse<SubAgentResponse>> {\n return browserApiRequest(`/api/v1/subagents/${subAgentId}`, { method: \"PUT\", body: { subAgent }, ...options });\n}\n\nexport async function deleteSubAgentApi(subAgentId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/subagents/${subAgentId}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// WIDGETS\n// =============================================================================\n\nexport async function listWidgetsApi(agentId: string, options: ApiClientOptions): Promise<ApiResponse<ListAgentWidgetsResponse>> {\n return browserApiRequest(`/api/v1/agents/${agentId}/widgets`, { method: \"GET\", ...options });\n}\n\nexport async function getDefaultWidgetApi(agentId: string, options: ApiClientOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return browserApiRequest(`/api/v1/agents/${agentId}/widgets/default`, { method: \"GET\", ...options });\n}\n\nexport async function createWidgetApi(agentId: string, widget: Partial<AgentWidget>, options: ApiClientOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return browserApiRequest(`/api/v1/agents/${agentId}/widgets`, { method: \"POST\", body: { widget }, ...options });\n}\n\nexport async function getWidgetApi(widgetId: string, options: ApiClientOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return browserApiRequest(`/api/v1/widgets/${widgetId}`, { method: \"GET\", ...options });\n}\n\nexport async function getWidgetByWidgetIdApi(widgetId: string, baseUrl: string): Promise<ApiResponse<AgentWidgetResponse>> {\n return browserApiRequest(`/api/v1/widgets/by-widget-id/${widgetId}`, { method: \"GET\", baseUrl, orgId: \"\" });\n}\n\nexport async function updateWidgetApi(widgetId: string, widget: Partial<AgentWidget>, options: ApiClientOptions): Promise<ApiResponse<AgentWidgetResponse>> {\n return browserApiRequest(`/api/v1/widgets/${widgetId}`, { method: \"PUT\", body: { widget }, ...options });\n}\n\nexport async function deleteWidgetApi(widgetId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/widgets/${widgetId}`, { method: \"DELETE\", ...options });\n}\n\nexport async function setDefaultWidgetApi(widgetId: string, agentId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/widgets/${widgetId}/default`, { method: \"POST\", body: { agentId }, ...options });\n}\n\n// =============================================================================\n// ANALYTICS\n// =============================================================================\n\nexport interface DateFilter {\n from?: string;\n to?: string;\n}\n\nexport interface AnalyticsDataResponse {\n data: unknown[];\n metadata: ResponseMetadata;\n}\n\nexport async function getAgentChatsAnalyticsApi(\n params: { date_filter: DateFilter; agent_id?: string },\n options: ApiClientOptions\n): Promise<ApiResponse<AnalyticsDataResponse>> {\n return browserApiRequest(\"/api/v1/analytics/agents/chats\", {\n method: \"POST\",\n body: params,\n ...options,\n });\n}\n\nexport async function getAgentCSATAnalyticsApi(\n params: { date_filter: DateFilter; agent_id?: string },\n options: ApiClientOptions\n): Promise<ApiResponse<AnalyticsDataResponse>> {\n return browserApiRequest(\"/api/v1/analytics/agents/csat\", {\n method: \"POST\",\n body: params,\n ...options,\n });\n}\n\nexport async function getAgentListAnalyticsApi(\n options: ApiClientOptions\n): Promise<ApiResponse<AnalyticsDataResponse>> {\n return browserApiRequest(\"/api/v1/analytics/agents\", {\n method: \"GET\",\n ...options,\n });\n}\n\nexport async function getTaskOutcomesApi(\n params: { date_filter: DateFilter },\n options: ApiClientOptions\n): Promise<ApiResponse<AnalyticsDataResponse>> {\n return browserApiRequest(\"/api/v1/analytics/tasks\", {\n method: \"POST\",\n body: params,\n ...options,\n });\n}\n\n// =============================================================================\n// TOOL DEFINITIONS\n// =============================================================================\n\nexport async function listToolDefinitionsApi(\n options: ApiClientOptions & { onlySystem?: boolean; enabled?: boolean; limit?: number; offset?: number }\n): Promise<ApiResponse<ToolDefinitionsListResponse>> {\n const params = new URLSearchParams();\n if (options.onlySystem !== undefined) params.set(\"onlySystem\", String(options.onlySystem));\n if (options.enabled !== undefined) params.set(\"enabled\", String(options.enabled));\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return browserApiRequest(`/api/v1/tool-definitions${queryString ? `?${queryString}` : \"\"}`, { method: \"GET\", ...options });\n}\n\nexport async function getToolDefinitionApi(toolDefId: string, options: ApiClientOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return browserApiRequest(`/api/v1/tool-definitions/${toolDefId}`, { method: \"GET\", ...options });\n}\n\nexport async function getToolDefinitionsByIdsApi(ids: string[], options: ApiClientOptions): Promise<ApiResponse<GetToolDefinitionsByIDsResponse>> {\n return browserApiRequest(\"/api/v1/tool-definitions/by-ids\", { method: \"POST\", body: { ids }, ...options });\n}\n\nexport async function createToolDefinitionApi(toolDefinition: Partial<ToolDefinition>, options: ApiClientOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return browserApiRequest(\"/api/v1/tool-definitions\", { method: \"POST\", body: { toolDefinition }, ...options });\n}\n\nexport async function updateToolDefinitionApi(toolDefId: string, toolDefinition: Partial<ToolDefinition>, options: ApiClientOptions): Promise<ApiResponse<ToolDefinitionResponse>> {\n return browserApiRequest(`/api/v1/tool-definitions/${toolDefId}`, { method: \"PUT\", body: { toolDefinition }, ...options });\n}\n\nexport async function deleteToolDefinitionApi(toolDefId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/tool-definitions/${toolDefId}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// AGENT JOBS\n// =============================================================================\n\nexport async function listAgentJobsApi(\n options: ApiClientOptions & {\n agentId?: string;\n ownerId?: string;\n scope?: string;\n status?: string;\n frequency?: string;\n limit?: number;\n offset?: number;\n }\n): Promise<ApiResponse<AgentJobsListResponse>> {\n const params = new URLSearchParams();\n if (options.agentId) params.set(\"agentId\", options.agentId);\n if (options.ownerId) params.set(\"ownerId\", options.ownerId);\n if (options.scope) params.set(\"scope\", options.scope);\n if (options.status) params.set(\"status\", options.status);\n if (options.frequency) params.set(\"frequency\", options.frequency);\n if (options.limit !== undefined) params.set(\"limit\", String(options.limit));\n if (options.offset !== undefined) params.set(\"offset\", String(options.offset));\n const queryString = params.toString();\n return browserApiRequest(`/api/v1/agent-jobs${queryString ? `?${queryString}` : \"\"}`, { method: \"GET\", ...options });\n}\n\nexport async function getAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>> {\n return browserApiRequest(`/api/v1/agent-jobs/${jobId}`, { method: \"GET\", ...options });\n}\n\nexport async function createAgentJobApi(job: Partial<AgentJob>, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>> {\n return browserApiRequest(\"/api/v1/agent-jobs\", { method: \"POST\", body: { job }, ...options });\n}\n\nexport async function updateAgentJobApi(jobId: string, job: Partial<AgentJob>, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>> {\n return browserApiRequest(`/api/v1/agent-jobs/${jobId}`, { method: \"PUT\", body: { job }, ...options });\n}\n\nexport async function deleteAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/agent-jobs/${jobId}`, { method: \"DELETE\", ...options });\n}\n\nexport async function pauseAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>> {\n return browserApiRequest(`/api/v1/agent-jobs/${jobId}/pause`, { method: \"POST\", ...options });\n}\n\nexport async function resumeAgentJobApi(jobId: string, options: ApiClientOptions): Promise<ApiResponse<AgentJobResponse>> {\n return browserApiRequest(`/api/v1/agent-jobs/${jobId}/resume`, { method: \"POST\", ...options });\n}\n\n// =============================================================================\n// SKILL CATEGORIES\n// =============================================================================\n\nexport interface SkillCategoriesResponse {\n categories: string[];\n metadata: ResponseMetadata;\n}\n\nexport async function getSkillCategoriesApi(options: ApiClientOptions): Promise<ApiResponse<SkillCategoriesResponse>> {\n return browserApiRequest(\"/api/v1/skills/categories\", { method: \"GET\", ...options });\n}\n\n// =============================================================================\n// PROVISIONING\n// =============================================================================\n\nexport interface ProvisionAgentsResponse {\n agents?: Agent[];\n agentsCreated: number;\n subAgentsCreated: number;\n toolsCreated: number;\n skillsCreated: number;\n success: boolean;\n metadata: ResponseMetadata;\n}\n\n/**\n * Provision default agents for an organization.\n * Creates or updates agents, tools, sub-agents, and skills in bulk.\n *\n * @param definitions - Array of DefaultDefinitions to provision\n * @param options - API client options (baseUrl, orgId)\n */\nexport async function provisionAgentsApi(\n definitions: unknown[],\n options: ApiClientOptions\n): Promise<ApiResponse<ProvisionAgentsResponse>> {\n return browserApiRequest(\"/api/v1/admin/provision/agents\", {\n method: \"POST\",\n body: { definitions },\n ...options,\n });\n}\n\n// =============================================================================\n// INTEGRATIONS\n// =============================================================================\n\nimport type {\n UserIntegration,\n ListUserIntegrationsResponse,\n GetUserIntegrationResponse,\n ConnectIntegrationResponse,\n IntegrationCallbackResponse,\n DisconnectIntegrationResponse,\n RefreshIntegrationResponse,\n UpdateTriageEnabledResponse,\n RunEmailTriageResponse,\n IntegrationProviderTS,\n IntegrationTypeTS,\n} from \"../models\";\n\nexport async function listIntegrationsApi(\n options: ApiClientOptions\n): Promise<ApiResponse<ListUserIntegrationsResponse>> {\n return browserApiRequest(\"/api/v1/integrations\", { method: \"GET\", ...options });\n}\n\nexport async function getIntegrationApi(\n provider: IntegrationProviderTS,\n integrationType: IntegrationTypeTS,\n options: ApiClientOptions\n): Promise<ApiResponse<GetUserIntegrationResponse>> {\n return browserApiRequest(`/api/v1/integrations/${provider}/${integrationType}`, {\n method: \"GET\",\n ...options,\n });\n}\n\nexport async function connectIntegrationApi(\n params: {\n provider: IntegrationProviderTS;\n integrationType: IntegrationTypeTS;\n redirectUri: string;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<ConnectIntegrationResponse>> {\n return browserApiRequest(\"/api/v1/integrations/connect\", {\n method: \"POST\",\n body: {\n provider: params.provider,\n integration_type: params.integrationType,\n redirect_uri: params.redirectUri,\n },\n ...options,\n });\n}\n\nexport async function integrationCallbackApi(\n params: {\n state: string;\n code: string;\n error?: string;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<IntegrationCallbackResponse>> {\n return browserApiRequest(\"/api/v1/integrations/callback\", {\n method: \"POST\",\n body: params,\n ...options,\n });\n}\n\nexport async function disconnectIntegrationApi(\n params: {\n provider: IntegrationProviderTS;\n integrationType: IntegrationTypeTS;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<DisconnectIntegrationResponse>> {\n return browserApiRequest(\"/api/v1/integrations/disconnect\", {\n method: \"POST\",\n body: {\n provider: params.provider,\n integration_type: params.integrationType,\n },\n ...options,\n });\n}\n\nexport async function refreshIntegrationApi(\n params: {\n provider: IntegrationProviderTS;\n integrationType: IntegrationTypeTS;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<RefreshIntegrationResponse>> {\n return browserApiRequest(\"/api/v1/integrations/refresh\", {\n method: \"POST\",\n body: {\n provider: params.provider,\n integration_type: params.integrationType,\n },\n ...options,\n });\n}\n\nexport async function updateIntegrationTriageApi(\n params: {\n provider: IntegrationProviderTS;\n integrationType: IntegrationTypeTS;\n triageEnabled: boolean;\n },\n options: ApiClientOptions\n): Promise<ApiResponse<UpdateTriageEnabledResponse>> {\n return browserApiRequest(\"/api/v1/integrations/triage\", {\n method: \"PUT\",\n body: {\n provider: params.provider,\n integration_type: params.integrationType,\n triage_enabled: params.triageEnabled,\n },\n ...options,\n });\n}\n\nexport async function runEmailTriageApi(\n options: ApiClientOptions\n): Promise<ApiResponse<RunEmailTriageResponse>> {\n return browserApiRequest(\"/api/v1/integrations/triage/run\", {\n method: \"POST\",\n body: {},\n ...options,\n });\n}\n\n// Re-export types from models\nexport type {\n Agent,\n AgentSummary,\n Skill,\n SubAgent,\n AgentWidget,\n SkillUserConfig,\n SkillUserConfigResponse,\n SkillUserConfigListResponse,\n ResolveSkillConfigResponse,\n ToolDefinition,\n ToolDefinitionResponse,\n ToolDefinitionsListResponse,\n GetToolDefinitionsByIDsResponse,\n AgentJob,\n AgentJobResponse,\n AgentJobsListResponse,\n // Integration types\n UserIntegration,\n ListUserIntegrationsResponse,\n GetUserIntegrationResponse,\n ConnectIntegrationResponse,\n IntegrationCallbackResponse,\n DisconnectIntegrationResponse,\n RefreshIntegrationResponse,\n UpdateTriageEnabledResponse,\n RunEmailTriageResponse,\n IntegrationProviderTS,\n IntegrationTypeTS,\n} from \"../models\";\n"]}
|
package/dist/chunk-RWFVHX2J.js
DELETED
|
@@ -1,585 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _chunkRAA5NKA7js = require('./chunk-RAA5NKA7.js');
|
|
58
|
-
|
|
59
|
-
// hooks/index.ts
|
|
60
|
-
var _react = require('react');
|
|
61
|
-
|
|
62
|
-
// hooks/use-async.ts
|
|
63
|
-
|
|
64
|
-
function useAsync(asyncFn, options) {
|
|
65
|
-
const [error, setError] = _react.useState.call(void 0, null);
|
|
66
|
-
const requestCountRef = _react.useRef.call(void 0, 0);
|
|
67
|
-
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
68
|
-
const execute = _react.useCallback.call(void 0,
|
|
69
|
-
async (...args) => {
|
|
70
|
-
requestCountRef.current += 1;
|
|
71
|
-
setLoading(true);
|
|
72
|
-
setError(null);
|
|
73
|
-
try {
|
|
74
|
-
return await asyncFn(...args);
|
|
75
|
-
} catch (err) {
|
|
76
|
-
const message = err instanceof Error ? err.message : "An error occurred";
|
|
77
|
-
setError(message);
|
|
78
|
-
_optionalChain([options, 'optionalAccess', _ => _.onError, 'optionalCall', _2 => _2(message)]);
|
|
79
|
-
throw err;
|
|
80
|
-
} finally {
|
|
81
|
-
requestCountRef.current -= 1;
|
|
82
|
-
if (requestCountRef.current === 0) {
|
|
83
|
-
setLoading(false);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
[asyncFn, options]
|
|
88
|
-
);
|
|
89
|
-
const clearError = _react.useCallback.call(void 0, () => setError(null), []);
|
|
90
|
-
return { execute, loading, error, clearError };
|
|
91
|
-
}
|
|
92
|
-
function useApiAsync(asyncFn, extractor, defaultValue, options) {
|
|
93
|
-
const [error, setError] = _react.useState.call(void 0, null);
|
|
94
|
-
const requestCountRef = _react.useRef.call(void 0, 0);
|
|
95
|
-
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
96
|
-
const execute = _react.useCallback.call(void 0,
|
|
97
|
-
async (...args) => {
|
|
98
|
-
requestCountRef.current += 1;
|
|
99
|
-
setLoading(true);
|
|
100
|
-
setError(null);
|
|
101
|
-
try {
|
|
102
|
-
const response = await asyncFn(...args);
|
|
103
|
-
if (response.error) {
|
|
104
|
-
setError(response.error);
|
|
105
|
-
_optionalChain([options, 'optionalAccess', _3 => _3.onError, 'optionalCall', _4 => _4(response.error)]);
|
|
106
|
-
return defaultValue;
|
|
107
|
-
}
|
|
108
|
-
return response.data ? extractor(response.data) : defaultValue;
|
|
109
|
-
} catch (err) {
|
|
110
|
-
const message = err instanceof Error ? err.message : "An error occurred";
|
|
111
|
-
setError(message);
|
|
112
|
-
_optionalChain([options, 'optionalAccess', _5 => _5.onError, 'optionalCall', _6 => _6(message)]);
|
|
113
|
-
return defaultValue;
|
|
114
|
-
} finally {
|
|
115
|
-
requestCountRef.current -= 1;
|
|
116
|
-
if (requestCountRef.current === 0) {
|
|
117
|
-
setLoading(false);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
[asyncFn, extractor, defaultValue, options]
|
|
122
|
-
);
|
|
123
|
-
const clearError = _react.useCallback.call(void 0, () => setError(null), []);
|
|
124
|
-
return { execute, loading, error, clearError };
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// hooks/use-options-ref.ts
|
|
128
|
-
|
|
129
|
-
function useOptionsRef(options) {
|
|
130
|
-
const optionsRef = _react.useRef.call(void 0, options);
|
|
131
|
-
_react.useEffect.call(void 0, () => {
|
|
132
|
-
optionsRef.current = options;
|
|
133
|
-
}, [options]);
|
|
134
|
-
return optionsRef;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// hooks/index.ts
|
|
138
|
-
function useAgents(options) {
|
|
139
|
-
const optionsRef = useOptionsRef(options);
|
|
140
|
-
const { execute: listAgents, loading: listLoading, error: listError } = useApiAsync(
|
|
141
|
-
() => _chunkRAA5NKA7js.listAgentsApi.call(void 0, optionsRef.current),
|
|
142
|
-
(data) => data.agents,
|
|
143
|
-
[]
|
|
144
|
-
);
|
|
145
|
-
const { execute: listAgentSummaries, loading: listSummaryLoading, error: listSummaryError } = useApiAsync(
|
|
146
|
-
() => _chunkRAA5NKA7js.listAgentsSummaryApi.call(void 0, optionsRef.current),
|
|
147
|
-
(data) => data.agents,
|
|
148
|
-
[]
|
|
149
|
-
);
|
|
150
|
-
const { execute: getAgent, loading: getLoading, error: getError } = useApiAsync(
|
|
151
|
-
(agentId) => _chunkRAA5NKA7js.getAgentApi.call(void 0, agentId, optionsRef.current),
|
|
152
|
-
(data) => data.agent || null,
|
|
153
|
-
null
|
|
154
|
-
);
|
|
155
|
-
const { execute: createAgent, loading: createLoading, error: createError } = useApiAsync(
|
|
156
|
-
(agent) => _chunkRAA5NKA7js.createAgentApi.call(void 0, agent, optionsRef.current),
|
|
157
|
-
(data) => data.agent || null,
|
|
158
|
-
null
|
|
159
|
-
);
|
|
160
|
-
const { execute: updateAgent, loading: updateLoading, error: updateError } = useApiAsync(
|
|
161
|
-
(agentId, agent) => _chunkRAA5NKA7js.updateAgentApi.call(void 0, agentId, agent, optionsRef.current),
|
|
162
|
-
(data) => data.agent || null,
|
|
163
|
-
null
|
|
164
|
-
);
|
|
165
|
-
const { execute: deleteAgent, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
166
|
-
(agentId) => _chunkRAA5NKA7js.deleteAgentApi.call(void 0, agentId, optionsRef.current),
|
|
167
|
-
() => true,
|
|
168
|
-
false
|
|
169
|
-
);
|
|
170
|
-
const { execute: getDefaultAgent, loading: defaultLoading, error: defaultError } = useApiAsync(
|
|
171
|
-
() => _chunkRAA5NKA7js.getDefaultAgentApi.call(void 0, optionsRef.current),
|
|
172
|
-
(data) => data.agent || null,
|
|
173
|
-
null
|
|
174
|
-
);
|
|
175
|
-
const loading = listLoading || listSummaryLoading || getLoading || createLoading || updateLoading || deleteLoading || defaultLoading;
|
|
176
|
-
const error = listError || listSummaryError || getError || createError || updateError || deleteError || defaultError;
|
|
177
|
-
return _react.useMemo.call(void 0,
|
|
178
|
-
() => ({
|
|
179
|
-
loading,
|
|
180
|
-
error,
|
|
181
|
-
listAgents,
|
|
182
|
-
listAgentSummaries,
|
|
183
|
-
getAgent,
|
|
184
|
-
createAgent,
|
|
185
|
-
updateAgent,
|
|
186
|
-
deleteAgent,
|
|
187
|
-
getDefaultAgent
|
|
188
|
-
}),
|
|
189
|
-
[loading, error, listAgents, listAgentSummaries, getAgent, createAgent, updateAgent, deleteAgent, getDefaultAgent]
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
function useSkills(options) {
|
|
193
|
-
const optionsRef = useOptionsRef(options);
|
|
194
|
-
const { execute: listSkills, loading: listLoading, error: listError } = useApiAsync(
|
|
195
|
-
() => _chunkRAA5NKA7js.listSkillsApi.call(void 0, optionsRef.current),
|
|
196
|
-
(data) => data.skills,
|
|
197
|
-
[]
|
|
198
|
-
);
|
|
199
|
-
const { execute: getSkill, loading: getLoading, error: getError } = useApiAsync(
|
|
200
|
-
(skillId) => _chunkRAA5NKA7js.getSkillApi.call(void 0, skillId, optionsRef.current),
|
|
201
|
-
(data) => data.skill || null,
|
|
202
|
-
null
|
|
203
|
-
);
|
|
204
|
-
const { execute: createSkill, loading: createLoading, error: createError } = useApiAsync(
|
|
205
|
-
(skill) => _chunkRAA5NKA7js.createSkillApi.call(void 0, skill, optionsRef.current),
|
|
206
|
-
(data) => data.skill || null,
|
|
207
|
-
null
|
|
208
|
-
);
|
|
209
|
-
const { execute: updateSkill, loading: updateLoading, error: updateError } = useApiAsync(
|
|
210
|
-
(skillId, skill) => _chunkRAA5NKA7js.updateSkillApi.call(void 0, skillId, skill, optionsRef.current),
|
|
211
|
-
(data) => data.skill || null,
|
|
212
|
-
null
|
|
213
|
-
);
|
|
214
|
-
const { execute: deleteSkill, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
215
|
-
(skillId) => _chunkRAA5NKA7js.deleteSkillApi.call(void 0, skillId, optionsRef.current),
|
|
216
|
-
() => true,
|
|
217
|
-
false
|
|
218
|
-
);
|
|
219
|
-
const { execute: getCategories, loading: categoriesLoading, error: categoriesError } = useApiAsync(
|
|
220
|
-
() => _chunkRAA5NKA7js.getSkillCategoriesApi.call(void 0, optionsRef.current),
|
|
221
|
-
(data) => data.categories,
|
|
222
|
-
[]
|
|
223
|
-
);
|
|
224
|
-
const loading = listLoading || getLoading || createLoading || updateLoading || deleteLoading || categoriesLoading;
|
|
225
|
-
const error = listError || getError || createError || updateError || deleteError || categoriesError;
|
|
226
|
-
return _react.useMemo.call(void 0,
|
|
227
|
-
() => ({
|
|
228
|
-
loading,
|
|
229
|
-
error,
|
|
230
|
-
listSkills,
|
|
231
|
-
getSkill,
|
|
232
|
-
createSkill,
|
|
233
|
-
updateSkill,
|
|
234
|
-
deleteSkill,
|
|
235
|
-
getCategories
|
|
236
|
-
}),
|
|
237
|
-
[loading, error, listSkills, getSkill, createSkill, updateSkill, deleteSkill, getCategories]
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
function useSubAgents(options) {
|
|
241
|
-
const optionsRef = useOptionsRef(options);
|
|
242
|
-
const { execute: listSubAgents, loading: listLoading, error: listError } = useApiAsync(
|
|
243
|
-
() => _chunkRAA5NKA7js.listSubAgentsApi.call(void 0, optionsRef.current),
|
|
244
|
-
(data) => data.subAgents,
|
|
245
|
-
[]
|
|
246
|
-
);
|
|
247
|
-
const { execute: getSubAgent, loading: getLoading, error: getError } = useApiAsync(
|
|
248
|
-
(subAgentId) => _chunkRAA5NKA7js.getSubAgentApi.call(void 0, subAgentId, optionsRef.current),
|
|
249
|
-
(data) => data.subAgent || null,
|
|
250
|
-
null
|
|
251
|
-
);
|
|
252
|
-
const { execute: createSubAgent, loading: createLoading, error: createError } = useApiAsync(
|
|
253
|
-
(subAgent) => _chunkRAA5NKA7js.createSubAgentApi.call(void 0, subAgent, optionsRef.current),
|
|
254
|
-
(data) => data.subAgent || null,
|
|
255
|
-
null
|
|
256
|
-
);
|
|
257
|
-
const { execute: updateSubAgent, loading: updateLoading, error: updateError } = useApiAsync(
|
|
258
|
-
(subAgentId, subAgent) => _chunkRAA5NKA7js.updateSubAgentApi.call(void 0, subAgentId, subAgent, optionsRef.current),
|
|
259
|
-
(data) => data.subAgent || null,
|
|
260
|
-
null
|
|
261
|
-
);
|
|
262
|
-
const { execute: deleteSubAgent, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
263
|
-
(subAgentId) => _chunkRAA5NKA7js.deleteSubAgentApi.call(void 0, subAgentId, optionsRef.current),
|
|
264
|
-
() => true,
|
|
265
|
-
false
|
|
266
|
-
);
|
|
267
|
-
const loading = listLoading || getLoading || createLoading || updateLoading || deleteLoading;
|
|
268
|
-
const error = listError || getError || createError || updateError || deleteError;
|
|
269
|
-
return _react.useMemo.call(void 0,
|
|
270
|
-
() => ({
|
|
271
|
-
loading,
|
|
272
|
-
error,
|
|
273
|
-
listSubAgents,
|
|
274
|
-
getSubAgent,
|
|
275
|
-
createSubAgent,
|
|
276
|
-
updateSubAgent,
|
|
277
|
-
deleteSubAgent
|
|
278
|
-
}),
|
|
279
|
-
[loading, error, listSubAgents, getSubAgent, createSubAgent, updateSubAgent, deleteSubAgent]
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
function useToolDefinitions(options) {
|
|
283
|
-
const optionsRef = useOptionsRef(options);
|
|
284
|
-
const { execute: listToolDefinitions, loading: listLoading, error: listError } = useApiAsync(
|
|
285
|
-
() => _chunkRAA5NKA7js.listToolDefinitionsApi.call(void 0, optionsRef.current),
|
|
286
|
-
(data) => data.toolDefinitions,
|
|
287
|
-
[]
|
|
288
|
-
);
|
|
289
|
-
const { execute: getToolDefinition, loading: getLoading, error: getError } = useApiAsync(
|
|
290
|
-
(toolDefId) => _chunkRAA5NKA7js.getToolDefinitionApi.call(void 0, toolDefId, optionsRef.current),
|
|
291
|
-
(data) => data.toolDefinition || null,
|
|
292
|
-
null
|
|
293
|
-
);
|
|
294
|
-
const { execute: getToolDefinitionsByIds, loading: getByIdsLoading, error: getByIdsError } = useApiAsync(
|
|
295
|
-
(ids) => _chunkRAA5NKA7js.getToolDefinitionsByIdsApi.call(void 0, ids, optionsRef.current),
|
|
296
|
-
(data) => data.toolDefinitions,
|
|
297
|
-
[]
|
|
298
|
-
);
|
|
299
|
-
const { execute: createToolDefinition, loading: createLoading, error: createError } = useApiAsync(
|
|
300
|
-
(toolDefinition) => _chunkRAA5NKA7js.createToolDefinitionApi.call(void 0, toolDefinition, optionsRef.current),
|
|
301
|
-
(data) => data.toolDefinition || null,
|
|
302
|
-
null
|
|
303
|
-
);
|
|
304
|
-
const { execute: updateToolDefinition, loading: updateLoading, error: updateError } = useApiAsync(
|
|
305
|
-
(toolDefId, toolDefinition) => _chunkRAA5NKA7js.updateToolDefinitionApi.call(void 0, toolDefId, toolDefinition, optionsRef.current),
|
|
306
|
-
(data) => data.toolDefinition || null,
|
|
307
|
-
null
|
|
308
|
-
);
|
|
309
|
-
const { execute: deleteToolDefinition, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
310
|
-
(toolDefId) => _chunkRAA5NKA7js.deleteToolDefinitionApi.call(void 0, toolDefId, optionsRef.current),
|
|
311
|
-
() => true,
|
|
312
|
-
false
|
|
313
|
-
);
|
|
314
|
-
const loading = listLoading || getLoading || getByIdsLoading || createLoading || updateLoading || deleteLoading;
|
|
315
|
-
const error = listError || getError || getByIdsError || createError || updateError || deleteError;
|
|
316
|
-
return _react.useMemo.call(void 0,
|
|
317
|
-
() => ({
|
|
318
|
-
loading,
|
|
319
|
-
error,
|
|
320
|
-
listToolDefinitions,
|
|
321
|
-
getToolDefinition,
|
|
322
|
-
getToolDefinitionsByIds,
|
|
323
|
-
createToolDefinition,
|
|
324
|
-
updateToolDefinition,
|
|
325
|
-
deleteToolDefinition
|
|
326
|
-
}),
|
|
327
|
-
[loading, error, listToolDefinitions, getToolDefinition, getToolDefinitionsByIds, createToolDefinition, updateToolDefinition, deleteToolDefinition]
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
function useAgentJobs(options) {
|
|
331
|
-
const optionsRef = useOptionsRef(options);
|
|
332
|
-
const { execute: listAgentJobs, loading: listLoading, error: listError } = useApiAsync(
|
|
333
|
-
() => _chunkRAA5NKA7js.listAgentJobsApi.call(void 0, optionsRef.current),
|
|
334
|
-
(data) => data.jobs,
|
|
335
|
-
[]
|
|
336
|
-
);
|
|
337
|
-
const { execute: getAgentJob, loading: getLoading, error: getError } = useApiAsync(
|
|
338
|
-
(jobId) => _chunkRAA5NKA7js.getAgentJobApi.call(void 0, jobId, optionsRef.current),
|
|
339
|
-
(data) => data.job || null,
|
|
340
|
-
null
|
|
341
|
-
);
|
|
342
|
-
const { execute: createAgentJob, loading: createLoading, error: createError } = useApiAsync(
|
|
343
|
-
(job) => _chunkRAA5NKA7js.createAgentJobApi.call(void 0, job, optionsRef.current),
|
|
344
|
-
(data) => data.job || null,
|
|
345
|
-
null
|
|
346
|
-
);
|
|
347
|
-
const { execute: updateAgentJob, loading: updateLoading, error: updateError } = useApiAsync(
|
|
348
|
-
(jobId, job) => _chunkRAA5NKA7js.updateAgentJobApi.call(void 0, jobId, job, optionsRef.current),
|
|
349
|
-
(data) => data.job || null,
|
|
350
|
-
null
|
|
351
|
-
);
|
|
352
|
-
const { execute: deleteAgentJob, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
353
|
-
(jobId) => _chunkRAA5NKA7js.deleteAgentJobApi.call(void 0, jobId, optionsRef.current),
|
|
354
|
-
() => true,
|
|
355
|
-
false
|
|
356
|
-
);
|
|
357
|
-
const { execute: pauseAgentJob, loading: pauseLoading, error: pauseError } = useApiAsync(
|
|
358
|
-
(jobId) => _chunkRAA5NKA7js.pauseAgentJobApi.call(void 0, jobId, optionsRef.current),
|
|
359
|
-
(data) => data.job || null,
|
|
360
|
-
null
|
|
361
|
-
);
|
|
362
|
-
const { execute: resumeAgentJob, loading: resumeLoading, error: resumeError } = useApiAsync(
|
|
363
|
-
(jobId) => _chunkRAA5NKA7js.resumeAgentJobApi.call(void 0, jobId, optionsRef.current),
|
|
364
|
-
(data) => data.job || null,
|
|
365
|
-
null
|
|
366
|
-
);
|
|
367
|
-
const loading = listLoading || getLoading || createLoading || updateLoading || deleteLoading || pauseLoading || resumeLoading;
|
|
368
|
-
const error = listError || getError || createError || updateError || deleteError || pauseError || resumeError;
|
|
369
|
-
return _react.useMemo.call(void 0,
|
|
370
|
-
() => ({
|
|
371
|
-
loading,
|
|
372
|
-
error,
|
|
373
|
-
listAgentJobs,
|
|
374
|
-
getAgentJob,
|
|
375
|
-
createAgentJob,
|
|
376
|
-
updateAgentJob,
|
|
377
|
-
deleteAgentJob,
|
|
378
|
-
pauseAgentJob,
|
|
379
|
-
resumeAgentJob
|
|
380
|
-
}),
|
|
381
|
-
[loading, error, listAgentJobs, getAgentJob, createAgentJob, updateAgentJob, deleteAgentJob, pauseAgentJob, resumeAgentJob]
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
function useWidgets(options) {
|
|
385
|
-
const optionsRef = useOptionsRef(options);
|
|
386
|
-
const { execute: listWidgets, loading: listLoading, error: listError } = useApiAsync(
|
|
387
|
-
() => _chunkRAA5NKA7js.listWidgetsApi.call(void 0, optionsRef.current.agentId, optionsRef.current),
|
|
388
|
-
(data) => data.widgets,
|
|
389
|
-
[]
|
|
390
|
-
);
|
|
391
|
-
const { execute: getWidget, loading: getLoading, error: getError } = useApiAsync(
|
|
392
|
-
(widgetId) => _chunkRAA5NKA7js.getWidgetApi.call(void 0, widgetId, optionsRef.current),
|
|
393
|
-
(data) => data.widget || null,
|
|
394
|
-
null
|
|
395
|
-
);
|
|
396
|
-
const { execute: getDefaultWidget, loading: defaultLoading, error: defaultError } = useApiAsync(
|
|
397
|
-
() => _chunkRAA5NKA7js.getDefaultWidgetApi.call(void 0, optionsRef.current.agentId, optionsRef.current),
|
|
398
|
-
(data) => data.widget || null,
|
|
399
|
-
null
|
|
400
|
-
);
|
|
401
|
-
const { execute: createWidget, loading: createLoading, error: createError } = useApiAsync(
|
|
402
|
-
(widget) => _chunkRAA5NKA7js.createWidgetApi.call(void 0, optionsRef.current.agentId, widget, optionsRef.current),
|
|
403
|
-
(data) => data.widget || null,
|
|
404
|
-
null
|
|
405
|
-
);
|
|
406
|
-
const { execute: updateWidget, loading: updateLoading, error: updateError } = useApiAsync(
|
|
407
|
-
(widgetId, widget) => _chunkRAA5NKA7js.updateWidgetApi.call(void 0, widgetId, widget, optionsRef.current),
|
|
408
|
-
(data) => data.widget || null,
|
|
409
|
-
null
|
|
410
|
-
);
|
|
411
|
-
const { execute: deleteWidget, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
412
|
-
(widgetId) => _chunkRAA5NKA7js.deleteWidgetApi.call(void 0, widgetId, optionsRef.current),
|
|
413
|
-
() => true,
|
|
414
|
-
false
|
|
415
|
-
);
|
|
416
|
-
const { execute: setDefaultWidget, loading: setDefaultLoading, error: setDefaultError } = useApiAsync(
|
|
417
|
-
(widgetId) => _chunkRAA5NKA7js.setDefaultWidgetApi.call(void 0, widgetId, optionsRef.current.agentId, optionsRef.current),
|
|
418
|
-
() => true,
|
|
419
|
-
false
|
|
420
|
-
);
|
|
421
|
-
const loading = listLoading || getLoading || defaultLoading || createLoading || updateLoading || deleteLoading || setDefaultLoading;
|
|
422
|
-
const error = listError || getError || defaultError || createError || updateError || deleteError || setDefaultError;
|
|
423
|
-
return _react.useMemo.call(void 0,
|
|
424
|
-
() => ({
|
|
425
|
-
loading,
|
|
426
|
-
error,
|
|
427
|
-
listWidgets,
|
|
428
|
-
getWidget,
|
|
429
|
-
getDefaultWidget,
|
|
430
|
-
createWidget,
|
|
431
|
-
updateWidget,
|
|
432
|
-
deleteWidget,
|
|
433
|
-
setDefaultWidget
|
|
434
|
-
}),
|
|
435
|
-
[loading, error, listWidgets, getWidget, getDefaultWidget, createWidget, updateWidget, deleteWidget, setDefaultWidget]
|
|
436
|
-
);
|
|
437
|
-
}
|
|
438
|
-
function useSkillUserConfig(options) {
|
|
439
|
-
const optionsRef = useOptionsRef(options);
|
|
440
|
-
const { execute: getSkillUserConfig, loading: getLoading, error: getError } = useApiAsync(
|
|
441
|
-
(skillId, agentId) => _chunkRAA5NKA7js.getSkillUserConfigApi.call(void 0, skillId, { ...optionsRef.current, agentId }),
|
|
442
|
-
(data) => data.userConfig || null,
|
|
443
|
-
null
|
|
444
|
-
);
|
|
445
|
-
const { execute: updateSkillUserConfig, loading: updateLoading, error: updateError } = useApiAsync(
|
|
446
|
-
(skillId, data) => _chunkRAA5NKA7js.updateSkillUserConfigApi.call(void 0, skillId, data, optionsRef.current),
|
|
447
|
-
(data) => data.userConfig || null,
|
|
448
|
-
null
|
|
449
|
-
);
|
|
450
|
-
const { execute: deleteSkillUserConfig, loading: deleteLoading, error: deleteError } = useApiAsync(
|
|
451
|
-
(skillId, agentId) => _chunkRAA5NKA7js.deleteSkillUserConfigApi.call(void 0, skillId, { ...optionsRef.current, agentId }),
|
|
452
|
-
() => true,
|
|
453
|
-
false
|
|
454
|
-
);
|
|
455
|
-
const { execute: listSkillUserConfigs, loading: listLoading, error: listError } = useApiAsync(
|
|
456
|
-
(params) => _chunkRAA5NKA7js.listSkillUserConfigsApi.call(void 0, { ...optionsRef.current, ...params }),
|
|
457
|
-
(data) => data.userConfigs || [],
|
|
458
|
-
[]
|
|
459
|
-
);
|
|
460
|
-
const { execute: resolveSkillConfig, loading: resolveLoading, error: resolveError } = useApiAsync(
|
|
461
|
-
(skillId, agentId) => _chunkRAA5NKA7js.resolveSkillConfigApi.call(void 0, skillId, agentId, optionsRef.current),
|
|
462
|
-
(data) => data,
|
|
463
|
-
null
|
|
464
|
-
);
|
|
465
|
-
const loading = getLoading || updateLoading || deleteLoading || listLoading || resolveLoading;
|
|
466
|
-
const error = getError || updateError || deleteError || listError || resolveError;
|
|
467
|
-
return _react.useMemo.call(void 0,
|
|
468
|
-
() => ({
|
|
469
|
-
loading,
|
|
470
|
-
error,
|
|
471
|
-
getSkillUserConfig,
|
|
472
|
-
updateSkillUserConfig,
|
|
473
|
-
deleteSkillUserConfig,
|
|
474
|
-
listSkillUserConfigs,
|
|
475
|
-
resolveSkillConfig
|
|
476
|
-
}),
|
|
477
|
-
[loading, error, getSkillUserConfig, updateSkillUserConfig, deleteSkillUserConfig, listSkillUserConfigs, resolveSkillConfig]
|
|
478
|
-
);
|
|
479
|
-
}
|
|
480
|
-
function useAnalytics(options) {
|
|
481
|
-
const optionsRef = useOptionsRef(options);
|
|
482
|
-
const { execute: getAgentChatsAnalytics, loading: chatsLoading, error: chatsError } = useApiAsync(
|
|
483
|
-
(params) => _chunkRAA5NKA7js.getAgentChatsAnalyticsApi.call(void 0, params, optionsRef.current),
|
|
484
|
-
(data) => data.data,
|
|
485
|
-
[]
|
|
486
|
-
);
|
|
487
|
-
const { execute: getAgentCSATAnalytics, loading: csatLoading, error: csatError } = useApiAsync(
|
|
488
|
-
(params) => _chunkRAA5NKA7js.getAgentCSATAnalyticsApi.call(void 0, params, optionsRef.current),
|
|
489
|
-
(data) => data.data,
|
|
490
|
-
[]
|
|
491
|
-
);
|
|
492
|
-
const { execute: getAgentListAnalytics, loading: listLoading, error: listError } = useApiAsync(
|
|
493
|
-
() => _chunkRAA5NKA7js.getAgentListAnalyticsApi.call(void 0, optionsRef.current),
|
|
494
|
-
(data) => data.data,
|
|
495
|
-
[]
|
|
496
|
-
);
|
|
497
|
-
const { execute: getTaskOutcomes, loading: taskLoading, error: taskError } = useApiAsync(
|
|
498
|
-
(params) => _chunkRAA5NKA7js.getTaskOutcomesApi.call(void 0, params, optionsRef.current),
|
|
499
|
-
(data) => data.data,
|
|
500
|
-
[]
|
|
501
|
-
);
|
|
502
|
-
const loading = chatsLoading || csatLoading || listLoading || taskLoading;
|
|
503
|
-
const error = chatsError || csatError || listError || taskError;
|
|
504
|
-
return _react.useMemo.call(void 0,
|
|
505
|
-
() => ({
|
|
506
|
-
loading,
|
|
507
|
-
error,
|
|
508
|
-
getAgentChatsAnalytics,
|
|
509
|
-
getAgentCSATAnalytics,
|
|
510
|
-
getAgentListAnalytics,
|
|
511
|
-
getTaskOutcomes
|
|
512
|
-
}),
|
|
513
|
-
[loading, error, getAgentChatsAnalytics, getAgentCSATAnalytics, getAgentListAnalytics, getTaskOutcomes]
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
|
-
function useIntegrations(options) {
|
|
517
|
-
const optionsRef = useOptionsRef(options);
|
|
518
|
-
const { execute: listIntegrations, loading: listLoading, error: listError } = useApiAsync(
|
|
519
|
-
() => _chunkRAA5NKA7js.listIntegrationsApi.call(void 0, optionsRef.current),
|
|
520
|
-
(data) => data.integrations,
|
|
521
|
-
[]
|
|
522
|
-
);
|
|
523
|
-
const { execute: getIntegration, loading: getLoading, error: getError } = useApiAsync(
|
|
524
|
-
(provider, integrationType) => _chunkRAA5NKA7js.getIntegrationApi.call(void 0, provider, integrationType, optionsRef.current),
|
|
525
|
-
(data) => data.integration || null,
|
|
526
|
-
null
|
|
527
|
-
);
|
|
528
|
-
const { execute: connectIntegration, loading: connectLoading, error: connectError } = useApiAsync(
|
|
529
|
-
(params) => _chunkRAA5NKA7js.connectIntegrationApi.call(void 0, params, optionsRef.current),
|
|
530
|
-
(data) => ({ authUrl: data.auth_url, state: data.state }),
|
|
531
|
-
null
|
|
532
|
-
);
|
|
533
|
-
const { execute: disconnectIntegration, loading: disconnectLoading, error: disconnectError } = useApiAsync(
|
|
534
|
-
(params) => _chunkRAA5NKA7js.disconnectIntegrationApi.call(void 0, params, optionsRef.current),
|
|
535
|
-
() => true,
|
|
536
|
-
false
|
|
537
|
-
);
|
|
538
|
-
const { execute: refreshIntegration, loading: refreshLoading, error: refreshError } = useApiAsync(
|
|
539
|
-
(params) => _chunkRAA5NKA7js.refreshIntegrationApi.call(void 0, params, optionsRef.current),
|
|
540
|
-
(data) => data.integration || null,
|
|
541
|
-
null
|
|
542
|
-
);
|
|
543
|
-
const { execute: updateTriage, loading: updateTriageLoading, error: updateTriageError } = useApiAsync(
|
|
544
|
-
(params) => _chunkRAA5NKA7js.updateIntegrationTriageApi.call(void 0, params, optionsRef.current),
|
|
545
|
-
(data) => data.integration || null,
|
|
546
|
-
null
|
|
547
|
-
);
|
|
548
|
-
const { execute: runEmailTriage, loading: runTriageLoading, error: runTriageError } = useApiAsync(
|
|
549
|
-
() => _chunkRAA5NKA7js.runEmailTriageApi.call(void 0, optionsRef.current),
|
|
550
|
-
(data) => ({ success: data.success, emailsFound: data.emails_found, instancesCreated: data.instances_created }),
|
|
551
|
-
null
|
|
552
|
-
);
|
|
553
|
-
const loading = listLoading || getLoading || connectLoading || disconnectLoading || refreshLoading || updateTriageLoading || runTriageLoading;
|
|
554
|
-
const error = listError || getError || connectError || disconnectError || refreshError || updateTriageError || runTriageError;
|
|
555
|
-
return _react.useMemo.call(void 0,
|
|
556
|
-
() => ({
|
|
557
|
-
loading,
|
|
558
|
-
error,
|
|
559
|
-
listIntegrations,
|
|
560
|
-
getIntegration,
|
|
561
|
-
connectIntegration,
|
|
562
|
-
disconnectIntegration,
|
|
563
|
-
refreshIntegration,
|
|
564
|
-
updateTriage,
|
|
565
|
-
runEmailTriage
|
|
566
|
-
}),
|
|
567
|
-
[loading, error, listIntegrations, getIntegration, connectIntegration, disconnectIntegration, refreshIntegration, updateTriage, runEmailTriage]
|
|
568
|
-
);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
exports.useAsync = useAsync; exports.useApiAsync = useApiAsync; exports.useOptionsRef = useOptionsRef; exports.useAgents = useAgents; exports.useSkills = useSkills; exports.useSubAgents = useSubAgents; exports.useToolDefinitions = useToolDefinitions; exports.useAgentJobs = useAgentJobs; exports.useWidgets = useWidgets; exports.useSkillUserConfig = useSkillUserConfig; exports.useAnalytics = useAnalytics; exports.useIntegrations = useIntegrations;
|
|
585
|
-
//# sourceMappingURL=chunk-RWFVHX2J.js.map
|