@swiss-ai-hub/web 0.290.11
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/LICENSE +661 -0
- package/README.md +479 -0
- package/app.config.ts +1 -0
- package/app.vue +52 -0
- package/assets/css/main.css +4 -0
- package/assets/images/logo.png +0 -0
- package/components/Agent/Avatar.vue +40 -0
- package/components/Agent/Card.vue +139 -0
- package/components/Agent/Configuration.vue +20 -0
- package/components/Agent/CreateModal.vue +287 -0
- package/components/Agent/EmptyCard.vue +35 -0
- package/components/Agent/List.vue +85 -0
- package/components/Agent/TemplateCard.vue +58 -0
- package/components/AppLoader.vue +55 -0
- package/components/Chat/Message.vue +90 -0
- package/components/Chat/SourceNodes.vue +120 -0
- package/components/Chat/Thread.vue +134 -0
- package/components/Costs/Table.vue +56 -0
- package/components/Dashboard/Component/BarChart.vue +46 -0
- package/components/Dashboard/Component/LineChart.vue +138 -0
- package/components/Dashboard/Component/Number.vue +31 -0
- package/components/Dashboard/Grid.vue +214 -0
- package/components/Dashboard/Item.vue +75 -0
- package/components/Dashboard/Trend.vue +34 -0
- package/components/Display/List/DisplayList.vue +93 -0
- package/components/Evaluation/Dataset/Card.vue +70 -0
- package/components/Evaluation/Dataset/Create.vue +81 -0
- package/components/Evaluation/Dataset/Edit.vue +132 -0
- package/components/Event/Display/AddMemoryToChatHistoryEvent.vue +60 -0
- package/components/Event/Display/AgentInTheLoopRequestEvent.vue +56 -0
- package/components/Event/Display/AgentInTheLoopResponseEvent.vue +17 -0
- package/components/Event/Display/Base.vue +125 -0
- package/components/Event/Display/BaseRetrieveMemoryEvent.vue +101 -0
- package/components/Event/Display/BaseStoreMemoryEvent.vue +182 -0
- package/components/Event/Display/ChunkEvent.vue +40 -0
- package/components/Event/Display/EmbeddingEvent.vue +25 -0
- package/components/Event/Display/ExceptionEvent.vue +21 -0
- package/components/Event/Display/GuardAcceptEvent.vue +25 -0
- package/components/Event/Display/GuardEvent.vue +17 -0
- package/components/Event/Display/GuardRejectionEvent.vue +25 -0
- package/components/Event/Display/HumanInTheLoopRequestEvent.vue +53 -0
- package/components/Event/Display/HumanInTheLoopResponseEvent.vue +40 -0
- package/components/Event/Display/LLMCostEvent.vue +25 -0
- package/components/Event/Display/LLMEvent.vue +92 -0
- package/components/Event/Display/LimitChatHistoryEvent.vue +60 -0
- package/components/Event/Display/RAGFailureStopEvent.vue +28 -0
- package/components/Event/Display/RAGStartEvent.vue +77 -0
- package/components/Event/Display/RAGSuccessStopEvent.vue +16 -0
- package/components/Event/Display/RawDataContent.vue +69 -0
- package/components/Event/Display/RerankerEvent.vue +39 -0
- package/components/Event/Display/RetrieverEvent.vue +22 -0
- package/components/Event/Display/RouterEvent.vue +54 -0
- package/components/Event/Display/StandaloneQuestionCondenserEvent.vue +38 -0
- package/components/Event/Display/StopEvent.vue +16 -0
- package/components/Event/Display/ThoughtEvent.vue +20 -0
- package/components/Event/Display/ToolEvent.vue +38 -0
- package/components/Event/Display/UnknownEvent.vue +17 -0
- package/components/Event/Display/UserMessageEvent.vue +35 -0
- package/components/Event/List/EventList.vue +249 -0
- package/components/Event/Statistics.vue +49 -0
- package/components/Event/Timeseries.vue +224 -0
- package/components/FormKit/AgentSelector.vue +307 -0
- package/components/FormKit/ChipsInput.vue +62 -0
- package/components/FormKit/DynamicConfiguration.vue +155 -0
- package/components/FormKit/IconSelector.vue +72 -0
- package/components/FormKit/KnowledgeDatabaseSelector.vue +92 -0
- package/components/FormKit/LocaleInput.vue +150 -0
- package/components/FormKit/ModelSelect.vue +110 -0
- package/components/FormKit/Repeater.vue +93 -0
- package/components/FormKit/VectorStoreInput.vue +247 -0
- package/components/Knowledge/Document/List.vue +140 -0
- package/components/Knowledge/Document/Overview.vue +28 -0
- package/components/Knowledge/Document/UploadModal.vue +298 -0
- package/components/Knowledge/Document/WithNodes.vue +105 -0
- package/components/Knowledge/Namespace/Card.vue +108 -0
- package/components/Knowledge/Namespace/CreateModal.vue +203 -0
- package/components/Knowledge/Namespace/EditModal.vue +134 -0
- package/components/Knowledge/Namespace/EmptyCard.vue +35 -0
- package/components/Knowledge/Node/Content.vue +71 -0
- package/components/Markdown/Renderer.vue +87 -0
- package/components/Memory/DetailPage.vue +48 -0
- package/components/Memory/Edit.vue +241 -0
- package/components/Memory/Graph.vue +318 -0
- package/components/Memory/List.vue +155 -0
- package/components/Memory/MemoryManagementPage.vue +178 -0
- package/components/Memory/OpenWebUIContent.vue +96 -0
- package/components/Memory/PageLayout.vue +72 -0
- package/components/Models/ModelDetailsPanel.vue +250 -0
- package/components/Models/NamespaceCard.vue +79 -0
- package/components/Navigation/Left.vue +85 -0
- package/components/Navigation/Top.vue +31 -0
- package/components/Notification/Item.vue +88 -0
- package/components/Notification/NotificationsOverlay.vue +164 -0
- package/components/Process/Card.vue +119 -0
- package/components/Process/Configuration.vue +20 -0
- package/components/Process/CreateModal.vue +276 -0
- package/components/Process/EmptyCard.vue +35 -0
- package/components/Process/Form.vue +153 -0
- package/components/Process/Starts.vue +44 -0
- package/components/Process/Walkthrough/List.vue +162 -0
- package/components/Role/AccessRulesEditor.vue +132 -0
- package/components/Role/Card.vue +68 -0
- package/components/Role/Create.vue +55 -0
- package/components/Role/Edit.vue +82 -0
- package/components/Role/UsageLimitsEditor.vue +225 -0
- package/components/Service/Selection.vue +148 -0
- package/components/Structural/Column.vue +74 -0
- package/components/Structural/Screen.vue +10 -0
- package/components/Structural/Substructure.vue +5 -0
- package/components/Tenant/Switcher.vue +102 -0
- package/components/Thread/Details.vue +135 -0
- package/components/Thread/Hierarchy.vue +136 -0
- package/components/Thread/Info.vue +41 -0
- package/components/Thread/List.vue +136 -0
- package/components/User/Bar.vue +74 -0
- package/components/User/List.vue +86 -0
- package/components/User/RoleChips.vue +83 -0
- package/components/User/Settings.vue +79 -0
- package/components/Workflow/Modal.vue +39 -0
- package/components/Workflow/NodeCard.vue +41 -0
- package/components/Workflow/StartNode.vue +24 -0
- package/components/Workflow/StepNode.vue +27 -0
- package/components/Workflow/StopNode.vue +24 -0
- package/components/Workflow/Visualization.vue +265 -0
- package/components/mdc/MarkdownFigure.vue +9 -0
- package/components/mdc/MarkdownTable.vue +9 -0
- package/components/mdc/ResolveImageComponent.vue +58 -0
- package/composables/agent/useAgentClass.ts +27 -0
- package/composables/agent/useAgentClassInstances.ts +27 -0
- package/composables/agent/useAgentClasses.ts +27 -0
- package/composables/agent/useAgentIconFromThread.ts +8 -0
- package/composables/agent/useAgentInstance.ts +28 -0
- package/composables/agent/useAgentInstanceThreads.ts +76 -0
- package/composables/agent/useAgentInstances.ts +25 -0
- package/composables/agent/useAgentNavigation.ts +35 -0
- package/composables/agent/useCreateAgentInstance.ts +33 -0
- package/composables/agent/useDeleteAgentInstance.ts +31 -0
- package/composables/agent/useUpdateAgentInstance.ts +40 -0
- package/composables/auth/useAuth.ts +54 -0
- package/composables/auth/useAuthProviders.ts +14 -0
- package/composables/chat/useChatCompletions.ts +30 -0
- package/composables/dashboard/useAgentNameFromDashboardWidget.ts +27 -0
- package/composables/dashboard/useDashboardComponent.ts +27 -0
- package/composables/dashboard/useSaveDashboard.ts +21 -0
- package/composables/document/useCreateNamespace.ts +26 -0
- package/composables/document/useDatabases.ts +23 -0
- package/composables/document/useDocument.ts +29 -0
- package/composables/document/useDocumentUrl.ts +20 -0
- package/composables/document/useDocuments.ts +107 -0
- package/composables/document/useNodes.ts +29 -0
- package/composables/document/useSummaryNodes.ts +32 -0
- package/composables/document/useUpdateNamespace.ts +22 -0
- package/composables/evaluation/useCreateDataset.ts +19 -0
- package/composables/evaluation/useDataset.ts +26 -0
- package/composables/evaluation/useDatasets.ts +25 -0
- package/composables/evaluation/useUpdateDataset.ts +23 -0
- package/composables/event/useBasicEventStatistics.ts +83 -0
- package/composables/event/useEventColor.ts +25 -0
- package/composables/event/useEventComponent.ts +87 -0
- package/composables/event/useEventTimeseries.ts +39 -0
- package/composables/event/useEventTimeseriesStats.ts +26 -0
- package/composables/file/useFileUpload.ts +91 -0
- package/composables/file/useSupportedFileTypes.ts +22 -0
- package/composables/form/useCreateInstanceForm.ts +251 -0
- package/composables/form/useFormKitTransform.ts +753 -0
- package/composables/memory/useMemoryCRUD.ts +88 -0
- package/composables/memory/useMemoryFactory.ts +319 -0
- package/composables/memory/useMemorySearchFilter.ts +74 -0
- package/composables/models/useModelsList.ts +24 -0
- package/composables/models/useSingleModel.ts +30 -0
- package/composables/notification/useNotificationPoller.ts +58 -0
- package/composables/notification/useNotifications.ts +57 -0
- package/composables/notification/useUpdateMultipleNotifications.ts +17 -0
- package/composables/notification/useUpdateNotification.ts +17 -0
- package/composables/process/useCreateProcessInstance.ts +32 -0
- package/composables/process/useDeleteProcessInstance.ts +31 -0
- package/composables/process/useProcessClasses.ts +27 -0
- package/composables/process/useProcessInstance.ts +28 -0
- package/composables/process/useProcessInstances.ts +27 -0
- package/composables/process/useProcessWalkthroughs.ts +73 -0
- package/composables/process/useSendProcessStartForm.ts +43 -0
- package/composables/process/useUpdateProcessInstance.ts +40 -0
- package/composables/role/useCreateRole.ts +19 -0
- package/composables/role/useDeleteRole.ts +21 -0
- package/composables/role/useRole.ts +30 -0
- package/composables/role/useRoles.ts +25 -0
- package/composables/role/useUpdateRole.ts +22 -0
- package/composables/suite/useApps.ts +31 -0
- package/composables/suite/useSuite.ts +26 -0
- package/composables/tenant/useActiveTenant.ts +27 -0
- package/composables/tenant/useSysadminNavigation.ts +19 -0
- package/composables/tenant/useTenant.ts +38 -0
- package/composables/tenant/useTenantMemberships.ts +15 -0
- package/composables/tenant/useTenantPath.ts +20 -0
- package/composables/tenant/useTenantPolling.ts +30 -0
- package/composables/tenant/useTenantReady.ts +12 -0
- package/composables/theme/useDarkMode.ts +5 -0
- package/composables/thread/useThread.ts +27 -0
- package/composables/thread/useThreadEvents.ts +91 -0
- package/composables/thread/useThreadUtils.ts +49 -0
- package/composables/thread/useThreads.ts +64 -0
- package/composables/thread/useThreadsInfinite.ts +56 -0
- package/composables/translation/useTranslate.ts +20 -0
- package/composables/useRouteReady.ts +21 -0
- package/composables/useTimeAgo.ts +40 -0
- package/composables/user/useAssignRoleToUser.ts +22 -0
- package/composables/user/useMyUser.ts +25 -0
- package/composables/user/useRevokeRoleFromUser.ts +21 -0
- package/composables/user/useUser.ts +30 -0
- package/composables/user/useUsers.ts +63 -0
- package/composables/utils/useJsonTree.ts +138 -0
- package/formkit.config.ts +44 -0
- package/i18n/locales/de.yaml +815 -0
- package/i18n/locales/en.yaml +804 -0
- package/i18n/locales/fr.yaml +812 -0
- package/i18n/locales/it.yaml +808 -0
- package/layouts/anonymous.vue +8 -0
- package/layouts/default.vue +116 -0
- package/middleware/auth.global.ts +62 -0
- package/nuxt.config.ts +145 -0
- package/package.json +114 -0
- package/pages/[tenant]/index.vue +31 -0
- package/pages/[tenant]/notifications/index.vue +235 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/chat.vue +67 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/configuration.vue +122 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories.vue +20 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/overview.vue +72 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/threads.vue +52 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/workflow.vue +19 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id].vue +63 -0
- package/pages/[tenant]/service/agents/templates.vue +102 -0
- package/pages/[tenant]/service/agents.vue +185 -0
- package/pages/[tenant]/service/datasets/[dataset_id].vue +81 -0
- package/pages/[tenant]/service/datasets.vue +53 -0
- package/pages/[tenant]/service/health/index.vue +3 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/nodes.vue +20 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/overview.vue +40 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/summary.vue +88 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id].vue +48 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace].vue +144 -0
- package/pages/[tenant]/service/knowledge.vue +126 -0
- package/pages/[tenant]/service/models/[model_name].vue +84 -0
- package/pages/[tenant]/service/models.vue +61 -0
- package/pages/[tenant]/service/my-account.vue +117 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/memories.vue +66 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/sources.vue +100 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/tracing.vue +49 -0
- package/pages/[tenant]/service/openai.vue +101 -0
- package/pages/[tenant]/service/organization-memories/graph.vue +97 -0
- package/pages/[tenant]/service/organization-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/organization-memories/list.vue +150 -0
- package/pages/[tenant]/service/organization-memories.vue +3 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/[process_walkthrough_id].vue +7 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/configuration.vue +106 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/overview.vue +67 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/start.vue +26 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs/[process_walkthrough_id]/overview.vue +14 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs.vue +54 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id].vue +60 -0
- package/pages/[tenant]/service/processes.vue +129 -0
- package/pages/[tenant]/service/roles/[role_id].vue +54 -0
- package/pages/[tenant]/service/roles.vue +84 -0
- package/pages/[tenant]/service/threads/[thread_id]/chat.vue +51 -0
- package/pages/[tenant]/service/threads/[thread_id]/display/[display_id].vue +21 -0
- package/pages/[tenant]/service/threads/[thread_id]/display.vue +29 -0
- package/pages/[tenant]/service/threads/[thread_id]/hierarchy.vue +14 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories.vue +19 -0
- package/pages/[tenant]/service/threads/[thread_id]/overview.vue +100 -0
- package/pages/[tenant]/service/threads/[thread_id].vue +54 -0
- package/pages/[tenant]/service/threads.vue +52 -0
- package/pages/[tenant]/service/user-memories/graph.vue +97 -0
- package/pages/[tenant]/service/user-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/user-memories/list.vue +150 -0
- package/pages/[tenant]/service/user-memories.vue +3 -0
- package/pages/[tenant]/service/users/[user_id].vue +117 -0
- package/pages/[tenant]/service/users.vue +88 -0
- package/pages/auth/callback.vue +52 -0
- package/pages/auth/login.vue +80 -0
- package/pages/auth/renew.vue +24 -0
- package/pages/index.vue +59 -0
- package/pages/select-tenant.vue +76 -0
- package/plugins/0.runtime-config.client.ts +55 -0
- package/plugins/apexcharts.client.ts +5 -0
- package/plugins/api-client.client.ts +38 -0
- package/plugins/dark-mode.client.ts +12 -0
- package/plugins/keycloak-client.ts +41 -0
- package/plugins/oidc-client.ts +78 -0
- package/sdk/client/client/client.gen.ts +237 -0
- package/sdk/client/client/index.ts +24 -0
- package/sdk/client/client/types.gen.ts +213 -0
- package/sdk/client/client/utils.gen.ts +407 -0
- package/sdk/client/client.gen.ts +25 -0
- package/sdk/client/core/auth.gen.ts +42 -0
- package/sdk/client/core/bodySerializer.gen.ts +96 -0
- package/sdk/client/core/params.gen.ts +181 -0
- package/sdk/client/core/pathSerializer.gen.ts +180 -0
- package/sdk/client/core/queryKeySerializer.gen.ts +136 -0
- package/sdk/client/core/serverSentEvents.gen.ts +265 -0
- package/sdk/client/core/types.gen.ts +118 -0
- package/sdk/client/core/utils.gen.ts +143 -0
- package/sdk/client/index.ts +1013 -0
- package/sdk/client/schemas.gen.ts +35395 -0
- package/sdk/client/sdk.gen.ts +3438 -0
- package/sdk/client/transformers.gen.ts +143 -0
- package/sdk/client/types.gen.ts +27567 -0
- package/tailwind.config.mjs +27 -0
- package/themes/aihub-theme.ts +125 -0
- package/types/DashboardWidget.ts +13 -0
- package/types/EventChartInput.ts +7 -0
- package/types/NavItem.ts +6 -0
- package/types/TimeseriesInput.ts +7 -0
|
@@ -0,0 +1,3438 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type Client,
|
|
5
|
+
type Composable,
|
|
6
|
+
formDataBodySerializer,
|
|
7
|
+
type Options as Options2,
|
|
8
|
+
type TDataShape,
|
|
9
|
+
} from "./client";
|
|
10
|
+
import { client } from "./client.gen";
|
|
11
|
+
import {
|
|
12
|
+
createDatasetResponseTransformer,
|
|
13
|
+
createTokenEndpointResponseTransformer,
|
|
14
|
+
getAgentEventTimeseriesResponseTransformer,
|
|
15
|
+
getDatasetResponseTransformer,
|
|
16
|
+
getDatasetsResponseTransformer,
|
|
17
|
+
getNotificationsResponseTransformer,
|
|
18
|
+
listTokensEndpointResponseTransformer,
|
|
19
|
+
updateDatasetResponseTransformer,
|
|
20
|
+
updateNotificationResponseTransformer,
|
|
21
|
+
updateNotificationsBulkResponseTransformer,
|
|
22
|
+
} from "./transformers.gen";
|
|
23
|
+
import type {
|
|
24
|
+
AddAgentToThreadData,
|
|
25
|
+
AddAgentToThreadError,
|
|
26
|
+
AddAgentToThreadResponse,
|
|
27
|
+
AddUserToThreadData,
|
|
28
|
+
AddUserToThreadError,
|
|
29
|
+
AddUserToThreadResponse,
|
|
30
|
+
AssignRoleData,
|
|
31
|
+
AssignRoleError,
|
|
32
|
+
AssignRoleResponse,
|
|
33
|
+
ChatCompletionWithAssistantsData,
|
|
34
|
+
ChatCompletionWithAssistantsError,
|
|
35
|
+
ChatCompletionWithAssistantsResponse,
|
|
36
|
+
CreateAgentInstanceData,
|
|
37
|
+
CreateAgentInstanceError,
|
|
38
|
+
CreateAgentInstanceResponse,
|
|
39
|
+
CreateDatasetData,
|
|
40
|
+
CreateDatasetError,
|
|
41
|
+
CreateDatasetResponse,
|
|
42
|
+
CreateNamespaceData,
|
|
43
|
+
CreateNamespaceError,
|
|
44
|
+
CreateNamespaceResponse,
|
|
45
|
+
CreateProcessInstanceData,
|
|
46
|
+
CreateProcessInstanceError,
|
|
47
|
+
CreateProcessInstanceResponse,
|
|
48
|
+
CreateRoleData,
|
|
49
|
+
CreateRoleError,
|
|
50
|
+
CreateRoleResponse,
|
|
51
|
+
CreateSpeechData,
|
|
52
|
+
CreateSpeechError,
|
|
53
|
+
CreateThreadData,
|
|
54
|
+
CreateThreadError,
|
|
55
|
+
CreateThreadResponse,
|
|
56
|
+
CreateTokenEndpointData,
|
|
57
|
+
CreateTokenEndpointError,
|
|
58
|
+
CreateTokenEndpointResponse,
|
|
59
|
+
CreateTranscriptionData,
|
|
60
|
+
CreateTranscriptionError,
|
|
61
|
+
CreateTranscriptionResponse,
|
|
62
|
+
DeleteAgentInstanceData,
|
|
63
|
+
DeleteAgentInstanceError,
|
|
64
|
+
DeleteAgentInstanceResponse,
|
|
65
|
+
DeleteAllOrganizationMemoriesData,
|
|
66
|
+
DeleteAllOrganizationMemoriesResponse,
|
|
67
|
+
DeleteAllUserMemoriesData,
|
|
68
|
+
DeleteAllUserMemoriesResponse,
|
|
69
|
+
DeleteOrganizationMemoryData,
|
|
70
|
+
DeleteOrganizationMemoryError,
|
|
71
|
+
DeleteOrganizationMemoryResponse,
|
|
72
|
+
DeleteProcessInstanceData,
|
|
73
|
+
DeleteProcessInstanceError,
|
|
74
|
+
DeleteProcessInstanceResponse,
|
|
75
|
+
DeleteRoleData,
|
|
76
|
+
DeleteRoleError,
|
|
77
|
+
DeleteRoleResponse2,
|
|
78
|
+
DeleteUserMemoryData,
|
|
79
|
+
DeleteUserMemoryError,
|
|
80
|
+
DeleteUserMemoryResponse,
|
|
81
|
+
GenerateImageData,
|
|
82
|
+
GenerateImageError,
|
|
83
|
+
GenerateImageResponse,
|
|
84
|
+
GetAgentClassData,
|
|
85
|
+
GetAgentClassError,
|
|
86
|
+
GetAgentClassesData,
|
|
87
|
+
GetAgentClassesError,
|
|
88
|
+
GetAgentClassesResponse,
|
|
89
|
+
GetAgentClassInstancesData,
|
|
90
|
+
GetAgentClassInstancesError,
|
|
91
|
+
GetAgentClassInstancesResponse,
|
|
92
|
+
GetAgentClassResponse,
|
|
93
|
+
GetAgentEventsInThreadData,
|
|
94
|
+
GetAgentEventsInThreadError,
|
|
95
|
+
GetAgentEventsInThreadResponse,
|
|
96
|
+
GetAgentEventTimeseriesData,
|
|
97
|
+
GetAgentEventTimeseriesError,
|
|
98
|
+
GetAgentEventTimeseriesResponse,
|
|
99
|
+
GetAgentInstanceData,
|
|
100
|
+
GetAgentInstanceError,
|
|
101
|
+
GetAgentInstanceResponse,
|
|
102
|
+
GetAgentInstanceThreadsData,
|
|
103
|
+
GetAgentInstanceThreadsError,
|
|
104
|
+
GetAgentInstanceThreadsResponse,
|
|
105
|
+
GetAllAgentInstancesData,
|
|
106
|
+
GetAllAgentInstancesError,
|
|
107
|
+
GetAllAgentInstancesResponse,
|
|
108
|
+
GetAllProcessInstancesData,
|
|
109
|
+
GetAllProcessInstancesError,
|
|
110
|
+
GetAllProcessInstancesResponse,
|
|
111
|
+
GetAnonymousFileRedirectData,
|
|
112
|
+
GetAnonymousFileRedirectError,
|
|
113
|
+
GetAnonymousFileUrlData,
|
|
114
|
+
GetAnonymousFileUrlError,
|
|
115
|
+
GetAuthProvidersData,
|
|
116
|
+
GetAuthProvidersResponse,
|
|
117
|
+
GetDatabasesData,
|
|
118
|
+
GetDatabasesResponse,
|
|
119
|
+
GetDatasetData,
|
|
120
|
+
GetDatasetError,
|
|
121
|
+
GetDatasetResponse,
|
|
122
|
+
GetDatasetsData,
|
|
123
|
+
GetDatasetsResponse,
|
|
124
|
+
GetDocumentByIdData,
|
|
125
|
+
GetDocumentByIdError,
|
|
126
|
+
GetDocumentByIdResponse,
|
|
127
|
+
GetDocumentsForNamespaceData,
|
|
128
|
+
GetDocumentsForNamespaceError,
|
|
129
|
+
GetDocumentsForNamespaceResponse,
|
|
130
|
+
GetDocumentUrlData,
|
|
131
|
+
GetDocumentUrlError,
|
|
132
|
+
GetDocumentUrlResponse,
|
|
133
|
+
GetEmbeddingsData,
|
|
134
|
+
GetEmbeddingsError,
|
|
135
|
+
GetEmbeddingsResponse,
|
|
136
|
+
GetFileUrlData,
|
|
137
|
+
GetFileUrlError,
|
|
138
|
+
GetFileUrlResponse,
|
|
139
|
+
GetHealthData,
|
|
140
|
+
GetHealthResponse,
|
|
141
|
+
GetLitellmModelData,
|
|
142
|
+
GetLitellmModelError,
|
|
143
|
+
GetLitellmModelResponse,
|
|
144
|
+
GetLitellmModelsByModeData,
|
|
145
|
+
GetLitellmModelsByModeError,
|
|
146
|
+
GetLitellmModelsByModeResponse,
|
|
147
|
+
GetLitellmModelsData,
|
|
148
|
+
GetLitellmModelsResponse,
|
|
149
|
+
GetLocaleData,
|
|
150
|
+
GetLocaleResponse,
|
|
151
|
+
GetModelsData,
|
|
152
|
+
GetModelsResponse,
|
|
153
|
+
GetModelWithAssistantsData,
|
|
154
|
+
GetModelWithAssistantsError,
|
|
155
|
+
GetModelWithAssistantsResponse,
|
|
156
|
+
GetMyAccountData,
|
|
157
|
+
GetMyAccountResponse,
|
|
158
|
+
GetMyActiveTenantData,
|
|
159
|
+
GetMyActiveTenantResponse,
|
|
160
|
+
GetMyDashboardData,
|
|
161
|
+
GetMyDashboardResponse,
|
|
162
|
+
GetMyIdentityData,
|
|
163
|
+
GetMyIdentityResponse,
|
|
164
|
+
GetMyTenantsData,
|
|
165
|
+
GetMyTenantsResponse,
|
|
166
|
+
GetNodesForDocumentData,
|
|
167
|
+
GetNodesForDocumentError,
|
|
168
|
+
GetNodesForDocumentResponse,
|
|
169
|
+
GetNotificationsData,
|
|
170
|
+
GetNotificationsError,
|
|
171
|
+
GetNotificationsResponse,
|
|
172
|
+
GetOpenChatHitlData,
|
|
173
|
+
GetOpenChatHitlError,
|
|
174
|
+
GetOpenChatHitlResponse,
|
|
175
|
+
GetOrganizationMemoriesData,
|
|
176
|
+
GetOrganizationMemoriesError,
|
|
177
|
+
GetOrganizationMemoriesResponse,
|
|
178
|
+
GetProcessClassData,
|
|
179
|
+
GetProcessClassError,
|
|
180
|
+
GetProcessClassesData,
|
|
181
|
+
GetProcessClassesError,
|
|
182
|
+
GetProcessClassesResponse,
|
|
183
|
+
GetProcessClassInstancesData,
|
|
184
|
+
GetProcessClassInstancesError,
|
|
185
|
+
GetProcessClassInstancesResponse,
|
|
186
|
+
GetProcessClassResponse,
|
|
187
|
+
GetProcessInstanceData,
|
|
188
|
+
GetProcessInstanceError,
|
|
189
|
+
GetProcessInstanceResponse,
|
|
190
|
+
GetProcessOpenFormsData,
|
|
191
|
+
GetProcessOpenFormsError,
|
|
192
|
+
GetProcessOpenFormsResponse,
|
|
193
|
+
GetProcessStartFormsData,
|
|
194
|
+
GetProcessStartFormsError,
|
|
195
|
+
GetProcessStartFormsResponse,
|
|
196
|
+
GetProcessWalkthroughsData,
|
|
197
|
+
GetProcessWalkthroughsError,
|
|
198
|
+
GetProcessWalkthroughsResponse,
|
|
199
|
+
GetReadyData,
|
|
200
|
+
GetReadyResponse,
|
|
201
|
+
GetRoleData,
|
|
202
|
+
GetRoleError,
|
|
203
|
+
GetRoleResponse,
|
|
204
|
+
GetRolesData,
|
|
205
|
+
GetRolesResponse,
|
|
206
|
+
GetSuiteData,
|
|
207
|
+
GetSuiteResponse,
|
|
208
|
+
GetSummaryNodesForDocumentData,
|
|
209
|
+
GetSummaryNodesForDocumentError,
|
|
210
|
+
GetSummaryNodesForDocumentResponse,
|
|
211
|
+
GetSupportedFileTypesData,
|
|
212
|
+
GetSupportedFileTypesResponse,
|
|
213
|
+
GetThreadData,
|
|
214
|
+
GetThreadError,
|
|
215
|
+
GetThreadResponse,
|
|
216
|
+
GetUserData,
|
|
217
|
+
GetUserError,
|
|
218
|
+
GetUserMemoriesData,
|
|
219
|
+
GetUserMemoriesError,
|
|
220
|
+
GetUserMemoriesResponse,
|
|
221
|
+
GetUserResponse,
|
|
222
|
+
GetUsersData,
|
|
223
|
+
GetUsersError,
|
|
224
|
+
GetUsersResponse,
|
|
225
|
+
GetUserThreadsData,
|
|
226
|
+
GetUserThreadsError,
|
|
227
|
+
GetUserThreadsResponse,
|
|
228
|
+
InitiateDocumentUploadData,
|
|
229
|
+
InitiateDocumentUploadError,
|
|
230
|
+
InitiateDocumentUploadResponse,
|
|
231
|
+
InitiateFileUploadData,
|
|
232
|
+
InitiateFileUploadError,
|
|
233
|
+
InitiateFileUploadResponse,
|
|
234
|
+
ListTokensEndpointData,
|
|
235
|
+
ListTokensEndpointResponse,
|
|
236
|
+
ProcessDocumentData,
|
|
237
|
+
ProcessDocumentError,
|
|
238
|
+
ProcessDocumentResponse,
|
|
239
|
+
ReceiveOpenwebuiWebhookData,
|
|
240
|
+
ReceiveOpenwebuiWebhookError,
|
|
241
|
+
ReceiveOpenwebuiWebhookResponse,
|
|
242
|
+
RemoveAgentFromThreadData,
|
|
243
|
+
RemoveAgentFromThreadError,
|
|
244
|
+
RemoveAgentFromThreadResponse,
|
|
245
|
+
RemoveUserFromThreadData,
|
|
246
|
+
RemoveUserFromThreadError,
|
|
247
|
+
RemoveUserFromThreadResponse,
|
|
248
|
+
RevokeRoleData,
|
|
249
|
+
RevokeRoleError,
|
|
250
|
+
RevokeRoleResponse,
|
|
251
|
+
RevokeTokenEndpointData,
|
|
252
|
+
RevokeTokenEndpointError,
|
|
253
|
+
RevokeTokenEndpointResponse,
|
|
254
|
+
SearchOrganizationMemoriesData,
|
|
255
|
+
SearchOrganizationMemoriesError,
|
|
256
|
+
SearchOrganizationMemoriesResponse,
|
|
257
|
+
SearchUserMemoriesData,
|
|
258
|
+
SearchUserMemoriesError,
|
|
259
|
+
SearchUserMemoriesResponse,
|
|
260
|
+
SendProcessOpenFormData,
|
|
261
|
+
SendProcessOpenFormError,
|
|
262
|
+
SendProcessOpenFormResponse,
|
|
263
|
+
SendProcessStartFormData,
|
|
264
|
+
SendProcessStartFormError,
|
|
265
|
+
SendProcessStartFormResponse,
|
|
266
|
+
SetMyActiveTenantData,
|
|
267
|
+
SetMyActiveTenantError,
|
|
268
|
+
SetMyActiveTenantResponse,
|
|
269
|
+
TranslateTextData,
|
|
270
|
+
TranslateTextError,
|
|
271
|
+
TranslateTextResponse,
|
|
272
|
+
UpdateAgentInstanceData,
|
|
273
|
+
UpdateAgentInstanceError,
|
|
274
|
+
UpdateAgentInstanceResponse,
|
|
275
|
+
UpdateDatasetData,
|
|
276
|
+
UpdateDatasetError,
|
|
277
|
+
UpdateDatasetResponse,
|
|
278
|
+
UpdateMyDashboardData,
|
|
279
|
+
UpdateMyDashboardError,
|
|
280
|
+
UpdateMyDashboardResponse,
|
|
281
|
+
UpdateNamespaceData,
|
|
282
|
+
UpdateNamespaceError,
|
|
283
|
+
UpdateNamespaceResponse,
|
|
284
|
+
UpdateNotificationData,
|
|
285
|
+
UpdateNotificationError,
|
|
286
|
+
UpdateNotificationResponse,
|
|
287
|
+
UpdateNotificationsBulkData,
|
|
288
|
+
UpdateNotificationsBulkError,
|
|
289
|
+
UpdateNotificationsBulkResponse,
|
|
290
|
+
UpdateOrganizationMemoryData,
|
|
291
|
+
UpdateOrganizationMemoryError,
|
|
292
|
+
UpdateOrganizationMemoryResponse,
|
|
293
|
+
UpdateProcessInstanceData,
|
|
294
|
+
UpdateProcessInstanceError,
|
|
295
|
+
UpdateProcessInstanceResponse,
|
|
296
|
+
UpdateRoleData,
|
|
297
|
+
UpdateRoleError,
|
|
298
|
+
UpdateRoleResponse,
|
|
299
|
+
UpdateUserMemoryData,
|
|
300
|
+
UpdateUserMemoryError,
|
|
301
|
+
UpdateUserMemoryResponse,
|
|
302
|
+
ValidateDocumentUploadData,
|
|
303
|
+
ValidateDocumentUploadError,
|
|
304
|
+
ValidateDocumentUploadResponse,
|
|
305
|
+
ValidateFileUploadData,
|
|
306
|
+
ValidateFileUploadError,
|
|
307
|
+
ValidateFileUploadResponse,
|
|
308
|
+
} from "./types.gen";
|
|
309
|
+
|
|
310
|
+
export type Options<
|
|
311
|
+
TComposable extends Composable = "$fetch",
|
|
312
|
+
TData extends TDataShape = TDataShape,
|
|
313
|
+
ResT = unknown,
|
|
314
|
+
DefaultT = undefined,
|
|
315
|
+
> = Options2<TComposable, TData, ResT, DefaultT> & {
|
|
316
|
+
/**
|
|
317
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
318
|
+
* individual options. This might be also useful if you want to implement a
|
|
319
|
+
* custom client.
|
|
320
|
+
*/
|
|
321
|
+
client?: Client;
|
|
322
|
+
/**
|
|
323
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
324
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
325
|
+
*/
|
|
326
|
+
meta?: Record<string, unknown>;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Get Health
|
|
331
|
+
*
|
|
332
|
+
* A simple liveness check endpoint that returns {"status": "ok"} if
|
|
333
|
+
* the application is running and capable of handling requests.
|
|
334
|
+
*/
|
|
335
|
+
export const getHealth = <
|
|
336
|
+
TComposable extends Composable = "$fetch",
|
|
337
|
+
DefaultT extends GetHealthResponse = GetHealthResponse,
|
|
338
|
+
>(
|
|
339
|
+
options: Options<TComposable, GetHealthData, GetHealthResponse, DefaultT>,
|
|
340
|
+
) =>
|
|
341
|
+
(options.client ?? client).get<
|
|
342
|
+
TComposable,
|
|
343
|
+
GetHealthResponse | DefaultT,
|
|
344
|
+
unknown,
|
|
345
|
+
DefaultT
|
|
346
|
+
>({ url: "/health/", ...options });
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Get Ready
|
|
350
|
+
*
|
|
351
|
+
* Readiness check that verifies all API dependencies are available.
|
|
352
|
+
* Returns 200 if all checks pass, 503 if any check fails.
|
|
353
|
+
*/
|
|
354
|
+
export const getReady = <
|
|
355
|
+
TComposable extends Composable = "$fetch",
|
|
356
|
+
DefaultT extends GetReadyResponse = GetReadyResponse,
|
|
357
|
+
>(
|
|
358
|
+
options: Options<TComposable, GetReadyData, GetReadyResponse, DefaultT>,
|
|
359
|
+
) =>
|
|
360
|
+
(options.client ?? client).get<
|
|
361
|
+
TComposable,
|
|
362
|
+
GetReadyResponse | DefaultT,
|
|
363
|
+
unknown,
|
|
364
|
+
DefaultT
|
|
365
|
+
>({ url: "/health/ready", ...options });
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Get Auth Providers
|
|
369
|
+
*/
|
|
370
|
+
export const getAuthProviders = <
|
|
371
|
+
TComposable extends Composable = "$fetch",
|
|
372
|
+
DefaultT extends GetAuthProvidersResponse = GetAuthProvidersResponse,
|
|
373
|
+
>(
|
|
374
|
+
options: Options<
|
|
375
|
+
TComposable,
|
|
376
|
+
GetAuthProvidersData,
|
|
377
|
+
GetAuthProvidersResponse,
|
|
378
|
+
DefaultT
|
|
379
|
+
>,
|
|
380
|
+
) =>
|
|
381
|
+
(options.client ?? client).get<
|
|
382
|
+
TComposable,
|
|
383
|
+
GetAuthProvidersResponse | DefaultT,
|
|
384
|
+
unknown,
|
|
385
|
+
DefaultT
|
|
386
|
+
>({ url: "/auth-providers/", ...options });
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Get Suite
|
|
390
|
+
*/
|
|
391
|
+
export const getSuite = <
|
|
392
|
+
TComposable extends Composable = "$fetch",
|
|
393
|
+
DefaultT extends GetSuiteResponse = GetSuiteResponse,
|
|
394
|
+
>(
|
|
395
|
+
options: Options<TComposable, GetSuiteData, GetSuiteResponse, DefaultT>,
|
|
396
|
+
) =>
|
|
397
|
+
(options.client ?? client).get<
|
|
398
|
+
TComposable,
|
|
399
|
+
GetSuiteResponse | DefaultT,
|
|
400
|
+
unknown,
|
|
401
|
+
DefaultT
|
|
402
|
+
>({
|
|
403
|
+
security: [
|
|
404
|
+
{ scheme: "bearer", type: "http" },
|
|
405
|
+
{ scheme: "bearer", type: "http" },
|
|
406
|
+
],
|
|
407
|
+
url: "/{tenant_id}/suites/",
|
|
408
|
+
...options,
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Get My Tenants
|
|
413
|
+
*
|
|
414
|
+
* Returns all tenants the current user belongs to, along with sysadmin status.
|
|
415
|
+
*/
|
|
416
|
+
export const getMyTenants = <
|
|
417
|
+
TComposable extends Composable = "$fetch",
|
|
418
|
+
DefaultT extends GetMyTenantsResponse = GetMyTenantsResponse,
|
|
419
|
+
>(
|
|
420
|
+
options: Options<
|
|
421
|
+
TComposable,
|
|
422
|
+
GetMyTenantsData,
|
|
423
|
+
GetMyTenantsResponse,
|
|
424
|
+
DefaultT
|
|
425
|
+
>,
|
|
426
|
+
) =>
|
|
427
|
+
(options.client ?? client).get<
|
|
428
|
+
TComposable,
|
|
429
|
+
GetMyTenantsResponse | DefaultT,
|
|
430
|
+
unknown,
|
|
431
|
+
DefaultT
|
|
432
|
+
>({
|
|
433
|
+
security: [
|
|
434
|
+
{ scheme: "bearer", type: "http" },
|
|
435
|
+
{ scheme: "bearer", type: "http" },
|
|
436
|
+
],
|
|
437
|
+
url: "/my-tenants",
|
|
438
|
+
...options,
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Get My Active Tenant
|
|
443
|
+
*
|
|
444
|
+
* Returns the current user's active tenant.
|
|
445
|
+
*/
|
|
446
|
+
export const getMyActiveTenant = <
|
|
447
|
+
TComposable extends Composable = "$fetch",
|
|
448
|
+
DefaultT extends GetMyActiveTenantResponse = GetMyActiveTenantResponse,
|
|
449
|
+
>(
|
|
450
|
+
options: Options<
|
|
451
|
+
TComposable,
|
|
452
|
+
GetMyActiveTenantData,
|
|
453
|
+
GetMyActiveTenantResponse,
|
|
454
|
+
DefaultT
|
|
455
|
+
>,
|
|
456
|
+
) =>
|
|
457
|
+
(options.client ?? client).get<
|
|
458
|
+
TComposable,
|
|
459
|
+
GetMyActiveTenantResponse | DefaultT,
|
|
460
|
+
unknown,
|
|
461
|
+
DefaultT
|
|
462
|
+
>({
|
|
463
|
+
security: [
|
|
464
|
+
{ scheme: "bearer", type: "http" },
|
|
465
|
+
{ scheme: "bearer", type: "http" },
|
|
466
|
+
],
|
|
467
|
+
url: "/my-tenants/active",
|
|
468
|
+
...options,
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Set My Active Tenant
|
|
473
|
+
*
|
|
474
|
+
* Sets the current user's active tenant.
|
|
475
|
+
*/
|
|
476
|
+
export const setMyActiveTenant = <
|
|
477
|
+
TComposable extends Composable = "$fetch",
|
|
478
|
+
DefaultT extends SetMyActiveTenantResponse = SetMyActiveTenantResponse,
|
|
479
|
+
>(
|
|
480
|
+
options: Options<
|
|
481
|
+
TComposable,
|
|
482
|
+
SetMyActiveTenantData,
|
|
483
|
+
SetMyActiveTenantResponse,
|
|
484
|
+
DefaultT
|
|
485
|
+
>,
|
|
486
|
+
) =>
|
|
487
|
+
(options.client ?? client).put<
|
|
488
|
+
TComposable,
|
|
489
|
+
SetMyActiveTenantResponse | DefaultT,
|
|
490
|
+
SetMyActiveTenantError,
|
|
491
|
+
DefaultT
|
|
492
|
+
>({
|
|
493
|
+
security: [
|
|
494
|
+
{ scheme: "bearer", type: "http" },
|
|
495
|
+
{ scheme: "bearer", type: "http" },
|
|
496
|
+
],
|
|
497
|
+
url: "/my-tenants/active",
|
|
498
|
+
...options,
|
|
499
|
+
headers: {
|
|
500
|
+
"Content-Type": "application/json",
|
|
501
|
+
...options.headers,
|
|
502
|
+
},
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Get My Account
|
|
507
|
+
*
|
|
508
|
+
* Returns the currently logged-in user's profile.
|
|
509
|
+
*/
|
|
510
|
+
export const getMyAccount = <
|
|
511
|
+
TComposable extends Composable = "$fetch",
|
|
512
|
+
DefaultT extends GetMyAccountResponse = GetMyAccountResponse,
|
|
513
|
+
>(
|
|
514
|
+
options: Options<
|
|
515
|
+
TComposable,
|
|
516
|
+
GetMyAccountData,
|
|
517
|
+
GetMyAccountResponse,
|
|
518
|
+
DefaultT
|
|
519
|
+
>,
|
|
520
|
+
) =>
|
|
521
|
+
(options.client ?? client).get<
|
|
522
|
+
TComposable,
|
|
523
|
+
GetMyAccountResponse | DefaultT,
|
|
524
|
+
unknown,
|
|
525
|
+
DefaultT
|
|
526
|
+
>({
|
|
527
|
+
security: [
|
|
528
|
+
{ scheme: "bearer", type: "http" },
|
|
529
|
+
{ scheme: "bearer", type: "http" },
|
|
530
|
+
],
|
|
531
|
+
url: "/{tenant_id}/my-account",
|
|
532
|
+
...options,
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Get My Identity
|
|
537
|
+
*
|
|
538
|
+
* Returns the authenticated user's identity (id, name, roles, sys-admin status, dashboard).
|
|
539
|
+
*
|
|
540
|
+
* Lightweight counterpart to ``get_my_account``: omits the access-rules matrix,
|
|
541
|
+
* so this endpoint can be mounted on runners (e.g., sysadmin-api) that don't
|
|
542
|
+
* wire NATS or i18n middleware. The ``{tenant_id}`` path segment is structural
|
|
543
|
+
* (TenantScopedController prefix); the response does not depend on it, so any
|
|
544
|
+
* value resolves — sysadmin-web's role-gate middleware passes ``"active"``.
|
|
545
|
+
*/
|
|
546
|
+
export const getMyIdentity = <
|
|
547
|
+
TComposable extends Composable = "$fetch",
|
|
548
|
+
DefaultT extends GetMyIdentityResponse = GetMyIdentityResponse,
|
|
549
|
+
>(
|
|
550
|
+
options: Options<
|
|
551
|
+
TComposable,
|
|
552
|
+
GetMyIdentityData,
|
|
553
|
+
GetMyIdentityResponse,
|
|
554
|
+
DefaultT
|
|
555
|
+
>,
|
|
556
|
+
) =>
|
|
557
|
+
(options.client ?? client).get<
|
|
558
|
+
TComposable,
|
|
559
|
+
GetMyIdentityResponse | DefaultT,
|
|
560
|
+
unknown,
|
|
561
|
+
DefaultT
|
|
562
|
+
>({
|
|
563
|
+
security: [
|
|
564
|
+
{ scheme: "bearer", type: "http" },
|
|
565
|
+
{ scheme: "bearer", type: "http" },
|
|
566
|
+
],
|
|
567
|
+
url: "/{tenant_id}/my-account/identity",
|
|
568
|
+
...options,
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Get My Dashboard
|
|
573
|
+
*
|
|
574
|
+
* Returns the user's dashboard settings, or null if none exist.
|
|
575
|
+
*/
|
|
576
|
+
export const getMyDashboard = <
|
|
577
|
+
TComposable extends Composable = "$fetch",
|
|
578
|
+
DefaultT extends GetMyDashboardResponse = GetMyDashboardResponse,
|
|
579
|
+
>(
|
|
580
|
+
options: Options<
|
|
581
|
+
TComposable,
|
|
582
|
+
GetMyDashboardData,
|
|
583
|
+
GetMyDashboardResponse,
|
|
584
|
+
DefaultT
|
|
585
|
+
>,
|
|
586
|
+
) =>
|
|
587
|
+
(options.client ?? client).get<
|
|
588
|
+
TComposable,
|
|
589
|
+
GetMyDashboardResponse | DefaultT,
|
|
590
|
+
unknown,
|
|
591
|
+
DefaultT
|
|
592
|
+
>({
|
|
593
|
+
security: [
|
|
594
|
+
{ scheme: "bearer", type: "http" },
|
|
595
|
+
{ scheme: "bearer", type: "http" },
|
|
596
|
+
],
|
|
597
|
+
url: "/{tenant_id}/my-account/dashboard",
|
|
598
|
+
...options,
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Update My Dashboard
|
|
603
|
+
*
|
|
604
|
+
* Updates the user's dashboard settings.
|
|
605
|
+
*/
|
|
606
|
+
export const updateMyDashboard = <
|
|
607
|
+
TComposable extends Composable = "$fetch",
|
|
608
|
+
DefaultT extends UpdateMyDashboardResponse = UpdateMyDashboardResponse,
|
|
609
|
+
>(
|
|
610
|
+
options: Options<
|
|
611
|
+
TComposable,
|
|
612
|
+
UpdateMyDashboardData,
|
|
613
|
+
UpdateMyDashboardResponse,
|
|
614
|
+
DefaultT
|
|
615
|
+
>,
|
|
616
|
+
) =>
|
|
617
|
+
(options.client ?? client).put<
|
|
618
|
+
TComposable,
|
|
619
|
+
UpdateMyDashboardResponse | DefaultT,
|
|
620
|
+
UpdateMyDashboardError,
|
|
621
|
+
DefaultT
|
|
622
|
+
>({
|
|
623
|
+
security: [
|
|
624
|
+
{ scheme: "bearer", type: "http" },
|
|
625
|
+
{ scheme: "bearer", type: "http" },
|
|
626
|
+
],
|
|
627
|
+
url: "/{tenant_id}/my-account/dashboard",
|
|
628
|
+
...options,
|
|
629
|
+
headers: {
|
|
630
|
+
"Content-Type": "application/json",
|
|
631
|
+
...options.headers,
|
|
632
|
+
},
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Get User
|
|
637
|
+
*
|
|
638
|
+
* Retrieve user info by their OID. Shows access within the admin's current tenant context.
|
|
639
|
+
*/
|
|
640
|
+
export const getUser = <
|
|
641
|
+
TComposable extends Composable = "$fetch",
|
|
642
|
+
DefaultT extends GetUserResponse = GetUserResponse,
|
|
643
|
+
>(
|
|
644
|
+
options: Options<TComposable, GetUserData, GetUserResponse, DefaultT>,
|
|
645
|
+
) =>
|
|
646
|
+
(options.client ?? client).get<
|
|
647
|
+
TComposable,
|
|
648
|
+
GetUserResponse | DefaultT,
|
|
649
|
+
GetUserError,
|
|
650
|
+
DefaultT
|
|
651
|
+
>({
|
|
652
|
+
security: [
|
|
653
|
+
{ scheme: "bearer", type: "http" },
|
|
654
|
+
{ scheme: "bearer", type: "http" },
|
|
655
|
+
],
|
|
656
|
+
url: "/{tenant_id}/users/{user_id}",
|
|
657
|
+
...options,
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Get Users
|
|
662
|
+
*
|
|
663
|
+
* Returns a paginated list of users within the requesting admin's tenant.
|
|
664
|
+
*/
|
|
665
|
+
export const getUsers = <
|
|
666
|
+
TComposable extends Composable = "$fetch",
|
|
667
|
+
DefaultT extends GetUsersResponse = GetUsersResponse,
|
|
668
|
+
>(
|
|
669
|
+
options: Options<TComposable, GetUsersData, GetUsersResponse, DefaultT>,
|
|
670
|
+
) =>
|
|
671
|
+
(options.client ?? client).get<
|
|
672
|
+
TComposable,
|
|
673
|
+
GetUsersResponse | DefaultT,
|
|
674
|
+
GetUsersError,
|
|
675
|
+
DefaultT
|
|
676
|
+
>({
|
|
677
|
+
security: [
|
|
678
|
+
{ scheme: "bearer", type: "http" },
|
|
679
|
+
{ scheme: "bearer", type: "http" },
|
|
680
|
+
],
|
|
681
|
+
url: "/{tenant_id}/users/",
|
|
682
|
+
...options,
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Assign Role
|
|
687
|
+
*
|
|
688
|
+
* Assign a tenant role to the user. Returns the user's resulting role list within the tenant.
|
|
689
|
+
*/
|
|
690
|
+
export const assignRole = <
|
|
691
|
+
TComposable extends Composable = "$fetch",
|
|
692
|
+
DefaultT extends AssignRoleResponse = AssignRoleResponse,
|
|
693
|
+
>(
|
|
694
|
+
options: Options<TComposable, AssignRoleData, AssignRoleResponse, DefaultT>,
|
|
695
|
+
) =>
|
|
696
|
+
(options.client ?? client).post<
|
|
697
|
+
TComposable,
|
|
698
|
+
AssignRoleResponse | DefaultT,
|
|
699
|
+
AssignRoleError,
|
|
700
|
+
DefaultT
|
|
701
|
+
>({
|
|
702
|
+
security: [
|
|
703
|
+
{ scheme: "bearer", type: "http" },
|
|
704
|
+
{ scheme: "bearer", type: "http" },
|
|
705
|
+
],
|
|
706
|
+
url: "/{tenant_id}/users/{user_id}/roles",
|
|
707
|
+
...options,
|
|
708
|
+
headers: {
|
|
709
|
+
"Content-Type": "application/json",
|
|
710
|
+
...options.headers,
|
|
711
|
+
},
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Revoke Role
|
|
716
|
+
*
|
|
717
|
+
* Revoke a tenant role from the user. Returns the user's resulting role list within the tenant.
|
|
718
|
+
*/
|
|
719
|
+
export const revokeRole = <
|
|
720
|
+
TComposable extends Composable = "$fetch",
|
|
721
|
+
DefaultT extends RevokeRoleResponse = RevokeRoleResponse,
|
|
722
|
+
>(
|
|
723
|
+
options: Options<TComposable, RevokeRoleData, RevokeRoleResponse, DefaultT>,
|
|
724
|
+
) =>
|
|
725
|
+
(options.client ?? client).delete<
|
|
726
|
+
TComposable,
|
|
727
|
+
RevokeRoleResponse | DefaultT,
|
|
728
|
+
RevokeRoleError,
|
|
729
|
+
DefaultT
|
|
730
|
+
>({
|
|
731
|
+
security: [
|
|
732
|
+
{ scheme: "bearer", type: "http" },
|
|
733
|
+
{ scheme: "bearer", type: "http" },
|
|
734
|
+
],
|
|
735
|
+
url: "/{tenant_id}/users/{user_id}/roles/{role_name}",
|
|
736
|
+
...options,
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Get Locale
|
|
741
|
+
*
|
|
742
|
+
* Return the user's current locale and a localized test string.
|
|
743
|
+
*/
|
|
744
|
+
export const getLocale = <
|
|
745
|
+
TComposable extends Composable = "$fetch",
|
|
746
|
+
DefaultT extends GetLocaleResponse = GetLocaleResponse,
|
|
747
|
+
>(
|
|
748
|
+
options: Options<TComposable, GetLocaleData, GetLocaleResponse, DefaultT>,
|
|
749
|
+
) =>
|
|
750
|
+
(options.client ?? client).get<
|
|
751
|
+
TComposable,
|
|
752
|
+
GetLocaleResponse | DefaultT,
|
|
753
|
+
unknown,
|
|
754
|
+
DefaultT
|
|
755
|
+
>({
|
|
756
|
+
security: [
|
|
757
|
+
{ scheme: "bearer", type: "http" },
|
|
758
|
+
{ scheme: "bearer", type: "http" },
|
|
759
|
+
],
|
|
760
|
+
url: "/{tenant_id}/i18n/my-locale",
|
|
761
|
+
...options,
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Get Agent Events In Thread
|
|
766
|
+
*
|
|
767
|
+
* Returns all events in a given thread
|
|
768
|
+
*/
|
|
769
|
+
export const getAgentEventsInThread = <
|
|
770
|
+
TComposable extends Composable = "$fetch",
|
|
771
|
+
DefaultT extends GetAgentEventsInThreadResponse =
|
|
772
|
+
GetAgentEventsInThreadResponse,
|
|
773
|
+
>(
|
|
774
|
+
options: Options<
|
|
775
|
+
TComposable,
|
|
776
|
+
GetAgentEventsInThreadData,
|
|
777
|
+
GetAgentEventsInThreadResponse,
|
|
778
|
+
DefaultT
|
|
779
|
+
>,
|
|
780
|
+
) =>
|
|
781
|
+
(options.client ?? client).get<
|
|
782
|
+
TComposable,
|
|
783
|
+
GetAgentEventsInThreadResponse | DefaultT,
|
|
784
|
+
GetAgentEventsInThreadError,
|
|
785
|
+
DefaultT
|
|
786
|
+
>({
|
|
787
|
+
security: [
|
|
788
|
+
{ scheme: "bearer", type: "http" },
|
|
789
|
+
{ scheme: "bearer", type: "http" },
|
|
790
|
+
],
|
|
791
|
+
url: "/{tenant_id}/events/agents/threads/{thread_id}",
|
|
792
|
+
...options,
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Get Agent Event Timeseries
|
|
797
|
+
*
|
|
798
|
+
* Retrieves time-based statistics.
|
|
799
|
+
* Returns event counts in time buckets with resolution based on the time range:
|
|
800
|
+
* - 1h: 1 minute resolution
|
|
801
|
+
* - 24h: 1 hour resolution
|
|
802
|
+
* - 30d: 1 day resolution
|
|
803
|
+
* - 365d: 1 week resolution
|
|
804
|
+
*/
|
|
805
|
+
export const getAgentEventTimeseries = <
|
|
806
|
+
TComposable extends Composable = "$fetch",
|
|
807
|
+
DefaultT extends GetAgentEventTimeseriesResponse =
|
|
808
|
+
GetAgentEventTimeseriesResponse,
|
|
809
|
+
>(
|
|
810
|
+
options: Options<
|
|
811
|
+
TComposable,
|
|
812
|
+
GetAgentEventTimeseriesData,
|
|
813
|
+
GetAgentEventTimeseriesResponse,
|
|
814
|
+
DefaultT
|
|
815
|
+
>,
|
|
816
|
+
) =>
|
|
817
|
+
(options.client ?? client).get<
|
|
818
|
+
TComposable,
|
|
819
|
+
GetAgentEventTimeseriesResponse | DefaultT,
|
|
820
|
+
GetAgentEventTimeseriesError,
|
|
821
|
+
DefaultT
|
|
822
|
+
>({
|
|
823
|
+
responseTransformer: getAgentEventTimeseriesResponseTransformer,
|
|
824
|
+
security: [
|
|
825
|
+
{ scheme: "bearer", type: "http" },
|
|
826
|
+
{ scheme: "bearer", type: "http" },
|
|
827
|
+
],
|
|
828
|
+
url: "/{tenant_id}/events/agents/timeseries/{time_range}",
|
|
829
|
+
...options,
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Get Litellm Models
|
|
834
|
+
*
|
|
835
|
+
* Retrieve a list of all available models grouped by type.
|
|
836
|
+
*/
|
|
837
|
+
export const getLitellmModels = <
|
|
838
|
+
TComposable extends Composable = "$fetch",
|
|
839
|
+
DefaultT extends GetLitellmModelsResponse = GetLitellmModelsResponse,
|
|
840
|
+
>(
|
|
841
|
+
options: Options<
|
|
842
|
+
TComposable,
|
|
843
|
+
GetLitellmModelsData,
|
|
844
|
+
GetLitellmModelsResponse,
|
|
845
|
+
DefaultT
|
|
846
|
+
>,
|
|
847
|
+
) =>
|
|
848
|
+
(options.client ?? client).get<
|
|
849
|
+
TComposable,
|
|
850
|
+
GetLitellmModelsResponse | DefaultT,
|
|
851
|
+
unknown,
|
|
852
|
+
DefaultT
|
|
853
|
+
>({
|
|
854
|
+
security: [
|
|
855
|
+
{ scheme: "bearer", type: "http" },
|
|
856
|
+
{ scheme: "bearer", type: "http" },
|
|
857
|
+
],
|
|
858
|
+
url: "/{tenant_id}/models",
|
|
859
|
+
...options,
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Get Litellm Models By Mode
|
|
864
|
+
*
|
|
865
|
+
* Retrieve all models filtered by their mode (chat, embedding, rerank, etc.).
|
|
866
|
+
*/
|
|
867
|
+
export const getLitellmModelsByMode = <
|
|
868
|
+
TComposable extends Composable = "$fetch",
|
|
869
|
+
DefaultT extends GetLitellmModelsByModeResponse =
|
|
870
|
+
GetLitellmModelsByModeResponse,
|
|
871
|
+
>(
|
|
872
|
+
options: Options<
|
|
873
|
+
TComposable,
|
|
874
|
+
GetLitellmModelsByModeData,
|
|
875
|
+
GetLitellmModelsByModeResponse,
|
|
876
|
+
DefaultT
|
|
877
|
+
>,
|
|
878
|
+
) =>
|
|
879
|
+
(options.client ?? client).get<
|
|
880
|
+
TComposable,
|
|
881
|
+
GetLitellmModelsByModeResponse | DefaultT,
|
|
882
|
+
GetLitellmModelsByModeError,
|
|
883
|
+
DefaultT
|
|
884
|
+
>({
|
|
885
|
+
security: [
|
|
886
|
+
{ scheme: "bearer", type: "http" },
|
|
887
|
+
{ scheme: "bearer", type: "http" },
|
|
888
|
+
],
|
|
889
|
+
url: "/{tenant_id}/models/mode/{mode}",
|
|
890
|
+
...options,
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Get Litellm Model
|
|
895
|
+
*
|
|
896
|
+
* Retrieve a specific model by name.
|
|
897
|
+
*/
|
|
898
|
+
export const getLitellmModel = <
|
|
899
|
+
TComposable extends Composable = "$fetch",
|
|
900
|
+
DefaultT extends GetLitellmModelResponse = GetLitellmModelResponse,
|
|
901
|
+
>(
|
|
902
|
+
options: Options<
|
|
903
|
+
TComposable,
|
|
904
|
+
GetLitellmModelData,
|
|
905
|
+
GetLitellmModelResponse,
|
|
906
|
+
DefaultT
|
|
907
|
+
>,
|
|
908
|
+
) =>
|
|
909
|
+
(options.client ?? client).get<
|
|
910
|
+
TComposable,
|
|
911
|
+
GetLitellmModelResponse | DefaultT,
|
|
912
|
+
GetLitellmModelError,
|
|
913
|
+
DefaultT
|
|
914
|
+
>({
|
|
915
|
+
security: [
|
|
916
|
+
{ scheme: "bearer", type: "http" },
|
|
917
|
+
{ scheme: "bearer", type: "http" },
|
|
918
|
+
],
|
|
919
|
+
url: "/{tenant_id}/models/{model_name}",
|
|
920
|
+
...options,
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Get User Threads
|
|
925
|
+
*
|
|
926
|
+
* Returns all threads that the authenticated user is a member of.
|
|
927
|
+
*/
|
|
928
|
+
export const getUserThreads = <
|
|
929
|
+
TComposable extends Composable = "$fetch",
|
|
930
|
+
DefaultT extends GetUserThreadsResponse = GetUserThreadsResponse,
|
|
931
|
+
>(
|
|
932
|
+
options: Options<
|
|
933
|
+
TComposable,
|
|
934
|
+
GetUserThreadsData,
|
|
935
|
+
GetUserThreadsResponse,
|
|
936
|
+
DefaultT
|
|
937
|
+
>,
|
|
938
|
+
) =>
|
|
939
|
+
(options.client ?? client).get<
|
|
940
|
+
TComposable,
|
|
941
|
+
GetUserThreadsResponse | DefaultT,
|
|
942
|
+
GetUserThreadsError,
|
|
943
|
+
DefaultT
|
|
944
|
+
>({
|
|
945
|
+
security: [
|
|
946
|
+
{ scheme: "bearer", type: "http" },
|
|
947
|
+
{ scheme: "bearer", type: "http" },
|
|
948
|
+
],
|
|
949
|
+
url: "/{tenant_id}/threads/",
|
|
950
|
+
...options,
|
|
951
|
+
});
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Create Thread
|
|
955
|
+
*
|
|
956
|
+
* Creates a new thread with the specified name, users, and agents.
|
|
957
|
+
* Automatically adds the authenticated user if not already included.
|
|
958
|
+
*/
|
|
959
|
+
export const createThread = <
|
|
960
|
+
TComposable extends Composable = "$fetch",
|
|
961
|
+
DefaultT extends CreateThreadResponse = CreateThreadResponse,
|
|
962
|
+
>(
|
|
963
|
+
options: Options<
|
|
964
|
+
TComposable,
|
|
965
|
+
CreateThreadData,
|
|
966
|
+
CreateThreadResponse,
|
|
967
|
+
DefaultT
|
|
968
|
+
>,
|
|
969
|
+
) =>
|
|
970
|
+
(options.client ?? client).post<
|
|
971
|
+
TComposable,
|
|
972
|
+
CreateThreadResponse | DefaultT,
|
|
973
|
+
CreateThreadError,
|
|
974
|
+
DefaultT
|
|
975
|
+
>({
|
|
976
|
+
security: [
|
|
977
|
+
{ scheme: "bearer", type: "http" },
|
|
978
|
+
{ scheme: "bearer", type: "http" },
|
|
979
|
+
],
|
|
980
|
+
url: "/{tenant_id}/threads/",
|
|
981
|
+
...options,
|
|
982
|
+
headers: {
|
|
983
|
+
"Content-Type": "application/json",
|
|
984
|
+
...options.headers,
|
|
985
|
+
},
|
|
986
|
+
});
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Get Thread
|
|
990
|
+
*
|
|
991
|
+
* Retrieves details of a specific thread.
|
|
992
|
+
* Raises 403 if the user is not a member of that thread.
|
|
993
|
+
*/
|
|
994
|
+
export const getThread = <
|
|
995
|
+
TComposable extends Composable = "$fetch",
|
|
996
|
+
DefaultT extends GetThreadResponse = GetThreadResponse,
|
|
997
|
+
>(
|
|
998
|
+
options: Options<TComposable, GetThreadData, GetThreadResponse, DefaultT>,
|
|
999
|
+
) =>
|
|
1000
|
+
(options.client ?? client).get<
|
|
1001
|
+
TComposable,
|
|
1002
|
+
GetThreadResponse | DefaultT,
|
|
1003
|
+
GetThreadError,
|
|
1004
|
+
DefaultT
|
|
1005
|
+
>({
|
|
1006
|
+
security: [
|
|
1007
|
+
{ scheme: "bearer", type: "http" },
|
|
1008
|
+
{ scheme: "bearer", type: "http" },
|
|
1009
|
+
],
|
|
1010
|
+
url: "/{tenant_id}/threads/{thread_id}",
|
|
1011
|
+
...options,
|
|
1012
|
+
});
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Add Agent To Thread
|
|
1016
|
+
*
|
|
1017
|
+
* Adds an agent to a specified thread, if the user is a member of that thread.
|
|
1018
|
+
*/
|
|
1019
|
+
export const addAgentToThread = <
|
|
1020
|
+
TComposable extends Composable = "$fetch",
|
|
1021
|
+
DefaultT extends AddAgentToThreadResponse = AddAgentToThreadResponse,
|
|
1022
|
+
>(
|
|
1023
|
+
options: Options<
|
|
1024
|
+
TComposable,
|
|
1025
|
+
AddAgentToThreadData,
|
|
1026
|
+
AddAgentToThreadResponse,
|
|
1027
|
+
DefaultT
|
|
1028
|
+
>,
|
|
1029
|
+
) =>
|
|
1030
|
+
(options.client ?? client).post<
|
|
1031
|
+
TComposable,
|
|
1032
|
+
AddAgentToThreadResponse | DefaultT,
|
|
1033
|
+
AddAgentToThreadError,
|
|
1034
|
+
DefaultT
|
|
1035
|
+
>({
|
|
1036
|
+
security: [
|
|
1037
|
+
{ scheme: "bearer", type: "http" },
|
|
1038
|
+
{ scheme: "bearer", type: "http" },
|
|
1039
|
+
],
|
|
1040
|
+
url: "/{tenant_id}/threads/{thread_id}/agents",
|
|
1041
|
+
...options,
|
|
1042
|
+
headers: {
|
|
1043
|
+
"Content-Type": "application/json",
|
|
1044
|
+
...options.headers,
|
|
1045
|
+
},
|
|
1046
|
+
});
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Remove Agent From Thread
|
|
1050
|
+
*
|
|
1051
|
+
* Removes an agent from the thread, if the user is part of that thread.
|
|
1052
|
+
*/
|
|
1053
|
+
export const removeAgentFromThread = <
|
|
1054
|
+
TComposable extends Composable = "$fetch",
|
|
1055
|
+
DefaultT extends RemoveAgentFromThreadResponse =
|
|
1056
|
+
RemoveAgentFromThreadResponse,
|
|
1057
|
+
>(
|
|
1058
|
+
options: Options<
|
|
1059
|
+
TComposable,
|
|
1060
|
+
RemoveAgentFromThreadData,
|
|
1061
|
+
RemoveAgentFromThreadResponse,
|
|
1062
|
+
DefaultT
|
|
1063
|
+
>,
|
|
1064
|
+
) =>
|
|
1065
|
+
(options.client ?? client).delete<
|
|
1066
|
+
TComposable,
|
|
1067
|
+
RemoveAgentFromThreadResponse | DefaultT,
|
|
1068
|
+
RemoveAgentFromThreadError,
|
|
1069
|
+
DefaultT
|
|
1070
|
+
>({
|
|
1071
|
+
security: [
|
|
1072
|
+
{ scheme: "bearer", type: "http" },
|
|
1073
|
+
{ scheme: "bearer", type: "http" },
|
|
1074
|
+
],
|
|
1075
|
+
url: "/{tenant_id}/threads/{thread_id}/agents/{agent_class}/{agent_id}",
|
|
1076
|
+
...options,
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Add User To Thread
|
|
1081
|
+
*
|
|
1082
|
+
* Adds another user to the thread, provided the current user is a member of the thread.
|
|
1083
|
+
*/
|
|
1084
|
+
export const addUserToThread = <
|
|
1085
|
+
TComposable extends Composable = "$fetch",
|
|
1086
|
+
DefaultT extends AddUserToThreadResponse = AddUserToThreadResponse,
|
|
1087
|
+
>(
|
|
1088
|
+
options: Options<
|
|
1089
|
+
TComposable,
|
|
1090
|
+
AddUserToThreadData,
|
|
1091
|
+
AddUserToThreadResponse,
|
|
1092
|
+
DefaultT
|
|
1093
|
+
>,
|
|
1094
|
+
) =>
|
|
1095
|
+
(options.client ?? client).post<
|
|
1096
|
+
TComposable,
|
|
1097
|
+
AddUserToThreadResponse | DefaultT,
|
|
1098
|
+
AddUserToThreadError,
|
|
1099
|
+
DefaultT
|
|
1100
|
+
>({
|
|
1101
|
+
security: [
|
|
1102
|
+
{ scheme: "bearer", type: "http" },
|
|
1103
|
+
{ scheme: "bearer", type: "http" },
|
|
1104
|
+
],
|
|
1105
|
+
url: "/{tenant_id}/threads/{thread_id}/users",
|
|
1106
|
+
...options,
|
|
1107
|
+
headers: {
|
|
1108
|
+
"Content-Type": "application/json",
|
|
1109
|
+
...options.headers,
|
|
1110
|
+
},
|
|
1111
|
+
});
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Remove User From Thread
|
|
1115
|
+
*
|
|
1116
|
+
* Removes a user from the thread if the authenticated user is a member of the thread.
|
|
1117
|
+
*/
|
|
1118
|
+
export const removeUserFromThread = <
|
|
1119
|
+
TComposable extends Composable = "$fetch",
|
|
1120
|
+
DefaultT extends RemoveUserFromThreadResponse = RemoveUserFromThreadResponse,
|
|
1121
|
+
>(
|
|
1122
|
+
options: Options<
|
|
1123
|
+
TComposable,
|
|
1124
|
+
RemoveUserFromThreadData,
|
|
1125
|
+
RemoveUserFromThreadResponse,
|
|
1126
|
+
DefaultT
|
|
1127
|
+
>,
|
|
1128
|
+
) =>
|
|
1129
|
+
(options.client ?? client).delete<
|
|
1130
|
+
TComposable,
|
|
1131
|
+
RemoveUserFromThreadResponse | DefaultT,
|
|
1132
|
+
RemoveUserFromThreadError,
|
|
1133
|
+
DefaultT
|
|
1134
|
+
>({
|
|
1135
|
+
security: [
|
|
1136
|
+
{ scheme: "bearer", type: "http" },
|
|
1137
|
+
{ scheme: "bearer", type: "http" },
|
|
1138
|
+
],
|
|
1139
|
+
url: "/{tenant_id}/threads/{thread_id}/users/{remove_user_id}",
|
|
1140
|
+
...options,
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Get Open Chat Hitl
|
|
1145
|
+
*
|
|
1146
|
+
* Returns the open chat HITL request for a thread, if any.
|
|
1147
|
+
*
|
|
1148
|
+
* Chat HITLs are HITL requests where the question appears as a regular chat message
|
|
1149
|
+
* and the user responds by typing a normal chat message (not via popup dialog).
|
|
1150
|
+
*/
|
|
1151
|
+
export const getOpenChatHitl = <
|
|
1152
|
+
TComposable extends Composable = "$fetch",
|
|
1153
|
+
DefaultT extends GetOpenChatHitlResponse = GetOpenChatHitlResponse,
|
|
1154
|
+
>(
|
|
1155
|
+
options: Options<
|
|
1156
|
+
TComposable,
|
|
1157
|
+
GetOpenChatHitlData,
|
|
1158
|
+
GetOpenChatHitlResponse,
|
|
1159
|
+
DefaultT
|
|
1160
|
+
>,
|
|
1161
|
+
) =>
|
|
1162
|
+
(options.client ?? client).get<
|
|
1163
|
+
TComposable,
|
|
1164
|
+
GetOpenChatHitlResponse | DefaultT,
|
|
1165
|
+
GetOpenChatHitlError,
|
|
1166
|
+
DefaultT
|
|
1167
|
+
>({
|
|
1168
|
+
security: [
|
|
1169
|
+
{ scheme: "bearer", type: "http" },
|
|
1170
|
+
{ scheme: "bearer", type: "http" },
|
|
1171
|
+
],
|
|
1172
|
+
url: "/{tenant_id}/threads/{thread_id}/open-chat-hitl",
|
|
1173
|
+
...options,
|
|
1174
|
+
});
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Get Agent Classes
|
|
1178
|
+
*
|
|
1179
|
+
* Retrieve all available agent classes.
|
|
1180
|
+
* Use `?online=true` for online classes only, `?online=false` for offline only.
|
|
1181
|
+
*/
|
|
1182
|
+
export const getAgentClasses = <
|
|
1183
|
+
TComposable extends Composable = "$fetch",
|
|
1184
|
+
DefaultT extends GetAgentClassesResponse = GetAgentClassesResponse,
|
|
1185
|
+
>(
|
|
1186
|
+
options: Options<
|
|
1187
|
+
TComposable,
|
|
1188
|
+
GetAgentClassesData,
|
|
1189
|
+
GetAgentClassesResponse,
|
|
1190
|
+
DefaultT
|
|
1191
|
+
>,
|
|
1192
|
+
) =>
|
|
1193
|
+
(options.client ?? client).get<
|
|
1194
|
+
TComposable,
|
|
1195
|
+
GetAgentClassesResponse | DefaultT,
|
|
1196
|
+
GetAgentClassesError,
|
|
1197
|
+
DefaultT
|
|
1198
|
+
>({
|
|
1199
|
+
security: [
|
|
1200
|
+
{ scheme: "bearer", type: "http" },
|
|
1201
|
+
{ scheme: "bearer", type: "http" },
|
|
1202
|
+
],
|
|
1203
|
+
url: "/{tenant_id}/agents/classes",
|
|
1204
|
+
...options,
|
|
1205
|
+
});
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Get Agent Class
|
|
1209
|
+
*
|
|
1210
|
+
* Retrieve details for a specific agent class.
|
|
1211
|
+
*/
|
|
1212
|
+
export const getAgentClass = <
|
|
1213
|
+
TComposable extends Composable = "$fetch",
|
|
1214
|
+
DefaultT extends GetAgentClassResponse = GetAgentClassResponse,
|
|
1215
|
+
>(
|
|
1216
|
+
options: Options<
|
|
1217
|
+
TComposable,
|
|
1218
|
+
GetAgentClassData,
|
|
1219
|
+
GetAgentClassResponse,
|
|
1220
|
+
DefaultT
|
|
1221
|
+
>,
|
|
1222
|
+
) =>
|
|
1223
|
+
(options.client ?? client).get<
|
|
1224
|
+
TComposable,
|
|
1225
|
+
GetAgentClassResponse | DefaultT,
|
|
1226
|
+
GetAgentClassError,
|
|
1227
|
+
DefaultT
|
|
1228
|
+
>({
|
|
1229
|
+
security: [
|
|
1230
|
+
{ scheme: "bearer", type: "http" },
|
|
1231
|
+
{ scheme: "bearer", type: "http" },
|
|
1232
|
+
],
|
|
1233
|
+
url: "/{tenant_id}/agents/classes/{agent_class}",
|
|
1234
|
+
...options,
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Get Agent Class Instances
|
|
1239
|
+
*
|
|
1240
|
+
* Retrieve all instances of a specific agent class.
|
|
1241
|
+
*/
|
|
1242
|
+
export const getAgentClassInstances = <
|
|
1243
|
+
TComposable extends Composable = "$fetch",
|
|
1244
|
+
DefaultT extends GetAgentClassInstancesResponse =
|
|
1245
|
+
GetAgentClassInstancesResponse,
|
|
1246
|
+
>(
|
|
1247
|
+
options: Options<
|
|
1248
|
+
TComposable,
|
|
1249
|
+
GetAgentClassInstancesData,
|
|
1250
|
+
GetAgentClassInstancesResponse,
|
|
1251
|
+
DefaultT
|
|
1252
|
+
>,
|
|
1253
|
+
) =>
|
|
1254
|
+
(options.client ?? client).get<
|
|
1255
|
+
TComposable,
|
|
1256
|
+
GetAgentClassInstancesResponse | DefaultT,
|
|
1257
|
+
GetAgentClassInstancesError,
|
|
1258
|
+
DefaultT
|
|
1259
|
+
>({
|
|
1260
|
+
security: [
|
|
1261
|
+
{ scheme: "bearer", type: "http" },
|
|
1262
|
+
{ scheme: "bearer", type: "http" },
|
|
1263
|
+
],
|
|
1264
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances",
|
|
1265
|
+
...options,
|
|
1266
|
+
});
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Create Agent Instance
|
|
1270
|
+
*
|
|
1271
|
+
* Create a new agent instance from an existing agent class.
|
|
1272
|
+
*/
|
|
1273
|
+
export const createAgentInstance = <
|
|
1274
|
+
TComposable extends Composable = "$fetch",
|
|
1275
|
+
DefaultT extends CreateAgentInstanceResponse = CreateAgentInstanceResponse,
|
|
1276
|
+
>(
|
|
1277
|
+
options: Options<
|
|
1278
|
+
TComposable,
|
|
1279
|
+
CreateAgentInstanceData,
|
|
1280
|
+
CreateAgentInstanceResponse,
|
|
1281
|
+
DefaultT
|
|
1282
|
+
>,
|
|
1283
|
+
) =>
|
|
1284
|
+
(options.client ?? client).post<
|
|
1285
|
+
TComposable,
|
|
1286
|
+
CreateAgentInstanceResponse | DefaultT,
|
|
1287
|
+
CreateAgentInstanceError,
|
|
1288
|
+
DefaultT
|
|
1289
|
+
>({
|
|
1290
|
+
security: [
|
|
1291
|
+
{ scheme: "bearer", type: "http" },
|
|
1292
|
+
{ scheme: "bearer", type: "http" },
|
|
1293
|
+
],
|
|
1294
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances",
|
|
1295
|
+
...options,
|
|
1296
|
+
headers: {
|
|
1297
|
+
"Content-Type": "application/json",
|
|
1298
|
+
...options.headers,
|
|
1299
|
+
},
|
|
1300
|
+
});
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Delete Agent Instance
|
|
1304
|
+
*
|
|
1305
|
+
* Delete an agent instance.
|
|
1306
|
+
*/
|
|
1307
|
+
export const deleteAgentInstance = <
|
|
1308
|
+
TComposable extends Composable = "$fetch",
|
|
1309
|
+
DefaultT extends DeleteAgentInstanceResponse = DeleteAgentInstanceResponse,
|
|
1310
|
+
>(
|
|
1311
|
+
options: Options<
|
|
1312
|
+
TComposable,
|
|
1313
|
+
DeleteAgentInstanceData,
|
|
1314
|
+
DeleteAgentInstanceResponse,
|
|
1315
|
+
DefaultT
|
|
1316
|
+
>,
|
|
1317
|
+
) =>
|
|
1318
|
+
(options.client ?? client).delete<
|
|
1319
|
+
TComposable,
|
|
1320
|
+
DeleteAgentInstanceResponse | DefaultT,
|
|
1321
|
+
DeleteAgentInstanceError,
|
|
1322
|
+
DefaultT
|
|
1323
|
+
>({
|
|
1324
|
+
security: [
|
|
1325
|
+
{ scheme: "bearer", type: "http" },
|
|
1326
|
+
{ scheme: "bearer", type: "http" },
|
|
1327
|
+
],
|
|
1328
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}",
|
|
1329
|
+
...options,
|
|
1330
|
+
});
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Get Agent Instance
|
|
1334
|
+
*
|
|
1335
|
+
* Retrieve details for a specific agent instance, including its configuration.
|
|
1336
|
+
*/
|
|
1337
|
+
export const getAgentInstance = <
|
|
1338
|
+
TComposable extends Composable = "$fetch",
|
|
1339
|
+
DefaultT extends GetAgentInstanceResponse = GetAgentInstanceResponse,
|
|
1340
|
+
>(
|
|
1341
|
+
options: Options<
|
|
1342
|
+
TComposable,
|
|
1343
|
+
GetAgentInstanceData,
|
|
1344
|
+
GetAgentInstanceResponse,
|
|
1345
|
+
DefaultT
|
|
1346
|
+
>,
|
|
1347
|
+
) =>
|
|
1348
|
+
(options.client ?? client).get<
|
|
1349
|
+
TComposable,
|
|
1350
|
+
GetAgentInstanceResponse | DefaultT,
|
|
1351
|
+
GetAgentInstanceError,
|
|
1352
|
+
DefaultT
|
|
1353
|
+
>({
|
|
1354
|
+
security: [
|
|
1355
|
+
{ scheme: "bearer", type: "http" },
|
|
1356
|
+
{ scheme: "bearer", type: "http" },
|
|
1357
|
+
],
|
|
1358
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}",
|
|
1359
|
+
...options,
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* Update Agent Instance
|
|
1364
|
+
*
|
|
1365
|
+
* Update the configuration for a specific agent instance.
|
|
1366
|
+
*/
|
|
1367
|
+
export const updateAgentInstance = <
|
|
1368
|
+
TComposable extends Composable = "$fetch",
|
|
1369
|
+
DefaultT extends UpdateAgentInstanceResponse = UpdateAgentInstanceResponse,
|
|
1370
|
+
>(
|
|
1371
|
+
options: Options<
|
|
1372
|
+
TComposable,
|
|
1373
|
+
UpdateAgentInstanceData,
|
|
1374
|
+
UpdateAgentInstanceResponse,
|
|
1375
|
+
DefaultT
|
|
1376
|
+
>,
|
|
1377
|
+
) =>
|
|
1378
|
+
(options.client ?? client).put<
|
|
1379
|
+
TComposable,
|
|
1380
|
+
UpdateAgentInstanceResponse | DefaultT,
|
|
1381
|
+
UpdateAgentInstanceError,
|
|
1382
|
+
DefaultT
|
|
1383
|
+
>({
|
|
1384
|
+
security: [
|
|
1385
|
+
{ scheme: "bearer", type: "http" },
|
|
1386
|
+
{ scheme: "bearer", type: "http" },
|
|
1387
|
+
],
|
|
1388
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}",
|
|
1389
|
+
...options,
|
|
1390
|
+
headers: {
|
|
1391
|
+
"Content-Type": "application/json",
|
|
1392
|
+
...options.headers,
|
|
1393
|
+
},
|
|
1394
|
+
});
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Get Agent Instance Threads
|
|
1398
|
+
*
|
|
1399
|
+
* Retrieve all threads that a specific agent instance is part of.
|
|
1400
|
+
*/
|
|
1401
|
+
export const getAgentInstanceThreads = <
|
|
1402
|
+
TComposable extends Composable = "$fetch",
|
|
1403
|
+
DefaultT extends GetAgentInstanceThreadsResponse =
|
|
1404
|
+
GetAgentInstanceThreadsResponse,
|
|
1405
|
+
>(
|
|
1406
|
+
options: Options<
|
|
1407
|
+
TComposable,
|
|
1408
|
+
GetAgentInstanceThreadsData,
|
|
1409
|
+
GetAgentInstanceThreadsResponse,
|
|
1410
|
+
DefaultT
|
|
1411
|
+
>,
|
|
1412
|
+
) =>
|
|
1413
|
+
(options.client ?? client).get<
|
|
1414
|
+
TComposable,
|
|
1415
|
+
GetAgentInstanceThreadsResponse | DefaultT,
|
|
1416
|
+
GetAgentInstanceThreadsError,
|
|
1417
|
+
DefaultT
|
|
1418
|
+
>({
|
|
1419
|
+
security: [
|
|
1420
|
+
{ scheme: "bearer", type: "http" },
|
|
1421
|
+
{ scheme: "bearer", type: "http" },
|
|
1422
|
+
],
|
|
1423
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}/threads",
|
|
1424
|
+
...options,
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Get All Agent Instances
|
|
1429
|
+
*
|
|
1430
|
+
* Retrieve a list of all agent instances across all classes.
|
|
1431
|
+
* Use `?online=true` for online instances only, `?online=false` for offline only.
|
|
1432
|
+
*/
|
|
1433
|
+
export const getAllAgentInstances = <
|
|
1434
|
+
TComposable extends Composable = "$fetch",
|
|
1435
|
+
DefaultT extends GetAllAgentInstancesResponse = GetAllAgentInstancesResponse,
|
|
1436
|
+
>(
|
|
1437
|
+
options: Options<
|
|
1438
|
+
TComposable,
|
|
1439
|
+
GetAllAgentInstancesData,
|
|
1440
|
+
GetAllAgentInstancesResponse,
|
|
1441
|
+
DefaultT
|
|
1442
|
+
>,
|
|
1443
|
+
) =>
|
|
1444
|
+
(options.client ?? client).get<
|
|
1445
|
+
TComposable,
|
|
1446
|
+
GetAllAgentInstancesResponse | DefaultT,
|
|
1447
|
+
GetAllAgentInstancesError,
|
|
1448
|
+
DefaultT
|
|
1449
|
+
>({
|
|
1450
|
+
security: [
|
|
1451
|
+
{ scheme: "bearer", type: "http" },
|
|
1452
|
+
{ scheme: "bearer", type: "http" },
|
|
1453
|
+
],
|
|
1454
|
+
url: "/{tenant_id}/agents/instances",
|
|
1455
|
+
...options,
|
|
1456
|
+
});
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Initiate File Upload
|
|
1460
|
+
*
|
|
1461
|
+
* Initiate a file upload by generating a presigned PUT URL for the agent's dedicated bucket.
|
|
1462
|
+
*/
|
|
1463
|
+
export const initiateFileUpload = <
|
|
1464
|
+
TComposable extends Composable = "$fetch",
|
|
1465
|
+
DefaultT extends InitiateFileUploadResponse = InitiateFileUploadResponse,
|
|
1466
|
+
>(
|
|
1467
|
+
options: Options<
|
|
1468
|
+
TComposable,
|
|
1469
|
+
InitiateFileUploadData,
|
|
1470
|
+
InitiateFileUploadResponse,
|
|
1471
|
+
DefaultT
|
|
1472
|
+
>,
|
|
1473
|
+
) =>
|
|
1474
|
+
(options.client ?? client).post<
|
|
1475
|
+
TComposable,
|
|
1476
|
+
InitiateFileUploadResponse | DefaultT,
|
|
1477
|
+
InitiateFileUploadError,
|
|
1478
|
+
DefaultT
|
|
1479
|
+
>({
|
|
1480
|
+
security: [
|
|
1481
|
+
{ scheme: "bearer", type: "http" },
|
|
1482
|
+
{ scheme: "bearer", type: "http" },
|
|
1483
|
+
],
|
|
1484
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}/files/upload/initiate",
|
|
1485
|
+
...options,
|
|
1486
|
+
headers: {
|
|
1487
|
+
"Content-Type": "application/json",
|
|
1488
|
+
...options.headers,
|
|
1489
|
+
},
|
|
1490
|
+
});
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Validate File Upload
|
|
1494
|
+
*
|
|
1495
|
+
* Validate that a file was successfully uploaded to the agent's dedicated bucket.
|
|
1496
|
+
*/
|
|
1497
|
+
export const validateFileUpload = <
|
|
1498
|
+
TComposable extends Composable = "$fetch",
|
|
1499
|
+
DefaultT extends ValidateFileUploadResponse = ValidateFileUploadResponse,
|
|
1500
|
+
>(
|
|
1501
|
+
options: Options<
|
|
1502
|
+
TComposable,
|
|
1503
|
+
ValidateFileUploadData,
|
|
1504
|
+
ValidateFileUploadResponse,
|
|
1505
|
+
DefaultT
|
|
1506
|
+
>,
|
|
1507
|
+
) =>
|
|
1508
|
+
(options.client ?? client).post<
|
|
1509
|
+
TComposable,
|
|
1510
|
+
ValidateFileUploadResponse | DefaultT,
|
|
1511
|
+
ValidateFileUploadError,
|
|
1512
|
+
DefaultT
|
|
1513
|
+
>({
|
|
1514
|
+
security: [
|
|
1515
|
+
{ scheme: "bearer", type: "http" },
|
|
1516
|
+
{ scheme: "bearer", type: "http" },
|
|
1517
|
+
],
|
|
1518
|
+
url: "/{tenant_id}/agents/classes/{agent_class}/instances/{agent_id}/files/upload/validate",
|
|
1519
|
+
...options,
|
|
1520
|
+
headers: {
|
|
1521
|
+
"Content-Type": "application/json",
|
|
1522
|
+
...options.headers,
|
|
1523
|
+
},
|
|
1524
|
+
});
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Get Process Classes
|
|
1528
|
+
*
|
|
1529
|
+
* Retrieve all available process classes.
|
|
1530
|
+
* Use `?online=true` for online classes only, `?online=false` for offline only.
|
|
1531
|
+
*/
|
|
1532
|
+
export const getProcessClasses = <
|
|
1533
|
+
TComposable extends Composable = "$fetch",
|
|
1534
|
+
DefaultT extends GetProcessClassesResponse = GetProcessClassesResponse,
|
|
1535
|
+
>(
|
|
1536
|
+
options: Options<
|
|
1537
|
+
TComposable,
|
|
1538
|
+
GetProcessClassesData,
|
|
1539
|
+
GetProcessClassesResponse,
|
|
1540
|
+
DefaultT
|
|
1541
|
+
>,
|
|
1542
|
+
) =>
|
|
1543
|
+
(options.client ?? client).get<
|
|
1544
|
+
TComposable,
|
|
1545
|
+
GetProcessClassesResponse | DefaultT,
|
|
1546
|
+
GetProcessClassesError,
|
|
1547
|
+
DefaultT
|
|
1548
|
+
>({
|
|
1549
|
+
security: [
|
|
1550
|
+
{ scheme: "bearer", type: "http" },
|
|
1551
|
+
{ scheme: "bearer", type: "http" },
|
|
1552
|
+
],
|
|
1553
|
+
url: "/{tenant_id}/processes/classes",
|
|
1554
|
+
...options,
|
|
1555
|
+
});
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Get Process Class
|
|
1559
|
+
*
|
|
1560
|
+
* Retrieve details for a specific process class.
|
|
1561
|
+
*/
|
|
1562
|
+
export const getProcessClass = <
|
|
1563
|
+
TComposable extends Composable = "$fetch",
|
|
1564
|
+
DefaultT extends GetProcessClassResponse = GetProcessClassResponse,
|
|
1565
|
+
>(
|
|
1566
|
+
options: Options<
|
|
1567
|
+
TComposable,
|
|
1568
|
+
GetProcessClassData,
|
|
1569
|
+
GetProcessClassResponse,
|
|
1570
|
+
DefaultT
|
|
1571
|
+
>,
|
|
1572
|
+
) =>
|
|
1573
|
+
(options.client ?? client).get<
|
|
1574
|
+
TComposable,
|
|
1575
|
+
GetProcessClassResponse | DefaultT,
|
|
1576
|
+
GetProcessClassError,
|
|
1577
|
+
DefaultT
|
|
1578
|
+
>({
|
|
1579
|
+
security: [
|
|
1580
|
+
{ scheme: "bearer", type: "http" },
|
|
1581
|
+
{ scheme: "bearer", type: "http" },
|
|
1582
|
+
],
|
|
1583
|
+
url: "/{tenant_id}/processes/classes/{process_class}",
|
|
1584
|
+
...options,
|
|
1585
|
+
});
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Get Process Class Instances
|
|
1589
|
+
*
|
|
1590
|
+
* Retrieve all instances of a specific process class.
|
|
1591
|
+
*/
|
|
1592
|
+
export const getProcessClassInstances = <
|
|
1593
|
+
TComposable extends Composable = "$fetch",
|
|
1594
|
+
DefaultT extends GetProcessClassInstancesResponse =
|
|
1595
|
+
GetProcessClassInstancesResponse,
|
|
1596
|
+
>(
|
|
1597
|
+
options: Options<
|
|
1598
|
+
TComposable,
|
|
1599
|
+
GetProcessClassInstancesData,
|
|
1600
|
+
GetProcessClassInstancesResponse,
|
|
1601
|
+
DefaultT
|
|
1602
|
+
>,
|
|
1603
|
+
) =>
|
|
1604
|
+
(options.client ?? client).get<
|
|
1605
|
+
TComposable,
|
|
1606
|
+
GetProcessClassInstancesResponse | DefaultT,
|
|
1607
|
+
GetProcessClassInstancesError,
|
|
1608
|
+
DefaultT
|
|
1609
|
+
>({
|
|
1610
|
+
security: [
|
|
1611
|
+
{ scheme: "bearer", type: "http" },
|
|
1612
|
+
{ scheme: "bearer", type: "http" },
|
|
1613
|
+
],
|
|
1614
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances",
|
|
1615
|
+
...options,
|
|
1616
|
+
});
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* Create Process Instance
|
|
1620
|
+
*
|
|
1621
|
+
* Create a new process instance from an existing process class.
|
|
1622
|
+
*/
|
|
1623
|
+
export const createProcessInstance = <
|
|
1624
|
+
TComposable extends Composable = "$fetch",
|
|
1625
|
+
DefaultT extends CreateProcessInstanceResponse =
|
|
1626
|
+
CreateProcessInstanceResponse,
|
|
1627
|
+
>(
|
|
1628
|
+
options: Options<
|
|
1629
|
+
TComposable,
|
|
1630
|
+
CreateProcessInstanceData,
|
|
1631
|
+
CreateProcessInstanceResponse,
|
|
1632
|
+
DefaultT
|
|
1633
|
+
>,
|
|
1634
|
+
) =>
|
|
1635
|
+
(options.client ?? client).post<
|
|
1636
|
+
TComposable,
|
|
1637
|
+
CreateProcessInstanceResponse | DefaultT,
|
|
1638
|
+
CreateProcessInstanceError,
|
|
1639
|
+
DefaultT
|
|
1640
|
+
>({
|
|
1641
|
+
security: [
|
|
1642
|
+
{ scheme: "bearer", type: "http" },
|
|
1643
|
+
{ scheme: "bearer", type: "http" },
|
|
1644
|
+
],
|
|
1645
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances",
|
|
1646
|
+
...options,
|
|
1647
|
+
headers: {
|
|
1648
|
+
"Content-Type": "application/json",
|
|
1649
|
+
...options.headers,
|
|
1650
|
+
},
|
|
1651
|
+
});
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* Delete Process Instance
|
|
1655
|
+
*
|
|
1656
|
+
* Delete a process instance.
|
|
1657
|
+
*/
|
|
1658
|
+
export const deleteProcessInstance = <
|
|
1659
|
+
TComposable extends Composable = "$fetch",
|
|
1660
|
+
DefaultT extends DeleteProcessInstanceResponse =
|
|
1661
|
+
DeleteProcessInstanceResponse,
|
|
1662
|
+
>(
|
|
1663
|
+
options: Options<
|
|
1664
|
+
TComposable,
|
|
1665
|
+
DeleteProcessInstanceData,
|
|
1666
|
+
DeleteProcessInstanceResponse,
|
|
1667
|
+
DefaultT
|
|
1668
|
+
>,
|
|
1669
|
+
) =>
|
|
1670
|
+
(options.client ?? client).delete<
|
|
1671
|
+
TComposable,
|
|
1672
|
+
DeleteProcessInstanceResponse | DefaultT,
|
|
1673
|
+
DeleteProcessInstanceError,
|
|
1674
|
+
DefaultT
|
|
1675
|
+
>({
|
|
1676
|
+
security: [
|
|
1677
|
+
{ scheme: "bearer", type: "http" },
|
|
1678
|
+
{ scheme: "bearer", type: "http" },
|
|
1679
|
+
],
|
|
1680
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}",
|
|
1681
|
+
...options,
|
|
1682
|
+
});
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* Get Process Instance
|
|
1686
|
+
*
|
|
1687
|
+
* Retrieve details for a specific process instance, including its configuration.
|
|
1688
|
+
*/
|
|
1689
|
+
export const getProcessInstance = <
|
|
1690
|
+
TComposable extends Composable = "$fetch",
|
|
1691
|
+
DefaultT extends GetProcessInstanceResponse = GetProcessInstanceResponse,
|
|
1692
|
+
>(
|
|
1693
|
+
options: Options<
|
|
1694
|
+
TComposable,
|
|
1695
|
+
GetProcessInstanceData,
|
|
1696
|
+
GetProcessInstanceResponse,
|
|
1697
|
+
DefaultT
|
|
1698
|
+
>,
|
|
1699
|
+
) =>
|
|
1700
|
+
(options.client ?? client).get<
|
|
1701
|
+
TComposable,
|
|
1702
|
+
GetProcessInstanceResponse | DefaultT,
|
|
1703
|
+
GetProcessInstanceError,
|
|
1704
|
+
DefaultT
|
|
1705
|
+
>({
|
|
1706
|
+
security: [
|
|
1707
|
+
{ scheme: "bearer", type: "http" },
|
|
1708
|
+
{ scheme: "bearer", type: "http" },
|
|
1709
|
+
],
|
|
1710
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}",
|
|
1711
|
+
...options,
|
|
1712
|
+
});
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* Update Process Instance
|
|
1716
|
+
*
|
|
1717
|
+
* Update the configuration for a specific process instance.
|
|
1718
|
+
*/
|
|
1719
|
+
export const updateProcessInstance = <
|
|
1720
|
+
TComposable extends Composable = "$fetch",
|
|
1721
|
+
DefaultT extends UpdateProcessInstanceResponse =
|
|
1722
|
+
UpdateProcessInstanceResponse,
|
|
1723
|
+
>(
|
|
1724
|
+
options: Options<
|
|
1725
|
+
TComposable,
|
|
1726
|
+
UpdateProcessInstanceData,
|
|
1727
|
+
UpdateProcessInstanceResponse,
|
|
1728
|
+
DefaultT
|
|
1729
|
+
>,
|
|
1730
|
+
) =>
|
|
1731
|
+
(options.client ?? client).put<
|
|
1732
|
+
TComposable,
|
|
1733
|
+
UpdateProcessInstanceResponse | DefaultT,
|
|
1734
|
+
UpdateProcessInstanceError,
|
|
1735
|
+
DefaultT
|
|
1736
|
+
>({
|
|
1737
|
+
security: [
|
|
1738
|
+
{ scheme: "bearer", type: "http" },
|
|
1739
|
+
{ scheme: "bearer", type: "http" },
|
|
1740
|
+
],
|
|
1741
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}",
|
|
1742
|
+
...options,
|
|
1743
|
+
headers: {
|
|
1744
|
+
"Content-Type": "application/json",
|
|
1745
|
+
...options.headers,
|
|
1746
|
+
},
|
|
1747
|
+
});
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Get All Process Instances
|
|
1751
|
+
*
|
|
1752
|
+
* Retrieve a list of all process instances across all classes.
|
|
1753
|
+
* Use `?online=true` for online instances only, `?online=false` for offline only.
|
|
1754
|
+
*/
|
|
1755
|
+
export const getAllProcessInstances = <
|
|
1756
|
+
TComposable extends Composable = "$fetch",
|
|
1757
|
+
DefaultT extends GetAllProcessInstancesResponse =
|
|
1758
|
+
GetAllProcessInstancesResponse,
|
|
1759
|
+
>(
|
|
1760
|
+
options: Options<
|
|
1761
|
+
TComposable,
|
|
1762
|
+
GetAllProcessInstancesData,
|
|
1763
|
+
GetAllProcessInstancesResponse,
|
|
1764
|
+
DefaultT
|
|
1765
|
+
>,
|
|
1766
|
+
) =>
|
|
1767
|
+
(options.client ?? client).get<
|
|
1768
|
+
TComposable,
|
|
1769
|
+
GetAllProcessInstancesResponse | DefaultT,
|
|
1770
|
+
GetAllProcessInstancesError,
|
|
1771
|
+
DefaultT
|
|
1772
|
+
>({
|
|
1773
|
+
security: [
|
|
1774
|
+
{ scheme: "bearer", type: "http" },
|
|
1775
|
+
{ scheme: "bearer", type: "http" },
|
|
1776
|
+
],
|
|
1777
|
+
url: "/{tenant_id}/processes/instances",
|
|
1778
|
+
...options,
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* Get Process Walkthroughs
|
|
1783
|
+
*
|
|
1784
|
+
* Get paginated process walkthroughs with detailed step information for a specific process.
|
|
1785
|
+
*/
|
|
1786
|
+
export const getProcessWalkthroughs = <
|
|
1787
|
+
TComposable extends Composable = "$fetch",
|
|
1788
|
+
DefaultT extends GetProcessWalkthroughsResponse =
|
|
1789
|
+
GetProcessWalkthroughsResponse,
|
|
1790
|
+
>(
|
|
1791
|
+
options: Options<
|
|
1792
|
+
TComposable,
|
|
1793
|
+
GetProcessWalkthroughsData,
|
|
1794
|
+
GetProcessWalkthroughsResponse,
|
|
1795
|
+
DefaultT
|
|
1796
|
+
>,
|
|
1797
|
+
) =>
|
|
1798
|
+
(options.client ?? client).get<
|
|
1799
|
+
TComposable,
|
|
1800
|
+
GetProcessWalkthroughsResponse | DefaultT,
|
|
1801
|
+
GetProcessWalkthroughsError,
|
|
1802
|
+
DefaultT
|
|
1803
|
+
>({
|
|
1804
|
+
security: [
|
|
1805
|
+
{ scheme: "bearer", type: "http" },
|
|
1806
|
+
{ scheme: "bearer", type: "http" },
|
|
1807
|
+
],
|
|
1808
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}/walkthroughs",
|
|
1809
|
+
...options,
|
|
1810
|
+
});
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* Get Process Start Forms
|
|
1814
|
+
*
|
|
1815
|
+
* Returns a list of formkit forms that the user can submit to start the process.
|
|
1816
|
+
*/
|
|
1817
|
+
export const getProcessStartForms = <
|
|
1818
|
+
TComposable extends Composable = "$fetch",
|
|
1819
|
+
DefaultT extends GetProcessStartFormsResponse = GetProcessStartFormsResponse,
|
|
1820
|
+
>(
|
|
1821
|
+
options: Options<
|
|
1822
|
+
TComposable,
|
|
1823
|
+
GetProcessStartFormsData,
|
|
1824
|
+
GetProcessStartFormsResponse,
|
|
1825
|
+
DefaultT
|
|
1826
|
+
>,
|
|
1827
|
+
) =>
|
|
1828
|
+
(options.client ?? client).get<
|
|
1829
|
+
TComposable,
|
|
1830
|
+
GetProcessStartFormsResponse | DefaultT,
|
|
1831
|
+
GetProcessStartFormsError,
|
|
1832
|
+
DefaultT
|
|
1833
|
+
>({
|
|
1834
|
+
security: [
|
|
1835
|
+
{ scheme: "bearer", type: "http" },
|
|
1836
|
+
{ scheme: "bearer", type: "http" },
|
|
1837
|
+
],
|
|
1838
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}/start_forms",
|
|
1839
|
+
...options,
|
|
1840
|
+
});
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* Get Process Open Forms
|
|
1844
|
+
*
|
|
1845
|
+
* Returns a list of formkit forms that the user can submit to continue the given process walkthrough
|
|
1846
|
+
*/
|
|
1847
|
+
export const getProcessOpenForms = <
|
|
1848
|
+
TComposable extends Composable = "$fetch",
|
|
1849
|
+
DefaultT extends GetProcessOpenFormsResponse = GetProcessOpenFormsResponse,
|
|
1850
|
+
>(
|
|
1851
|
+
options: Options<
|
|
1852
|
+
TComposable,
|
|
1853
|
+
GetProcessOpenFormsData,
|
|
1854
|
+
GetProcessOpenFormsResponse,
|
|
1855
|
+
DefaultT
|
|
1856
|
+
>,
|
|
1857
|
+
) =>
|
|
1858
|
+
(options.client ?? client).get<
|
|
1859
|
+
TComposable,
|
|
1860
|
+
GetProcessOpenFormsResponse | DefaultT,
|
|
1861
|
+
GetProcessOpenFormsError,
|
|
1862
|
+
DefaultT
|
|
1863
|
+
>({
|
|
1864
|
+
security: [
|
|
1865
|
+
{ scheme: "bearer", type: "http" },
|
|
1866
|
+
{ scheme: "bearer", type: "http" },
|
|
1867
|
+
],
|
|
1868
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}/{process_walkthrough_id}/open_forms",
|
|
1869
|
+
...options,
|
|
1870
|
+
});
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* Send Process Start Form
|
|
1874
|
+
*
|
|
1875
|
+
* Submit an object satisfying a form to start a process.
|
|
1876
|
+
*/
|
|
1877
|
+
export const sendProcessStartForm = <
|
|
1878
|
+
TComposable extends Composable = "$fetch",
|
|
1879
|
+
DefaultT extends SendProcessStartFormResponse = SendProcessStartFormResponse,
|
|
1880
|
+
>(
|
|
1881
|
+
options: Options<
|
|
1882
|
+
TComposable,
|
|
1883
|
+
SendProcessStartFormData,
|
|
1884
|
+
SendProcessStartFormResponse,
|
|
1885
|
+
DefaultT
|
|
1886
|
+
>,
|
|
1887
|
+
) =>
|
|
1888
|
+
(options.client ?? client).post<
|
|
1889
|
+
TComposable,
|
|
1890
|
+
SendProcessStartFormResponse | DefaultT,
|
|
1891
|
+
SendProcessStartFormError,
|
|
1892
|
+
DefaultT
|
|
1893
|
+
>({
|
|
1894
|
+
security: [
|
|
1895
|
+
{ scheme: "bearer", type: "http" },
|
|
1896
|
+
{ scheme: "bearer", type: "http" },
|
|
1897
|
+
],
|
|
1898
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}/submit_start_form",
|
|
1899
|
+
...options,
|
|
1900
|
+
headers: {
|
|
1901
|
+
"Content-Type": "application/json",
|
|
1902
|
+
...options.headers,
|
|
1903
|
+
},
|
|
1904
|
+
});
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Send Process Open Form
|
|
1908
|
+
*
|
|
1909
|
+
* Submit an object satisfying a form to continue a process walkthrough.
|
|
1910
|
+
*/
|
|
1911
|
+
export const sendProcessOpenForm = <
|
|
1912
|
+
TComposable extends Composable = "$fetch",
|
|
1913
|
+
DefaultT extends SendProcessOpenFormResponse = SendProcessOpenFormResponse,
|
|
1914
|
+
>(
|
|
1915
|
+
options: Options<
|
|
1916
|
+
TComposable,
|
|
1917
|
+
SendProcessOpenFormData,
|
|
1918
|
+
SendProcessOpenFormResponse,
|
|
1919
|
+
DefaultT
|
|
1920
|
+
>,
|
|
1921
|
+
) =>
|
|
1922
|
+
(options.client ?? client).post<
|
|
1923
|
+
TComposable,
|
|
1924
|
+
SendProcessOpenFormResponse | DefaultT,
|
|
1925
|
+
SendProcessOpenFormError,
|
|
1926
|
+
DefaultT
|
|
1927
|
+
>({
|
|
1928
|
+
security: [
|
|
1929
|
+
{ scheme: "bearer", type: "http" },
|
|
1930
|
+
{ scheme: "bearer", type: "http" },
|
|
1931
|
+
],
|
|
1932
|
+
url: "/{tenant_id}/processes/classes/{process_class}/instances/{process_id}/{process_walkthrough_id}/submit_open_form",
|
|
1933
|
+
...options,
|
|
1934
|
+
headers: {
|
|
1935
|
+
"Content-Type": "application/json",
|
|
1936
|
+
...options.headers,
|
|
1937
|
+
},
|
|
1938
|
+
});
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* List API Tokens
|
|
1942
|
+
*
|
|
1943
|
+
* Lists all API tokens for the authenticated user. The token value is not returned.
|
|
1944
|
+
*/
|
|
1945
|
+
export const listTokensEndpoint = <
|
|
1946
|
+
TComposable extends Composable = "$fetch",
|
|
1947
|
+
DefaultT extends ListTokensEndpointResponse = ListTokensEndpointResponse,
|
|
1948
|
+
>(
|
|
1949
|
+
options: Options<
|
|
1950
|
+
TComposable,
|
|
1951
|
+
ListTokensEndpointData,
|
|
1952
|
+
ListTokensEndpointResponse,
|
|
1953
|
+
DefaultT
|
|
1954
|
+
>,
|
|
1955
|
+
) =>
|
|
1956
|
+
(options.client ?? client).get<
|
|
1957
|
+
TComposable,
|
|
1958
|
+
ListTokensEndpointResponse | DefaultT,
|
|
1959
|
+
unknown,
|
|
1960
|
+
DefaultT
|
|
1961
|
+
>({
|
|
1962
|
+
responseTransformer: listTokensEndpointResponseTransformer,
|
|
1963
|
+
security: [
|
|
1964
|
+
{ scheme: "bearer", type: "http" },
|
|
1965
|
+
{ scheme: "bearer", type: "http" },
|
|
1966
|
+
],
|
|
1967
|
+
url: "/{tenant_id}/tokens/",
|
|
1968
|
+
...options,
|
|
1969
|
+
});
|
|
1970
|
+
|
|
1971
|
+
/**
|
|
1972
|
+
* Create API Token
|
|
1973
|
+
*
|
|
1974
|
+
* Creates a new API token.
|
|
1975
|
+
*/
|
|
1976
|
+
export const createTokenEndpoint = <
|
|
1977
|
+
TComposable extends Composable = "$fetch",
|
|
1978
|
+
DefaultT extends CreateTokenEndpointResponse = CreateTokenEndpointResponse,
|
|
1979
|
+
>(
|
|
1980
|
+
options: Options<
|
|
1981
|
+
TComposable,
|
|
1982
|
+
CreateTokenEndpointData,
|
|
1983
|
+
CreateTokenEndpointResponse,
|
|
1984
|
+
DefaultT
|
|
1985
|
+
>,
|
|
1986
|
+
) =>
|
|
1987
|
+
(options.client ?? client).post<
|
|
1988
|
+
TComposable,
|
|
1989
|
+
CreateTokenEndpointResponse | DefaultT,
|
|
1990
|
+
CreateTokenEndpointError,
|
|
1991
|
+
DefaultT
|
|
1992
|
+
>({
|
|
1993
|
+
responseTransformer: createTokenEndpointResponseTransformer,
|
|
1994
|
+
security: [
|
|
1995
|
+
{ scheme: "bearer", type: "http" },
|
|
1996
|
+
{ scheme: "bearer", type: "http" },
|
|
1997
|
+
],
|
|
1998
|
+
url: "/{tenant_id}/tokens/",
|
|
1999
|
+
...options,
|
|
2000
|
+
headers: {
|
|
2001
|
+
"Content-Type": "application/json",
|
|
2002
|
+
...options.headers,
|
|
2003
|
+
},
|
|
2004
|
+
});
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* Revoke API Token
|
|
2008
|
+
*
|
|
2009
|
+
* Revokes (deletes) an API token for the authenticated user.
|
|
2010
|
+
*/
|
|
2011
|
+
export const revokeTokenEndpoint = <
|
|
2012
|
+
TComposable extends Composable = "$fetch",
|
|
2013
|
+
DefaultT extends RevokeTokenEndpointResponse = RevokeTokenEndpointResponse,
|
|
2014
|
+
>(
|
|
2015
|
+
options: Options<
|
|
2016
|
+
TComposable,
|
|
2017
|
+
RevokeTokenEndpointData,
|
|
2018
|
+
RevokeTokenEndpointResponse,
|
|
2019
|
+
DefaultT
|
|
2020
|
+
>,
|
|
2021
|
+
) =>
|
|
2022
|
+
(options.client ?? client).delete<
|
|
2023
|
+
TComposable,
|
|
2024
|
+
RevokeTokenEndpointResponse | DefaultT,
|
|
2025
|
+
RevokeTokenEndpointError,
|
|
2026
|
+
DefaultT
|
|
2027
|
+
>({
|
|
2028
|
+
security: [
|
|
2029
|
+
{ scheme: "bearer", type: "http" },
|
|
2030
|
+
{ scheme: "bearer", type: "http" },
|
|
2031
|
+
],
|
|
2032
|
+
url: "/{tenant_id}/tokens/{token_id}",
|
|
2033
|
+
...options,
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Delete Role
|
|
2038
|
+
*
|
|
2039
|
+
* Permanently deletes a tenant-scoped role.
|
|
2040
|
+
*/
|
|
2041
|
+
export const deleteRole = <
|
|
2042
|
+
TComposable extends Composable = "$fetch",
|
|
2043
|
+
DefaultT extends DeleteRoleResponse2 = DeleteRoleResponse2,
|
|
2044
|
+
>(
|
|
2045
|
+
options: Options<TComposable, DeleteRoleData, DeleteRoleResponse2, DefaultT>,
|
|
2046
|
+
) =>
|
|
2047
|
+
(options.client ?? client).delete<
|
|
2048
|
+
TComposable,
|
|
2049
|
+
DeleteRoleResponse2 | DefaultT,
|
|
2050
|
+
DeleteRoleError,
|
|
2051
|
+
DefaultT
|
|
2052
|
+
>({
|
|
2053
|
+
security: [
|
|
2054
|
+
{ scheme: "bearer", type: "http" },
|
|
2055
|
+
{ scheme: "bearer", type: "http" },
|
|
2056
|
+
],
|
|
2057
|
+
url: "/{tenant_id}/roles/{role_id}",
|
|
2058
|
+
...options,
|
|
2059
|
+
});
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Get Role
|
|
2063
|
+
*
|
|
2064
|
+
* Retrieves a single role by its unique ID.
|
|
2065
|
+
*/
|
|
2066
|
+
export const getRole = <
|
|
2067
|
+
TComposable extends Composable = "$fetch",
|
|
2068
|
+
DefaultT extends GetRoleResponse = GetRoleResponse,
|
|
2069
|
+
>(
|
|
2070
|
+
options: Options<TComposable, GetRoleData, GetRoleResponse, DefaultT>,
|
|
2071
|
+
) =>
|
|
2072
|
+
(options.client ?? client).get<
|
|
2073
|
+
TComposable,
|
|
2074
|
+
GetRoleResponse | DefaultT,
|
|
2075
|
+
GetRoleError,
|
|
2076
|
+
DefaultT
|
|
2077
|
+
>({
|
|
2078
|
+
security: [
|
|
2079
|
+
{ scheme: "bearer", type: "http" },
|
|
2080
|
+
{ scheme: "bearer", type: "http" },
|
|
2081
|
+
],
|
|
2082
|
+
url: "/{tenant_id}/roles/{role_id}",
|
|
2083
|
+
...options,
|
|
2084
|
+
});
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* Update Role
|
|
2088
|
+
*
|
|
2089
|
+
* Updates a tenant-scoped role's name, description, or access rules.
|
|
2090
|
+
*/
|
|
2091
|
+
export const updateRole = <
|
|
2092
|
+
TComposable extends Composable = "$fetch",
|
|
2093
|
+
DefaultT extends UpdateRoleResponse = UpdateRoleResponse,
|
|
2094
|
+
>(
|
|
2095
|
+
options: Options<TComposable, UpdateRoleData, UpdateRoleResponse, DefaultT>,
|
|
2096
|
+
) =>
|
|
2097
|
+
(options.client ?? client).patch<
|
|
2098
|
+
TComposable,
|
|
2099
|
+
UpdateRoleResponse | DefaultT,
|
|
2100
|
+
UpdateRoleError,
|
|
2101
|
+
DefaultT
|
|
2102
|
+
>({
|
|
2103
|
+
security: [
|
|
2104
|
+
{ scheme: "bearer", type: "http" },
|
|
2105
|
+
{ scheme: "bearer", type: "http" },
|
|
2106
|
+
],
|
|
2107
|
+
url: "/{tenant_id}/roles/{role_id}",
|
|
2108
|
+
...options,
|
|
2109
|
+
headers: {
|
|
2110
|
+
"Content-Type": "application/json",
|
|
2111
|
+
...options.headers,
|
|
2112
|
+
},
|
|
2113
|
+
});
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* List Roles
|
|
2117
|
+
*
|
|
2118
|
+
* Retrieves all roles available to the current tenant (system + tenant-specific).
|
|
2119
|
+
*/
|
|
2120
|
+
export const getRoles = <
|
|
2121
|
+
TComposable extends Composable = "$fetch",
|
|
2122
|
+
DefaultT extends GetRolesResponse = GetRolesResponse,
|
|
2123
|
+
>(
|
|
2124
|
+
options: Options<TComposable, GetRolesData, GetRolesResponse, DefaultT>,
|
|
2125
|
+
) =>
|
|
2126
|
+
(options.client ?? client).get<
|
|
2127
|
+
TComposable,
|
|
2128
|
+
GetRolesResponse | DefaultT,
|
|
2129
|
+
unknown,
|
|
2130
|
+
DefaultT
|
|
2131
|
+
>({
|
|
2132
|
+
security: [
|
|
2133
|
+
{ scheme: "bearer", type: "http" },
|
|
2134
|
+
{ scheme: "bearer", type: "http" },
|
|
2135
|
+
],
|
|
2136
|
+
url: "/{tenant_id}/roles/",
|
|
2137
|
+
...options,
|
|
2138
|
+
});
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* Create Role
|
|
2142
|
+
*
|
|
2143
|
+
* Creates a new tenant-scoped role with a name, description, and access rules.
|
|
2144
|
+
*/
|
|
2145
|
+
export const createRole = <
|
|
2146
|
+
TComposable extends Composable = "$fetch",
|
|
2147
|
+
DefaultT extends CreateRoleResponse = CreateRoleResponse,
|
|
2148
|
+
>(
|
|
2149
|
+
options: Options<TComposable, CreateRoleData, CreateRoleResponse, DefaultT>,
|
|
2150
|
+
) =>
|
|
2151
|
+
(options.client ?? client).post<
|
|
2152
|
+
TComposable,
|
|
2153
|
+
CreateRoleResponse | DefaultT,
|
|
2154
|
+
CreateRoleError,
|
|
2155
|
+
DefaultT
|
|
2156
|
+
>({
|
|
2157
|
+
security: [
|
|
2158
|
+
{ scheme: "bearer", type: "http" },
|
|
2159
|
+
{ scheme: "bearer", type: "http" },
|
|
2160
|
+
],
|
|
2161
|
+
url: "/{tenant_id}/roles/",
|
|
2162
|
+
...options,
|
|
2163
|
+
headers: {
|
|
2164
|
+
"Content-Type": "application/json",
|
|
2165
|
+
...options.headers,
|
|
2166
|
+
},
|
|
2167
|
+
});
|
|
2168
|
+
|
|
2169
|
+
/**
|
|
2170
|
+
* List Models
|
|
2171
|
+
*
|
|
2172
|
+
* Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
2173
|
+
*/
|
|
2174
|
+
export const getModels = <
|
|
2175
|
+
TComposable extends Composable = "$fetch",
|
|
2176
|
+
DefaultT extends GetModelsResponse = GetModelsResponse,
|
|
2177
|
+
>(
|
|
2178
|
+
options: Options<TComposable, GetModelsData, GetModelsResponse, DefaultT>,
|
|
2179
|
+
) =>
|
|
2180
|
+
(options.client ?? client).get<
|
|
2181
|
+
TComposable,
|
|
2182
|
+
GetModelsResponse | DefaultT,
|
|
2183
|
+
unknown,
|
|
2184
|
+
DefaultT
|
|
2185
|
+
>({
|
|
2186
|
+
security: [
|
|
2187
|
+
{ scheme: "bearer", type: "http" },
|
|
2188
|
+
{ scheme: "bearer", type: "http" },
|
|
2189
|
+
],
|
|
2190
|
+
url: "/{tenant_id}/openai/models",
|
|
2191
|
+
...options,
|
|
2192
|
+
});
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* Retrieve model (including ai-hub assistants)
|
|
2196
|
+
*
|
|
2197
|
+
* Retrieves a model or ai-hub assistant instance, providing basic information about the model such as the owner and permissioning.
|
|
2198
|
+
*/
|
|
2199
|
+
export const getModelWithAssistants = <
|
|
2200
|
+
TComposable extends Composable = "$fetch",
|
|
2201
|
+
DefaultT extends GetModelWithAssistantsResponse =
|
|
2202
|
+
GetModelWithAssistantsResponse,
|
|
2203
|
+
>(
|
|
2204
|
+
options: Options<
|
|
2205
|
+
TComposable,
|
|
2206
|
+
GetModelWithAssistantsData,
|
|
2207
|
+
GetModelWithAssistantsResponse,
|
|
2208
|
+
DefaultT
|
|
2209
|
+
>,
|
|
2210
|
+
) =>
|
|
2211
|
+
(options.client ?? client).get<
|
|
2212
|
+
TComposable,
|
|
2213
|
+
GetModelWithAssistantsResponse | DefaultT,
|
|
2214
|
+
GetModelWithAssistantsError,
|
|
2215
|
+
DefaultT
|
|
2216
|
+
>({
|
|
2217
|
+
security: [
|
|
2218
|
+
{ scheme: "bearer", type: "http" },
|
|
2219
|
+
{ scheme: "bearer", type: "http" },
|
|
2220
|
+
],
|
|
2221
|
+
url: "/{tenant_id}/openai/models/{full_path}",
|
|
2222
|
+
...options,
|
|
2223
|
+
});
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Create embeddings
|
|
2227
|
+
*
|
|
2228
|
+
* Creates an embedding vector representing the input text.
|
|
2229
|
+
*/
|
|
2230
|
+
export const getEmbeddings = <
|
|
2231
|
+
TComposable extends Composable = "$fetch",
|
|
2232
|
+
DefaultT extends GetEmbeddingsResponse = GetEmbeddingsResponse,
|
|
2233
|
+
>(
|
|
2234
|
+
options: Options<
|
|
2235
|
+
TComposable,
|
|
2236
|
+
GetEmbeddingsData,
|
|
2237
|
+
GetEmbeddingsResponse,
|
|
2238
|
+
DefaultT
|
|
2239
|
+
>,
|
|
2240
|
+
) =>
|
|
2241
|
+
(options.client ?? client).post<
|
|
2242
|
+
TComposable,
|
|
2243
|
+
GetEmbeddingsResponse | DefaultT,
|
|
2244
|
+
GetEmbeddingsError,
|
|
2245
|
+
DefaultT
|
|
2246
|
+
>({
|
|
2247
|
+
security: [
|
|
2248
|
+
{ scheme: "bearer", type: "http" },
|
|
2249
|
+
{ scheme: "bearer", type: "http" },
|
|
2250
|
+
],
|
|
2251
|
+
url: "/{tenant_id}/openai/embeddings",
|
|
2252
|
+
...options,
|
|
2253
|
+
headers: {
|
|
2254
|
+
"Content-Type": "application/json",
|
|
2255
|
+
...options.headers,
|
|
2256
|
+
},
|
|
2257
|
+
});
|
|
2258
|
+
|
|
2259
|
+
/**
|
|
2260
|
+
* Create chat completion (including ai-hub assistants)
|
|
2261
|
+
*
|
|
2262
|
+
* Creates a model or ai-hub assistant response for the given chat conversation. Learn more in the text generation, vision, and audio guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide.
|
|
2263
|
+
*/
|
|
2264
|
+
export const chatCompletionWithAssistants = <
|
|
2265
|
+
TComposable extends Composable = "$fetch",
|
|
2266
|
+
DefaultT extends ChatCompletionWithAssistantsResponse =
|
|
2267
|
+
ChatCompletionWithAssistantsResponse,
|
|
2268
|
+
>(
|
|
2269
|
+
options: Options<
|
|
2270
|
+
TComposable,
|
|
2271
|
+
ChatCompletionWithAssistantsData,
|
|
2272
|
+
ChatCompletionWithAssistantsResponse,
|
|
2273
|
+
DefaultT
|
|
2274
|
+
>,
|
|
2275
|
+
) =>
|
|
2276
|
+
(options.client ?? client).post<
|
|
2277
|
+
TComposable,
|
|
2278
|
+
ChatCompletionWithAssistantsResponse | DefaultT,
|
|
2279
|
+
ChatCompletionWithAssistantsError,
|
|
2280
|
+
DefaultT
|
|
2281
|
+
>({
|
|
2282
|
+
security: [
|
|
2283
|
+
{ scheme: "bearer", type: "http" },
|
|
2284
|
+
{ scheme: "bearer", type: "http" },
|
|
2285
|
+
],
|
|
2286
|
+
url: "/{tenant_id}/openai/chat/completions",
|
|
2287
|
+
...options,
|
|
2288
|
+
headers: {
|
|
2289
|
+
"Content-Type": "application/json",
|
|
2290
|
+
...options.headers,
|
|
2291
|
+
},
|
|
2292
|
+
});
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* Create image
|
|
2296
|
+
*
|
|
2297
|
+
* Creates an image given a prompt.
|
|
2298
|
+
*/
|
|
2299
|
+
export const generateImage = <
|
|
2300
|
+
TComposable extends Composable = "$fetch",
|
|
2301
|
+
DefaultT extends GenerateImageResponse = GenerateImageResponse,
|
|
2302
|
+
>(
|
|
2303
|
+
options: Options<
|
|
2304
|
+
TComposable,
|
|
2305
|
+
GenerateImageData,
|
|
2306
|
+
GenerateImageResponse,
|
|
2307
|
+
DefaultT
|
|
2308
|
+
>,
|
|
2309
|
+
) =>
|
|
2310
|
+
(options.client ?? client).post<
|
|
2311
|
+
TComposable,
|
|
2312
|
+
GenerateImageResponse | DefaultT,
|
|
2313
|
+
GenerateImageError,
|
|
2314
|
+
DefaultT
|
|
2315
|
+
>({
|
|
2316
|
+
security: [
|
|
2317
|
+
{ scheme: "bearer", type: "http" },
|
|
2318
|
+
{ scheme: "bearer", type: "http" },
|
|
2319
|
+
],
|
|
2320
|
+
url: "/{tenant_id}/openai/images/generations",
|
|
2321
|
+
...options,
|
|
2322
|
+
headers: {
|
|
2323
|
+
"Content-Type": "application/json",
|
|
2324
|
+
...options.headers,
|
|
2325
|
+
},
|
|
2326
|
+
});
|
|
2327
|
+
|
|
2328
|
+
/**
|
|
2329
|
+
* Create transcription
|
|
2330
|
+
*
|
|
2331
|
+
* Transcribes audio into the input language.
|
|
2332
|
+
*/
|
|
2333
|
+
export const createTranscription = <
|
|
2334
|
+
TComposable extends Composable = "$fetch",
|
|
2335
|
+
DefaultT extends CreateTranscriptionResponse = CreateTranscriptionResponse,
|
|
2336
|
+
>(
|
|
2337
|
+
options: Options<
|
|
2338
|
+
TComposable,
|
|
2339
|
+
CreateTranscriptionData,
|
|
2340
|
+
CreateTranscriptionResponse,
|
|
2341
|
+
DefaultT
|
|
2342
|
+
>,
|
|
2343
|
+
) =>
|
|
2344
|
+
(options.client ?? client).post<
|
|
2345
|
+
TComposable,
|
|
2346
|
+
CreateTranscriptionResponse | DefaultT,
|
|
2347
|
+
CreateTranscriptionError,
|
|
2348
|
+
DefaultT
|
|
2349
|
+
>({
|
|
2350
|
+
...formDataBodySerializer,
|
|
2351
|
+
security: [
|
|
2352
|
+
{ scheme: "bearer", type: "http" },
|
|
2353
|
+
{ scheme: "bearer", type: "http" },
|
|
2354
|
+
],
|
|
2355
|
+
url: "/{tenant_id}/openai/audio/transcriptions",
|
|
2356
|
+
...options,
|
|
2357
|
+
headers: {
|
|
2358
|
+
"Content-Type": null,
|
|
2359
|
+
...options.headers,
|
|
2360
|
+
},
|
|
2361
|
+
});
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* Create speech
|
|
2365
|
+
*
|
|
2366
|
+
* Generates audio from the input text.
|
|
2367
|
+
*/
|
|
2368
|
+
export const createSpeech = <
|
|
2369
|
+
TComposable extends Composable = "$fetch",
|
|
2370
|
+
DefaultT = undefined,
|
|
2371
|
+
>(
|
|
2372
|
+
options: Options<TComposable, CreateSpeechData, unknown, DefaultT>,
|
|
2373
|
+
) =>
|
|
2374
|
+
(options.client ?? client).post<
|
|
2375
|
+
TComposable,
|
|
2376
|
+
unknown | DefaultT,
|
|
2377
|
+
CreateSpeechError,
|
|
2378
|
+
DefaultT
|
|
2379
|
+
>({
|
|
2380
|
+
security: [
|
|
2381
|
+
{ scheme: "bearer", type: "http" },
|
|
2382
|
+
{ scheme: "bearer", type: "http" },
|
|
2383
|
+
],
|
|
2384
|
+
url: "/{tenant_id}/openai/audio/speech",
|
|
2385
|
+
...options,
|
|
2386
|
+
headers: {
|
|
2387
|
+
"Content-Type": "application/json",
|
|
2388
|
+
...options.headers,
|
|
2389
|
+
},
|
|
2390
|
+
});
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* List Evaluation Datasets
|
|
2394
|
+
*
|
|
2395
|
+
* Retrieves a list of all evaluation datasets.
|
|
2396
|
+
*/
|
|
2397
|
+
export const getDatasets = <
|
|
2398
|
+
TComposable extends Composable = "$fetch",
|
|
2399
|
+
DefaultT extends GetDatasetsResponse = GetDatasetsResponse,
|
|
2400
|
+
>(
|
|
2401
|
+
options: Options<TComposable, GetDatasetsData, GetDatasetsResponse, DefaultT>,
|
|
2402
|
+
) =>
|
|
2403
|
+
(options.client ?? client).get<
|
|
2404
|
+
TComposable,
|
|
2405
|
+
GetDatasetsResponse | DefaultT,
|
|
2406
|
+
unknown,
|
|
2407
|
+
DefaultT
|
|
2408
|
+
>({
|
|
2409
|
+
responseTransformer: getDatasetsResponseTransformer,
|
|
2410
|
+
security: [
|
|
2411
|
+
{ scheme: "bearer", type: "http" },
|
|
2412
|
+
{ scheme: "bearer", type: "http" },
|
|
2413
|
+
],
|
|
2414
|
+
url: "/{tenant_id}/datasets/",
|
|
2415
|
+
...options,
|
|
2416
|
+
});
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Create Evaluation Dataset
|
|
2420
|
+
*
|
|
2421
|
+
* Creates a new evaluation dataset.
|
|
2422
|
+
*/
|
|
2423
|
+
export const createDataset = <
|
|
2424
|
+
TComposable extends Composable = "$fetch",
|
|
2425
|
+
DefaultT extends CreateDatasetResponse = CreateDatasetResponse,
|
|
2426
|
+
>(
|
|
2427
|
+
options: Options<
|
|
2428
|
+
TComposable,
|
|
2429
|
+
CreateDatasetData,
|
|
2430
|
+
CreateDatasetResponse,
|
|
2431
|
+
DefaultT
|
|
2432
|
+
>,
|
|
2433
|
+
) =>
|
|
2434
|
+
(options.client ?? client).post<
|
|
2435
|
+
TComposable,
|
|
2436
|
+
CreateDatasetResponse | DefaultT,
|
|
2437
|
+
CreateDatasetError,
|
|
2438
|
+
DefaultT
|
|
2439
|
+
>({
|
|
2440
|
+
responseTransformer: createDatasetResponseTransformer,
|
|
2441
|
+
security: [
|
|
2442
|
+
{ scheme: "bearer", type: "http" },
|
|
2443
|
+
{ scheme: "bearer", type: "http" },
|
|
2444
|
+
],
|
|
2445
|
+
url: "/{tenant_id}/datasets/",
|
|
2446
|
+
...options,
|
|
2447
|
+
headers: {
|
|
2448
|
+
"Content-Type": "application/json",
|
|
2449
|
+
...options.headers,
|
|
2450
|
+
},
|
|
2451
|
+
});
|
|
2452
|
+
|
|
2453
|
+
/**
|
|
2454
|
+
* Get Specific Dataset
|
|
2455
|
+
*
|
|
2456
|
+
* Retrieves a specific evaluation dataset by its ID, including its items.
|
|
2457
|
+
*/
|
|
2458
|
+
export const getDataset = <
|
|
2459
|
+
TComposable extends Composable = "$fetch",
|
|
2460
|
+
DefaultT extends GetDatasetResponse = GetDatasetResponse,
|
|
2461
|
+
>(
|
|
2462
|
+
options: Options<TComposable, GetDatasetData, GetDatasetResponse, DefaultT>,
|
|
2463
|
+
) =>
|
|
2464
|
+
(options.client ?? client).get<
|
|
2465
|
+
TComposable,
|
|
2466
|
+
GetDatasetResponse | DefaultT,
|
|
2467
|
+
GetDatasetError,
|
|
2468
|
+
DefaultT
|
|
2469
|
+
>({
|
|
2470
|
+
responseTransformer: getDatasetResponseTransformer,
|
|
2471
|
+
security: [
|
|
2472
|
+
{ scheme: "bearer", type: "http" },
|
|
2473
|
+
{ scheme: "bearer", type: "http" },
|
|
2474
|
+
],
|
|
2475
|
+
url: "/{tenant_id}/datasets/{dataset_id}",
|
|
2476
|
+
...options,
|
|
2477
|
+
});
|
|
2478
|
+
|
|
2479
|
+
/**
|
|
2480
|
+
* Update Evaluation Dataset
|
|
2481
|
+
*
|
|
2482
|
+
* Appends new question-answer items to an existing evaluation dataset.
|
|
2483
|
+
*/
|
|
2484
|
+
export const updateDataset = <
|
|
2485
|
+
TComposable extends Composable = "$fetch",
|
|
2486
|
+
DefaultT extends UpdateDatasetResponse = UpdateDatasetResponse,
|
|
2487
|
+
>(
|
|
2488
|
+
options: Options<
|
|
2489
|
+
TComposable,
|
|
2490
|
+
UpdateDatasetData,
|
|
2491
|
+
UpdateDatasetResponse,
|
|
2492
|
+
DefaultT
|
|
2493
|
+
>,
|
|
2494
|
+
) =>
|
|
2495
|
+
(options.client ?? client).put<
|
|
2496
|
+
TComposable,
|
|
2497
|
+
UpdateDatasetResponse | DefaultT,
|
|
2498
|
+
UpdateDatasetError,
|
|
2499
|
+
DefaultT
|
|
2500
|
+
>({
|
|
2501
|
+
responseTransformer: updateDatasetResponseTransformer,
|
|
2502
|
+
security: [
|
|
2503
|
+
{ scheme: "bearer", type: "http" },
|
|
2504
|
+
{ scheme: "bearer", type: "http" },
|
|
2505
|
+
],
|
|
2506
|
+
url: "/{tenant_id}/datasets/{dataset_id}",
|
|
2507
|
+
...options,
|
|
2508
|
+
headers: {
|
|
2509
|
+
"Content-Type": "application/json",
|
|
2510
|
+
...options.headers,
|
|
2511
|
+
},
|
|
2512
|
+
});
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* Create Namespace
|
|
2516
|
+
*
|
|
2517
|
+
* Creates a new namespace (folder) in the specified database.
|
|
2518
|
+
*/
|
|
2519
|
+
export const createNamespace = <
|
|
2520
|
+
TComposable extends Composable = "$fetch",
|
|
2521
|
+
DefaultT extends CreateNamespaceResponse = CreateNamespaceResponse,
|
|
2522
|
+
>(
|
|
2523
|
+
options: Options<
|
|
2524
|
+
TComposable,
|
|
2525
|
+
CreateNamespaceData,
|
|
2526
|
+
CreateNamespaceResponse,
|
|
2527
|
+
DefaultT
|
|
2528
|
+
>,
|
|
2529
|
+
) =>
|
|
2530
|
+
(options.client ?? client).post<
|
|
2531
|
+
TComposable,
|
|
2532
|
+
CreateNamespaceResponse | DefaultT,
|
|
2533
|
+
CreateNamespaceError,
|
|
2534
|
+
DefaultT
|
|
2535
|
+
>({
|
|
2536
|
+
security: [
|
|
2537
|
+
{ scheme: "bearer", type: "http" },
|
|
2538
|
+
{ scheme: "bearer", type: "http" },
|
|
2539
|
+
],
|
|
2540
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}",
|
|
2541
|
+
...options,
|
|
2542
|
+
headers: {
|
|
2543
|
+
"Content-Type": "application/json",
|
|
2544
|
+
...options.headers,
|
|
2545
|
+
},
|
|
2546
|
+
});
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Update Namespace
|
|
2550
|
+
*
|
|
2551
|
+
* Updates display name and description for an existing namespace.
|
|
2552
|
+
*/
|
|
2553
|
+
export const updateNamespace = <
|
|
2554
|
+
TComposable extends Composable = "$fetch",
|
|
2555
|
+
DefaultT extends UpdateNamespaceResponse = UpdateNamespaceResponse,
|
|
2556
|
+
>(
|
|
2557
|
+
options: Options<
|
|
2558
|
+
TComposable,
|
|
2559
|
+
UpdateNamespaceData,
|
|
2560
|
+
UpdateNamespaceResponse,
|
|
2561
|
+
DefaultT
|
|
2562
|
+
>,
|
|
2563
|
+
) =>
|
|
2564
|
+
(options.client ?? client).put<
|
|
2565
|
+
TComposable,
|
|
2566
|
+
UpdateNamespaceResponse | DefaultT,
|
|
2567
|
+
UpdateNamespaceError,
|
|
2568
|
+
DefaultT
|
|
2569
|
+
>({
|
|
2570
|
+
security: [
|
|
2571
|
+
{ scheme: "bearer", type: "http" },
|
|
2572
|
+
{ scheme: "bearer", type: "http" },
|
|
2573
|
+
],
|
|
2574
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}",
|
|
2575
|
+
...options,
|
|
2576
|
+
headers: {
|
|
2577
|
+
"Content-Type": "application/json",
|
|
2578
|
+
...options.headers,
|
|
2579
|
+
},
|
|
2580
|
+
});
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* Get Databases
|
|
2584
|
+
*
|
|
2585
|
+
* Returns all available buckets with their namespaces and document counts.
|
|
2586
|
+
* Gets data from BucketEntity and NamespaceEntity in MongoDB.
|
|
2587
|
+
*/
|
|
2588
|
+
export const getDatabases = <
|
|
2589
|
+
TComposable extends Composable = "$fetch",
|
|
2590
|
+
DefaultT extends GetDatabasesResponse = GetDatabasesResponse,
|
|
2591
|
+
>(
|
|
2592
|
+
options: Options<
|
|
2593
|
+
TComposable,
|
|
2594
|
+
GetDatabasesData,
|
|
2595
|
+
GetDatabasesResponse,
|
|
2596
|
+
DefaultT
|
|
2597
|
+
>,
|
|
2598
|
+
) =>
|
|
2599
|
+
(options.client ?? client).get<
|
|
2600
|
+
TComposable,
|
|
2601
|
+
GetDatabasesResponse | DefaultT,
|
|
2602
|
+
unknown,
|
|
2603
|
+
DefaultT
|
|
2604
|
+
>({
|
|
2605
|
+
security: [
|
|
2606
|
+
{ scheme: "bearer", type: "http" },
|
|
2607
|
+
{ scheme: "bearer", type: "http" },
|
|
2608
|
+
],
|
|
2609
|
+
url: "/{tenant_id}/knowledge/databases",
|
|
2610
|
+
...options,
|
|
2611
|
+
});
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* Get Documents For Namespace
|
|
2615
|
+
*
|
|
2616
|
+
* Returns paginated documents for a specific namespace within a database.
|
|
2617
|
+
* Optionally filter by document title or filename using the search parameter.
|
|
2618
|
+
* Supports sorting by document_title, created_at, or updated_at.
|
|
2619
|
+
*/
|
|
2620
|
+
export const getDocumentsForNamespace = <
|
|
2621
|
+
TComposable extends Composable = "$fetch",
|
|
2622
|
+
DefaultT extends GetDocumentsForNamespaceResponse =
|
|
2623
|
+
GetDocumentsForNamespaceResponse,
|
|
2624
|
+
>(
|
|
2625
|
+
options: Options<
|
|
2626
|
+
TComposable,
|
|
2627
|
+
GetDocumentsForNamespaceData,
|
|
2628
|
+
GetDocumentsForNamespaceResponse,
|
|
2629
|
+
DefaultT
|
|
2630
|
+
>,
|
|
2631
|
+
) =>
|
|
2632
|
+
(options.client ?? client).get<
|
|
2633
|
+
TComposable,
|
|
2634
|
+
GetDocumentsForNamespaceResponse | DefaultT,
|
|
2635
|
+
GetDocumentsForNamespaceError,
|
|
2636
|
+
DefaultT
|
|
2637
|
+
>({
|
|
2638
|
+
security: [
|
|
2639
|
+
{ scheme: "bearer", type: "http" },
|
|
2640
|
+
{ scheme: "bearer", type: "http" },
|
|
2641
|
+
],
|
|
2642
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents",
|
|
2643
|
+
...options,
|
|
2644
|
+
});
|
|
2645
|
+
|
|
2646
|
+
/**
|
|
2647
|
+
* Get Document By Id
|
|
2648
|
+
*
|
|
2649
|
+
* Returns a single document by its ID.
|
|
2650
|
+
*/
|
|
2651
|
+
export const getDocumentById = <
|
|
2652
|
+
TComposable extends Composable = "$fetch",
|
|
2653
|
+
DefaultT extends GetDocumentByIdResponse = GetDocumentByIdResponse,
|
|
2654
|
+
>(
|
|
2655
|
+
options: Options<
|
|
2656
|
+
TComposable,
|
|
2657
|
+
GetDocumentByIdData,
|
|
2658
|
+
GetDocumentByIdResponse,
|
|
2659
|
+
DefaultT
|
|
2660
|
+
>,
|
|
2661
|
+
) =>
|
|
2662
|
+
(options.client ?? client).get<
|
|
2663
|
+
TComposable,
|
|
2664
|
+
GetDocumentByIdResponse | DefaultT,
|
|
2665
|
+
GetDocumentByIdError,
|
|
2666
|
+
DefaultT
|
|
2667
|
+
>({
|
|
2668
|
+
security: [
|
|
2669
|
+
{ scheme: "bearer", type: "http" },
|
|
2670
|
+
{ scheme: "bearer", type: "http" },
|
|
2671
|
+
],
|
|
2672
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/{document_id}",
|
|
2673
|
+
...options,
|
|
2674
|
+
});
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* Get Nodes For Document
|
|
2678
|
+
*
|
|
2679
|
+
* Returns nodes for a given document.
|
|
2680
|
+
*/
|
|
2681
|
+
export const getNodesForDocument = <
|
|
2682
|
+
TComposable extends Composable = "$fetch",
|
|
2683
|
+
DefaultT extends GetNodesForDocumentResponse = GetNodesForDocumentResponse,
|
|
2684
|
+
>(
|
|
2685
|
+
options: Options<
|
|
2686
|
+
TComposable,
|
|
2687
|
+
GetNodesForDocumentData,
|
|
2688
|
+
GetNodesForDocumentResponse,
|
|
2689
|
+
DefaultT
|
|
2690
|
+
>,
|
|
2691
|
+
) =>
|
|
2692
|
+
(options.client ?? client).get<
|
|
2693
|
+
TComposable,
|
|
2694
|
+
GetNodesForDocumentResponse | DefaultT,
|
|
2695
|
+
GetNodesForDocumentError,
|
|
2696
|
+
DefaultT
|
|
2697
|
+
>({
|
|
2698
|
+
security: [
|
|
2699
|
+
{ scheme: "bearer", type: "http" },
|
|
2700
|
+
{ scheme: "bearer", type: "http" },
|
|
2701
|
+
],
|
|
2702
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/{document_id}/nodes",
|
|
2703
|
+
...options,
|
|
2704
|
+
});
|
|
2705
|
+
|
|
2706
|
+
/**
|
|
2707
|
+
* Get Summary Nodes For Document
|
|
2708
|
+
*
|
|
2709
|
+
* Returns nodes for a given document.
|
|
2710
|
+
*/
|
|
2711
|
+
export const getSummaryNodesForDocument = <
|
|
2712
|
+
TComposable extends Composable = "$fetch",
|
|
2713
|
+
DefaultT extends GetSummaryNodesForDocumentResponse =
|
|
2714
|
+
GetSummaryNodesForDocumentResponse,
|
|
2715
|
+
>(
|
|
2716
|
+
options: Options<
|
|
2717
|
+
TComposable,
|
|
2718
|
+
GetSummaryNodesForDocumentData,
|
|
2719
|
+
GetSummaryNodesForDocumentResponse,
|
|
2720
|
+
DefaultT
|
|
2721
|
+
>,
|
|
2722
|
+
) =>
|
|
2723
|
+
(options.client ?? client).get<
|
|
2724
|
+
TComposable,
|
|
2725
|
+
GetSummaryNodesForDocumentResponse | DefaultT,
|
|
2726
|
+
GetSummaryNodesForDocumentError,
|
|
2727
|
+
DefaultT
|
|
2728
|
+
>({
|
|
2729
|
+
security: [
|
|
2730
|
+
{ scheme: "bearer", type: "http" },
|
|
2731
|
+
{ scheme: "bearer", type: "http" },
|
|
2732
|
+
],
|
|
2733
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/{document_id}/summaries",
|
|
2734
|
+
...options,
|
|
2735
|
+
});
|
|
2736
|
+
|
|
2737
|
+
/**
|
|
2738
|
+
* Initiate Document Upload
|
|
2739
|
+
*
|
|
2740
|
+
* Initiates file upload by generating a presigned S3/MinIO URL.
|
|
2741
|
+
*
|
|
2742
|
+
* This endpoint validates the upload request and returns a presigned URL
|
|
2743
|
+
* that allows the client to upload the file directly to S3/MinIO storage.
|
|
2744
|
+
*/
|
|
2745
|
+
export const initiateDocumentUpload = <
|
|
2746
|
+
TComposable extends Composable = "$fetch",
|
|
2747
|
+
DefaultT extends InitiateDocumentUploadResponse =
|
|
2748
|
+
InitiateDocumentUploadResponse,
|
|
2749
|
+
>(
|
|
2750
|
+
options: Options<
|
|
2751
|
+
TComposable,
|
|
2752
|
+
InitiateDocumentUploadData,
|
|
2753
|
+
InitiateDocumentUploadResponse,
|
|
2754
|
+
DefaultT
|
|
2755
|
+
>,
|
|
2756
|
+
) =>
|
|
2757
|
+
(options.client ?? client).post<
|
|
2758
|
+
TComposable,
|
|
2759
|
+
InitiateDocumentUploadResponse | DefaultT,
|
|
2760
|
+
InitiateDocumentUploadError,
|
|
2761
|
+
DefaultT
|
|
2762
|
+
>({
|
|
2763
|
+
security: [
|
|
2764
|
+
{ scheme: "bearer", type: "http" },
|
|
2765
|
+
{ scheme: "bearer", type: "http" },
|
|
2766
|
+
],
|
|
2767
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/upload/initiate",
|
|
2768
|
+
...options,
|
|
2769
|
+
headers: {
|
|
2770
|
+
"Content-Type": "application/json",
|
|
2771
|
+
...options.headers,
|
|
2772
|
+
},
|
|
2773
|
+
});
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* Validate Document Upload
|
|
2777
|
+
*
|
|
2778
|
+
* Validates whether a file was successfully uploaded to the datalake.
|
|
2779
|
+
*
|
|
2780
|
+
* This endpoint checks if a file exists in the configured datalake storage
|
|
2781
|
+
* (S3/MinIO or Azure Blob Storage) after a presigned URL upload, and publishes
|
|
2782
|
+
* a SourceUpdatedEvent to NATS to trigger downstream pipeline processing.
|
|
2783
|
+
*/
|
|
2784
|
+
export const validateDocumentUpload = <
|
|
2785
|
+
TComposable extends Composable = "$fetch",
|
|
2786
|
+
DefaultT extends ValidateDocumentUploadResponse =
|
|
2787
|
+
ValidateDocumentUploadResponse,
|
|
2788
|
+
>(
|
|
2789
|
+
options: Options<
|
|
2790
|
+
TComposable,
|
|
2791
|
+
ValidateDocumentUploadData,
|
|
2792
|
+
ValidateDocumentUploadResponse,
|
|
2793
|
+
DefaultT
|
|
2794
|
+
>,
|
|
2795
|
+
) =>
|
|
2796
|
+
(options.client ?? client).post<
|
|
2797
|
+
TComposable,
|
|
2798
|
+
ValidateDocumentUploadResponse | DefaultT,
|
|
2799
|
+
ValidateDocumentUploadError,
|
|
2800
|
+
DefaultT
|
|
2801
|
+
>({
|
|
2802
|
+
security: [
|
|
2803
|
+
{ scheme: "bearer", type: "http" },
|
|
2804
|
+
{ scheme: "bearer", type: "http" },
|
|
2805
|
+
],
|
|
2806
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/upload/validate",
|
|
2807
|
+
...options,
|
|
2808
|
+
headers: {
|
|
2809
|
+
"Content-Type": "application/json",
|
|
2810
|
+
...options.headers,
|
|
2811
|
+
},
|
|
2812
|
+
});
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* Get supported file types
|
|
2816
|
+
*
|
|
2817
|
+
* Returns a list of supported file extensions (e.g., [".pdf", ".docx"])
|
|
2818
|
+
* that can be used for client-side validation.
|
|
2819
|
+
*/
|
|
2820
|
+
export const getSupportedFileTypes = <
|
|
2821
|
+
TComposable extends Composable = "$fetch",
|
|
2822
|
+
DefaultT extends GetSupportedFileTypesResponse =
|
|
2823
|
+
GetSupportedFileTypesResponse,
|
|
2824
|
+
>(
|
|
2825
|
+
options: Options<
|
|
2826
|
+
TComposable,
|
|
2827
|
+
GetSupportedFileTypesData,
|
|
2828
|
+
GetSupportedFileTypesResponse,
|
|
2829
|
+
DefaultT
|
|
2830
|
+
>,
|
|
2831
|
+
) =>
|
|
2832
|
+
(options.client ?? client).get<
|
|
2833
|
+
TComposable,
|
|
2834
|
+
GetSupportedFileTypesResponse | DefaultT,
|
|
2835
|
+
unknown,
|
|
2836
|
+
DefaultT
|
|
2837
|
+
>({
|
|
2838
|
+
security: [
|
|
2839
|
+
{ scheme: "bearer", type: "http" },
|
|
2840
|
+
{ scheme: "bearer", type: "http" },
|
|
2841
|
+
],
|
|
2842
|
+
url: "/{tenant_id}/knowledge/supported-types",
|
|
2843
|
+
...options,
|
|
2844
|
+
});
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Get signed document URL
|
|
2848
|
+
*
|
|
2849
|
+
* Generates a presigned URL for downloading a document's source file.
|
|
2850
|
+
*/
|
|
2851
|
+
export const getDocumentUrl = <
|
|
2852
|
+
TComposable extends Composable = "$fetch",
|
|
2853
|
+
DefaultT extends GetDocumentUrlResponse = GetDocumentUrlResponse,
|
|
2854
|
+
>(
|
|
2855
|
+
options: Options<
|
|
2856
|
+
TComposable,
|
|
2857
|
+
GetDocumentUrlData,
|
|
2858
|
+
GetDocumentUrlResponse,
|
|
2859
|
+
DefaultT
|
|
2860
|
+
>,
|
|
2861
|
+
) =>
|
|
2862
|
+
(options.client ?? client).get<
|
|
2863
|
+
TComposable,
|
|
2864
|
+
GetDocumentUrlResponse | DefaultT,
|
|
2865
|
+
GetDocumentUrlError,
|
|
2866
|
+
DefaultT
|
|
2867
|
+
>({
|
|
2868
|
+
security: [
|
|
2869
|
+
{ scheme: "bearer", type: "http" },
|
|
2870
|
+
{ scheme: "bearer", type: "http" },
|
|
2871
|
+
],
|
|
2872
|
+
url: "/{tenant_id}/knowledge/databases/{database}/namespaces/{namespace}/documents/{document_id}/url",
|
|
2873
|
+
...options,
|
|
2874
|
+
});
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* Get signed file URL
|
|
2878
|
+
*
|
|
2879
|
+
* Generates a short-lived secure link to the blob resource, and returns the URL.
|
|
2880
|
+
*/
|
|
2881
|
+
export const getFileUrl = <
|
|
2882
|
+
TComposable extends Composable = "$fetch",
|
|
2883
|
+
DefaultT extends GetFileUrlResponse = GetFileUrlResponse,
|
|
2884
|
+
>(
|
|
2885
|
+
options: Options<TComposable, GetFileUrlData, GetFileUrlResponse, DefaultT>,
|
|
2886
|
+
) =>
|
|
2887
|
+
(options.client ?? client).get<
|
|
2888
|
+
TComposable,
|
|
2889
|
+
GetFileUrlResponse | DefaultT,
|
|
2890
|
+
GetFileUrlError,
|
|
2891
|
+
DefaultT
|
|
2892
|
+
>({
|
|
2893
|
+
security: [
|
|
2894
|
+
{ scheme: "bearer", type: "http" },
|
|
2895
|
+
{ scheme: "bearer", type: "http" },
|
|
2896
|
+
],
|
|
2897
|
+
url: "/{tenant_id}/files/logged-in/url/{container}/{file_path}",
|
|
2898
|
+
...options,
|
|
2899
|
+
});
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Access file url via shared link
|
|
2903
|
+
*
|
|
2904
|
+
* Provides access to a file via a temporary, signed URL and returns the URL.
|
|
2905
|
+
*/
|
|
2906
|
+
export const getAnonymousFileUrl = <
|
|
2907
|
+
TComposable extends Composable = "$fetch",
|
|
2908
|
+
DefaultT = undefined,
|
|
2909
|
+
>(
|
|
2910
|
+
options: Options<TComposable, GetAnonymousFileUrlData, unknown, DefaultT>,
|
|
2911
|
+
) =>
|
|
2912
|
+
(options.client ?? client).get<
|
|
2913
|
+
TComposable,
|
|
2914
|
+
unknown | DefaultT,
|
|
2915
|
+
GetAnonymousFileUrlError,
|
|
2916
|
+
DefaultT
|
|
2917
|
+
>({
|
|
2918
|
+
url: "/{tenant_id}/files/anonymous/url/{container}/{file_path}",
|
|
2919
|
+
...options,
|
|
2920
|
+
});
|
|
2921
|
+
|
|
2922
|
+
/**
|
|
2923
|
+
* Access file via shared link
|
|
2924
|
+
*
|
|
2925
|
+
* Provides access to a file via a temporary URL and redirects the user to it.
|
|
2926
|
+
*/
|
|
2927
|
+
export const getAnonymousFileRedirect = <
|
|
2928
|
+
TComposable extends Composable = "$fetch",
|
|
2929
|
+
DefaultT = undefined,
|
|
2930
|
+
>(
|
|
2931
|
+
options: Options<
|
|
2932
|
+
TComposable,
|
|
2933
|
+
GetAnonymousFileRedirectData,
|
|
2934
|
+
unknown,
|
|
2935
|
+
DefaultT
|
|
2936
|
+
>,
|
|
2937
|
+
) =>
|
|
2938
|
+
(options.client ?? client).get<
|
|
2939
|
+
TComposable,
|
|
2940
|
+
unknown | DefaultT,
|
|
2941
|
+
GetAnonymousFileRedirectError,
|
|
2942
|
+
DefaultT
|
|
2943
|
+
>({
|
|
2944
|
+
url: "/{tenant_id}/files/anonymous/redirect/{container}/{file_path}",
|
|
2945
|
+
...options,
|
|
2946
|
+
});
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Get Notifications
|
|
2950
|
+
*
|
|
2951
|
+
* Retrieves a paginated list of notifications with optional filters.
|
|
2952
|
+
*/
|
|
2953
|
+
export const getNotifications = <
|
|
2954
|
+
TComposable extends Composable = "$fetch",
|
|
2955
|
+
DefaultT extends GetNotificationsResponse = GetNotificationsResponse,
|
|
2956
|
+
>(
|
|
2957
|
+
options: Options<
|
|
2958
|
+
TComposable,
|
|
2959
|
+
GetNotificationsData,
|
|
2960
|
+
GetNotificationsResponse,
|
|
2961
|
+
DefaultT
|
|
2962
|
+
>,
|
|
2963
|
+
) =>
|
|
2964
|
+
(options.client ?? client).get<
|
|
2965
|
+
TComposable,
|
|
2966
|
+
GetNotificationsResponse | DefaultT,
|
|
2967
|
+
GetNotificationsError,
|
|
2968
|
+
DefaultT
|
|
2969
|
+
>({
|
|
2970
|
+
responseTransformer: getNotificationsResponseTransformer,
|
|
2971
|
+
security: [
|
|
2972
|
+
{ scheme: "bearer", type: "http" },
|
|
2973
|
+
{ scheme: "bearer", type: "http" },
|
|
2974
|
+
],
|
|
2975
|
+
url: "/{tenant_id}/notifications",
|
|
2976
|
+
...options,
|
|
2977
|
+
});
|
|
2978
|
+
|
|
2979
|
+
/**
|
|
2980
|
+
* Update Notifications Bulk
|
|
2981
|
+
*
|
|
2982
|
+
* Partially updates a list of notifications (e.g., marks them as read or done).
|
|
2983
|
+
*/
|
|
2984
|
+
export const updateNotificationsBulk = <
|
|
2985
|
+
TComposable extends Composable = "$fetch",
|
|
2986
|
+
DefaultT extends UpdateNotificationsBulkResponse =
|
|
2987
|
+
UpdateNotificationsBulkResponse,
|
|
2988
|
+
>(
|
|
2989
|
+
options: Options<
|
|
2990
|
+
TComposable,
|
|
2991
|
+
UpdateNotificationsBulkData,
|
|
2992
|
+
UpdateNotificationsBulkResponse,
|
|
2993
|
+
DefaultT
|
|
2994
|
+
>,
|
|
2995
|
+
) =>
|
|
2996
|
+
(options.client ?? client).patch<
|
|
2997
|
+
TComposable,
|
|
2998
|
+
UpdateNotificationsBulkResponse | DefaultT,
|
|
2999
|
+
UpdateNotificationsBulkError,
|
|
3000
|
+
DefaultT
|
|
3001
|
+
>({
|
|
3002
|
+
responseTransformer: updateNotificationsBulkResponseTransformer,
|
|
3003
|
+
security: [
|
|
3004
|
+
{ scheme: "bearer", type: "http" },
|
|
3005
|
+
{ scheme: "bearer", type: "http" },
|
|
3006
|
+
],
|
|
3007
|
+
url: "/{tenant_id}/notifications/",
|
|
3008
|
+
...options,
|
|
3009
|
+
headers: {
|
|
3010
|
+
"Content-Type": "application/json",
|
|
3011
|
+
...options.headers,
|
|
3012
|
+
},
|
|
3013
|
+
});
|
|
3014
|
+
|
|
3015
|
+
/**
|
|
3016
|
+
* Update Notification
|
|
3017
|
+
*
|
|
3018
|
+
* Partially updates a notification (e.g., marks it as read or done).
|
|
3019
|
+
*/
|
|
3020
|
+
export const updateNotification = <
|
|
3021
|
+
TComposable extends Composable = "$fetch",
|
|
3022
|
+
DefaultT extends UpdateNotificationResponse = UpdateNotificationResponse,
|
|
3023
|
+
>(
|
|
3024
|
+
options: Options<
|
|
3025
|
+
TComposable,
|
|
3026
|
+
UpdateNotificationData,
|
|
3027
|
+
UpdateNotificationResponse,
|
|
3028
|
+
DefaultT
|
|
3029
|
+
>,
|
|
3030
|
+
) =>
|
|
3031
|
+
(options.client ?? client).patch<
|
|
3032
|
+
TComposable,
|
|
3033
|
+
UpdateNotificationResponse | DefaultT,
|
|
3034
|
+
UpdateNotificationError,
|
|
3035
|
+
DefaultT
|
|
3036
|
+
>({
|
|
3037
|
+
responseTransformer: updateNotificationResponseTransformer,
|
|
3038
|
+
security: [
|
|
3039
|
+
{ scheme: "bearer", type: "http" },
|
|
3040
|
+
{ scheme: "bearer", type: "http" },
|
|
3041
|
+
],
|
|
3042
|
+
url: "/{tenant_id}/notifications/{notification_id}",
|
|
3043
|
+
...options,
|
|
3044
|
+
headers: {
|
|
3045
|
+
"Content-Type": "application/json",
|
|
3046
|
+
...options.headers,
|
|
3047
|
+
},
|
|
3048
|
+
});
|
|
3049
|
+
|
|
3050
|
+
/**
|
|
3051
|
+
* Delete All User Memories
|
|
3052
|
+
*/
|
|
3053
|
+
export const deleteAllUserMemories = <
|
|
3054
|
+
TComposable extends Composable = "$fetch",
|
|
3055
|
+
DefaultT extends DeleteAllUserMemoriesResponse =
|
|
3056
|
+
DeleteAllUserMemoriesResponse,
|
|
3057
|
+
>(
|
|
3058
|
+
options: Options<
|
|
3059
|
+
TComposable,
|
|
3060
|
+
DeleteAllUserMemoriesData,
|
|
3061
|
+
DeleteAllUserMemoriesResponse,
|
|
3062
|
+
DefaultT
|
|
3063
|
+
>,
|
|
3064
|
+
) =>
|
|
3065
|
+
(options.client ?? client).delete<
|
|
3066
|
+
TComposable,
|
|
3067
|
+
DeleteAllUserMemoriesResponse | DefaultT,
|
|
3068
|
+
unknown,
|
|
3069
|
+
DefaultT
|
|
3070
|
+
>({
|
|
3071
|
+
security: [
|
|
3072
|
+
{ scheme: "bearer", type: "http" },
|
|
3073
|
+
{ scheme: "bearer", type: "http" },
|
|
3074
|
+
],
|
|
3075
|
+
url: "/{tenant_id}/user-memories",
|
|
3076
|
+
...options,
|
|
3077
|
+
});
|
|
3078
|
+
|
|
3079
|
+
/**
|
|
3080
|
+
* Get User Memories
|
|
3081
|
+
*/
|
|
3082
|
+
export const getUserMemories = <
|
|
3083
|
+
TComposable extends Composable = "$fetch",
|
|
3084
|
+
DefaultT extends GetUserMemoriesResponse = GetUserMemoriesResponse,
|
|
3085
|
+
>(
|
|
3086
|
+
options: Options<
|
|
3087
|
+
TComposable,
|
|
3088
|
+
GetUserMemoriesData,
|
|
3089
|
+
GetUserMemoriesResponse,
|
|
3090
|
+
DefaultT
|
|
3091
|
+
>,
|
|
3092
|
+
) =>
|
|
3093
|
+
(options.client ?? client).get<
|
|
3094
|
+
TComposable,
|
|
3095
|
+
GetUserMemoriesResponse | DefaultT,
|
|
3096
|
+
GetUserMemoriesError,
|
|
3097
|
+
DefaultT
|
|
3098
|
+
>({
|
|
3099
|
+
security: [
|
|
3100
|
+
{ scheme: "bearer", type: "http" },
|
|
3101
|
+
{ scheme: "bearer", type: "http" },
|
|
3102
|
+
],
|
|
3103
|
+
url: "/{tenant_id}/user-memories",
|
|
3104
|
+
...options,
|
|
3105
|
+
});
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* Search User Memories
|
|
3109
|
+
*/
|
|
3110
|
+
export const searchUserMemories = <
|
|
3111
|
+
TComposable extends Composable = "$fetch",
|
|
3112
|
+
DefaultT extends SearchUserMemoriesResponse = SearchUserMemoriesResponse,
|
|
3113
|
+
>(
|
|
3114
|
+
options: Options<
|
|
3115
|
+
TComposable,
|
|
3116
|
+
SearchUserMemoriesData,
|
|
3117
|
+
SearchUserMemoriesResponse,
|
|
3118
|
+
DefaultT
|
|
3119
|
+
>,
|
|
3120
|
+
) =>
|
|
3121
|
+
(options.client ?? client).get<
|
|
3122
|
+
TComposable,
|
|
3123
|
+
SearchUserMemoriesResponse | DefaultT,
|
|
3124
|
+
SearchUserMemoriesError,
|
|
3125
|
+
DefaultT
|
|
3126
|
+
>({
|
|
3127
|
+
security: [
|
|
3128
|
+
{ scheme: "bearer", type: "http" },
|
|
3129
|
+
{ scheme: "bearer", type: "http" },
|
|
3130
|
+
],
|
|
3131
|
+
url: "/{tenant_id}/user-memories/search",
|
|
3132
|
+
...options,
|
|
3133
|
+
});
|
|
3134
|
+
|
|
3135
|
+
/**
|
|
3136
|
+
* Delete User Memory
|
|
3137
|
+
*/
|
|
3138
|
+
export const deleteUserMemory = <
|
|
3139
|
+
TComposable extends Composable = "$fetch",
|
|
3140
|
+
DefaultT extends DeleteUserMemoryResponse = DeleteUserMemoryResponse,
|
|
3141
|
+
>(
|
|
3142
|
+
options: Options<
|
|
3143
|
+
TComposable,
|
|
3144
|
+
DeleteUserMemoryData,
|
|
3145
|
+
DeleteUserMemoryResponse,
|
|
3146
|
+
DefaultT
|
|
3147
|
+
>,
|
|
3148
|
+
) =>
|
|
3149
|
+
(options.client ?? client).delete<
|
|
3150
|
+
TComposable,
|
|
3151
|
+
DeleteUserMemoryResponse | DefaultT,
|
|
3152
|
+
DeleteUserMemoryError,
|
|
3153
|
+
DefaultT
|
|
3154
|
+
>({
|
|
3155
|
+
security: [
|
|
3156
|
+
{ scheme: "bearer", type: "http" },
|
|
3157
|
+
{ scheme: "bearer", type: "http" },
|
|
3158
|
+
],
|
|
3159
|
+
url: "/{tenant_id}/user-memories/{memory_id}",
|
|
3160
|
+
...options,
|
|
3161
|
+
});
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* Update User Memory
|
|
3165
|
+
*/
|
|
3166
|
+
export const updateUserMemory = <
|
|
3167
|
+
TComposable extends Composable = "$fetch",
|
|
3168
|
+
DefaultT extends UpdateUserMemoryResponse = UpdateUserMemoryResponse,
|
|
3169
|
+
>(
|
|
3170
|
+
options: Options<
|
|
3171
|
+
TComposable,
|
|
3172
|
+
UpdateUserMemoryData,
|
|
3173
|
+
UpdateUserMemoryResponse,
|
|
3174
|
+
DefaultT
|
|
3175
|
+
>,
|
|
3176
|
+
) =>
|
|
3177
|
+
(options.client ?? client).patch<
|
|
3178
|
+
TComposable,
|
|
3179
|
+
UpdateUserMemoryResponse | DefaultT,
|
|
3180
|
+
UpdateUserMemoryError,
|
|
3181
|
+
DefaultT
|
|
3182
|
+
>({
|
|
3183
|
+
security: [
|
|
3184
|
+
{ scheme: "bearer", type: "http" },
|
|
3185
|
+
{ scheme: "bearer", type: "http" },
|
|
3186
|
+
],
|
|
3187
|
+
url: "/{tenant_id}/user-memories/{memory_id}",
|
|
3188
|
+
...options,
|
|
3189
|
+
headers: {
|
|
3190
|
+
"Content-Type": "application/json",
|
|
3191
|
+
...options.headers,
|
|
3192
|
+
},
|
|
3193
|
+
});
|
|
3194
|
+
|
|
3195
|
+
/**
|
|
3196
|
+
* Delete All Organization Memories
|
|
3197
|
+
*/
|
|
3198
|
+
export const deleteAllOrganizationMemories = <
|
|
3199
|
+
TComposable extends Composable = "$fetch",
|
|
3200
|
+
DefaultT extends DeleteAllOrganizationMemoriesResponse =
|
|
3201
|
+
DeleteAllOrganizationMemoriesResponse,
|
|
3202
|
+
>(
|
|
3203
|
+
options: Options<
|
|
3204
|
+
TComposable,
|
|
3205
|
+
DeleteAllOrganizationMemoriesData,
|
|
3206
|
+
DeleteAllOrganizationMemoriesResponse,
|
|
3207
|
+
DefaultT
|
|
3208
|
+
>,
|
|
3209
|
+
) =>
|
|
3210
|
+
(options.client ?? client).delete<
|
|
3211
|
+
TComposable,
|
|
3212
|
+
DeleteAllOrganizationMemoriesResponse | DefaultT,
|
|
3213
|
+
unknown,
|
|
3214
|
+
DefaultT
|
|
3215
|
+
>({
|
|
3216
|
+
security: [
|
|
3217
|
+
{ scheme: "bearer", type: "http" },
|
|
3218
|
+
{ scheme: "bearer", type: "http" },
|
|
3219
|
+
],
|
|
3220
|
+
url: "/{tenant_id}/organization-memories",
|
|
3221
|
+
...options,
|
|
3222
|
+
});
|
|
3223
|
+
|
|
3224
|
+
/**
|
|
3225
|
+
* Get Organization Memories
|
|
3226
|
+
*/
|
|
3227
|
+
export const getOrganizationMemories = <
|
|
3228
|
+
TComposable extends Composable = "$fetch",
|
|
3229
|
+
DefaultT extends GetOrganizationMemoriesResponse =
|
|
3230
|
+
GetOrganizationMemoriesResponse,
|
|
3231
|
+
>(
|
|
3232
|
+
options: Options<
|
|
3233
|
+
TComposable,
|
|
3234
|
+
GetOrganizationMemoriesData,
|
|
3235
|
+
GetOrganizationMemoriesResponse,
|
|
3236
|
+
DefaultT
|
|
3237
|
+
>,
|
|
3238
|
+
) =>
|
|
3239
|
+
(options.client ?? client).get<
|
|
3240
|
+
TComposable,
|
|
3241
|
+
GetOrganizationMemoriesResponse | DefaultT,
|
|
3242
|
+
GetOrganizationMemoriesError,
|
|
3243
|
+
DefaultT
|
|
3244
|
+
>({
|
|
3245
|
+
security: [
|
|
3246
|
+
{ scheme: "bearer", type: "http" },
|
|
3247
|
+
{ scheme: "bearer", type: "http" },
|
|
3248
|
+
],
|
|
3249
|
+
url: "/{tenant_id}/organization-memories",
|
|
3250
|
+
...options,
|
|
3251
|
+
});
|
|
3252
|
+
|
|
3253
|
+
/**
|
|
3254
|
+
* Search Organization Memories
|
|
3255
|
+
*/
|
|
3256
|
+
export const searchOrganizationMemories = <
|
|
3257
|
+
TComposable extends Composable = "$fetch",
|
|
3258
|
+
DefaultT extends SearchOrganizationMemoriesResponse =
|
|
3259
|
+
SearchOrganizationMemoriesResponse,
|
|
3260
|
+
>(
|
|
3261
|
+
options: Options<
|
|
3262
|
+
TComposable,
|
|
3263
|
+
SearchOrganizationMemoriesData,
|
|
3264
|
+
SearchOrganizationMemoriesResponse,
|
|
3265
|
+
DefaultT
|
|
3266
|
+
>,
|
|
3267
|
+
) =>
|
|
3268
|
+
(options.client ?? client).get<
|
|
3269
|
+
TComposable,
|
|
3270
|
+
SearchOrganizationMemoriesResponse | DefaultT,
|
|
3271
|
+
SearchOrganizationMemoriesError,
|
|
3272
|
+
DefaultT
|
|
3273
|
+
>({
|
|
3274
|
+
security: [
|
|
3275
|
+
{ scheme: "bearer", type: "http" },
|
|
3276
|
+
{ scheme: "bearer", type: "http" },
|
|
3277
|
+
],
|
|
3278
|
+
url: "/{tenant_id}/organization-memories/search",
|
|
3279
|
+
...options,
|
|
3280
|
+
});
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* Delete Organization Memory
|
|
3284
|
+
*/
|
|
3285
|
+
export const deleteOrganizationMemory = <
|
|
3286
|
+
TComposable extends Composable = "$fetch",
|
|
3287
|
+
DefaultT extends DeleteOrganizationMemoryResponse =
|
|
3288
|
+
DeleteOrganizationMemoryResponse,
|
|
3289
|
+
>(
|
|
3290
|
+
options: Options<
|
|
3291
|
+
TComposable,
|
|
3292
|
+
DeleteOrganizationMemoryData,
|
|
3293
|
+
DeleteOrganizationMemoryResponse,
|
|
3294
|
+
DefaultT
|
|
3295
|
+
>,
|
|
3296
|
+
) =>
|
|
3297
|
+
(options.client ?? client).delete<
|
|
3298
|
+
TComposable,
|
|
3299
|
+
DeleteOrganizationMemoryResponse | DefaultT,
|
|
3300
|
+
DeleteOrganizationMemoryError,
|
|
3301
|
+
DefaultT
|
|
3302
|
+
>({
|
|
3303
|
+
security: [
|
|
3304
|
+
{ scheme: "bearer", type: "http" },
|
|
3305
|
+
{ scheme: "bearer", type: "http" },
|
|
3306
|
+
],
|
|
3307
|
+
url: "/{tenant_id}/organization-memories/{memory_id}",
|
|
3308
|
+
...options,
|
|
3309
|
+
});
|
|
3310
|
+
|
|
3311
|
+
/**
|
|
3312
|
+
* Update Organization Memory
|
|
3313
|
+
*/
|
|
3314
|
+
export const updateOrganizationMemory = <
|
|
3315
|
+
TComposable extends Composable = "$fetch",
|
|
3316
|
+
DefaultT extends UpdateOrganizationMemoryResponse =
|
|
3317
|
+
UpdateOrganizationMemoryResponse,
|
|
3318
|
+
>(
|
|
3319
|
+
options: Options<
|
|
3320
|
+
TComposable,
|
|
3321
|
+
UpdateOrganizationMemoryData,
|
|
3322
|
+
UpdateOrganizationMemoryResponse,
|
|
3323
|
+
DefaultT
|
|
3324
|
+
>,
|
|
3325
|
+
) =>
|
|
3326
|
+
(options.client ?? client).patch<
|
|
3327
|
+
TComposable,
|
|
3328
|
+
UpdateOrganizationMemoryResponse | DefaultT,
|
|
3329
|
+
UpdateOrganizationMemoryError,
|
|
3330
|
+
DefaultT
|
|
3331
|
+
>({
|
|
3332
|
+
security: [
|
|
3333
|
+
{ scheme: "bearer", type: "http" },
|
|
3334
|
+
{ scheme: "bearer", type: "http" },
|
|
3335
|
+
],
|
|
3336
|
+
url: "/{tenant_id}/organization-memories/{memory_id}",
|
|
3337
|
+
...options,
|
|
3338
|
+
headers: {
|
|
3339
|
+
"Content-Type": "application/json",
|
|
3340
|
+
...options.headers,
|
|
3341
|
+
},
|
|
3342
|
+
});
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* Process document (OpenWebUI)
|
|
3346
|
+
*
|
|
3347
|
+
* Convert a document to markdown format. Supports PDF, images, and Office documents.
|
|
3348
|
+
*/
|
|
3349
|
+
export const processDocument = <
|
|
3350
|
+
TComposable extends Composable = "$fetch",
|
|
3351
|
+
DefaultT extends ProcessDocumentResponse = ProcessDocumentResponse,
|
|
3352
|
+
>(
|
|
3353
|
+
options: Options<
|
|
3354
|
+
TComposable,
|
|
3355
|
+
ProcessDocumentData,
|
|
3356
|
+
ProcessDocumentResponse,
|
|
3357
|
+
DefaultT
|
|
3358
|
+
>,
|
|
3359
|
+
) =>
|
|
3360
|
+
(options.client ?? client).put<
|
|
3361
|
+
TComposable,
|
|
3362
|
+
ProcessDocumentResponse | DefaultT,
|
|
3363
|
+
ProcessDocumentError,
|
|
3364
|
+
DefaultT
|
|
3365
|
+
>({
|
|
3366
|
+
security: [
|
|
3367
|
+
{ scheme: "bearer", type: "http" },
|
|
3368
|
+
{ scheme: "bearer", type: "http" },
|
|
3369
|
+
],
|
|
3370
|
+
url: "/{tenant_id}/parsing/process",
|
|
3371
|
+
...options,
|
|
3372
|
+
});
|
|
3373
|
+
|
|
3374
|
+
/**
|
|
3375
|
+
* Translate Text
|
|
3376
|
+
*
|
|
3377
|
+
* Translate a LocaleString to all supported locales.
|
|
3378
|
+
*
|
|
3379
|
+
* Takes a LocaleString with at least one locale populated and translates it
|
|
3380
|
+
* to all other supported locales (de, en, fr, it) using an LLM.
|
|
3381
|
+
*/
|
|
3382
|
+
export const translateText = <
|
|
3383
|
+
TComposable extends Composable = "$fetch",
|
|
3384
|
+
DefaultT extends TranslateTextResponse = TranslateTextResponse,
|
|
3385
|
+
>(
|
|
3386
|
+
options: Options<
|
|
3387
|
+
TComposable,
|
|
3388
|
+
TranslateTextData,
|
|
3389
|
+
TranslateTextResponse,
|
|
3390
|
+
DefaultT
|
|
3391
|
+
>,
|
|
3392
|
+
) =>
|
|
3393
|
+
(options.client ?? client).post<
|
|
3394
|
+
TComposable,
|
|
3395
|
+
TranslateTextResponse | DefaultT,
|
|
3396
|
+
TranslateTextError,
|
|
3397
|
+
DefaultT
|
|
3398
|
+
>({
|
|
3399
|
+
security: [
|
|
3400
|
+
{ scheme: "bearer", type: "http" },
|
|
3401
|
+
{ scheme: "bearer", type: "http" },
|
|
3402
|
+
],
|
|
3403
|
+
url: "/{tenant_id}/translation/",
|
|
3404
|
+
...options,
|
|
3405
|
+
headers: {
|
|
3406
|
+
"Content-Type": "application/json",
|
|
3407
|
+
...options.headers,
|
|
3408
|
+
},
|
|
3409
|
+
});
|
|
3410
|
+
|
|
3411
|
+
/**
|
|
3412
|
+
* Receive Openwebui Webhook
|
|
3413
|
+
*/
|
|
3414
|
+
export const receiveOpenwebuiWebhook = <
|
|
3415
|
+
TComposable extends Composable = "$fetch",
|
|
3416
|
+
DefaultT extends ReceiveOpenwebuiWebhookResponse =
|
|
3417
|
+
ReceiveOpenwebuiWebhookResponse,
|
|
3418
|
+
>(
|
|
3419
|
+
options: Options<
|
|
3420
|
+
TComposable,
|
|
3421
|
+
ReceiveOpenwebuiWebhookData,
|
|
3422
|
+
ReceiveOpenwebuiWebhookResponse,
|
|
3423
|
+
DefaultT
|
|
3424
|
+
>,
|
|
3425
|
+
) =>
|
|
3426
|
+
(options.client ?? client).post<
|
|
3427
|
+
TComposable,
|
|
3428
|
+
ReceiveOpenwebuiWebhookResponse | DefaultT,
|
|
3429
|
+
ReceiveOpenwebuiWebhookError,
|
|
3430
|
+
DefaultT
|
|
3431
|
+
>({
|
|
3432
|
+
url: "/webhook/openwebui",
|
|
3433
|
+
...options,
|
|
3434
|
+
headers: {
|
|
3435
|
+
"Content-Type": "application/json",
|
|
3436
|
+
...options.headers,
|
|
3437
|
+
},
|
|
3438
|
+
});
|