@quantcdn/quant-client 4.8.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * QuantCDN API
6
6
  * Unified API for QuantCDN Admin and QuantCloud Platform services
7
7
  *
8
- * The version of the OpenAPI document: 4.8.0
8
+ * The version of the OpenAPI document: 4.9.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,10 +22,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.AIModelsApiFp = exports.AIModelsApiAxiosParamCreator = exports.AIInferenceApi = exports.AIInferenceApiFactory = exports.AIInferenceApiFp = exports.AIInferenceApiAxiosParamCreator = exports.AICustomToolsApi = exports.AICustomToolsApiFactory = exports.AICustomToolsApiFp = exports.AICustomToolsApiAxiosParamCreator = exports.AIAgentsApi = exports.AIAgentsApiFactory = exports.AIAgentsApiFp = exports.AIAgentsApiAxiosParamCreator = exports.WafConfigThresholdsInnerModeEnum = exports.WafConfigThresholdsInnerTypeEnum = exports.WafConfigModeEnum = exports.V2RuleProxyActionNotifyEnum = exports.V1TransitionStateEnum = exports.UpdateAISessionRequestNewMessagesInnerRoleEnum = exports.UpdateAISessionRequestStatusEnum = exports.SpotConfigurationStrategyEnum = exports.ScalingPolicyMetricEnum = exports.PatchEnvironmentComposeRequestSpotConfigurationStrategyEnum = exports.ImageGenerationRequestTextToImageParamsControlModeEnum = exports.ImageGenerationRequestTextToImageParamsStyleEnum = exports.ImageGenerationRequestOutPaintingParamsOutPaintingModeEnum = exports.ImageGenerationRequestImageGenerationConfigQualityEnum = exports.ImageGenerationRequestRegionEnum = exports.ImageGenerationRequestTaskTypeEnum = exports.EnvironmentSummaryDeploymentStatusEnum = exports.EnvironmentResponseDeploymentStatusEnum = exports.EmbeddingsRequestDimensionsEnum = exports.CronRunStatusEnum = exports.CronRunRunTypeEnum = exports.CreateApplicationRequestDatabaseEngineEnum = exports.CreateAISessionRequestInitialMessagesInnerRoleEnum = exports.CreateAISession201ResponseStatusEnum = exports.ContainerImageReferenceTypeEnum = exports.ContainerDependsOnInnerConditionEnum = exports.ChatInferenceStreamRequestMessagesInnerRoleEnum = exports.ChatInferenceRequestResponseFormatTypeEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentFormatEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoFormatEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageFormatEnum = exports.ChatInferenceRequestMessagesInnerRoleEnum = exports.ChatInference200ResponseResponseRoleEnum = exports.ChatInference200ResponseFinishReasonEnum = exports.ApplicationImageReferenceTypeEnum = exports.ApplicationDatabaseRdsInstanceEngineEnum = void 0;
26
- exports.CrawlerSchedulesApi = exports.CrawlerSchedulesApiFactory = exports.CrawlerSchedulesApiFp = exports.CrawlerSchedulesApiAxiosParamCreator = exports.ContainersApi = exports.ContainersApiFactory = exports.ContainersApiFp = exports.ContainersApiAxiosParamCreator = exports.ComposeApi = exports.ComposeApiFactory = exports.ComposeApiFp = exports.ComposeApiAxiosParamCreator = exports.CommandsApi = exports.CommandsApiFactory = exports.CommandsApiFp = exports.CommandsApiAxiosParamCreator = exports.ListBackupsStatusEnum = exports.ListBackupsOrderEnum = exports.ListBackupsTypeEnum = exports.DownloadBackupTypeEnum = exports.DeleteBackupTypeEnum = exports.CreateBackupTypeEnum = exports.BackupManagementApi = exports.BackupManagementApiFactory = exports.BackupManagementApiFp = exports.BackupManagementApiAxiosParamCreator = exports.ApplicationsApi = exports.ApplicationsApiFactory = exports.ApplicationsApiFp = exports.ApplicationsApiAxiosParamCreator = exports.AIVectorDatabaseApi = exports.AIVectorDatabaseApiFactory = exports.AIVectorDatabaseApiFp = exports.AIVectorDatabaseApiAxiosParamCreator = exports.ListAIToolExecutionsStatusEnum = exports.AIToolsApi = exports.AIToolsApiFactory = exports.AIToolsApiFp = exports.AIToolsApiAxiosParamCreator = exports.AISessionsApi = exports.AISessionsApiFactory = exports.AISessionsApiFp = exports.AISessionsApiAxiosParamCreator = exports.AIMonitoringApi = exports.AIMonitoringApiFactory = exports.AIMonitoringApiFp = exports.AIMonitoringApiAxiosParamCreator = exports.ListAIModelsFeatureEnum = exports.AIModelsApi = exports.AIModelsApiFactory = void 0;
27
- exports.ScalingPolicyApi = exports.ScalingPolicyApiFactory = exports.ScalingPolicyApiFp = exports.ScalingPolicyApiAxiosParamCreator = exports.SSHAccessApi = exports.SSHAccessApiFactory = exports.SSHAccessApiFp = exports.SSHAccessApiAxiosParamCreator = exports.RulesApi = exports.RulesApiFactory = exports.RulesApiFp = exports.RulesApiAxiosParamCreator = exports.PurgeApi = exports.PurgeApiFactory = exports.PurgeApiFp = exports.PurgeApiAxiosParamCreator = exports.ProjectsApi = exports.ProjectsApiFactory = exports.ProjectsApiFp = exports.ProjectsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.KVApi = exports.KVApiFactory = exports.KVApiFp = exports.KVApiAxiosParamCreator = exports.HeadersApi = exports.HeadersApiFactory = exports.HeadersApiFp = exports.HeadersApiAxiosParamCreator = exports.SyncToEnvironmentTypeEnum = exports.ListSyncOperationsTypeEnum = exports.EnvironmentsApi = exports.EnvironmentsApiFactory = exports.EnvironmentsApiFp = exports.EnvironmentsApiAxiosParamCreator = exports.DomainsApi = exports.DomainsApiFactory = exports.DomainsApiFp = exports.DomainsApiAxiosParamCreator = exports.CronApi = exports.CronApiFactory = exports.CronApiFp = exports.CronApiAxiosParamCreator = exports.CrawlersApi = exports.CrawlersApiFactory = exports.CrawlersApiFp = exports.CrawlersApiAxiosParamCreator = void 0;
28
- exports.VolumesApi = exports.VolumesApiFactory = exports.VolumesApiFp = exports.VolumesApiAxiosParamCreator = exports.VariablesApi = exports.VariablesApiFactory = exports.VariablesApiFp = exports.VariablesApiAxiosParamCreator = void 0;
25
+ exports.WafConfigThresholdsInnerModeEnum = exports.WafConfigThresholdsInnerTypeEnum = exports.WafConfigModeEnum = exports.V2RuleProxyActionNotifyEnum = exports.V1TransitionStateEnum = exports.UpdateTaskRequestStatusEnum = exports.UpdateAISessionRequestNewMessagesInnerRoleEnum = exports.UpdateAISessionRequestStatusEnum = exports.SpotConfigurationStrategyEnum = exports.ScalingPolicyMetricEnum = exports.QueryVectorCollectionRequestSortOrderEnum = exports.QueryVectorCollectionRequestSortByEnum = exports.QueryVectorCollection200ResponsePaginationSortOrderEnum = exports.QueryVectorCollection200ResponsePaginationSortByEnum = exports.QueryVectorCollection200ResponseSearchModeEnum = exports.PatchEnvironmentComposeRequestSpotConfigurationStrategyEnum = exports.ListTasks200ResponseTasksInnerStatusEnum = exports.ImageGenerationRequestTextToImageParamsControlModeEnum = exports.ImageGenerationRequestTextToImageParamsStyleEnum = exports.ImageGenerationRequestOutPaintingParamsOutPaintingModeEnum = exports.ImageGenerationRequestImageGenerationConfigQualityEnum = exports.ImageGenerationRequestRegionEnum = exports.ImageGenerationRequestTaskTypeEnum = exports.GetTask200ResponseStatusEnum = exports.GetDurableExecutionStatus200ResponseStatusEnum = exports.GetAIOrchestrationStatus200ResponseToolsInnerStatusEnum = exports.GetAIOrchestrationStatus200ResponseStatusEnum = exports.EnvironmentSummaryDeploymentStatusEnum = exports.EnvironmentResponseDeploymentStatusEnum = exports.EmbeddingsRequestDimensionsEnum = exports.CronRunStatusEnum = exports.CronRunRunTypeEnum = exports.CreateTaskRequestStatusEnum = exports.CreateApplicationRequestDatabaseEngineEnum = exports.CreateAISessionRequestInitialMessagesInnerRoleEnum = exports.CreateAISession201ResponseStatusEnum = exports.ContainerImageReferenceTypeEnum = exports.ContainerDependsOnInnerConditionEnum = exports.ChatWithAIAgent202ResponseStatusEnum = exports.ChatInferenceStreamRequestMessagesInnerRoleEnum = exports.ChatInferenceRequestResponseFormatTypeEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentFormatEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoFormatEnum = exports.ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageFormatEnum = exports.ChatInferenceRequestMessagesInnerRoleEnum = exports.ChatInference202ResponseStatusEnum = exports.ChatInference200ResponseResponseRoleEnum = exports.ChatInference200ResponseFinishReasonEnum = exports.ApplicationImageReferenceTypeEnum = exports.ApplicationDatabaseRdsInstanceEngineEnum = void 0;
26
+ exports.BackupManagementApiFactory = exports.BackupManagementApiFp = exports.BackupManagementApiAxiosParamCreator = exports.ApplicationsApi = exports.ApplicationsApiFactory = exports.ApplicationsApiFp = exports.ApplicationsApiAxiosParamCreator = exports.AIVectorDatabaseApi = exports.AIVectorDatabaseApiFactory = exports.AIVectorDatabaseApiFp = exports.AIVectorDatabaseApiAxiosParamCreator = exports.ListAIToolExecutionsStatusEnum = exports.AIToolsApi = exports.AIToolsApiFactory = exports.AIToolsApiFp = exports.AIToolsApiAxiosParamCreator = exports.ListTasksStatusEnum = exports.AITaskManagementApi = exports.AITaskManagementApiFactory = exports.AITaskManagementApiFp = exports.AITaskManagementApiAxiosParamCreator = exports.AISessionsApi = exports.AISessionsApiFactory = exports.AISessionsApiFp = exports.AISessionsApiAxiosParamCreator = exports.AIMonitoringApi = exports.AIMonitoringApiFactory = exports.AIMonitoringApiFp = exports.AIMonitoringApiAxiosParamCreator = exports.ListAIModelsFeatureEnum = exports.AIModelsApi = exports.AIModelsApiFactory = exports.AIModelsApiFp = exports.AIModelsApiAxiosParamCreator = exports.AIInferenceApi = exports.AIInferenceApiFactory = exports.AIInferenceApiFp = exports.AIInferenceApiAxiosParamCreator = exports.AIFileStorageApi = exports.AIFileStorageApiFactory = exports.AIFileStorageApiFp = exports.AIFileStorageApiAxiosParamCreator = exports.AICustomToolsApi = exports.AICustomToolsApiFactory = exports.AICustomToolsApiFp = exports.AICustomToolsApiAxiosParamCreator = exports.AIAgentsApi = exports.AIAgentsApiFactory = exports.AIAgentsApiFp = exports.AIAgentsApiAxiosParamCreator = void 0;
27
+ exports.OrchestrationApiAxiosParamCreator = exports.KVApi = exports.KVApiFactory = exports.KVApiFp = exports.KVApiAxiosParamCreator = exports.HeadersApi = exports.HeadersApiFactory = exports.HeadersApiFp = exports.HeadersApiAxiosParamCreator = exports.SyncToEnvironmentTypeEnum = exports.ListSyncOperationsTypeEnum = exports.EnvironmentsApi = exports.EnvironmentsApiFactory = exports.EnvironmentsApiFp = exports.EnvironmentsApiAxiosParamCreator = exports.DomainsApi = exports.DomainsApiFactory = exports.DomainsApiFp = exports.DomainsApiAxiosParamCreator = exports.CronApi = exports.CronApiFactory = exports.CronApiFp = exports.CronApiAxiosParamCreator = exports.CrawlersApi = exports.CrawlersApiFactory = exports.CrawlersApiFp = exports.CrawlersApiAxiosParamCreator = exports.CrawlerSchedulesApi = exports.CrawlerSchedulesApiFactory = exports.CrawlerSchedulesApiFp = exports.CrawlerSchedulesApiAxiosParamCreator = exports.ContainersApi = exports.ContainersApiFactory = exports.ContainersApiFp = exports.ContainersApiAxiosParamCreator = exports.ComposeApi = exports.ComposeApiFactory = exports.ComposeApiFp = exports.ComposeApiAxiosParamCreator = exports.CommandsApi = exports.CommandsApiFactory = exports.CommandsApiFp = exports.CommandsApiAxiosParamCreator = exports.ListBackupsStatusEnum = exports.ListBackupsOrderEnum = exports.ListBackupsTypeEnum = exports.DownloadBackupTypeEnum = exports.DeleteBackupTypeEnum = exports.CreateBackupTypeEnum = exports.BackupManagementApi = void 0;
28
+ exports.VolumesApi = exports.VolumesApiFactory = exports.VolumesApiFp = exports.VolumesApiAxiosParamCreator = exports.VariablesApi = exports.VariablesApiFactory = exports.VariablesApiFp = exports.VariablesApiAxiosParamCreator = exports.ScalingPolicyApi = exports.ScalingPolicyApiFactory = exports.ScalingPolicyApiFp = exports.ScalingPolicyApiAxiosParamCreator = exports.SSHAccessApi = exports.SSHAccessApiFactory = exports.SSHAccessApiFp = exports.SSHAccessApiAxiosParamCreator = exports.RulesApi = exports.RulesApiFactory = exports.RulesApiFp = exports.RulesApiAxiosParamCreator = exports.PurgeApi = exports.PurgeApiFactory = exports.PurgeApiFp = exports.PurgeApiAxiosParamCreator = exports.ProjectsApi = exports.ProjectsApiFactory = exports.ProjectsApiFp = exports.ProjectsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrchestrationApi = exports.OrchestrationApiFactory = exports.OrchestrationApiFp = void 0;
29
29
  const axios_1 = require("axios");
30
30
  // Some imports not used depending on template conditions
31
31
  // @ts-ignore
@@ -49,6 +49,9 @@ exports.ChatInference200ResponseFinishReasonEnum = {
49
49
  exports.ChatInference200ResponseResponseRoleEnum = {
50
50
  Assistant: 'assistant'
51
51
  };
52
+ exports.ChatInference202ResponseStatusEnum = {
53
+ Queued: 'queued'
54
+ };
52
55
  exports.ChatInferenceRequestMessagesInnerRoleEnum = {
53
56
  User: 'user',
54
57
  Assistant: 'assistant',
@@ -80,6 +83,9 @@ exports.ChatInferenceStreamRequestMessagesInnerRoleEnum = {
80
83
  Assistant: 'assistant',
81
84
  System: 'system'
82
85
  };
86
+ exports.ChatWithAIAgent202ResponseStatusEnum = {
87
+ Queued: 'queued'
88
+ };
83
89
  exports.ContainerDependsOnInnerConditionEnum = {
84
90
  Start: 'START',
85
91
  Healthy: 'HEALTHY',
@@ -102,6 +108,14 @@ exports.CreateApplicationRequestDatabaseEngineEnum = {
102
108
  Mysql: 'mysql',
103
109
  Postgres: 'postgres'
104
110
  };
111
+ exports.CreateTaskRequestStatusEnum = {
112
+ Pending: 'pending',
113
+ InProgress: 'in_progress',
114
+ Completed: 'completed',
115
+ Failed: 'failed',
116
+ Cancelled: 'cancelled',
117
+ Blocked: 'blocked'
118
+ };
105
119
  exports.CronRunRunTypeEnum = {
106
120
  Exec: 'EXEC',
107
121
  Cron: 'CRON'
@@ -130,6 +144,34 @@ exports.EnvironmentSummaryDeploymentStatusEnum = {
130
144
  InProgress: 'IN_PROGRESS',
131
145
  Failed: 'FAILED'
132
146
  };
147
+ exports.GetAIOrchestrationStatus200ResponseStatusEnum = {
148
+ Pending: 'pending',
149
+ Polling: 'polling',
150
+ Synthesizing: 'synthesizing',
151
+ Complete: 'complete',
152
+ Failed: 'failed'
153
+ };
154
+ exports.GetAIOrchestrationStatus200ResponseToolsInnerStatusEnum = {
155
+ Pending: 'pending',
156
+ Running: 'running',
157
+ Complete: 'complete',
158
+ Failed: 'failed'
159
+ };
160
+ exports.GetDurableExecutionStatus200ResponseStatusEnum = {
161
+ Pending: 'pending',
162
+ Running: 'running',
163
+ WaitingCallback: 'waiting_callback',
164
+ Complete: 'complete',
165
+ Failed: 'failed'
166
+ };
167
+ exports.GetTask200ResponseStatusEnum = {
168
+ Pending: 'pending',
169
+ InProgress: 'in_progress',
170
+ Completed: 'completed',
171
+ Failed: 'failed',
172
+ Cancelled: 'cancelled',
173
+ Blocked: 'blocked'
174
+ };
133
175
  exports.ImageGenerationRequestTaskTypeEnum = {
134
176
  TextImage: 'TEXT_IMAGE',
135
177
  ColorGuidedGeneration: 'COLOR_GUIDED_GENERATION',
@@ -166,12 +208,41 @@ exports.ImageGenerationRequestTextToImageParamsControlModeEnum = {
166
208
  CannyEdge: 'CANNY_EDGE',
167
209
  Segmentation: 'SEGMENTATION'
168
210
  };
211
+ exports.ListTasks200ResponseTasksInnerStatusEnum = {
212
+ Pending: 'pending',
213
+ InProgress: 'in_progress',
214
+ Completed: 'completed',
215
+ Failed: 'failed',
216
+ Cancelled: 'cancelled',
217
+ Blocked: 'blocked'
218
+ };
169
219
  exports.PatchEnvironmentComposeRequestSpotConfigurationStrategyEnum = {
170
220
  Off: 'off',
171
221
  SpotOnly: 'spot-only',
172
222
  MixedSafe: 'mixed-safe',
173
223
  MixedAggressive: 'mixed-aggressive'
174
224
  };
225
+ exports.QueryVectorCollection200ResponseSearchModeEnum = {
226
+ Text: 'text',
227
+ Vector: 'vector',
228
+ Metadata: 'metadata'
229
+ };
230
+ exports.QueryVectorCollection200ResponsePaginationSortByEnum = {
231
+ CreatedAt: 'created_at',
232
+ DocumentId: 'document_id'
233
+ };
234
+ exports.QueryVectorCollection200ResponsePaginationSortOrderEnum = {
235
+ Asc: 'asc',
236
+ Desc: 'desc'
237
+ };
238
+ exports.QueryVectorCollectionRequestSortByEnum = {
239
+ CreatedAt: 'created_at',
240
+ DocumentId: 'document_id'
241
+ };
242
+ exports.QueryVectorCollectionRequestSortOrderEnum = {
243
+ Asc: 'asc',
244
+ Desc: 'desc'
245
+ };
175
246
  exports.ScalingPolicyMetricEnum = {
176
247
  CpuUtilization: 'CPUUtilization',
177
248
  MemoryUtilization: 'MemoryUtilization',
@@ -191,6 +262,14 @@ exports.UpdateAISessionRequestNewMessagesInnerRoleEnum = {
191
262
  User: 'user',
192
263
  Assistant: 'assistant'
193
264
  };
265
+ exports.UpdateTaskRequestStatusEnum = {
266
+ Pending: 'pending',
267
+ InProgress: 'in_progress',
268
+ Completed: 'completed',
269
+ Failed: 'failed',
270
+ Cancelled: 'cancelled',
271
+ Blocked: 'blocked'
272
+ };
194
273
  exports.V1TransitionStateEnum = {
195
274
  Published: 'published',
196
275
  Unpublished: 'unpublished'
@@ -220,7 +299,7 @@ exports.WafConfigThresholdsInnerModeEnum = {
220
299
  const AIAgentsApiAxiosParamCreator = function (configuration) {
221
300
  return {
222
301
  /**
223
- * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed (no client confirmation) * - Temperature and model from agent config * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Use `/sessions/{sessionId}` to retrieve full conversation history
302
+ * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed on cloud (no client confirmation needed) * - Temperature and model from agent config * - Supports sync, streaming, and async modes * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion * - **Streaming Mode**: Set `stream: true` for SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running agent tasks * - All tools are auto-executed on cloud (no `waiting_callback` state) * - Poll `/ai/chat/executions/{requestId}` for status * - Ideal for agents with slow tools (image generation, web search, etc.) * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Sessions work in all modes (sync, streaming, async) * - Use `/sessions/{sessionId}` to retrieve full conversation history
224
303
  * @summary Chat with AI Agent
225
304
  * @param {string} organisation The organisation ID
226
305
  * @param {string} agentId The agent ID
@@ -457,7 +536,7 @@ const AIAgentsApiFp = function (configuration) {
457
536
  const localVarAxiosParamCreator = (0, exports.AIAgentsApiAxiosParamCreator)(configuration);
458
537
  return {
459
538
  /**
460
- * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed (no client confirmation) * - Temperature and model from agent config * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Use `/sessions/{sessionId}` to retrieve full conversation history
539
+ * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed on cloud (no client confirmation needed) * - Temperature and model from agent config * - Supports sync, streaming, and async modes * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion * - **Streaming Mode**: Set `stream: true` for SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running agent tasks * - All tools are auto-executed on cloud (no `waiting_callback` state) * - Poll `/ai/chat/executions/{requestId}` for status * - Ideal for agents with slow tools (image generation, web search, etc.) * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Sessions work in all modes (sync, streaming, async) * - Use `/sessions/{sessionId}` to retrieve full conversation history
461
540
  * @summary Chat with AI Agent
462
541
  * @param {string} organisation The organisation ID
463
542
  * @param {string} agentId The agent ID
@@ -571,7 +650,7 @@ const AIAgentsApiFactory = function (configuration, basePath, axios) {
571
650
  const localVarFp = (0, exports.AIAgentsApiFp)(configuration);
572
651
  return {
573
652
  /**
574
- * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed (no client confirmation) * - Temperature and model from agent config * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Use `/sessions/{sessionId}` to retrieve full conversation history
653
+ * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed on cloud (no client confirmation needed) * - Temperature and model from agent config * - Supports sync, streaming, and async modes * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion * - **Streaming Mode**: Set `stream: true` for SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running agent tasks * - All tools are auto-executed on cloud (no `waiting_callback` state) * - Poll `/ai/chat/executions/{requestId}` for status * - Ideal for agents with slow tools (image generation, web search, etc.) * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Sessions work in all modes (sync, streaming, async) * - Use `/sessions/{sessionId}` to retrieve full conversation history
575
654
  * @summary Chat with AI Agent
576
655
  * @param {string} organisation The organisation ID
577
656
  * @param {string} agentId The agent ID
@@ -649,7 +728,7 @@ exports.AIAgentsApiFactory = AIAgentsApiFactory;
649
728
  */
650
729
  class AIAgentsApi extends base_1.BaseAPI {
651
730
  /**
652
- * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed (no client confirmation) * - Temperature and model from agent config * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Use `/sessions/{sessionId}` to retrieve full conversation history
731
+ * Initiates a chat session with a specific AI agent. The agent\'s configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * **Key Features:** * - **Session Management**: Automatic session creation and state tracking * - **Multi-turn Conversations**: Full conversation history maintained server-side * - Agent\'s system prompt is prepended to conversation * - Only agent\'s allowed tools are available * - All tools are auto-executed on cloud (no client confirmation needed) * - Temperature and model from agent config * - Supports sync, streaming, and async modes * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion * - **Streaming Mode**: Set `stream: true` for SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running agent tasks * - All tools are auto-executed on cloud (no `waiting_callback` state) * - Poll `/ai/chat/executions/{requestId}` for status * - Ideal for agents with slow tools (image generation, web search, etc.) * * **Session Support:** * - Omit `sessionId` to create a new session automatically * - Include `sessionId` to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Sessions work in all modes (sync, streaming, async) * - Use `/sessions/{sessionId}` to retrieve full conversation history
653
732
  * @summary Chat with AI Agent
654
733
  * @param {string} organisation The organisation ID
655
734
  * @param {string} agentId The agent ID
@@ -985,99 +1064,97 @@ class AICustomToolsApi extends base_1.BaseAPI {
985
1064
  }
986
1065
  exports.AICustomToolsApi = AICustomToolsApi;
987
1066
  /**
988
- * AIInferenceApi - axios parameter creator
1067
+ * AIFileStorageApi - axios parameter creator
989
1068
  * @export
990
1069
  */
991
- const AIInferenceApiAxiosParamCreator = function (configuration) {
1070
+ const AIFileStorageApiAxiosParamCreator = function (configuration) {
992
1071
  return {
993
1072
  /**
994
- * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
995
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1073
+ * Deletes a file from S3 storage.
1074
+ * @summary Delete File
996
1075
  * @param {string} organisation The organisation ID
997
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1076
+ * @param {string} fileId The file ID
998
1077
  * @param {*} [options] Override http request option.
999
1078
  * @throws {RequiredError}
1000
1079
  */
1001
- chatInference: (organisation_1, chatInferenceRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceRequest_1, ...args_1], void 0, function* (organisation, chatInferenceRequest, options = {}) {
1080
+ deleteFile: (organisation_1, fileId_1, ...args_1) => __awaiter(this, [organisation_1, fileId_1, ...args_1], void 0, function* (organisation, fileId, options = {}) {
1002
1081
  // verify required parameter 'organisation' is not null or undefined
1003
- (0, common_1.assertParamExists)('chatInference', 'organisation', organisation);
1004
- // verify required parameter 'chatInferenceRequest' is not null or undefined
1005
- (0, common_1.assertParamExists)('chatInference', 'chatInferenceRequest', chatInferenceRequest);
1006
- const localVarPath = `/api/v3/organizations/{organisation}/ai/chat`
1007
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1082
+ (0, common_1.assertParamExists)('deleteFile', 'organisation', organisation);
1083
+ // verify required parameter 'fileId' is not null or undefined
1084
+ (0, common_1.assertParamExists)('deleteFile', 'fileId', fileId);
1085
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files/{fileId}`
1086
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1087
+ .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
1008
1088
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1009
1089
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1010
1090
  let baseOptions;
1011
1091
  if (configuration) {
1012
1092
  baseOptions = configuration.baseOptions;
1013
1093
  }
1014
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1094
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1015
1095
  const localVarHeaderParameter = {};
1016
1096
  const localVarQueryParameter = {};
1017
1097
  // authentication BearerAuth required
1018
1098
  // http bearer authentication required
1019
1099
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1020
- localVarHeaderParameter['Content-Type'] = 'application/json';
1021
1100
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1022
1101
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1023
1102
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1024
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatInferenceRequest, localVarRequestOptions, configuration);
1025
1103
  return {
1026
1104
  url: (0, common_1.toPathString)(localVarUrlObj),
1027
1105
  options: localVarRequestOptions,
1028
1106
  };
1029
1107
  }),
1030
1108
  /**
1031
- * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1032
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1109
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1110
+ * @summary Get File
1033
1111
  * @param {string} organisation The organisation ID
1034
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1112
+ * @param {string} fileId The file ID
1035
1113
  * @param {*} [options] Override http request option.
1036
1114
  * @throws {RequiredError}
1037
1115
  */
1038
- chatInferenceStream: (organisation_1, chatInferenceStreamRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceStreamRequest_1, ...args_1], void 0, function* (organisation, chatInferenceStreamRequest, options = {}) {
1116
+ getFile: (organisation_1, fileId_1, ...args_1) => __awaiter(this, [organisation_1, fileId_1, ...args_1], void 0, function* (organisation, fileId, options = {}) {
1039
1117
  // verify required parameter 'organisation' is not null or undefined
1040
- (0, common_1.assertParamExists)('chatInferenceStream', 'organisation', organisation);
1041
- // verify required parameter 'chatInferenceStreamRequest' is not null or undefined
1042
- (0, common_1.assertParamExists)('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest);
1043
- const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream`
1044
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1118
+ (0, common_1.assertParamExists)('getFile', 'organisation', organisation);
1119
+ // verify required parameter 'fileId' is not null or undefined
1120
+ (0, common_1.assertParamExists)('getFile', 'fileId', fileId);
1121
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files/{fileId}`
1122
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1123
+ .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
1045
1124
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1046
1125
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1047
1126
  let baseOptions;
1048
1127
  if (configuration) {
1049
1128
  baseOptions = configuration.baseOptions;
1050
1129
  }
1051
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1130
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1052
1131
  const localVarHeaderParameter = {};
1053
1132
  const localVarQueryParameter = {};
1054
1133
  // authentication BearerAuth required
1055
1134
  // http bearer authentication required
1056
1135
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1057
- localVarHeaderParameter['Content-Type'] = 'application/json';
1058
1136
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1059
1137
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1060
1138
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1061
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatInferenceStreamRequest, localVarRequestOptions, configuration);
1062
1139
  return {
1063
1140
  url: (0, common_1.toPathString)(localVarUrlObj),
1064
1141
  options: localVarRequestOptions,
1065
1142
  };
1066
1143
  }),
1067
1144
  /**
1068
- * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1069
- * @summary Generate text embeddings for semantic search and RAG applications
1145
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1146
+ * @summary List Files
1070
1147
  * @param {string} organisation The organisation ID
1071
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1148
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1149
+ * @param {number} [limit] Maximum files to return
1150
+ * @param {string} [cursor] Pagination cursor from previous response
1072
1151
  * @param {*} [options] Override http request option.
1073
1152
  * @throws {RequiredError}
1074
1153
  */
1075
- embeddings: (organisation_1, embeddingsRequest_1, ...args_1) => __awaiter(this, [organisation_1, embeddingsRequest_1, ...args_1], void 0, function* (organisation, embeddingsRequest, options = {}) {
1154
+ listFiles: (organisation_1, filter_1, limit_1, cursor_1, ...args_1) => __awaiter(this, [organisation_1, filter_1, limit_1, cursor_1, ...args_1], void 0, function* (organisation, filter, limit, cursor, options = {}) {
1076
1155
  // verify required parameter 'organisation' is not null or undefined
1077
- (0, common_1.assertParamExists)('embeddings', 'organisation', organisation);
1078
- // verify required parameter 'embeddingsRequest' is not null or undefined
1079
- (0, common_1.assertParamExists)('embeddings', 'embeddingsRequest', embeddingsRequest);
1080
- const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings`
1156
+ (0, common_1.assertParamExists)('listFiles', 'organisation', organisation);
1157
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files`
1081
1158
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1082
1159
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1083
1160
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1085,36 +1162,43 @@ const AIInferenceApiAxiosParamCreator = function (configuration) {
1085
1162
  if (configuration) {
1086
1163
  baseOptions = configuration.baseOptions;
1087
1164
  }
1088
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1165
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1089
1166
  const localVarHeaderParameter = {};
1090
1167
  const localVarQueryParameter = {};
1091
1168
  // authentication BearerAuth required
1092
1169
  // http bearer authentication required
1093
1170
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1094
- localVarHeaderParameter['Content-Type'] = 'application/json';
1171
+ if (filter !== undefined) {
1172
+ localVarQueryParameter['filter'] = filter;
1173
+ }
1174
+ if (limit !== undefined) {
1175
+ localVarQueryParameter['limit'] = limit;
1176
+ }
1177
+ if (cursor !== undefined) {
1178
+ localVarQueryParameter['cursor'] = cursor;
1179
+ }
1095
1180
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1096
1181
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1097
1182
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1098
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(embeddingsRequest, localVarRequestOptions, configuration);
1099
1183
  return {
1100
1184
  url: (0, common_1.toPathString)(localVarUrlObj),
1101
1185
  options: localVarRequestOptions,
1102
1186
  };
1103
1187
  }),
1104
1188
  /**
1105
- * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1106
- * @summary Generate images with Amazon Nova Canvas
1189
+ * Uploads a file to S3 storage for later retrieval. * * **Two Upload Modes:** * * 1. **Direct Upload (≤7MB):** Send base64-encoded content in request body. * * 2. **Presigned URL Upload (any size):** Set `requestUploadUrl: true` to get a presigned S3 PUT URL, then upload directly to S3. * * **Supported Content Types:** * - Images: image/png, image/jpeg, image/gif, image/webp, image/svg+xml * - Documents: application/pdf, text/plain, text/markdown, text/html * - Code: text/javascript, application/json, text/css, text/yaml * - Archives: application/zip, application/gzip * - Video: video/mp4, video/webm (use presigned URL for large files) * * **Metadata:** * Attach any custom metadata for filtering. `artifactType` is auto-populated from contentType if not provided.
1190
+ * @summary Upload File to S3
1107
1191
  * @param {string} organisation The organisation ID
1108
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1192
+ * @param {UploadFileRequest} uploadFileRequest
1109
1193
  * @param {*} [options] Override http request option.
1110
1194
  * @throws {RequiredError}
1111
1195
  */
1112
- imageGeneration: (organisation_1, imageGenerationRequest_1, ...args_1) => __awaiter(this, [organisation_1, imageGenerationRequest_1, ...args_1], void 0, function* (organisation, imageGenerationRequest, options = {}) {
1196
+ uploadFile: (organisation_1, uploadFileRequest_1, ...args_1) => __awaiter(this, [organisation_1, uploadFileRequest_1, ...args_1], void 0, function* (organisation, uploadFileRequest, options = {}) {
1113
1197
  // verify required parameter 'organisation' is not null or undefined
1114
- (0, common_1.assertParamExists)('imageGeneration', 'organisation', organisation);
1115
- // verify required parameter 'imageGenerationRequest' is not null or undefined
1116
- (0, common_1.assertParamExists)('imageGeneration', 'imageGenerationRequest', imageGenerationRequest);
1117
- const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation`
1198
+ (0, common_1.assertParamExists)('uploadFile', 'organisation', organisation);
1199
+ // verify required parameter 'uploadFileRequest' is not null or undefined
1200
+ (0, common_1.assertParamExists)('uploadFile', 'uploadFileRequest', uploadFileRequest);
1201
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files`
1118
1202
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1119
1203
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1120
1204
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1132,7 +1216,7 @@ const AIInferenceApiAxiosParamCreator = function (configuration) {
1132
1216
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1133
1217
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1134
1218
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1135
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(imageGenerationRequest, localVarRequestOptions, configuration);
1219
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadFileRequest, localVarRequestOptions, configuration);
1136
1220
  return {
1137
1221
  url: (0, common_1.toPathString)(localVarUrlObj),
1138
1222
  options: localVarRequestOptions,
@@ -1140,250 +1224,259 @@ const AIInferenceApiAxiosParamCreator = function (configuration) {
1140
1224
  }),
1141
1225
  };
1142
1226
  };
1143
- exports.AIInferenceApiAxiosParamCreator = AIInferenceApiAxiosParamCreator;
1227
+ exports.AIFileStorageApiAxiosParamCreator = AIFileStorageApiAxiosParamCreator;
1144
1228
  /**
1145
- * AIInferenceApi - functional programming interface
1229
+ * AIFileStorageApi - functional programming interface
1146
1230
  * @export
1147
1231
  */
1148
- const AIInferenceApiFp = function (configuration) {
1149
- const localVarAxiosParamCreator = (0, exports.AIInferenceApiAxiosParamCreator)(configuration);
1232
+ const AIFileStorageApiFp = function (configuration) {
1233
+ const localVarAxiosParamCreator = (0, exports.AIFileStorageApiAxiosParamCreator)(configuration);
1150
1234
  return {
1151
1235
  /**
1152
- * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1153
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1236
+ * Deletes a file from S3 storage.
1237
+ * @summary Delete File
1154
1238
  * @param {string} organisation The organisation ID
1155
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1239
+ * @param {string} fileId The file ID
1156
1240
  * @param {*} [options] Override http request option.
1157
1241
  * @throws {RequiredError}
1158
1242
  */
1159
- chatInference(organisation, chatInferenceRequest, options) {
1243
+ deleteFile(organisation, fileId, options) {
1160
1244
  return __awaiter(this, void 0, void 0, function* () {
1161
1245
  var _a, _b, _c;
1162
- const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options);
1246
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFile(organisation, fileId, options);
1163
1247
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1164
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.chatInference']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1248
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIFileStorageApi.deleteFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1165
1249
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1166
1250
  });
1167
1251
  },
1168
1252
  /**
1169
- * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1170
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1253
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1254
+ * @summary Get File
1171
1255
  * @param {string} organisation The organisation ID
1172
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1256
+ * @param {string} fileId The file ID
1173
1257
  * @param {*} [options] Override http request option.
1174
1258
  * @throws {RequiredError}
1175
1259
  */
1176
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1260
+ getFile(organisation, fileId, options) {
1177
1261
  return __awaiter(this, void 0, void 0, function* () {
1178
1262
  var _a, _b, _c;
1179
- const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options);
1263
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFile(organisation, fileId, options);
1180
1264
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1181
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.chatInferenceStream']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1265
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIFileStorageApi.getFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1182
1266
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1183
1267
  });
1184
1268
  },
1185
1269
  /**
1186
- * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1187
- * @summary Generate text embeddings for semantic search and RAG applications
1270
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1271
+ * @summary List Files
1188
1272
  * @param {string} organisation The organisation ID
1189
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1273
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1274
+ * @param {number} [limit] Maximum files to return
1275
+ * @param {string} [cursor] Pagination cursor from previous response
1190
1276
  * @param {*} [options] Override http request option.
1191
1277
  * @throws {RequiredError}
1192
1278
  */
1193
- embeddings(organisation, embeddingsRequest, options) {
1279
+ listFiles(organisation, filter, limit, cursor, options) {
1194
1280
  return __awaiter(this, void 0, void 0, function* () {
1195
1281
  var _a, _b, _c;
1196
- const localVarAxiosArgs = yield localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options);
1282
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFiles(organisation, filter, limit, cursor, options);
1197
1283
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1198
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.embeddings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1284
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIFileStorageApi.listFiles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1199
1285
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1200
1286
  });
1201
1287
  },
1202
1288
  /**
1203
- * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1204
- * @summary Generate images with Amazon Nova Canvas
1289
+ * Uploads a file to S3 storage for later retrieval. * * **Two Upload Modes:** * * 1. **Direct Upload (≤7MB):** Send base64-encoded content in request body. * * 2. **Presigned URL Upload (any size):** Set `requestUploadUrl: true` to get a presigned S3 PUT URL, then upload directly to S3. * * **Supported Content Types:** * - Images: image/png, image/jpeg, image/gif, image/webp, image/svg+xml * - Documents: application/pdf, text/plain, text/markdown, text/html * - Code: text/javascript, application/json, text/css, text/yaml * - Archives: application/zip, application/gzip * - Video: video/mp4, video/webm (use presigned URL for large files) * * **Metadata:** * Attach any custom metadata for filtering. `artifactType` is auto-populated from contentType if not provided.
1290
+ * @summary Upload File to S3
1205
1291
  * @param {string} organisation The organisation ID
1206
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1292
+ * @param {UploadFileRequest} uploadFileRequest
1207
1293
  * @param {*} [options] Override http request option.
1208
1294
  * @throws {RequiredError}
1209
1295
  */
1210
- imageGeneration(organisation, imageGenerationRequest, options) {
1296
+ uploadFile(organisation, uploadFileRequest, options) {
1211
1297
  return __awaiter(this, void 0, void 0, function* () {
1212
1298
  var _a, _b, _c;
1213
- const localVarAxiosArgs = yield localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options);
1299
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadFile(organisation, uploadFileRequest, options);
1214
1300
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1215
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.imageGeneration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1301
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIFileStorageApi.uploadFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1216
1302
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1217
1303
  });
1218
1304
  },
1219
1305
  };
1220
1306
  };
1221
- exports.AIInferenceApiFp = AIInferenceApiFp;
1307
+ exports.AIFileStorageApiFp = AIFileStorageApiFp;
1222
1308
  /**
1223
- * AIInferenceApi - factory interface
1309
+ * AIFileStorageApi - factory interface
1224
1310
  * @export
1225
1311
  */
1226
- const AIInferenceApiFactory = function (configuration, basePath, axios) {
1227
- const localVarFp = (0, exports.AIInferenceApiFp)(configuration);
1312
+ const AIFileStorageApiFactory = function (configuration, basePath, axios) {
1313
+ const localVarFp = (0, exports.AIFileStorageApiFp)(configuration);
1228
1314
  return {
1229
1315
  /**
1230
- * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1231
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1316
+ * Deletes a file from S3 storage.
1317
+ * @summary Delete File
1232
1318
  * @param {string} organisation The organisation ID
1233
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1319
+ * @param {string} fileId The file ID
1234
1320
  * @param {*} [options] Override http request option.
1235
1321
  * @throws {RequiredError}
1236
1322
  */
1237
- chatInference(organisation, chatInferenceRequest, options) {
1238
- return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath));
1323
+ deleteFile(organisation, fileId, options) {
1324
+ return localVarFp.deleteFile(organisation, fileId, options).then((request) => request(axios, basePath));
1239
1325
  },
1240
1326
  /**
1241
- * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1242
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1327
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1328
+ * @summary Get File
1243
1329
  * @param {string} organisation The organisation ID
1244
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1330
+ * @param {string} fileId The file ID
1245
1331
  * @param {*} [options] Override http request option.
1246
1332
  * @throws {RequiredError}
1247
1333
  */
1248
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1249
- return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath));
1334
+ getFile(organisation, fileId, options) {
1335
+ return localVarFp.getFile(organisation, fileId, options).then((request) => request(axios, basePath));
1250
1336
  },
1251
1337
  /**
1252
- * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1253
- * @summary Generate text embeddings for semantic search and RAG applications
1338
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1339
+ * @summary List Files
1254
1340
  * @param {string} organisation The organisation ID
1255
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1341
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1342
+ * @param {number} [limit] Maximum files to return
1343
+ * @param {string} [cursor] Pagination cursor from previous response
1256
1344
  * @param {*} [options] Override http request option.
1257
1345
  * @throws {RequiredError}
1258
1346
  */
1259
- embeddings(organisation, embeddingsRequest, options) {
1260
- return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath));
1347
+ listFiles(organisation, filter, limit, cursor, options) {
1348
+ return localVarFp.listFiles(organisation, filter, limit, cursor, options).then((request) => request(axios, basePath));
1261
1349
  },
1262
1350
  /**
1263
- * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1264
- * @summary Generate images with Amazon Nova Canvas
1351
+ * Uploads a file to S3 storage for later retrieval. * * **Two Upload Modes:** * * 1. **Direct Upload (≤7MB):** Send base64-encoded content in request body. * * 2. **Presigned URL Upload (any size):** Set `requestUploadUrl: true` to get a presigned S3 PUT URL, then upload directly to S3. * * **Supported Content Types:** * - Images: image/png, image/jpeg, image/gif, image/webp, image/svg+xml * - Documents: application/pdf, text/plain, text/markdown, text/html * - Code: text/javascript, application/json, text/css, text/yaml * - Archives: application/zip, application/gzip * - Video: video/mp4, video/webm (use presigned URL for large files) * * **Metadata:** * Attach any custom metadata for filtering. `artifactType` is auto-populated from contentType if not provided.
1352
+ * @summary Upload File to S3
1265
1353
  * @param {string} organisation The organisation ID
1266
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1354
+ * @param {UploadFileRequest} uploadFileRequest
1267
1355
  * @param {*} [options] Override http request option.
1268
1356
  * @throws {RequiredError}
1269
1357
  */
1270
- imageGeneration(organisation, imageGenerationRequest, options) {
1271
- return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath));
1358
+ uploadFile(organisation, uploadFileRequest, options) {
1359
+ return localVarFp.uploadFile(organisation, uploadFileRequest, options).then((request) => request(axios, basePath));
1272
1360
  },
1273
1361
  };
1274
1362
  };
1275
- exports.AIInferenceApiFactory = AIInferenceApiFactory;
1363
+ exports.AIFileStorageApiFactory = AIFileStorageApiFactory;
1276
1364
  /**
1277
- * AIInferenceApi - object-oriented interface
1365
+ * AIFileStorageApi - object-oriented interface
1278
1366
  * @export
1279
- * @class AIInferenceApi
1367
+ * @class AIFileStorageApi
1280
1368
  * @extends {BaseAPI}
1281
1369
  */
1282
- class AIInferenceApi extends base_1.BaseAPI {
1370
+ class AIFileStorageApi extends base_1.BaseAPI {
1283
1371
  /**
1284
- * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1285
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1372
+ * Deletes a file from S3 storage.
1373
+ * @summary Delete File
1286
1374
  * @param {string} organisation The organisation ID
1287
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1375
+ * @param {string} fileId The file ID
1288
1376
  * @param {*} [options] Override http request option.
1289
1377
  * @throws {RequiredError}
1290
- * @memberof AIInferenceApi
1378
+ * @memberof AIFileStorageApi
1291
1379
  */
1292
- chatInference(organisation, chatInferenceRequest, options) {
1293
- return (0, exports.AIInferenceApiFp)(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath));
1380
+ deleteFile(organisation, fileId, options) {
1381
+ return (0, exports.AIFileStorageApiFp)(this.configuration).deleteFile(organisation, fileId, options).then((request) => request(this.axios, this.basePath));
1294
1382
  }
1295
1383
  /**
1296
- * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models:** * - Amazon Nova Lite, Micro, Pro (all support multimodal) * - Claude models (text only) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1297
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1384
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1385
+ * @summary Get File
1298
1386
  * @param {string} organisation The organisation ID
1299
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1387
+ * @param {string} fileId The file ID
1300
1388
  * @param {*} [options] Override http request option.
1301
1389
  * @throws {RequiredError}
1302
- * @memberof AIInferenceApi
1390
+ * @memberof AIFileStorageApi
1303
1391
  */
1304
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1305
- return (0, exports.AIInferenceApiFp)(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath));
1392
+ getFile(organisation, fileId, options) {
1393
+ return (0, exports.AIFileStorageApiFp)(this.configuration).getFile(organisation, fileId, options).then((request) => request(this.axios, this.basePath));
1306
1394
  }
1307
1395
  /**
1308
- * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1309
- * @summary Generate text embeddings for semantic search and RAG applications
1396
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1397
+ * @summary List Files
1310
1398
  * @param {string} organisation The organisation ID
1311
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1399
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1400
+ * @param {number} [limit] Maximum files to return
1401
+ * @param {string} [cursor] Pagination cursor from previous response
1312
1402
  * @param {*} [options] Override http request option.
1313
1403
  * @throws {RequiredError}
1314
- * @memberof AIInferenceApi
1404
+ * @memberof AIFileStorageApi
1315
1405
  */
1316
- embeddings(organisation, embeddingsRequest, options) {
1317
- return (0, exports.AIInferenceApiFp)(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath));
1406
+ listFiles(organisation, filter, limit, cursor, options) {
1407
+ return (0, exports.AIFileStorageApiFp)(this.configuration).listFiles(organisation, filter, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1318
1408
  }
1319
1409
  /**
1320
- * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1321
- * @summary Generate images with Amazon Nova Canvas
1410
+ * Uploads a file to S3 storage for later retrieval. * * **Two Upload Modes:** * * 1. **Direct Upload (≤7MB):** Send base64-encoded content in request body. * * 2. **Presigned URL Upload (any size):** Set `requestUploadUrl: true` to get a presigned S3 PUT URL, then upload directly to S3. * * **Supported Content Types:** * - Images: image/png, image/jpeg, image/gif, image/webp, image/svg+xml * - Documents: application/pdf, text/plain, text/markdown, text/html * - Code: text/javascript, application/json, text/css, text/yaml * - Archives: application/zip, application/gzip * - Video: video/mp4, video/webm (use presigned URL for large files) * * **Metadata:** * Attach any custom metadata for filtering. `artifactType` is auto-populated from contentType if not provided.
1411
+ * @summary Upload File to S3
1322
1412
  * @param {string} organisation The organisation ID
1323
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1413
+ * @param {UploadFileRequest} uploadFileRequest
1324
1414
  * @param {*} [options] Override http request option.
1325
1415
  * @throws {RequiredError}
1326
- * @memberof AIInferenceApi
1416
+ * @memberof AIFileStorageApi
1327
1417
  */
1328
- imageGeneration(organisation, imageGenerationRequest, options) {
1329
- return (0, exports.AIInferenceApiFp)(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath));
1418
+ uploadFile(organisation, uploadFileRequest, options) {
1419
+ return (0, exports.AIFileStorageApiFp)(this.configuration).uploadFile(organisation, uploadFileRequest, options).then((request) => request(this.axios, this.basePath));
1330
1420
  }
1331
1421
  }
1332
- exports.AIInferenceApi = AIInferenceApi;
1422
+ exports.AIFileStorageApi = AIFileStorageApi;
1333
1423
  /**
1334
- * AIModelsApi - axios parameter creator
1424
+ * AIInferenceApi - axios parameter creator
1335
1425
  * @export
1336
1426
  */
1337
- const AIModelsApiAxiosParamCreator = function (configuration) {
1427
+ const AIInferenceApiAxiosParamCreator = function (configuration) {
1338
1428
  return {
1339
1429
  /**
1340
- * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
1341
- * @summary Get AI Model Details
1430
+ * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1431
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1342
1432
  * @param {string} organisation The organisation ID
1343
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1433
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1344
1434
  * @param {*} [options] Override http request option.
1345
1435
  * @throws {RequiredError}
1346
1436
  */
1347
- getAIModel: (organisation_1, modelId_1, ...args_1) => __awaiter(this, [organisation_1, modelId_1, ...args_1], void 0, function* (organisation, modelId, options = {}) {
1437
+ chatInference: (organisation_1, chatInferenceRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceRequest_1, ...args_1], void 0, function* (organisation, chatInferenceRequest, options = {}) {
1348
1438
  // verify required parameter 'organisation' is not null or undefined
1349
- (0, common_1.assertParamExists)('getAIModel', 'organisation', organisation);
1350
- // verify required parameter 'modelId' is not null or undefined
1351
- (0, common_1.assertParamExists)('getAIModel', 'modelId', modelId);
1352
- const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}`
1353
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1354
- .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId)));
1439
+ (0, common_1.assertParamExists)('chatInference', 'organisation', organisation);
1440
+ // verify required parameter 'chatInferenceRequest' is not null or undefined
1441
+ (0, common_1.assertParamExists)('chatInference', 'chatInferenceRequest', chatInferenceRequest);
1442
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat`
1443
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1355
1444
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1356
1445
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1357
1446
  let baseOptions;
1358
1447
  if (configuration) {
1359
1448
  baseOptions = configuration.baseOptions;
1360
1449
  }
1361
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1450
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1362
1451
  const localVarHeaderParameter = {};
1363
1452
  const localVarQueryParameter = {};
1364
1453
  // authentication BearerAuth required
1365
1454
  // http bearer authentication required
1366
1455
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1456
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1367
1457
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1368
1458
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1369
1459
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1460
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatInferenceRequest, localVarRequestOptions, configuration);
1370
1461
  return {
1371
1462
  url: (0, common_1.toPathString)(localVarUrlObj),
1372
1463
  options: localVarRequestOptions,
1373
1464
  };
1374
1465
  }),
1375
1466
  /**
1376
- *
1377
- * @summary List available AI models for an organization
1467
+ * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1468
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1378
1469
  * @param {string} organisation The organisation ID
1379
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1470
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1380
1471
  * @param {*} [options] Override http request option.
1381
1472
  * @throws {RequiredError}
1382
1473
  */
1383
- listAIModels: (organisation_1, feature_1, ...args_1) => __awaiter(this, [organisation_1, feature_1, ...args_1], void 0, function* (organisation, feature, options = {}) {
1474
+ chatInferenceStream: (organisation_1, chatInferenceStreamRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceStreamRequest_1, ...args_1], void 0, function* (organisation, chatInferenceStreamRequest, options = {}) {
1384
1475
  // verify required parameter 'organisation' is not null or undefined
1385
- (0, common_1.assertParamExists)('listAIModels', 'organisation', organisation);
1386
- const localVarPath = `/api/v3/organizations/{organisation}/ai/models`
1476
+ (0, common_1.assertParamExists)('chatInferenceStream', 'organisation', organisation);
1477
+ // verify required parameter 'chatInferenceStreamRequest' is not null or undefined
1478
+ (0, common_1.assertParamExists)('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest);
1479
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream`
1387
1480
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1388
1481
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1389
1482
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1391,163 +1484,146 @@ const AIModelsApiAxiosParamCreator = function (configuration) {
1391
1484
  if (configuration) {
1392
1485
  baseOptions = configuration.baseOptions;
1393
1486
  }
1394
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1487
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1395
1488
  const localVarHeaderParameter = {};
1396
1489
  const localVarQueryParameter = {};
1397
1490
  // authentication BearerAuth required
1398
1491
  // http bearer authentication required
1399
1492
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1400
- if (feature !== undefined) {
1401
- localVarQueryParameter['feature'] = feature;
1402
- }
1493
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1403
1494
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1404
1495
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1405
1496
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1497
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatInferenceStreamRequest, localVarRequestOptions, configuration);
1406
1498
  return {
1407
1499
  url: (0, common_1.toPathString)(localVarUrlObj),
1408
1500
  options: localVarRequestOptions,
1409
1501
  };
1410
1502
  }),
1411
- };
1412
- };
1413
- exports.AIModelsApiAxiosParamCreator = AIModelsApiAxiosParamCreator;
1414
- /**
1415
- * AIModelsApi - functional programming interface
1416
- * @export
1417
- */
1418
- const AIModelsApiFp = function (configuration) {
1419
- const localVarAxiosParamCreator = (0, exports.AIModelsApiAxiosParamCreator)(configuration);
1420
- return {
1421
- /**
1422
- * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
1423
- * @summary Get AI Model Details
1424
- * @param {string} organisation The organisation ID
1425
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1426
- * @param {*} [options] Override http request option.
1427
- * @throws {RequiredError}
1428
- */
1429
- getAIModel(organisation, modelId, options) {
1430
- return __awaiter(this, void 0, void 0, function* () {
1431
- var _a, _b, _c;
1432
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIModel(organisation, modelId, options);
1433
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1434
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIModelsApi.getAIModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1435
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1436
- });
1437
- },
1438
1503
  /**
1439
- *
1440
- * @summary List available AI models for an organization
1504
+ * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1505
+ * @summary Generate text embeddings for semantic search and RAG applications
1441
1506
  * @param {string} organisation The organisation ID
1442
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1507
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1443
1508
  * @param {*} [options] Override http request option.
1444
1509
  * @throws {RequiredError}
1445
1510
  */
1446
- listAIModels(organisation, feature, options) {
1447
- return __awaiter(this, void 0, void 0, function* () {
1448
- var _a, _b, _c;
1449
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listAIModels(organisation, feature, options);
1450
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1451
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIModelsApi.listAIModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1452
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1453
- });
1454
- },
1455
- };
1456
- };
1457
- exports.AIModelsApiFp = AIModelsApiFp;
1458
- /**
1459
- * AIModelsApi - factory interface
1460
- * @export
1461
- */
1462
- const AIModelsApiFactory = function (configuration, basePath, axios) {
1463
- const localVarFp = (0, exports.AIModelsApiFp)(configuration);
1464
- return {
1511
+ embeddings: (organisation_1, embeddingsRequest_1, ...args_1) => __awaiter(this, [organisation_1, embeddingsRequest_1, ...args_1], void 0, function* (organisation, embeddingsRequest, options = {}) {
1512
+ // verify required parameter 'organisation' is not null or undefined
1513
+ (0, common_1.assertParamExists)('embeddings', 'organisation', organisation);
1514
+ // verify required parameter 'embeddingsRequest' is not null or undefined
1515
+ (0, common_1.assertParamExists)('embeddings', 'embeddingsRequest', embeddingsRequest);
1516
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings`
1517
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1518
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1519
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1520
+ let baseOptions;
1521
+ if (configuration) {
1522
+ baseOptions = configuration.baseOptions;
1523
+ }
1524
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1525
+ const localVarHeaderParameter = {};
1526
+ const localVarQueryParameter = {};
1527
+ // authentication BearerAuth required
1528
+ // http bearer authentication required
1529
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1530
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1531
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1532
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1533
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1534
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(embeddingsRequest, localVarRequestOptions, configuration);
1535
+ return {
1536
+ url: (0, common_1.toPathString)(localVarUrlObj),
1537
+ options: localVarRequestOptions,
1538
+ };
1539
+ }),
1465
1540
  /**
1466
- * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
1467
- * @summary Get AI Model Details
1541
+ * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed)
1542
+ * @summary Get Durable Execution Status
1468
1543
  * @param {string} organisation The organisation ID
1469
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1544
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1470
1545
  * @param {*} [options] Override http request option.
1471
1546
  * @throws {RequiredError}
1472
1547
  */
1473
- getAIModel(organisation, modelId, options) {
1474
- return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath));
1475
- },
1548
+ getDurableExecutionStatus: (organisation_1, identifier_1, ...args_1) => __awaiter(this, [organisation_1, identifier_1, ...args_1], void 0, function* (organisation, identifier, options = {}) {
1549
+ // verify required parameter 'organisation' is not null or undefined
1550
+ (0, common_1.assertParamExists)('getDurableExecutionStatus', 'organisation', organisation);
1551
+ // verify required parameter 'identifier' is not null or undefined
1552
+ (0, common_1.assertParamExists)('getDurableExecutionStatus', 'identifier', identifier);
1553
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/executions/{identifier}`
1554
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1555
+ .replace(`{${"identifier"}}`, encodeURIComponent(String(identifier)));
1556
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1557
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1558
+ let baseOptions;
1559
+ if (configuration) {
1560
+ baseOptions = configuration.baseOptions;
1561
+ }
1562
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1563
+ const localVarHeaderParameter = {};
1564
+ const localVarQueryParameter = {};
1565
+ // authentication BearerAuth required
1566
+ // http bearer authentication required
1567
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1568
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1569
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1570
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1571
+ return {
1572
+ url: (0, common_1.toPathString)(localVarUrlObj),
1573
+ options: localVarRequestOptions,
1574
+ };
1575
+ }),
1476
1576
  /**
1477
- *
1478
- * @summary List available AI models for an organization
1577
+ * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1578
+ * @summary Generate images with Amazon Nova Canvas
1479
1579
  * @param {string} organisation The organisation ID
1480
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1580
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1481
1581
  * @param {*} [options] Override http request option.
1482
1582
  * @throws {RequiredError}
1483
1583
  */
1484
- listAIModels(organisation, feature, options) {
1485
- return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath));
1486
- },
1487
- };
1488
- };
1489
- exports.AIModelsApiFactory = AIModelsApiFactory;
1490
- /**
1491
- * AIModelsApi - object-oriented interface
1492
- * @export
1493
- * @class AIModelsApi
1494
- * @extends {BaseAPI}
1495
- */
1496
- class AIModelsApi extends base_1.BaseAPI {
1497
- /**
1498
- * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
1499
- * @summary Get AI Model Details
1500
- * @param {string} organisation The organisation ID
1501
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1502
- * @param {*} [options] Override http request option.
1503
- * @throws {RequiredError}
1504
- * @memberof AIModelsApi
1505
- */
1506
- getAIModel(organisation, modelId, options) {
1507
- return (0, exports.AIModelsApiFp)(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath));
1508
- }
1509
- /**
1510
- *
1511
- * @summary List available AI models for an organization
1512
- * @param {string} organisation The organisation ID
1513
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1514
- * @param {*} [options] Override http request option.
1515
- * @throws {RequiredError}
1516
- * @memberof AIModelsApi
1517
- */
1518
- listAIModels(organisation, feature, options) {
1519
- return (0, exports.AIModelsApiFp)(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath));
1520
- }
1521
- }
1522
- exports.AIModelsApi = AIModelsApi;
1523
- /**
1524
- * @export
1525
- */
1526
- exports.ListAIModelsFeatureEnum = {
1527
- Chat: 'chat',
1528
- Embeddings: 'embeddings',
1529
- Vision: 'vision',
1530
- Streaming: 'streaming',
1531
- All: 'all'
1532
- };
1533
- /**
1534
- * AIMonitoringApi - axios parameter creator
1535
- * @export
1536
- */
1537
- const AIMonitoringApiAxiosParamCreator = function (configuration) {
1538
- return {
1584
+ imageGeneration: (organisation_1, imageGenerationRequest_1, ...args_1) => __awaiter(this, [organisation_1, imageGenerationRequest_1, ...args_1], void 0, function* (organisation, imageGenerationRequest, options = {}) {
1585
+ // verify required parameter 'organisation' is not null or undefined
1586
+ (0, common_1.assertParamExists)('imageGeneration', 'organisation', organisation);
1587
+ // verify required parameter 'imageGenerationRequest' is not null or undefined
1588
+ (0, common_1.assertParamExists)('imageGeneration', 'imageGenerationRequest', imageGenerationRequest);
1589
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation`
1590
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1591
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1592
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1593
+ let baseOptions;
1594
+ if (configuration) {
1595
+ baseOptions = configuration.baseOptions;
1596
+ }
1597
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1598
+ const localVarHeaderParameter = {};
1599
+ const localVarQueryParameter = {};
1600
+ // authentication BearerAuth required
1601
+ // http bearer authentication required
1602
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1603
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1604
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1605
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1606
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1607
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(imageGenerationRequest, localVarRequestOptions, configuration);
1608
+ return {
1609
+ url: (0, common_1.toPathString)(localVarUrlObj),
1610
+ options: localVarRequestOptions,
1611
+ };
1612
+ }),
1539
1613
  /**
1540
- *
1541
- * @summary Get AI usage statistics
1614
+ * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state.
1615
+ * @summary Submit Client Tool Results (Callback)
1542
1616
  * @param {string} organisation The organisation ID
1543
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
1617
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1544
1618
  * @param {*} [options] Override http request option.
1545
1619
  * @throws {RequiredError}
1546
1620
  */
1547
- getAIUsageStats: (organisation_1, month_1, ...args_1) => __awaiter(this, [organisation_1, month_1, ...args_1], void 0, function* (organisation, month, options = {}) {
1621
+ submitToolCallback: (organisation_1, submitToolCallbackRequest_1, ...args_1) => __awaiter(this, [organisation_1, submitToolCallbackRequest_1, ...args_1], void 0, function* (organisation, submitToolCallbackRequest, options = {}) {
1548
1622
  // verify required parameter 'organisation' is not null or undefined
1549
- (0, common_1.assertParamExists)('getAIUsageStats', 'organisation', organisation);
1550
- const localVarPath = `/api/v3/organizations/{organisation}/ai/usage`
1623
+ (0, common_1.assertParamExists)('submitToolCallback', 'organisation', organisation);
1624
+ // verify required parameter 'submitToolCallbackRequest' is not null or undefined
1625
+ (0, common_1.assertParamExists)('submitToolCallback', 'submitToolCallbackRequest', submitToolCallbackRequest);
1626
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/callback`
1551
1627
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1552
1628
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1553
1629
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1555,18 +1631,17 @@ const AIMonitoringApiAxiosParamCreator = function (configuration) {
1555
1631
  if (configuration) {
1556
1632
  baseOptions = configuration.baseOptions;
1557
1633
  }
1558
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1634
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1559
1635
  const localVarHeaderParameter = {};
1560
1636
  const localVarQueryParameter = {};
1561
1637
  // authentication BearerAuth required
1562
1638
  // http bearer authentication required
1563
1639
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1564
- if (month !== undefined) {
1565
- localVarQueryParameter['month'] = month;
1566
- }
1640
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1567
1641
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1568
1642
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1569
1643
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1644
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(submitToolCallbackRequest, localVarRequestOptions, configuration);
1570
1645
  return {
1571
1646
  url: (0, common_1.toPathString)(localVarUrlObj),
1572
1647
  options: localVarRequestOptions,
@@ -1574,96 +1649,1147 @@ const AIMonitoringApiAxiosParamCreator = function (configuration) {
1574
1649
  }),
1575
1650
  };
1576
1651
  };
1577
- exports.AIMonitoringApiAxiosParamCreator = AIMonitoringApiAxiosParamCreator;
1652
+ exports.AIInferenceApiAxiosParamCreator = AIInferenceApiAxiosParamCreator;
1578
1653
  /**
1579
- * AIMonitoringApi - functional programming interface
1654
+ * AIInferenceApi - functional programming interface
1580
1655
  * @export
1581
1656
  */
1582
- const AIMonitoringApiFp = function (configuration) {
1583
- const localVarAxiosParamCreator = (0, exports.AIMonitoringApiAxiosParamCreator)(configuration);
1657
+ const AIInferenceApiFp = function (configuration) {
1658
+ const localVarAxiosParamCreator = (0, exports.AIInferenceApiAxiosParamCreator)(configuration);
1584
1659
  return {
1585
1660
  /**
1586
- *
1587
- * @summary Get AI usage statistics
1661
+ * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1662
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1588
1663
  * @param {string} organisation The organisation ID
1589
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
1664
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1665
+ * @param {*} [options] Override http request option.
1666
+ * @throws {RequiredError}
1667
+ */
1668
+ chatInference(organisation, chatInferenceRequest, options) {
1669
+ return __awaiter(this, void 0, void 0, function* () {
1670
+ var _a, _b, _c;
1671
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options);
1672
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1673
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.chatInference']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1674
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1675
+ });
1676
+ },
1677
+ /**
1678
+ * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1679
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1680
+ * @param {string} organisation The organisation ID
1681
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1682
+ * @param {*} [options] Override http request option.
1683
+ * @throws {RequiredError}
1684
+ */
1685
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1686
+ return __awaiter(this, void 0, void 0, function* () {
1687
+ var _a, _b, _c;
1688
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options);
1689
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1690
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.chatInferenceStream']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1691
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1692
+ });
1693
+ },
1694
+ /**
1695
+ * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1696
+ * @summary Generate text embeddings for semantic search and RAG applications
1697
+ * @param {string} organisation The organisation ID
1698
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1699
+ * @param {*} [options] Override http request option.
1700
+ * @throws {RequiredError}
1701
+ */
1702
+ embeddings(organisation, embeddingsRequest, options) {
1703
+ return __awaiter(this, void 0, void 0, function* () {
1704
+ var _a, _b, _c;
1705
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options);
1706
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1707
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.embeddings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1708
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1709
+ });
1710
+ },
1711
+ /**
1712
+ * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed)
1713
+ * @summary Get Durable Execution Status
1714
+ * @param {string} organisation The organisation ID
1715
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1716
+ * @param {*} [options] Override http request option.
1717
+ * @throws {RequiredError}
1718
+ */
1719
+ getDurableExecutionStatus(organisation, identifier, options) {
1720
+ return __awaiter(this, void 0, void 0, function* () {
1721
+ var _a, _b, _c;
1722
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDurableExecutionStatus(organisation, identifier, options);
1723
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1724
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.getDurableExecutionStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1725
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1726
+ });
1727
+ },
1728
+ /**
1729
+ * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1730
+ * @summary Generate images with Amazon Nova Canvas
1731
+ * @param {string} organisation The organisation ID
1732
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1733
+ * @param {*} [options] Override http request option.
1734
+ * @throws {RequiredError}
1735
+ */
1736
+ imageGeneration(organisation, imageGenerationRequest, options) {
1737
+ return __awaiter(this, void 0, void 0, function* () {
1738
+ var _a, _b, _c;
1739
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options);
1740
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1741
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.imageGeneration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1742
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1743
+ });
1744
+ },
1745
+ /**
1746
+ * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state.
1747
+ * @summary Submit Client Tool Results (Callback)
1748
+ * @param {string} organisation The organisation ID
1749
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1750
+ * @param {*} [options] Override http request option.
1751
+ * @throws {RequiredError}
1752
+ */
1753
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1754
+ return __awaiter(this, void 0, void 0, function* () {
1755
+ var _a, _b, _c;
1756
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.submitToolCallback(organisation, submitToolCallbackRequest, options);
1757
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1758
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIInferenceApi.submitToolCallback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1759
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1760
+ });
1761
+ },
1762
+ };
1763
+ };
1764
+ exports.AIInferenceApiFp = AIInferenceApiFp;
1765
+ /**
1766
+ * AIInferenceApi - factory interface
1767
+ * @export
1768
+ */
1769
+ const AIInferenceApiFactory = function (configuration, basePath, axios) {
1770
+ const localVarFp = (0, exports.AIInferenceApiFp)(configuration);
1771
+ return {
1772
+ /**
1773
+ * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1774
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1775
+ * @param {string} organisation The organisation ID
1776
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1777
+ * @param {*} [options] Override http request option.
1778
+ * @throws {RequiredError}
1779
+ */
1780
+ chatInference(organisation, chatInferenceRequest, options) {
1781
+ return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath));
1782
+ },
1783
+ /**
1784
+ * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1785
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1786
+ * @param {string} organisation The organisation ID
1787
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1788
+ * @param {*} [options] Override http request option.
1789
+ * @throws {RequiredError}
1790
+ */
1791
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1792
+ return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath));
1793
+ },
1794
+ /**
1795
+ * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1796
+ * @summary Generate text embeddings for semantic search and RAG applications
1797
+ * @param {string} organisation The organisation ID
1798
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1799
+ * @param {*} [options] Override http request option.
1800
+ * @throws {RequiredError}
1801
+ */
1802
+ embeddings(organisation, embeddingsRequest, options) {
1803
+ return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath));
1804
+ },
1805
+ /**
1806
+ * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed)
1807
+ * @summary Get Durable Execution Status
1808
+ * @param {string} organisation The organisation ID
1809
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1810
+ * @param {*} [options] Override http request option.
1811
+ * @throws {RequiredError}
1812
+ */
1813
+ getDurableExecutionStatus(organisation, identifier, options) {
1814
+ return localVarFp.getDurableExecutionStatus(organisation, identifier, options).then((request) => request(axios, basePath));
1815
+ },
1816
+ /**
1817
+ * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1818
+ * @summary Generate images with Amazon Nova Canvas
1819
+ * @param {string} organisation The organisation ID
1820
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1821
+ * @param {*} [options] Override http request option.
1822
+ * @throws {RequiredError}
1823
+ */
1824
+ imageGeneration(organisation, imageGenerationRequest, options) {
1825
+ return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath));
1826
+ },
1827
+ /**
1828
+ * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state.
1829
+ * @summary Submit Client Tool Results (Callback)
1830
+ * @param {string} organisation The organisation ID
1831
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1832
+ * @param {*} [options] Override http request option.
1833
+ * @throws {RequiredError}
1834
+ */
1835
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1836
+ return localVarFp.submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(axios, basePath));
1837
+ },
1838
+ };
1839
+ };
1840
+ exports.AIInferenceApiFactory = AIInferenceApiFactory;
1841
+ /**
1842
+ * AIInferenceApi - object-oriented interface
1843
+ * @export
1844
+ * @class AIInferenceApi
1845
+ * @extends {BaseAPI}
1846
+ */
1847
+ class AIInferenceApi extends base_1.BaseAPI {
1848
+ /**
1849
+ * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling
1850
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1851
+ * @param {string} organisation The organisation ID
1852
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1853
+ * @param {*} [options] Override http request option.
1854
+ * @throws {RequiredError}
1855
+ * @memberof AIInferenceApi
1856
+ */
1857
+ chatInference(organisation, chatInferenceRequest, options) {
1858
+ return (0, exports.AIInferenceApiFp)(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath));
1859
+ }
1860
+ /**
1861
+ * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document)
1862
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1863
+ * @param {string} organisation The organisation ID
1864
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1865
+ * @param {*} [options] Override http request option.
1866
+ * @throws {RequiredError}
1867
+ * @memberof AIInferenceApi
1868
+ */
1869
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1870
+ return (0, exports.AIInferenceApiFp)(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath));
1871
+ }
1872
+ /**
1873
+ * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
1874
+ * @summary Generate text embeddings for semantic search and RAG applications
1875
+ * @param {string} organisation The organisation ID
1876
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1877
+ * @param {*} [options] Override http request option.
1878
+ * @throws {RequiredError}
1879
+ * @memberof AIInferenceApi
1880
+ */
1881
+ embeddings(organisation, embeddingsRequest, options) {
1882
+ return (0, exports.AIInferenceApiFp)(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath));
1883
+ }
1884
+ /**
1885
+ * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed)
1886
+ * @summary Get Durable Execution Status
1887
+ * @param {string} organisation The organisation ID
1888
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1889
+ * @param {*} [options] Override http request option.
1890
+ * @throws {RequiredError}
1891
+ * @memberof AIInferenceApi
1892
+ */
1893
+ getDurableExecutionStatus(organisation, identifier, options) {
1894
+ return (0, exports.AIInferenceApiFp)(this.configuration).getDurableExecutionStatus(organisation, identifier, options).then((request) => request(this.axios, this.basePath));
1895
+ }
1896
+ /**
1897
+ * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes
1898
+ * @summary Generate images with Amazon Nova Canvas
1899
+ * @param {string} organisation The organisation ID
1900
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1901
+ * @param {*} [options] Override http request option.
1902
+ * @throws {RequiredError}
1903
+ * @memberof AIInferenceApi
1904
+ */
1905
+ imageGeneration(organisation, imageGenerationRequest, options) {
1906
+ return (0, exports.AIInferenceApiFp)(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath));
1907
+ }
1908
+ /**
1909
+ * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state.
1910
+ * @summary Submit Client Tool Results (Callback)
1911
+ * @param {string} organisation The organisation ID
1912
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1913
+ * @param {*} [options] Override http request option.
1914
+ * @throws {RequiredError}
1915
+ * @memberof AIInferenceApi
1916
+ */
1917
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1918
+ return (0, exports.AIInferenceApiFp)(this.configuration).submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(this.axios, this.basePath));
1919
+ }
1920
+ }
1921
+ exports.AIInferenceApi = AIInferenceApi;
1922
+ /**
1923
+ * AIModelsApi - axios parameter creator
1924
+ * @export
1925
+ */
1926
+ const AIModelsApiAxiosParamCreator = function (configuration) {
1927
+ return {
1928
+ /**
1929
+ * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
1930
+ * @summary Get AI Model Details
1931
+ * @param {string} organisation The organisation ID
1932
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1933
+ * @param {*} [options] Override http request option.
1934
+ * @throws {RequiredError}
1935
+ */
1936
+ getAIModel: (organisation_1, modelId_1, ...args_1) => __awaiter(this, [organisation_1, modelId_1, ...args_1], void 0, function* (organisation, modelId, options = {}) {
1937
+ // verify required parameter 'organisation' is not null or undefined
1938
+ (0, common_1.assertParamExists)('getAIModel', 'organisation', organisation);
1939
+ // verify required parameter 'modelId' is not null or undefined
1940
+ (0, common_1.assertParamExists)('getAIModel', 'modelId', modelId);
1941
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}`
1942
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1943
+ .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId)));
1944
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1945
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1946
+ let baseOptions;
1947
+ if (configuration) {
1948
+ baseOptions = configuration.baseOptions;
1949
+ }
1950
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1951
+ const localVarHeaderParameter = {};
1952
+ const localVarQueryParameter = {};
1953
+ // authentication BearerAuth required
1954
+ // http bearer authentication required
1955
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1956
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1957
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1958
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1959
+ return {
1960
+ url: (0, common_1.toPathString)(localVarUrlObj),
1961
+ options: localVarRequestOptions,
1962
+ };
1963
+ }),
1964
+ /**
1965
+ *
1966
+ * @summary List available AI models for an organization
1967
+ * @param {string} organisation The organisation ID
1968
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1969
+ * @param {*} [options] Override http request option.
1970
+ * @throws {RequiredError}
1971
+ */
1972
+ listAIModels: (organisation_1, feature_1, ...args_1) => __awaiter(this, [organisation_1, feature_1, ...args_1], void 0, function* (organisation, feature, options = {}) {
1973
+ // verify required parameter 'organisation' is not null or undefined
1974
+ (0, common_1.assertParamExists)('listAIModels', 'organisation', organisation);
1975
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/models`
1976
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1977
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1978
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1979
+ let baseOptions;
1980
+ if (configuration) {
1981
+ baseOptions = configuration.baseOptions;
1982
+ }
1983
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1984
+ const localVarHeaderParameter = {};
1985
+ const localVarQueryParameter = {};
1986
+ // authentication BearerAuth required
1987
+ // http bearer authentication required
1988
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1989
+ if (feature !== undefined) {
1990
+ localVarQueryParameter['feature'] = feature;
1991
+ }
1992
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1993
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1994
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1995
+ return {
1996
+ url: (0, common_1.toPathString)(localVarUrlObj),
1997
+ options: localVarRequestOptions,
1998
+ };
1999
+ }),
2000
+ };
2001
+ };
2002
+ exports.AIModelsApiAxiosParamCreator = AIModelsApiAxiosParamCreator;
2003
+ /**
2004
+ * AIModelsApi - functional programming interface
2005
+ * @export
2006
+ */
2007
+ const AIModelsApiFp = function (configuration) {
2008
+ const localVarAxiosParamCreator = (0, exports.AIModelsApiAxiosParamCreator)(configuration);
2009
+ return {
2010
+ /**
2011
+ * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
2012
+ * @summary Get AI Model Details
2013
+ * @param {string} organisation The organisation ID
2014
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
2015
+ * @param {*} [options] Override http request option.
2016
+ * @throws {RequiredError}
2017
+ */
2018
+ getAIModel(organisation, modelId, options) {
2019
+ return __awaiter(this, void 0, void 0, function* () {
2020
+ var _a, _b, _c;
2021
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIModel(organisation, modelId, options);
2022
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2023
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIModelsApi.getAIModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2024
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2025
+ });
2026
+ },
2027
+ /**
2028
+ *
2029
+ * @summary List available AI models for an organization
2030
+ * @param {string} organisation The organisation ID
2031
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2032
+ * @param {*} [options] Override http request option.
2033
+ * @throws {RequiredError}
2034
+ */
2035
+ listAIModels(organisation, feature, options) {
2036
+ return __awaiter(this, void 0, void 0, function* () {
2037
+ var _a, _b, _c;
2038
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAIModels(organisation, feature, options);
2039
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2040
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIModelsApi.listAIModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2041
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2042
+ });
2043
+ },
2044
+ };
2045
+ };
2046
+ exports.AIModelsApiFp = AIModelsApiFp;
2047
+ /**
2048
+ * AIModelsApi - factory interface
2049
+ * @export
2050
+ */
2051
+ const AIModelsApiFactory = function (configuration, basePath, axios) {
2052
+ const localVarFp = (0, exports.AIModelsApiFp)(configuration);
2053
+ return {
2054
+ /**
2055
+ * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
2056
+ * @summary Get AI Model Details
2057
+ * @param {string} organisation The organisation ID
2058
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
2059
+ * @param {*} [options] Override http request option.
2060
+ * @throws {RequiredError}
2061
+ */
2062
+ getAIModel(organisation, modelId, options) {
2063
+ return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath));
2064
+ },
2065
+ /**
2066
+ *
2067
+ * @summary List available AI models for an organization
2068
+ * @param {string} organisation The organisation ID
2069
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2070
+ * @param {*} [options] Override http request option.
2071
+ * @throws {RequiredError}
2072
+ */
2073
+ listAIModels(organisation, feature, options) {
2074
+ return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath));
2075
+ },
2076
+ };
2077
+ };
2078
+ exports.AIModelsApiFactory = AIModelsApiFactory;
2079
+ /**
2080
+ * AIModelsApi - object-oriented interface
2081
+ * @export
2082
+ * @class AIModelsApi
2083
+ * @extends {BaseAPI}
2084
+ */
2085
+ class AIModelsApi extends base_1.BaseAPI {
2086
+ /**
2087
+ * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings
2088
+ * @summary Get AI Model Details
2089
+ * @param {string} organisation The organisation ID
2090
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
2091
+ * @param {*} [options] Override http request option.
2092
+ * @throws {RequiredError}
2093
+ * @memberof AIModelsApi
2094
+ */
2095
+ getAIModel(organisation, modelId, options) {
2096
+ return (0, exports.AIModelsApiFp)(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath));
2097
+ }
2098
+ /**
2099
+ *
2100
+ * @summary List available AI models for an organization
2101
+ * @param {string} organisation The organisation ID
2102
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2103
+ * @param {*} [options] Override http request option.
2104
+ * @throws {RequiredError}
2105
+ * @memberof AIModelsApi
2106
+ */
2107
+ listAIModels(organisation, feature, options) {
2108
+ return (0, exports.AIModelsApiFp)(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath));
2109
+ }
2110
+ }
2111
+ exports.AIModelsApi = AIModelsApi;
2112
+ /**
2113
+ * @export
2114
+ */
2115
+ exports.ListAIModelsFeatureEnum = {
2116
+ Chat: 'chat',
2117
+ Embeddings: 'embeddings',
2118
+ Vision: 'vision',
2119
+ Streaming: 'streaming',
2120
+ All: 'all'
2121
+ };
2122
+ /**
2123
+ * AIMonitoringApi - axios parameter creator
2124
+ * @export
2125
+ */
2126
+ const AIMonitoringApiAxiosParamCreator = function (configuration) {
2127
+ return {
2128
+ /**
2129
+ *
2130
+ * @summary Get AI usage statistics
2131
+ * @param {string} organisation The organisation ID
2132
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2133
+ * @param {*} [options] Override http request option.
2134
+ * @throws {RequiredError}
2135
+ */
2136
+ getAIUsageStats: (organisation_1, month_1, ...args_1) => __awaiter(this, [organisation_1, month_1, ...args_1], void 0, function* (organisation, month, options = {}) {
2137
+ // verify required parameter 'organisation' is not null or undefined
2138
+ (0, common_1.assertParamExists)('getAIUsageStats', 'organisation', organisation);
2139
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/usage`
2140
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2141
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2142
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2143
+ let baseOptions;
2144
+ if (configuration) {
2145
+ baseOptions = configuration.baseOptions;
2146
+ }
2147
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2148
+ const localVarHeaderParameter = {};
2149
+ const localVarQueryParameter = {};
2150
+ // authentication BearerAuth required
2151
+ // http bearer authentication required
2152
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2153
+ if (month !== undefined) {
2154
+ localVarQueryParameter['month'] = month;
2155
+ }
2156
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2157
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2158
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2159
+ return {
2160
+ url: (0, common_1.toPathString)(localVarUrlObj),
2161
+ options: localVarRequestOptions,
2162
+ };
2163
+ }),
2164
+ };
2165
+ };
2166
+ exports.AIMonitoringApiAxiosParamCreator = AIMonitoringApiAxiosParamCreator;
2167
+ /**
2168
+ * AIMonitoringApi - functional programming interface
2169
+ * @export
2170
+ */
2171
+ const AIMonitoringApiFp = function (configuration) {
2172
+ const localVarAxiosParamCreator = (0, exports.AIMonitoringApiAxiosParamCreator)(configuration);
2173
+ return {
2174
+ /**
2175
+ *
2176
+ * @summary Get AI usage statistics
2177
+ * @param {string} organisation The organisation ID
2178
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2179
+ * @param {*} [options] Override http request option.
2180
+ * @throws {RequiredError}
2181
+ */
2182
+ getAIUsageStats(organisation, month, options) {
2183
+ return __awaiter(this, void 0, void 0, function* () {
2184
+ var _a, _b, _c;
2185
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIUsageStats(organisation, month, options);
2186
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2187
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIMonitoringApi.getAIUsageStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2188
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2189
+ });
2190
+ },
2191
+ };
2192
+ };
2193
+ exports.AIMonitoringApiFp = AIMonitoringApiFp;
2194
+ /**
2195
+ * AIMonitoringApi - factory interface
2196
+ * @export
2197
+ */
2198
+ const AIMonitoringApiFactory = function (configuration, basePath, axios) {
2199
+ const localVarFp = (0, exports.AIMonitoringApiFp)(configuration);
2200
+ return {
2201
+ /**
2202
+ *
2203
+ * @summary Get AI usage statistics
2204
+ * @param {string} organisation The organisation ID
2205
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2206
+ * @param {*} [options] Override http request option.
2207
+ * @throws {RequiredError}
2208
+ */
2209
+ getAIUsageStats(organisation, month, options) {
2210
+ return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath));
2211
+ },
2212
+ };
2213
+ };
2214
+ exports.AIMonitoringApiFactory = AIMonitoringApiFactory;
2215
+ /**
2216
+ * AIMonitoringApi - object-oriented interface
2217
+ * @export
2218
+ * @class AIMonitoringApi
2219
+ * @extends {BaseAPI}
2220
+ */
2221
+ class AIMonitoringApi extends base_1.BaseAPI {
2222
+ /**
2223
+ *
2224
+ * @summary Get AI usage statistics
2225
+ * @param {string} organisation The organisation ID
2226
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2227
+ * @param {*} [options] Override http request option.
2228
+ * @throws {RequiredError}
2229
+ * @memberof AIMonitoringApi
2230
+ */
2231
+ getAIUsageStats(organisation, month, options) {
2232
+ return (0, exports.AIMonitoringApiFp)(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath));
2233
+ }
2234
+ }
2235
+ exports.AIMonitoringApi = AIMonitoringApi;
2236
+ /**
2237
+ * AISessionsApi - axios parameter creator
2238
+ * @export
2239
+ */
2240
+ const AISessionsApiAxiosParamCreator = function (configuration) {
2241
+ return {
2242
+ /**
2243
+ * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2244
+ * @summary Create a new chat session with multi-tenant isolation
2245
+ * @param {string} organisation The organisation ID
2246
+ * @param {CreateAISessionRequest} createAISessionRequest
2247
+ * @param {*} [options] Override http request option.
2248
+ * @throws {RequiredError}
2249
+ */
2250
+ createAISession: (organisation_1, createAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, createAISessionRequest_1, ...args_1], void 0, function* (organisation, createAISessionRequest, options = {}) {
2251
+ // verify required parameter 'organisation' is not null or undefined
2252
+ (0, common_1.assertParamExists)('createAISession', 'organisation', organisation);
2253
+ // verify required parameter 'createAISessionRequest' is not null or undefined
2254
+ (0, common_1.assertParamExists)('createAISession', 'createAISessionRequest', createAISessionRequest);
2255
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2256
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2257
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2258
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2259
+ let baseOptions;
2260
+ if (configuration) {
2261
+ baseOptions = configuration.baseOptions;
2262
+ }
2263
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2264
+ const localVarHeaderParameter = {};
2265
+ const localVarQueryParameter = {};
2266
+ // authentication BearerAuth required
2267
+ // http bearer authentication required
2268
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2269
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2270
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2271
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2272
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2273
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAISessionRequest, localVarRequestOptions, configuration);
2274
+ return {
2275
+ url: (0, common_1.toPathString)(localVarUrlObj),
2276
+ options: localVarRequestOptions,
2277
+ };
2278
+ }),
2279
+ /**
2280
+ *
2281
+ * @summary Delete a chat session
2282
+ * @param {string} organisation The organisation ID
2283
+ * @param {string} sessionId The session ID
2284
+ * @param {*} [options] Override http request option.
2285
+ * @throws {RequiredError}
2286
+ */
2287
+ deleteAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2288
+ // verify required parameter 'organisation' is not null or undefined
2289
+ (0, common_1.assertParamExists)('deleteAISession', 'organisation', organisation);
2290
+ // verify required parameter 'sessionId' is not null or undefined
2291
+ (0, common_1.assertParamExists)('deleteAISession', 'sessionId', sessionId);
2292
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2293
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2294
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2295
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2296
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2297
+ let baseOptions;
2298
+ if (configuration) {
2299
+ baseOptions = configuration.baseOptions;
2300
+ }
2301
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2302
+ const localVarHeaderParameter = {};
2303
+ const localVarQueryParameter = {};
2304
+ // authentication BearerAuth required
2305
+ // http bearer authentication required
2306
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2307
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2308
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2309
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2310
+ return {
2311
+ url: (0, common_1.toPathString)(localVarUrlObj),
2312
+ options: localVarRequestOptions,
2313
+ };
2314
+ }),
2315
+ /**
2316
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2317
+ * @summary Extend Session Expiration
2318
+ * @param {string} organisation The organisation ID
2319
+ * @param {string} sessionId The session ID
2320
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2321
+ * @param {*} [options] Override http request option.
2322
+ * @throws {RequiredError}
2323
+ */
2324
+ extendAISession: (organisation_1, sessionId_1, extendAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, extendAISessionRequest_1, ...args_1], void 0, function* (organisation, sessionId, extendAISessionRequest, options = {}) {
2325
+ // verify required parameter 'organisation' is not null or undefined
2326
+ (0, common_1.assertParamExists)('extendAISession', 'organisation', organisation);
2327
+ // verify required parameter 'sessionId' is not null or undefined
2328
+ (0, common_1.assertParamExists)('extendAISession', 'sessionId', sessionId);
2329
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend`
2330
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2331
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2332
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2333
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2334
+ let baseOptions;
2335
+ if (configuration) {
2336
+ baseOptions = configuration.baseOptions;
2337
+ }
2338
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2339
+ const localVarHeaderParameter = {};
2340
+ const localVarQueryParameter = {};
2341
+ // authentication BearerAuth required
2342
+ // http bearer authentication required
2343
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2344
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2345
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2346
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2347
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2348
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(extendAISessionRequest, localVarRequestOptions, configuration);
2349
+ return {
2350
+ url: (0, common_1.toPathString)(localVarUrlObj),
2351
+ options: localVarRequestOptions,
2352
+ };
2353
+ }),
2354
+ /**
2355
+ *
2356
+ * @summary Get a specific chat session
2357
+ * @param {string} organisation The organisation ID
2358
+ * @param {string} sessionId The session ID
2359
+ * @param {*} [options] Override http request option.
2360
+ * @throws {RequiredError}
2361
+ */
2362
+ getAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2363
+ // verify required parameter 'organisation' is not null or undefined
2364
+ (0, common_1.assertParamExists)('getAISession', 'organisation', organisation);
2365
+ // verify required parameter 'sessionId' is not null or undefined
2366
+ (0, common_1.assertParamExists)('getAISession', 'sessionId', sessionId);
2367
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2368
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2369
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2370
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2371
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2372
+ let baseOptions;
2373
+ if (configuration) {
2374
+ baseOptions = configuration.baseOptions;
2375
+ }
2376
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2377
+ const localVarHeaderParameter = {};
2378
+ const localVarQueryParameter = {};
2379
+ // authentication BearerAuth required
2380
+ // http bearer authentication required
2381
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2382
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2383
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2384
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2385
+ return {
2386
+ url: (0, common_1.toPathString)(localVarUrlObj),
2387
+ options: localVarRequestOptions,
2388
+ };
2389
+ }),
2390
+ /**
2391
+ * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2392
+ * @summary List chat sessions with multi-tenant filtering
2393
+ * @param {string} organisation The organisation ID
2394
+ * @param {string} [userId] Filter sessions by user ID
2395
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2396
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2397
+ * @param {number} [offset] Offset for pagination
2398
+ * @param {string} [model] Filter by model ID
2399
+ * @param {*} [options] Override http request option.
2400
+ * @throws {RequiredError}
2401
+ */
2402
+ listAISessions: (organisation_1, userId_1, sessionGroup_1, limit_1, offset_1, model_1, ...args_1) => __awaiter(this, [organisation_1, userId_1, sessionGroup_1, limit_1, offset_1, model_1, ...args_1], void 0, function* (organisation, userId, sessionGroup, limit, offset, model, options = {}) {
2403
+ // verify required parameter 'organisation' is not null or undefined
2404
+ (0, common_1.assertParamExists)('listAISessions', 'organisation', organisation);
2405
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2406
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2407
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2408
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2409
+ let baseOptions;
2410
+ if (configuration) {
2411
+ baseOptions = configuration.baseOptions;
2412
+ }
2413
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2414
+ const localVarHeaderParameter = {};
2415
+ const localVarQueryParameter = {};
2416
+ // authentication BearerAuth required
2417
+ // http bearer authentication required
2418
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2419
+ if (userId !== undefined) {
2420
+ localVarQueryParameter['userId'] = userId;
2421
+ }
2422
+ if (sessionGroup !== undefined) {
2423
+ localVarQueryParameter['sessionGroup'] = sessionGroup;
2424
+ }
2425
+ if (limit !== undefined) {
2426
+ localVarQueryParameter['limit'] = limit;
2427
+ }
2428
+ if (offset !== undefined) {
2429
+ localVarQueryParameter['offset'] = offset;
2430
+ }
2431
+ if (model !== undefined) {
2432
+ localVarQueryParameter['model'] = model;
2433
+ }
2434
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2435
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2436
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2437
+ return {
2438
+ url: (0, common_1.toPathString)(localVarUrlObj),
2439
+ options: localVarRequestOptions,
2440
+ };
2441
+ }),
2442
+ /**
2443
+ * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2444
+ * @summary Update Session
2445
+ * @param {string} organisation The organisation ID
2446
+ * @param {string} sessionId The session ID
2447
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2448
+ * @param {*} [options] Override http request option.
2449
+ * @throws {RequiredError}
2450
+ */
2451
+ updateAISession: (organisation_1, sessionId_1, updateAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, updateAISessionRequest_1, ...args_1], void 0, function* (organisation, sessionId, updateAISessionRequest, options = {}) {
2452
+ // verify required parameter 'organisation' is not null or undefined
2453
+ (0, common_1.assertParamExists)('updateAISession', 'organisation', organisation);
2454
+ // verify required parameter 'sessionId' is not null or undefined
2455
+ (0, common_1.assertParamExists)('updateAISession', 'sessionId', sessionId);
2456
+ // verify required parameter 'updateAISessionRequest' is not null or undefined
2457
+ (0, common_1.assertParamExists)('updateAISession', 'updateAISessionRequest', updateAISessionRequest);
2458
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2459
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2460
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2461
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2462
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2463
+ let baseOptions;
2464
+ if (configuration) {
2465
+ baseOptions = configuration.baseOptions;
2466
+ }
2467
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2468
+ const localVarHeaderParameter = {};
2469
+ const localVarQueryParameter = {};
2470
+ // authentication BearerAuth required
2471
+ // http bearer authentication required
2472
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2473
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2474
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2475
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2476
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2477
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAISessionRequest, localVarRequestOptions, configuration);
2478
+ return {
2479
+ url: (0, common_1.toPathString)(localVarUrlObj),
2480
+ options: localVarRequestOptions,
2481
+ };
2482
+ }),
2483
+ };
2484
+ };
2485
+ exports.AISessionsApiAxiosParamCreator = AISessionsApiAxiosParamCreator;
2486
+ /**
2487
+ * AISessionsApi - functional programming interface
2488
+ * @export
2489
+ */
2490
+ const AISessionsApiFp = function (configuration) {
2491
+ const localVarAxiosParamCreator = (0, exports.AISessionsApiAxiosParamCreator)(configuration);
2492
+ return {
2493
+ /**
2494
+ * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2495
+ * @summary Create a new chat session with multi-tenant isolation
2496
+ * @param {string} organisation The organisation ID
2497
+ * @param {CreateAISessionRequest} createAISessionRequest
2498
+ * @param {*} [options] Override http request option.
2499
+ * @throws {RequiredError}
2500
+ */
2501
+ createAISession(organisation, createAISessionRequest, options) {
2502
+ return __awaiter(this, void 0, void 0, function* () {
2503
+ var _a, _b, _c;
2504
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options);
2505
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2506
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.createAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2507
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2508
+ });
2509
+ },
2510
+ /**
2511
+ *
2512
+ * @summary Delete a chat session
2513
+ * @param {string} organisation The organisation ID
2514
+ * @param {string} sessionId The session ID
2515
+ * @param {*} [options] Override http request option.
2516
+ * @throws {RequiredError}
2517
+ */
2518
+ deleteAISession(organisation, sessionId, options) {
2519
+ return __awaiter(this, void 0, void 0, function* () {
2520
+ var _a, _b, _c;
2521
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options);
2522
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2523
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.deleteAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2524
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2525
+ });
2526
+ },
2527
+ /**
2528
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2529
+ * @summary Extend Session Expiration
2530
+ * @param {string} organisation The organisation ID
2531
+ * @param {string} sessionId The session ID
2532
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2533
+ * @param {*} [options] Override http request option.
2534
+ * @throws {RequiredError}
2535
+ */
2536
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2537
+ return __awaiter(this, void 0, void 0, function* () {
2538
+ var _a, _b, _c;
2539
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options);
2540
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2541
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.extendAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2542
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2543
+ });
2544
+ },
2545
+ /**
2546
+ *
2547
+ * @summary Get a specific chat session
2548
+ * @param {string} organisation The organisation ID
2549
+ * @param {string} sessionId The session ID
2550
+ * @param {*} [options] Override http request option.
2551
+ * @throws {RequiredError}
2552
+ */
2553
+ getAISession(organisation, sessionId, options) {
2554
+ return __awaiter(this, void 0, void 0, function* () {
2555
+ var _a, _b, _c;
2556
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAISession(organisation, sessionId, options);
2557
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2558
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.getAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2559
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2560
+ });
2561
+ },
2562
+ /**
2563
+ * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2564
+ * @summary List chat sessions with multi-tenant filtering
2565
+ * @param {string} organisation The organisation ID
2566
+ * @param {string} [userId] Filter sessions by user ID
2567
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2568
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2569
+ * @param {number} [offset] Offset for pagination
2570
+ * @param {string} [model] Filter by model ID
2571
+ * @param {*} [options] Override http request option.
2572
+ * @throws {RequiredError}
2573
+ */
2574
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2575
+ return __awaiter(this, void 0, void 0, function* () {
2576
+ var _a, _b, _c;
2577
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options);
2578
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2579
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.listAISessions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2580
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2581
+ });
2582
+ },
2583
+ /**
2584
+ * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2585
+ * @summary Update Session
2586
+ * @param {string} organisation The organisation ID
2587
+ * @param {string} sessionId The session ID
2588
+ * @param {UpdateAISessionRequest} updateAISessionRequest
1590
2589
  * @param {*} [options] Override http request option.
1591
2590
  * @throws {RequiredError}
1592
2591
  */
1593
- getAIUsageStats(organisation, month, options) {
2592
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
1594
2593
  return __awaiter(this, void 0, void 0, function* () {
1595
2594
  var _a, _b, _c;
1596
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIUsageStats(organisation, month, options);
2595
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options);
1597
2596
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1598
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIMonitoringApi.getAIUsageStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2597
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.updateAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1599
2598
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1600
2599
  });
1601
2600
  },
1602
2601
  };
1603
2602
  };
1604
- exports.AIMonitoringApiFp = AIMonitoringApiFp;
2603
+ exports.AISessionsApiFp = AISessionsApiFp;
1605
2604
  /**
1606
- * AIMonitoringApi - factory interface
2605
+ * AISessionsApi - factory interface
1607
2606
  * @export
1608
2607
  */
1609
- const AIMonitoringApiFactory = function (configuration, basePath, axios) {
1610
- const localVarFp = (0, exports.AIMonitoringApiFp)(configuration);
2608
+ const AISessionsApiFactory = function (configuration, basePath, axios) {
2609
+ const localVarFp = (0, exports.AISessionsApiFp)(configuration);
1611
2610
  return {
2611
+ /**
2612
+ * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2613
+ * @summary Create a new chat session with multi-tenant isolation
2614
+ * @param {string} organisation The organisation ID
2615
+ * @param {CreateAISessionRequest} createAISessionRequest
2616
+ * @param {*} [options] Override http request option.
2617
+ * @throws {RequiredError}
2618
+ */
2619
+ createAISession(organisation, createAISessionRequest, options) {
2620
+ return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath));
2621
+ },
1612
2622
  /**
1613
2623
  *
1614
- * @summary Get AI usage statistics
2624
+ * @summary Delete a chat session
1615
2625
  * @param {string} organisation The organisation ID
1616
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2626
+ * @param {string} sessionId The session ID
1617
2627
  * @param {*} [options] Override http request option.
1618
2628
  * @throws {RequiredError}
1619
2629
  */
1620
- getAIUsageStats(organisation, month, options) {
1621
- return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath));
2630
+ deleteAISession(organisation, sessionId, options) {
2631
+ return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
2632
+ },
2633
+ /**
2634
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2635
+ * @summary Extend Session Expiration
2636
+ * @param {string} organisation The organisation ID
2637
+ * @param {string} sessionId The session ID
2638
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2639
+ * @param {*} [options] Override http request option.
2640
+ * @throws {RequiredError}
2641
+ */
2642
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2643
+ return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath));
2644
+ },
2645
+ /**
2646
+ *
2647
+ * @summary Get a specific chat session
2648
+ * @param {string} organisation The organisation ID
2649
+ * @param {string} sessionId The session ID
2650
+ * @param {*} [options] Override http request option.
2651
+ * @throws {RequiredError}
2652
+ */
2653
+ getAISession(organisation, sessionId, options) {
2654
+ return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
2655
+ },
2656
+ /**
2657
+ * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2658
+ * @summary List chat sessions with multi-tenant filtering
2659
+ * @param {string} organisation The organisation ID
2660
+ * @param {string} [userId] Filter sessions by user ID
2661
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2662
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2663
+ * @param {number} [offset] Offset for pagination
2664
+ * @param {string} [model] Filter by model ID
2665
+ * @param {*} [options] Override http request option.
2666
+ * @throws {RequiredError}
2667
+ */
2668
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2669
+ return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath));
2670
+ },
2671
+ /**
2672
+ * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2673
+ * @summary Update Session
2674
+ * @param {string} organisation The organisation ID
2675
+ * @param {string} sessionId The session ID
2676
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2677
+ * @param {*} [options] Override http request option.
2678
+ * @throws {RequiredError}
2679
+ */
2680
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2681
+ return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath));
1622
2682
  },
1623
2683
  };
1624
2684
  };
1625
- exports.AIMonitoringApiFactory = AIMonitoringApiFactory;
2685
+ exports.AISessionsApiFactory = AISessionsApiFactory;
1626
2686
  /**
1627
- * AIMonitoringApi - object-oriented interface
2687
+ * AISessionsApi - object-oriented interface
1628
2688
  * @export
1629
- * @class AIMonitoringApi
2689
+ * @class AISessionsApi
1630
2690
  * @extends {BaseAPI}
1631
2691
  */
1632
- class AIMonitoringApi extends base_1.BaseAPI {
2692
+ class AISessionsApi extends base_1.BaseAPI {
2693
+ /**
2694
+ * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2695
+ * @summary Create a new chat session with multi-tenant isolation
2696
+ * @param {string} organisation The organisation ID
2697
+ * @param {CreateAISessionRequest} createAISessionRequest
2698
+ * @param {*} [options] Override http request option.
2699
+ * @throws {RequiredError}
2700
+ * @memberof AISessionsApi
2701
+ */
2702
+ createAISession(organisation, createAISessionRequest, options) {
2703
+ return (0, exports.AISessionsApiFp)(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath));
2704
+ }
1633
2705
  /**
1634
2706
  *
1635
- * @summary Get AI usage statistics
2707
+ * @summary Delete a chat session
1636
2708
  * @param {string} organisation The organisation ID
1637
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2709
+ * @param {string} sessionId The session ID
1638
2710
  * @param {*} [options] Override http request option.
1639
2711
  * @throws {RequiredError}
1640
- * @memberof AIMonitoringApi
2712
+ * @memberof AISessionsApi
1641
2713
  */
1642
- getAIUsageStats(organisation, month, options) {
1643
- return (0, exports.AIMonitoringApiFp)(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath));
2714
+ deleteAISession(organisation, sessionId, options) {
2715
+ return (0, exports.AISessionsApiFp)(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
2716
+ }
2717
+ /**
2718
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2719
+ * @summary Extend Session Expiration
2720
+ * @param {string} organisation The organisation ID
2721
+ * @param {string} sessionId The session ID
2722
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2723
+ * @param {*} [options] Override http request option.
2724
+ * @throws {RequiredError}
2725
+ * @memberof AISessionsApi
2726
+ */
2727
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2728
+ return (0, exports.AISessionsApiFp)(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath));
2729
+ }
2730
+ /**
2731
+ *
2732
+ * @summary Get a specific chat session
2733
+ * @param {string} organisation The organisation ID
2734
+ * @param {string} sessionId The session ID
2735
+ * @param {*} [options] Override http request option.
2736
+ * @throws {RequiredError}
2737
+ * @memberof AISessionsApi
2738
+ */
2739
+ getAISession(organisation, sessionId, options) {
2740
+ return (0, exports.AISessionsApiFp)(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
2741
+ }
2742
+ /**
2743
+ * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2744
+ * @summary List chat sessions with multi-tenant filtering
2745
+ * @param {string} organisation The organisation ID
2746
+ * @param {string} [userId] Filter sessions by user ID
2747
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2748
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2749
+ * @param {number} [offset] Offset for pagination
2750
+ * @param {string} [model] Filter by model ID
2751
+ * @param {*} [options] Override http request option.
2752
+ * @throws {RequiredError}
2753
+ * @memberof AISessionsApi
2754
+ */
2755
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2756
+ return (0, exports.AISessionsApiFp)(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath));
2757
+ }
2758
+ /**
2759
+ * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2760
+ * @summary Update Session
2761
+ * @param {string} organisation The organisation ID
2762
+ * @param {string} sessionId The session ID
2763
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2764
+ * @param {*} [options] Override http request option.
2765
+ * @throws {RequiredError}
2766
+ * @memberof AISessionsApi
2767
+ */
2768
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2769
+ return (0, exports.AISessionsApiFp)(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath));
1644
2770
  }
1645
2771
  }
1646
- exports.AIMonitoringApi = AIMonitoringApi;
2772
+ exports.AISessionsApi = AISessionsApi;
1647
2773
  /**
1648
- * AISessionsApi - axios parameter creator
2774
+ * AITaskManagementApi - axios parameter creator
1649
2775
  * @export
1650
2776
  */
1651
- const AISessionsApiAxiosParamCreator = function (configuration) {
2777
+ const AITaskManagementApiAxiosParamCreator = function (configuration) {
1652
2778
  return {
1653
2779
  /**
1654
- * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
1655
- * @summary Create a new chat session with multi-tenant isolation
2780
+ * Creates a new task for multi-agent coordination and workflow orchestration. * * **Key Features:** * - **Persistent State**: Tasks survive across conversations and sessions * - **Agent Assignment**: Pre-assign tasks to specific agents * - **Task Lists**: Group related tasks using taskListId (implicit - no need to create lists first) * - **Dependencies**: Define task dependencies for workflow orchestration * - **Metadata**: Store flexible JSON metadata for task-specific data * - **Progress Tracking**: Track progress from 0.0 to 1.0 * * **Use Cases:** * - Break down complex requests into manageable steps * - Assign work to specialized agents * - Track long-running operations * - Coordinate multi-agent workflows
2781
+ * @summary Create a new task
1656
2782
  * @param {string} organisation The organisation ID
1657
- * @param {CreateAISessionRequest} createAISessionRequest
2783
+ * @param {CreateTaskRequest} createTaskRequest
1658
2784
  * @param {*} [options] Override http request option.
1659
2785
  * @throws {RequiredError}
1660
2786
  */
1661
- createAISession: (organisation_1, createAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, createAISessionRequest_1, ...args_1], void 0, function* (organisation, createAISessionRequest, options = {}) {
2787
+ createTask: (organisation_1, createTaskRequest_1, ...args_1) => __awaiter(this, [organisation_1, createTaskRequest_1, ...args_1], void 0, function* (organisation, createTaskRequest, options = {}) {
1662
2788
  // verify required parameter 'organisation' is not null or undefined
1663
- (0, common_1.assertParamExists)('createAISession', 'organisation', organisation);
1664
- // verify required parameter 'createAISessionRequest' is not null or undefined
1665
- (0, common_1.assertParamExists)('createAISession', 'createAISessionRequest', createAISessionRequest);
1666
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2789
+ (0, common_1.assertParamExists)('createTask', 'organisation', organisation);
2790
+ // verify required parameter 'createTaskRequest' is not null or undefined
2791
+ (0, common_1.assertParamExists)('createTask', 'createTaskRequest', createTaskRequest);
2792
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks`
1667
2793
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1668
2794
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1669
2795
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1681,28 +2807,29 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1681
2807
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1682
2808
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1683
2809
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1684
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAISessionRequest, localVarRequestOptions, configuration);
2810
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createTaskRequest, localVarRequestOptions, configuration);
1685
2811
  return {
1686
2812
  url: (0, common_1.toPathString)(localVarUrlObj),
1687
2813
  options: localVarRequestOptions,
1688
2814
  };
1689
2815
  }),
1690
2816
  /**
1691
- *
1692
- * @summary Delete a chat session
2817
+ * Permanently deletes a task. This action cannot be undone. * * **Dependency Protection:** * By default, deletion is blocked if other tasks depend on this task (TASK_HAS_DEPENDENTS error). * This prevents breaking workflows. * * **Cascade Delete:** * Use `?cascade=true` to delete the task AND all tasks that depend on it recursively. * Useful for cleaning up entire dependency chains. * * **Examples:** * - DELETE /tasks/{id} - Deletes task if no dependents, otherwise returns 409 error * - DELETE /tasks/{id}?cascade=true - Deletes task and all dependent tasks
2818
+ * @summary Delete a task
1693
2819
  * @param {string} organisation The organisation ID
1694
- * @param {string} sessionId The session ID
2820
+ * @param {string} taskId The task UUID
2821
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
1695
2822
  * @param {*} [options] Override http request option.
1696
2823
  * @throws {RequiredError}
1697
2824
  */
1698
- deleteAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2825
+ deleteTask: (organisation_1, taskId_1, cascade_1, ...args_1) => __awaiter(this, [organisation_1, taskId_1, cascade_1, ...args_1], void 0, function* (organisation, taskId, cascade, options = {}) {
1699
2826
  // verify required parameter 'organisation' is not null or undefined
1700
- (0, common_1.assertParamExists)('deleteAISession', 'organisation', organisation);
1701
- // verify required parameter 'sessionId' is not null or undefined
1702
- (0, common_1.assertParamExists)('deleteAISession', 'sessionId', sessionId);
1703
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2827
+ (0, common_1.assertParamExists)('deleteTask', 'organisation', organisation);
2828
+ // verify required parameter 'taskId' is not null or undefined
2829
+ (0, common_1.assertParamExists)('deleteTask', 'taskId', taskId);
2830
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1704
2831
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1705
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2832
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1706
2833
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1707
2834
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1708
2835
  let baseOptions;
@@ -1715,6 +2842,9 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1715
2842
  // authentication BearerAuth required
1716
2843
  // http bearer authentication required
1717
2844
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2845
+ if (cascade !== undefined) {
2846
+ localVarQueryParameter['cascade'] = cascade;
2847
+ }
1718
2848
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1719
2849
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1720
2850
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -1724,60 +2854,57 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1724
2854
  };
1725
2855
  }),
1726
2856
  /**
1727
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
1728
- * @summary Extend Session Expiration
2857
+ * Returns the full dependency graph for all tasks in a task list. * * **Use Cases:** * - Visualize task dependencies in a UI (DAG diagram) * - Analyze workflow structure and critical paths * - Find starting tasks (roots) and terminal tasks (leaves) * - Plan parallel execution by identifying independent task groups * * **Response Structure:** * - `taskCount`: Total number of tasks in the list * - `roots`: Task IDs with no dependencies (starting points) * - `leaves`: Task IDs with no dependents (terminal tasks) * - `graph`: Adjacency list with each task\'s dependencies and dependents
2858
+ * @summary Get dependency graph for a task list
1729
2859
  * @param {string} organisation The organisation ID
1730
- * @param {string} sessionId The session ID
1731
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
2860
+ * @param {string} taskListId The task list ID to get the dependency graph for
1732
2861
  * @param {*} [options] Override http request option.
1733
2862
  * @throws {RequiredError}
1734
2863
  */
1735
- extendAISession: (organisation_1, sessionId_1, extendAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, extendAISessionRequest_1, ...args_1], void 0, function* (organisation, sessionId, extendAISessionRequest, options = {}) {
2864
+ getDependencyGraph: (organisation_1, taskListId_1, ...args_1) => __awaiter(this, [organisation_1, taskListId_1, ...args_1], void 0, function* (organisation, taskListId, options = {}) {
1736
2865
  // verify required parameter 'organisation' is not null or undefined
1737
- (0, common_1.assertParamExists)('extendAISession', 'organisation', organisation);
1738
- // verify required parameter 'sessionId' is not null or undefined
1739
- (0, common_1.assertParamExists)('extendAISession', 'sessionId', sessionId);
1740
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend`
2866
+ (0, common_1.assertParamExists)('getDependencyGraph', 'organisation', organisation);
2867
+ // verify required parameter 'taskListId' is not null or undefined
2868
+ (0, common_1.assertParamExists)('getDependencyGraph', 'taskListId', taskListId);
2869
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskListId}/dependency-graph`
1741
2870
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1742
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2871
+ .replace(`{${"taskListId"}}`, encodeURIComponent(String(taskListId)));
1743
2872
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1744
2873
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1745
2874
  let baseOptions;
1746
2875
  if (configuration) {
1747
2876
  baseOptions = configuration.baseOptions;
1748
2877
  }
1749
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2878
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1750
2879
  const localVarHeaderParameter = {};
1751
2880
  const localVarQueryParameter = {};
1752
2881
  // authentication BearerAuth required
1753
2882
  // http bearer authentication required
1754
2883
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1755
- localVarHeaderParameter['Content-Type'] = 'application/json';
1756
2884
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1757
2885
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1758
2886
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1759
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(extendAISessionRequest, localVarRequestOptions, configuration);
1760
2887
  return {
1761
2888
  url: (0, common_1.toPathString)(localVarUrlObj),
1762
2889
  options: localVarRequestOptions,
1763
2890
  };
1764
2891
  }),
1765
2892
  /**
1766
- *
1767
- * @summary Get a specific chat session
2893
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
2894
+ * @summary Get task details
1768
2895
  * @param {string} organisation The organisation ID
1769
- * @param {string} sessionId The session ID
2896
+ * @param {string} taskId The task UUID
1770
2897
  * @param {*} [options] Override http request option.
1771
2898
  * @throws {RequiredError}
1772
2899
  */
1773
- getAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2900
+ getTask: (organisation_1, taskId_1, ...args_1) => __awaiter(this, [organisation_1, taskId_1, ...args_1], void 0, function* (organisation, taskId, options = {}) {
1774
2901
  // verify required parameter 'organisation' is not null or undefined
1775
- (0, common_1.assertParamExists)('getAISession', 'organisation', organisation);
1776
- // verify required parameter 'sessionId' is not null or undefined
1777
- (0, common_1.assertParamExists)('getAISession', 'sessionId', sessionId);
1778
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2902
+ (0, common_1.assertParamExists)('getTask', 'organisation', organisation);
2903
+ // verify required parameter 'taskId' is not null or undefined
2904
+ (0, common_1.assertParamExists)('getTask', 'taskId', taskId);
2905
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1779
2906
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1780
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2907
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1781
2908
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1782
2909
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1783
2910
  let baseOptions;
@@ -1799,21 +2926,22 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1799
2926
  };
1800
2927
  }),
1801
2928
  /**
1802
- * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
1803
- * @summary List chat sessions with multi-tenant filtering
2929
+ * Lists tasks for an organization with optional filtering. Filters can be combined for powerful queries. * * **Filter Examples:** * - All tasks in a list: ?taskListId=world-1 * - Pending tasks in a list: ?taskListId=world-1&status=pending * - Tasks assigned to an agent: ?assignedAgentId=agent-code-reviewer * - Combined: ?taskListId=world-1&status=in_progress&assignedAgentId=agent-1 * * **Reverse Dependency Lookup:** * Use `dependsOn` to find tasks that depend on a specific task (waiting for it to complete): * - ?dependsOn=task-123 - Returns task IDs only (lightweight) * - ?dependsOn=task-123&includeDetails=true - Returns full task objects * - ?dependsOn=task-123&status=pending - Pending tasks waiting for task-123 * * **Ordering:** * Tasks are returned in reverse chronological order (most recent first).
2930
+ * @summary List tasks with optional filtering
1804
2931
  * @param {string} organisation The organisation ID
1805
- * @param {string} [userId] Filter sessions by user ID
1806
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
1807
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
1808
- * @param {number} [offset] Offset for pagination
1809
- * @param {string} [model] Filter by model ID
2932
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
2933
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
2934
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
2935
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
2936
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
2937
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
1810
2938
  * @param {*} [options] Override http request option.
1811
2939
  * @throws {RequiredError}
1812
2940
  */
1813
- listAISessions: (organisation_1, userId_1, sessionGroup_1, limit_1, offset_1, model_1, ...args_1) => __awaiter(this, [organisation_1, userId_1, sessionGroup_1, limit_1, offset_1, model_1, ...args_1], void 0, function* (organisation, userId, sessionGroup, limit, offset, model, options = {}) {
2941
+ listTasks: (organisation_1, taskListId_1, status_1, assignedAgentId_1, limit_1, dependsOn_1, includeDetails_1, ...args_1) => __awaiter(this, [organisation_1, taskListId_1, status_1, assignedAgentId_1, limit_1, dependsOn_1, includeDetails_1, ...args_1], void 0, function* (organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options = {}) {
1814
2942
  // verify required parameter 'organisation' is not null or undefined
1815
- (0, common_1.assertParamExists)('listAISessions', 'organisation', organisation);
1816
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2943
+ (0, common_1.assertParamExists)('listTasks', 'organisation', organisation);
2944
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks`
1817
2945
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1818
2946
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1819
2947
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -1827,20 +2955,23 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1827
2955
  // authentication BearerAuth required
1828
2956
  // http bearer authentication required
1829
2957
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1830
- if (userId !== undefined) {
1831
- localVarQueryParameter['userId'] = userId;
2958
+ if (taskListId !== undefined) {
2959
+ localVarQueryParameter['taskListId'] = taskListId;
1832
2960
  }
1833
- if (sessionGroup !== undefined) {
1834
- localVarQueryParameter['sessionGroup'] = sessionGroup;
2961
+ if (status !== undefined) {
2962
+ localVarQueryParameter['status'] = status;
2963
+ }
2964
+ if (assignedAgentId !== undefined) {
2965
+ localVarQueryParameter['assignedAgentId'] = assignedAgentId;
1835
2966
  }
1836
2967
  if (limit !== undefined) {
1837
2968
  localVarQueryParameter['limit'] = limit;
1838
2969
  }
1839
- if (offset !== undefined) {
1840
- localVarQueryParameter['offset'] = offset;
2970
+ if (dependsOn !== undefined) {
2971
+ localVarQueryParameter['dependsOn'] = dependsOn;
1841
2972
  }
1842
- if (model !== undefined) {
1843
- localVarQueryParameter['model'] = model;
2973
+ if (includeDetails !== undefined) {
2974
+ localVarQueryParameter['includeDetails'] = includeDetails;
1844
2975
  }
1845
2976
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1846
2977
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1851,24 +2982,24 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1851
2982
  };
1852
2983
  }),
1853
2984
  /**
1854
- * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
1855
- * @summary Update Session
2985
+ * Updates an existing task. All fields are optional - only provided fields will be updated. * * **Status Transitions:** * - Changing from **pending** to **in_progress** automatically sets startedAt timestamp * - Changing to **completed**, **failed**, or **cancelled** automatically sets completedAt timestamp * - Changing to **blocked** automatically sets blockedAt timestamp * - Changing from **blocked** to **in_progress** or **pending** clears blocked fields * - Completed tasks get a 30-day TTL for automatic cleanup * * **Progress Updates:** * - Update progress (0.0 to 1.0) to track completion percentage * - Update progressMessage for human-readable status updates * - Set result object when task completes successfully * - Set error string when task fails * - Set blockedReason and blockedByTaskIds when blocking a task
2986
+ * @summary Update a task
1856
2987
  * @param {string} organisation The organisation ID
1857
- * @param {string} sessionId The session ID
1858
- * @param {UpdateAISessionRequest} updateAISessionRequest
2988
+ * @param {string} taskId The task UUID
2989
+ * @param {UpdateTaskRequest} updateTaskRequest
1859
2990
  * @param {*} [options] Override http request option.
1860
2991
  * @throws {RequiredError}
1861
2992
  */
1862
- updateAISession: (organisation_1, sessionId_1, updateAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, updateAISessionRequest_1, ...args_1], void 0, function* (organisation, sessionId, updateAISessionRequest, options = {}) {
2993
+ updateTask: (organisation_1, taskId_1, updateTaskRequest_1, ...args_1) => __awaiter(this, [organisation_1, taskId_1, updateTaskRequest_1, ...args_1], void 0, function* (organisation, taskId, updateTaskRequest, options = {}) {
1863
2994
  // verify required parameter 'organisation' is not null or undefined
1864
- (0, common_1.assertParamExists)('updateAISession', 'organisation', organisation);
1865
- // verify required parameter 'sessionId' is not null or undefined
1866
- (0, common_1.assertParamExists)('updateAISession', 'sessionId', sessionId);
1867
- // verify required parameter 'updateAISessionRequest' is not null or undefined
1868
- (0, common_1.assertParamExists)('updateAISession', 'updateAISessionRequest', updateAISessionRequest);
1869
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2995
+ (0, common_1.assertParamExists)('updateTask', 'organisation', organisation);
2996
+ // verify required parameter 'taskId' is not null or undefined
2997
+ (0, common_1.assertParamExists)('updateTask', 'taskId', taskId);
2998
+ // verify required parameter 'updateTaskRequest' is not null or undefined
2999
+ (0, common_1.assertParamExists)('updateTask', 'updateTaskRequest', updateTaskRequest);
3000
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1870
3001
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1871
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
3002
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1872
3003
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1873
3004
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1874
3005
  let baseOptions;
@@ -1885,7 +3016,7 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1885
3016
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1886
3017
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1887
3018
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1888
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAISessionRequest, localVarRequestOptions, configuration);
3019
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateTaskRequest, localVarRequestOptions, configuration);
1889
3020
  return {
1890
3021
  url: (0, common_1.toPathString)(localVarUrlObj),
1891
3022
  options: localVarRequestOptions,
@@ -1893,300 +3024,350 @@ const AISessionsApiAxiosParamCreator = function (configuration) {
1893
3024
  }),
1894
3025
  };
1895
3026
  };
1896
- exports.AISessionsApiAxiosParamCreator = AISessionsApiAxiosParamCreator;
3027
+ exports.AITaskManagementApiAxiosParamCreator = AITaskManagementApiAxiosParamCreator;
1897
3028
  /**
1898
- * AISessionsApi - functional programming interface
3029
+ * AITaskManagementApi - functional programming interface
1899
3030
  * @export
1900
3031
  */
1901
- const AISessionsApiFp = function (configuration) {
1902
- const localVarAxiosParamCreator = (0, exports.AISessionsApiAxiosParamCreator)(configuration);
3032
+ const AITaskManagementApiFp = function (configuration) {
3033
+ const localVarAxiosParamCreator = (0, exports.AITaskManagementApiAxiosParamCreator)(configuration);
1903
3034
  return {
1904
3035
  /**
1905
- * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
1906
- * @summary Create a new chat session with multi-tenant isolation
3036
+ * Creates a new task for multi-agent coordination and workflow orchestration. * * **Key Features:** * - **Persistent State**: Tasks survive across conversations and sessions * - **Agent Assignment**: Pre-assign tasks to specific agents * - **Task Lists**: Group related tasks using taskListId (implicit - no need to create lists first) * - **Dependencies**: Define task dependencies for workflow orchestration * - **Metadata**: Store flexible JSON metadata for task-specific data * - **Progress Tracking**: Track progress from 0.0 to 1.0 * * **Use Cases:** * - Break down complex requests into manageable steps * - Assign work to specialized agents * - Track long-running operations * - Coordinate multi-agent workflows
3037
+ * @summary Create a new task
1907
3038
  * @param {string} organisation The organisation ID
1908
- * @param {CreateAISessionRequest} createAISessionRequest
3039
+ * @param {CreateTaskRequest} createTaskRequest
1909
3040
  * @param {*} [options] Override http request option.
1910
3041
  * @throws {RequiredError}
1911
3042
  */
1912
- createAISession(organisation, createAISessionRequest, options) {
3043
+ createTask(organisation, createTaskRequest, options) {
1913
3044
  return __awaiter(this, void 0, void 0, function* () {
1914
3045
  var _a, _b, _c;
1915
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options);
3046
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createTask(organisation, createTaskRequest, options);
1916
3047
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1917
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.createAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3048
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.createTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1918
3049
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1919
3050
  });
1920
3051
  },
1921
3052
  /**
1922
- *
1923
- * @summary Delete a chat session
3053
+ * Permanently deletes a task. This action cannot be undone. * * **Dependency Protection:** * By default, deletion is blocked if other tasks depend on this task (TASK_HAS_DEPENDENTS error). * This prevents breaking workflows. * * **Cascade Delete:** * Use `?cascade=true` to delete the task AND all tasks that depend on it recursively. * Useful for cleaning up entire dependency chains. * * **Examples:** * - DELETE /tasks/{id} - Deletes task if no dependents, otherwise returns 409 error * - DELETE /tasks/{id}?cascade=true - Deletes task and all dependent tasks
3054
+ * @summary Delete a task
1924
3055
  * @param {string} organisation The organisation ID
1925
- * @param {string} sessionId The session ID
3056
+ * @param {string} taskId The task UUID
3057
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
1926
3058
  * @param {*} [options] Override http request option.
1927
3059
  * @throws {RequiredError}
1928
3060
  */
1929
- deleteAISession(organisation, sessionId, options) {
3061
+ deleteTask(organisation, taskId, cascade, options) {
1930
3062
  return __awaiter(this, void 0, void 0, function* () {
1931
3063
  var _a, _b, _c;
1932
- const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options);
3064
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteTask(organisation, taskId, cascade, options);
1933
3065
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1934
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.deleteAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3066
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.deleteTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1935
3067
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1936
3068
  });
1937
3069
  },
1938
3070
  /**
1939
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
1940
- * @summary Extend Session Expiration
3071
+ * Returns the full dependency graph for all tasks in a task list. * * **Use Cases:** * - Visualize task dependencies in a UI (DAG diagram) * - Analyze workflow structure and critical paths * - Find starting tasks (roots) and terminal tasks (leaves) * - Plan parallel execution by identifying independent task groups * * **Response Structure:** * - `taskCount`: Total number of tasks in the list * - `roots`: Task IDs with no dependencies (starting points) * - `leaves`: Task IDs with no dependents (terminal tasks) * - `graph`: Adjacency list with each task\'s dependencies and dependents
3072
+ * @summary Get dependency graph for a task list
1941
3073
  * @param {string} organisation The organisation ID
1942
- * @param {string} sessionId The session ID
1943
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3074
+ * @param {string} taskListId The task list ID to get the dependency graph for
1944
3075
  * @param {*} [options] Override http request option.
1945
3076
  * @throws {RequiredError}
1946
3077
  */
1947
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
3078
+ getDependencyGraph(organisation, taskListId, options) {
1948
3079
  return __awaiter(this, void 0, void 0, function* () {
1949
3080
  var _a, _b, _c;
1950
- const localVarAxiosArgs = yield localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options);
3081
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDependencyGraph(organisation, taskListId, options);
1951
3082
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1952
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.extendAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3083
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.getDependencyGraph']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1953
3084
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1954
3085
  });
1955
3086
  },
1956
3087
  /**
1957
- *
1958
- * @summary Get a specific chat session
3088
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3089
+ * @summary Get task details
1959
3090
  * @param {string} organisation The organisation ID
1960
- * @param {string} sessionId The session ID
3091
+ * @param {string} taskId The task UUID
1961
3092
  * @param {*} [options] Override http request option.
1962
3093
  * @throws {RequiredError}
1963
3094
  */
1964
- getAISession(organisation, sessionId, options) {
3095
+ getTask(organisation, taskId, options) {
1965
3096
  return __awaiter(this, void 0, void 0, function* () {
1966
3097
  var _a, _b, _c;
1967
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAISession(organisation, sessionId, options);
3098
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTask(organisation, taskId, options);
1968
3099
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1969
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.getAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3100
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.getTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1970
3101
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1971
3102
  });
1972
3103
  },
1973
3104
  /**
1974
- * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
1975
- * @summary List chat sessions with multi-tenant filtering
3105
+ * Lists tasks for an organization with optional filtering. Filters can be combined for powerful queries. * * **Filter Examples:** * - All tasks in a list: ?taskListId=world-1 * - Pending tasks in a list: ?taskListId=world-1&status=pending * - Tasks assigned to an agent: ?assignedAgentId=agent-code-reviewer * - Combined: ?taskListId=world-1&status=in_progress&assignedAgentId=agent-1 * * **Reverse Dependency Lookup:** * Use `dependsOn` to find tasks that depend on a specific task (waiting for it to complete): * - ?dependsOn=task-123 - Returns task IDs only (lightweight) * - ?dependsOn=task-123&includeDetails=true - Returns full task objects * - ?dependsOn=task-123&status=pending - Pending tasks waiting for task-123 * * **Ordering:** * Tasks are returned in reverse chronological order (most recent first).
3106
+ * @summary List tasks with optional filtering
1976
3107
  * @param {string} organisation The organisation ID
1977
- * @param {string} [userId] Filter sessions by user ID
1978
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
1979
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
1980
- * @param {number} [offset] Offset for pagination
1981
- * @param {string} [model] Filter by model ID
3108
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3109
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3110
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3111
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3112
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3113
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
1982
3114
  * @param {*} [options] Override http request option.
1983
3115
  * @throws {RequiredError}
1984
3116
  */
1985
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
3117
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
1986
3118
  return __awaiter(this, void 0, void 0, function* () {
1987
3119
  var _a, _b, _c;
1988
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options);
3120
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options);
1989
3121
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1990
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.listAISessions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3122
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.listTasks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1991
3123
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1992
3124
  });
1993
3125
  },
1994
3126
  /**
1995
- * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
1996
- * @summary Update Session
3127
+ * Updates an existing task. All fields are optional - only provided fields will be updated. * * **Status Transitions:** * - Changing from **pending** to **in_progress** automatically sets startedAt timestamp * - Changing to **completed**, **failed**, or **cancelled** automatically sets completedAt timestamp * - Changing to **blocked** automatically sets blockedAt timestamp * - Changing from **blocked** to **in_progress** or **pending** clears blocked fields * - Completed tasks get a 30-day TTL for automatic cleanup * * **Progress Updates:** * - Update progress (0.0 to 1.0) to track completion percentage * - Update progressMessage for human-readable status updates * - Set result object when task completes successfully * - Set error string when task fails * - Set blockedReason and blockedByTaskIds when blocking a task
3128
+ * @summary Update a task
1997
3129
  * @param {string} organisation The organisation ID
1998
- * @param {string} sessionId The session ID
1999
- * @param {UpdateAISessionRequest} updateAISessionRequest
3130
+ * @param {string} taskId The task UUID
3131
+ * @param {UpdateTaskRequest} updateTaskRequest
2000
3132
  * @param {*} [options] Override http request option.
2001
3133
  * @throws {RequiredError}
2002
3134
  */
2003
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
3135
+ updateTask(organisation, taskId, updateTaskRequest, options) {
2004
3136
  return __awaiter(this, void 0, void 0, function* () {
2005
3137
  var _a, _b, _c;
2006
- const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options);
3138
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateTask(organisation, taskId, updateTaskRequest, options);
2007
3139
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2008
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AISessionsApi.updateAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3140
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AITaskManagementApi.updateTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2009
3141
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2010
3142
  });
2011
3143
  },
2012
3144
  };
2013
3145
  };
2014
- exports.AISessionsApiFp = AISessionsApiFp;
3146
+ exports.AITaskManagementApiFp = AITaskManagementApiFp;
2015
3147
  /**
2016
- * AISessionsApi - factory interface
3148
+ * AITaskManagementApi - factory interface
2017
3149
  * @export
2018
3150
  */
2019
- const AISessionsApiFactory = function (configuration, basePath, axios) {
2020
- const localVarFp = (0, exports.AISessionsApiFp)(configuration);
3151
+ const AITaskManagementApiFactory = function (configuration, basePath, axios) {
3152
+ const localVarFp = (0, exports.AITaskManagementApiFp)(configuration);
2021
3153
  return {
2022
3154
  /**
2023
- * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2024
- * @summary Create a new chat session with multi-tenant isolation
3155
+ * Creates a new task for multi-agent coordination and workflow orchestration. * * **Key Features:** * - **Persistent State**: Tasks survive across conversations and sessions * - **Agent Assignment**: Pre-assign tasks to specific agents * - **Task Lists**: Group related tasks using taskListId (implicit - no need to create lists first) * - **Dependencies**: Define task dependencies for workflow orchestration * - **Metadata**: Store flexible JSON metadata for task-specific data * - **Progress Tracking**: Track progress from 0.0 to 1.0 * * **Use Cases:** * - Break down complex requests into manageable steps * - Assign work to specialized agents * - Track long-running operations * - Coordinate multi-agent workflows
3156
+ * @summary Create a new task
2025
3157
  * @param {string} organisation The organisation ID
2026
- * @param {CreateAISessionRequest} createAISessionRequest
3158
+ * @param {CreateTaskRequest} createTaskRequest
2027
3159
  * @param {*} [options] Override http request option.
2028
3160
  * @throws {RequiredError}
2029
3161
  */
2030
- createAISession(organisation, createAISessionRequest, options) {
2031
- return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath));
3162
+ createTask(organisation, createTaskRequest, options) {
3163
+ return localVarFp.createTask(organisation, createTaskRequest, options).then((request) => request(axios, basePath));
2032
3164
  },
2033
3165
  /**
2034
- *
2035
- * @summary Delete a chat session
3166
+ * Permanently deletes a task. This action cannot be undone. * * **Dependency Protection:** * By default, deletion is blocked if other tasks depend on this task (TASK_HAS_DEPENDENTS error). * This prevents breaking workflows. * * **Cascade Delete:** * Use `?cascade=true` to delete the task AND all tasks that depend on it recursively. * Useful for cleaning up entire dependency chains. * * **Examples:** * - DELETE /tasks/{id} - Deletes task if no dependents, otherwise returns 409 error * - DELETE /tasks/{id}?cascade=true - Deletes task and all dependent tasks
3167
+ * @summary Delete a task
2036
3168
  * @param {string} organisation The organisation ID
2037
- * @param {string} sessionId The session ID
3169
+ * @param {string} taskId The task UUID
3170
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
2038
3171
  * @param {*} [options] Override http request option.
2039
3172
  * @throws {RequiredError}
2040
3173
  */
2041
- deleteAISession(organisation, sessionId, options) {
2042
- return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
3174
+ deleteTask(organisation, taskId, cascade, options) {
3175
+ return localVarFp.deleteTask(organisation, taskId, cascade, options).then((request) => request(axios, basePath));
2043
3176
  },
2044
3177
  /**
2045
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2046
- * @summary Extend Session Expiration
3178
+ * Returns the full dependency graph for all tasks in a task list. * * **Use Cases:** * - Visualize task dependencies in a UI (DAG diagram) * - Analyze workflow structure and critical paths * - Find starting tasks (roots) and terminal tasks (leaves) * - Plan parallel execution by identifying independent task groups * * **Response Structure:** * - `taskCount`: Total number of tasks in the list * - `roots`: Task IDs with no dependencies (starting points) * - `leaves`: Task IDs with no dependents (terminal tasks) * - `graph`: Adjacency list with each task\'s dependencies and dependents
3179
+ * @summary Get dependency graph for a task list
2047
3180
  * @param {string} organisation The organisation ID
2048
- * @param {string} sessionId The session ID
2049
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3181
+ * @param {string} taskListId The task list ID to get the dependency graph for
2050
3182
  * @param {*} [options] Override http request option.
2051
3183
  * @throws {RequiredError}
2052
3184
  */
2053
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2054
- return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath));
3185
+ getDependencyGraph(organisation, taskListId, options) {
3186
+ return localVarFp.getDependencyGraph(organisation, taskListId, options).then((request) => request(axios, basePath));
2055
3187
  },
2056
3188
  /**
2057
- *
2058
- * @summary Get a specific chat session
3189
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3190
+ * @summary Get task details
2059
3191
  * @param {string} organisation The organisation ID
2060
- * @param {string} sessionId The session ID
3192
+ * @param {string} taskId The task UUID
2061
3193
  * @param {*} [options] Override http request option.
2062
3194
  * @throws {RequiredError}
2063
3195
  */
2064
- getAISession(organisation, sessionId, options) {
2065
- return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
3196
+ getTask(organisation, taskId, options) {
3197
+ return localVarFp.getTask(organisation, taskId, options).then((request) => request(axios, basePath));
2066
3198
  },
2067
3199
  /**
2068
- * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2069
- * @summary List chat sessions with multi-tenant filtering
3200
+ * Lists tasks for an organization with optional filtering. Filters can be combined for powerful queries. * * **Filter Examples:** * - All tasks in a list: ?taskListId=world-1 * - Pending tasks in a list: ?taskListId=world-1&status=pending * - Tasks assigned to an agent: ?assignedAgentId=agent-code-reviewer * - Combined: ?taskListId=world-1&status=in_progress&assignedAgentId=agent-1 * * **Reverse Dependency Lookup:** * Use `dependsOn` to find tasks that depend on a specific task (waiting for it to complete): * - ?dependsOn=task-123 - Returns task IDs only (lightweight) * - ?dependsOn=task-123&includeDetails=true - Returns full task objects * - ?dependsOn=task-123&status=pending - Pending tasks waiting for task-123 * * **Ordering:** * Tasks are returned in reverse chronological order (most recent first).
3201
+ * @summary List tasks with optional filtering
2070
3202
  * @param {string} organisation The organisation ID
2071
- * @param {string} [userId] Filter sessions by user ID
2072
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2073
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2074
- * @param {number} [offset] Offset for pagination
2075
- * @param {string} [model] Filter by model ID
3203
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3204
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3205
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3206
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3207
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3208
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
2076
3209
  * @param {*} [options] Override http request option.
2077
3210
  * @throws {RequiredError}
2078
3211
  */
2079
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2080
- return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath));
3212
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
3213
+ return localVarFp.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(axios, basePath));
2081
3214
  },
2082
3215
  /**
2083
- * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2084
- * @summary Update Session
3216
+ * Updates an existing task. All fields are optional - only provided fields will be updated. * * **Status Transitions:** * - Changing from **pending** to **in_progress** automatically sets startedAt timestamp * - Changing to **completed**, **failed**, or **cancelled** automatically sets completedAt timestamp * - Changing to **blocked** automatically sets blockedAt timestamp * - Changing from **blocked** to **in_progress** or **pending** clears blocked fields * - Completed tasks get a 30-day TTL for automatic cleanup * * **Progress Updates:** * - Update progress (0.0 to 1.0) to track completion percentage * - Update progressMessage for human-readable status updates * - Set result object when task completes successfully * - Set error string when task fails * - Set blockedReason and blockedByTaskIds when blocking a task
3217
+ * @summary Update a task
2085
3218
  * @param {string} organisation The organisation ID
2086
- * @param {string} sessionId The session ID
2087
- * @param {UpdateAISessionRequest} updateAISessionRequest
3219
+ * @param {string} taskId The task UUID
3220
+ * @param {UpdateTaskRequest} updateTaskRequest
2088
3221
  * @param {*} [options] Override http request option.
2089
3222
  * @throws {RequiredError}
2090
3223
  */
2091
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2092
- return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath));
3224
+ updateTask(organisation, taskId, updateTaskRequest, options) {
3225
+ return localVarFp.updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(axios, basePath));
2093
3226
  },
2094
3227
  };
2095
3228
  };
2096
- exports.AISessionsApiFactory = AISessionsApiFactory;
3229
+ exports.AITaskManagementApiFactory = AITaskManagementApiFactory;
2097
3230
  /**
2098
- * AISessionsApi - object-oriented interface
3231
+ * AITaskManagementApi - object-oriented interface
2099
3232
  * @export
2100
- * @class AISessionsApi
3233
+ * @class AITaskManagementApi
2101
3234
  * @extends {BaseAPI}
2102
3235
  */
2103
- class AISessionsApi extends base_1.BaseAPI {
3236
+ class AITaskManagementApi extends base_1.BaseAPI {
2104
3237
  /**
2105
- * Creates an AI session with automatic expiration (60 min default, 24h max). Sessions are isolated by organization. Use userId to identify the user creating the session. Use sessionGroup for logical grouping. Use metadata for additional custom data. Filter sessions by userId or sessionGroup when listing.
2106
- * @summary Create a new chat session with multi-tenant isolation
3238
+ * Creates a new task for multi-agent coordination and workflow orchestration. * * **Key Features:** * - **Persistent State**: Tasks survive across conversations and sessions * - **Agent Assignment**: Pre-assign tasks to specific agents * - **Task Lists**: Group related tasks using taskListId (implicit - no need to create lists first) * - **Dependencies**: Define task dependencies for workflow orchestration * - **Metadata**: Store flexible JSON metadata for task-specific data * - **Progress Tracking**: Track progress from 0.0 to 1.0 * * **Use Cases:** * - Break down complex requests into manageable steps * - Assign work to specialized agents * - Track long-running operations * - Coordinate multi-agent workflows
3239
+ * @summary Create a new task
2107
3240
  * @param {string} organisation The organisation ID
2108
- * @param {CreateAISessionRequest} createAISessionRequest
3241
+ * @param {CreateTaskRequest} createTaskRequest
2109
3242
  * @param {*} [options] Override http request option.
2110
3243
  * @throws {RequiredError}
2111
- * @memberof AISessionsApi
3244
+ * @memberof AITaskManagementApi
2112
3245
  */
2113
- createAISession(organisation, createAISessionRequest, options) {
2114
- return (0, exports.AISessionsApiFp)(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3246
+ createTask(organisation, createTaskRequest, options) {
3247
+ return (0, exports.AITaskManagementApiFp)(this.configuration).createTask(organisation, createTaskRequest, options).then((request) => request(this.axios, this.basePath));
2115
3248
  }
2116
3249
  /**
2117
- *
2118
- * @summary Delete a chat session
3250
+ * Permanently deletes a task. This action cannot be undone. * * **Dependency Protection:** * By default, deletion is blocked if other tasks depend on this task (TASK_HAS_DEPENDENTS error). * This prevents breaking workflows. * * **Cascade Delete:** * Use `?cascade=true` to delete the task AND all tasks that depend on it recursively. * Useful for cleaning up entire dependency chains. * * **Examples:** * - DELETE /tasks/{id} - Deletes task if no dependents, otherwise returns 409 error * - DELETE /tasks/{id}?cascade=true - Deletes task and all dependent tasks
3251
+ * @summary Delete a task
2119
3252
  * @param {string} organisation The organisation ID
2120
- * @param {string} sessionId The session ID
3253
+ * @param {string} taskId The task UUID
3254
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
2121
3255
  * @param {*} [options] Override http request option.
2122
3256
  * @throws {RequiredError}
2123
- * @memberof AISessionsApi
3257
+ * @memberof AITaskManagementApi
2124
3258
  */
2125
- deleteAISession(organisation, sessionId, options) {
2126
- return (0, exports.AISessionsApiFp)(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
3259
+ deleteTask(organisation, taskId, cascade, options) {
3260
+ return (0, exports.AITaskManagementApiFp)(this.configuration).deleteTask(organisation, taskId, cascade, options).then((request) => request(this.axios, this.basePath));
2127
3261
  }
2128
3262
  /**
2129
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2130
- * @summary Extend Session Expiration
3263
+ * Returns the full dependency graph for all tasks in a task list. * * **Use Cases:** * - Visualize task dependencies in a UI (DAG diagram) * - Analyze workflow structure and critical paths * - Find starting tasks (roots) and terminal tasks (leaves) * - Plan parallel execution by identifying independent task groups * * **Response Structure:** * - `taskCount`: Total number of tasks in the list * - `roots`: Task IDs with no dependencies (starting points) * - `leaves`: Task IDs with no dependents (terminal tasks) * - `graph`: Adjacency list with each task\'s dependencies and dependents
3264
+ * @summary Get dependency graph for a task list
2131
3265
  * @param {string} organisation The organisation ID
2132
- * @param {string} sessionId The session ID
2133
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3266
+ * @param {string} taskListId The task list ID to get the dependency graph for
2134
3267
  * @param {*} [options] Override http request option.
2135
3268
  * @throws {RequiredError}
2136
- * @memberof AISessionsApi
3269
+ * @memberof AITaskManagementApi
2137
3270
  */
2138
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2139
- return (0, exports.AISessionsApiFp)(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3271
+ getDependencyGraph(organisation, taskListId, options) {
3272
+ return (0, exports.AITaskManagementApiFp)(this.configuration).getDependencyGraph(organisation, taskListId, options).then((request) => request(this.axios, this.basePath));
2140
3273
  }
2141
3274
  /**
2142
- *
2143
- * @summary Get a specific chat session
3275
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3276
+ * @summary Get task details
2144
3277
  * @param {string} organisation The organisation ID
2145
- * @param {string} sessionId The session ID
3278
+ * @param {string} taskId The task UUID
2146
3279
  * @param {*} [options] Override http request option.
2147
3280
  * @throws {RequiredError}
2148
- * @memberof AISessionsApi
3281
+ * @memberof AITaskManagementApi
2149
3282
  */
2150
- getAISession(organisation, sessionId, options) {
2151
- return (0, exports.AISessionsApiFp)(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
3283
+ getTask(organisation, taskId, options) {
3284
+ return (0, exports.AITaskManagementApiFp)(this.configuration).getTask(organisation, taskId, options).then((request) => request(this.axios, this.basePath));
2152
3285
  }
2153
3286
  /**
2154
- * Lists active sessions for an organization with flexible filtering options. * * **Query Combinations:** * 1. By Organization (default): Returns all sessions in the organization * 2. By Organization + Group: `?sessionGroup=drupal-prod` - Sessions in a specific group * 3. By User: `?userId=user-123` - All sessions for a user * 4. By User + Group: `?userId=user-123&sessionGroup=drupal-prod` - User\'s sessions in a specific group * * **Use Cases:** * - List user\'s conversations in a specific app/environment * - Admin view of all sessions in a customer/tenant group * - User profile showing all AI conversations across apps
2155
- * @summary List chat sessions with multi-tenant filtering
3287
+ * Lists tasks for an organization with optional filtering. Filters can be combined for powerful queries. * * **Filter Examples:** * - All tasks in a list: ?taskListId=world-1 * - Pending tasks in a list: ?taskListId=world-1&status=pending * - Tasks assigned to an agent: ?assignedAgentId=agent-code-reviewer * - Combined: ?taskListId=world-1&status=in_progress&assignedAgentId=agent-1 * * **Reverse Dependency Lookup:** * Use `dependsOn` to find tasks that depend on a specific task (waiting for it to complete): * - ?dependsOn=task-123 - Returns task IDs only (lightweight) * - ?dependsOn=task-123&includeDetails=true - Returns full task objects * - ?dependsOn=task-123&status=pending - Pending tasks waiting for task-123 * * **Ordering:** * Tasks are returned in reverse chronological order (most recent first).
3288
+ * @summary List tasks with optional filtering
2156
3289
  * @param {string} organisation The organisation ID
2157
- * @param {string} [userId] Filter sessions by user ID
2158
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2159
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2160
- * @param {number} [offset] Offset for pagination
2161
- * @param {string} [model] Filter by model ID
3290
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3291
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3292
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3293
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3294
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3295
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
2162
3296
  * @param {*} [options] Override http request option.
2163
3297
  * @throws {RequiredError}
2164
- * @memberof AISessionsApi
3298
+ * @memberof AITaskManagementApi
2165
3299
  */
2166
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2167
- return (0, exports.AISessionsApiFp)(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath));
3300
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
3301
+ return (0, exports.AITaskManagementApiFp)(this.configuration).listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(this.axios, this.basePath));
2168
3302
  }
2169
3303
  /**
2170
- * Updates session with new conversation messages and tracks token usage. Appends new messages to conversation history and updates session stats. * * **Typical Flow:** * 1. Get session to retrieve conversation history * 2. Call AI inference with full message history * 3. Update session with new user + assistant messages
2171
- * @summary Update Session
3304
+ * Updates an existing task. All fields are optional - only provided fields will be updated. * * **Status Transitions:** * - Changing from **pending** to **in_progress** automatically sets startedAt timestamp * - Changing to **completed**, **failed**, or **cancelled** automatically sets completedAt timestamp * - Changing to **blocked** automatically sets blockedAt timestamp * - Changing from **blocked** to **in_progress** or **pending** clears blocked fields * - Completed tasks get a 30-day TTL for automatic cleanup * * **Progress Updates:** * - Update progress (0.0 to 1.0) to track completion percentage * - Update progressMessage for human-readable status updates * - Set result object when task completes successfully * - Set error string when task fails * - Set blockedReason and blockedByTaskIds when blocking a task
3305
+ * @summary Update a task
2172
3306
  * @param {string} organisation The organisation ID
2173
- * @param {string} sessionId The session ID
2174
- * @param {UpdateAISessionRequest} updateAISessionRequest
3307
+ * @param {string} taskId The task UUID
3308
+ * @param {UpdateTaskRequest} updateTaskRequest
2175
3309
  * @param {*} [options] Override http request option.
2176
3310
  * @throws {RequiredError}
2177
- * @memberof AISessionsApi
3311
+ * @memberof AITaskManagementApi
2178
3312
  */
2179
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2180
- return (0, exports.AISessionsApiFp)(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3313
+ updateTask(organisation, taskId, updateTaskRequest, options) {
3314
+ return (0, exports.AITaskManagementApiFp)(this.configuration).updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(this.axios, this.basePath));
2181
3315
  }
2182
3316
  }
2183
- exports.AISessionsApi = AISessionsApi;
3317
+ exports.AITaskManagementApi = AITaskManagementApi;
3318
+ /**
3319
+ * @export
3320
+ */
3321
+ exports.ListTasksStatusEnum = {
3322
+ Pending: 'pending',
3323
+ InProgress: 'in_progress',
3324
+ Completed: 'completed',
3325
+ Failed: 'failed',
3326
+ Cancelled: 'cancelled',
3327
+ Blocked: 'blocked'
3328
+ };
2184
3329
  /**
2185
3330
  * AIToolsApi - axios parameter creator
2186
3331
  * @export
2187
3332
  */
2188
3333
  const AIToolsApiAxiosParamCreator = function (configuration) {
2189
3334
  return {
3335
+ /**
3336
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
3337
+ * @summary Get Orchestration Status
3338
+ * @param {string} organisation The organisation ID
3339
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3340
+ * @param {*} [options] Override http request option.
3341
+ * @throws {RequiredError}
3342
+ */
3343
+ getAIOrchestrationStatus: (organisation_1, orchestrationId_1, ...args_1) => __awaiter(this, [organisation_1, orchestrationId_1, ...args_1], void 0, function* (organisation, orchestrationId, options = {}) {
3344
+ // verify required parameter 'organisation' is not null or undefined
3345
+ (0, common_1.assertParamExists)('getAIOrchestrationStatus', 'organisation', organisation);
3346
+ // verify required parameter 'orchestrationId' is not null or undefined
3347
+ (0, common_1.assertParamExists)('getAIOrchestrationStatus', 'orchestrationId', orchestrationId);
3348
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}`
3349
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
3350
+ .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId)));
3351
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3352
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3353
+ let baseOptions;
3354
+ if (configuration) {
3355
+ baseOptions = configuration.baseOptions;
3356
+ }
3357
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3358
+ const localVarHeaderParameter = {};
3359
+ const localVarQueryParameter = {};
3360
+ // authentication BearerAuth required
3361
+ // http bearer authentication required
3362
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3363
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3364
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3365
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3366
+ return {
3367
+ url: (0, common_1.toPathString)(localVarUrlObj),
3368
+ options: localVarRequestOptions,
3369
+ };
3370
+ }),
2190
3371
  /**
2191
3372
  * Retrieves the status and result of an async tool execution. Used for polling long-running tools like image generation. * * **Async Tool Execution Pattern:** * This endpoint enables a polling pattern for long-running tools that would otherwise hit API Gateway\'s 30-second timeout. * * **Flow:** * 1. AI requests tool use (e.g., `generate_image`) * 2. Chat API returns `toolUse` with execution tracking info * 3. Client starts polling this endpoint with the `executionId` * 4. When `status === \'complete\'`, retrieve `result` and send back to AI * 5. AI incorporates result into final response * * **Status Values:** * - `pending`: Tool execution queued, not yet started * - `running`: Tool is currently executing * - `complete`: Tool execution finished successfully, `result` available * - `failed`: Tool execution failed, `error` available * * **Polling Recommendations:** * - Poll every 2-3 seconds for image generation * - Exponential backoff for other tools (start 1s, max 5s) * - Stop polling after 5 minutes (consider failed) * - Auto-cleanup after 24 hours (TTL) * * **Use Cases:** * - Image generation (10-15s typical runtime) * - Video processing * - Large file uploads/downloads * - Complex database queries * - External API calls with high latency
2192
3373
  * @summary Get async tool execution status and result
@@ -2337,6 +3518,23 @@ exports.AIToolsApiAxiosParamCreator = AIToolsApiAxiosParamCreator;
2337
3518
  const AIToolsApiFp = function (configuration) {
2338
3519
  const localVarAxiosParamCreator = (0, exports.AIToolsApiAxiosParamCreator)(configuration);
2339
3520
  return {
3521
+ /**
3522
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
3523
+ * @summary Get Orchestration Status
3524
+ * @param {string} organisation The organisation ID
3525
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3526
+ * @param {*} [options] Override http request option.
3527
+ * @throws {RequiredError}
3528
+ */
3529
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3530
+ return __awaiter(this, void 0, void 0, function* () {
3531
+ var _a, _b, _c;
3532
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options);
3533
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3534
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIToolsApi.getAIOrchestrationStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3535
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3536
+ });
3537
+ },
2340
3538
  /**
2341
3539
  * Retrieves the status and result of an async tool execution. Used for polling long-running tools like image generation. * * **Async Tool Execution Pattern:** * This endpoint enables a polling pattern for long-running tools that would otherwise hit API Gateway\'s 30-second timeout. * * **Flow:** * 1. AI requests tool use (e.g., `generate_image`) * 2. Chat API returns `toolUse` with execution tracking info * 3. Client starts polling this endpoint with the `executionId` * 4. When `status === \'complete\'`, retrieve `result` and send back to AI * 5. AI incorporates result into final response * * **Status Values:** * - `pending`: Tool execution queued, not yet started * - `running`: Tool is currently executing * - `complete`: Tool execution finished successfully, `result` available * - `failed`: Tool execution failed, `error` available * * **Polling Recommendations:** * - Poll every 2-3 seconds for image generation * - Exponential backoff for other tools (start 1s, max 5s) * - Stop polling after 5 minutes (consider failed) * - Auto-cleanup after 24 hours (TTL) * * **Use Cases:** * - Image generation (10-15s typical runtime) * - Video processing * - Large file uploads/downloads * - Complex database queries * - External API calls with high latency
2342
3540
  * @summary Get async tool execution status and result
@@ -2414,6 +3612,17 @@ exports.AIToolsApiFp = AIToolsApiFp;
2414
3612
  const AIToolsApiFactory = function (configuration, basePath, axios) {
2415
3613
  const localVarFp = (0, exports.AIToolsApiFp)(configuration);
2416
3614
  return {
3615
+ /**
3616
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
3617
+ * @summary Get Orchestration Status
3618
+ * @param {string} organisation The organisation ID
3619
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3620
+ * @param {*} [options] Override http request option.
3621
+ * @throws {RequiredError}
3622
+ */
3623
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3624
+ return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath));
3625
+ },
2417
3626
  /**
2418
3627
  * Retrieves the status and result of an async tool execution. Used for polling long-running tools like image generation. * * **Async Tool Execution Pattern:** * This endpoint enables a polling pattern for long-running tools that would otherwise hit API Gateway\'s 30-second timeout. * * **Flow:** * 1. AI requests tool use (e.g., `generate_image`) * 2. Chat API returns `toolUse` with execution tracking info * 3. Client starts polling this endpoint with the `executionId` * 4. When `status === \'complete\'`, retrieve `result` and send back to AI * 5. AI incorporates result into final response * * **Status Values:** * - `pending`: Tool execution queued, not yet started * - `running`: Tool is currently executing * - `complete`: Tool execution finished successfully, `result` available * - `failed`: Tool execution failed, `error` available * * **Polling Recommendations:** * - Poll every 2-3 seconds for image generation * - Exponential backoff for other tools (start 1s, max 5s) * - Stop polling after 5 minutes (consider failed) * - Auto-cleanup after 24 hours (TTL) * * **Use Cases:** * - Image generation (10-15s typical runtime) * - Video processing * - Large file uploads/downloads * - Complex database queries * - External API calls with high latency
2419
3628
  * @summary Get async tool execution status and result
@@ -2467,6 +3676,18 @@ exports.AIToolsApiFactory = AIToolsApiFactory;
2467
3676
  * @extends {BaseAPI}
2468
3677
  */
2469
3678
  class AIToolsApi extends base_1.BaseAPI {
3679
+ /**
3680
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
3681
+ * @summary Get Orchestration Status
3682
+ * @param {string} organisation The organisation ID
3683
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3684
+ * @param {*} [options] Override http request option.
3685
+ * @throws {RequiredError}
3686
+ * @memberof AIToolsApi
3687
+ */
3688
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3689
+ return (0, exports.AIToolsApiFp)(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath));
3690
+ }
2470
3691
  /**
2471
3692
  * Retrieves the status and result of an async tool execution. Used for polling long-running tools like image generation. * * **Async Tool Execution Pattern:** * This endpoint enables a polling pattern for long-running tools that would otherwise hit API Gateway\'s 30-second timeout. * * **Flow:** * 1. AI requests tool use (e.g., `generate_image`) * 2. Chat API returns `toolUse` with execution tracking info * 3. Client starts polling this endpoint with the `executionId` * 4. When `status === \'complete\'`, retrieve `result` and send back to AI * 5. AI incorporates result into final response * * **Status Values:** * - `pending`: Tool execution queued, not yet started * - `running`: Tool is currently executing * - `complete`: Tool execution finished successfully, `result` available * - `failed`: Tool execution failed, `error` available * * **Polling Recommendations:** * - Poll every 2-3 seconds for image generation * - Exponential backoff for other tools (start 1s, max 5s) * - Stop polling after 5 minutes (consider failed) * - Auto-cleanup after 24 hours (TTL) * * **Use Cases:** * - Image generation (10-15s typical runtime) * - Video processing * - Large file uploads/downloads * - Complex database queries * - External API calls with high latency
2472
3693
  * @summary Get async tool execution status and result
@@ -2673,7 +3894,7 @@ const AIVectorDatabaseApiAxiosParamCreator = function (configuration) {
2673
3894
  };
2674
3895
  }),
2675
3896
  /**
2676
- * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases
3897
+ * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Three Search Modes:** * * 1. **Text Query** - Provide `query` string, server generates embedding * - Query text is embedded using the collection\'s embedding model * - Embeddings are cached for repeated queries * * 2. **Vector Query** - Provide pre-computed `vector` array * - Skip embedding generation (faster) * - Useful when you\'ve already embedded the query elsewhere * - Vector dimension must match collection (e.g., 1024 for Titan v2) * * 3. **Metadata List** - Set `listByMetadata: true` with `filter` * - Skip semantic search entirely * - Return all documents matching the filter * - Supports cursor-based pagination for large datasets * - Results ordered by sortBy/sortOrder (default: created_at DESC) * * **Filtering:** * - `filter.exact`: Exact match on metadata fields (AND logic) * - `filter.contains`: Array contains filter for tags (ANY match) * - Filters can be combined with semantic search or used alone with listByMetadata * * **Pagination (listByMetadata mode only):** * - Use `cursor` from previous response\'s `nextCursor` to get next page * - Uses keyset pagination for efficient traversal of large datasets * - Control sort with `sortBy` and `sortOrder` * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases * - List all artifacts by building/worker/tag
2677
3898
  * @summary Semantic Search Query
2678
3899
  * @param {string} organisation The organisation ID
2679
3900
  * @param {string} collectionId The collection ID
@@ -2832,7 +4053,7 @@ const AIVectorDatabaseApiFp = function (configuration) {
2832
4053
  });
2833
4054
  },
2834
4055
  /**
2835
- * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases
4056
+ * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Three Search Modes:** * * 1. **Text Query** - Provide `query` string, server generates embedding * - Query text is embedded using the collection\'s embedding model * - Embeddings are cached for repeated queries * * 2. **Vector Query** - Provide pre-computed `vector` array * - Skip embedding generation (faster) * - Useful when you\'ve already embedded the query elsewhere * - Vector dimension must match collection (e.g., 1024 for Titan v2) * * 3. **Metadata List** - Set `listByMetadata: true` with `filter` * - Skip semantic search entirely * - Return all documents matching the filter * - Supports cursor-based pagination for large datasets * - Results ordered by sortBy/sortOrder (default: created_at DESC) * * **Filtering:** * - `filter.exact`: Exact match on metadata fields (AND logic) * - `filter.contains`: Array contains filter for tags (ANY match) * - Filters can be combined with semantic search or used alone with listByMetadata * * **Pagination (listByMetadata mode only):** * - Use `cursor` from previous response\'s `nextCursor` to get next page * - Uses keyset pagination for efficient traversal of large datasets * - Control sort with `sortBy` and `sortOrder` * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases * - List all artifacts by building/worker/tag
2836
4057
  * @summary Semantic Search Query
2837
4058
  * @param {string} organisation The organisation ID
2838
4059
  * @param {string} collectionId The collection ID
@@ -2921,7 +4142,7 @@ const AIVectorDatabaseApiFactory = function (configuration, basePath, axios) {
2921
4142
  return localVarFp.listVectorCollections(organisation, options).then((request) => request(axios, basePath));
2922
4143
  },
2923
4144
  /**
2924
- * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases
4145
+ * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Three Search Modes:** * * 1. **Text Query** - Provide `query` string, server generates embedding * - Query text is embedded using the collection\'s embedding model * - Embeddings are cached for repeated queries * * 2. **Vector Query** - Provide pre-computed `vector` array * - Skip embedding generation (faster) * - Useful when you\'ve already embedded the query elsewhere * - Vector dimension must match collection (e.g., 1024 for Titan v2) * * 3. **Metadata List** - Set `listByMetadata: true` with `filter` * - Skip semantic search entirely * - Return all documents matching the filter * - Supports cursor-based pagination for large datasets * - Results ordered by sortBy/sortOrder (default: created_at DESC) * * **Filtering:** * - `filter.exact`: Exact match on metadata fields (AND logic) * - `filter.contains`: Array contains filter for tags (ANY match) * - Filters can be combined with semantic search or used alone with listByMetadata * * **Pagination (listByMetadata mode only):** * - Use `cursor` from previous response\'s `nextCursor` to get next page * - Uses keyset pagination for efficient traversal of large datasets * - Control sort with `sortBy` and `sortOrder` * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases * - List all artifacts by building/worker/tag
2925
4146
  * @summary Semantic Search Query
2926
4147
  * @param {string} organisation The organisation ID
2927
4148
  * @param {string} collectionId The collection ID
@@ -3002,7 +4223,7 @@ class AIVectorDatabaseApi extends base_1.BaseAPI {
3002
4223
  return (0, exports.AIVectorDatabaseApiFp)(this.configuration).listVectorCollections(organisation, options).then((request) => request(this.axios, this.basePath));
3003
4224
  }
3004
4225
  /**
3005
- * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases
4226
+ * Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * **Three Search Modes:** * * 1. **Text Query** - Provide `query` string, server generates embedding * - Query text is embedded using the collection\'s embedding model * - Embeddings are cached for repeated queries * * 2. **Vector Query** - Provide pre-computed `vector` array * - Skip embedding generation (faster) * - Useful when you\'ve already embedded the query elsewhere * - Vector dimension must match collection (e.g., 1024 for Titan v2) * * 3. **Metadata List** - Set `listByMetadata: true` with `filter` * - Skip semantic search entirely * - Return all documents matching the filter * - Supports cursor-based pagination for large datasets * - Results ordered by sortBy/sortOrder (default: created_at DESC) * * **Filtering:** * - `filter.exact`: Exact match on metadata fields (AND logic) * - `filter.contains`: Array contains filter for tags (ANY match) * - Filters can be combined with semantic search or used alone with listByMetadata * * **Pagination (listByMetadata mode only):** * - Use `cursor` from previous response\'s `nextCursor` to get next page * - Uses keyset pagination for efficient traversal of large datasets * - Control sort with `sortBy` and `sortOrder` * * **Use Cases:** * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases * - List all artifacts by building/worker/tag
3006
4227
  * @summary Semantic Search Query
3007
4228
  * @param {string} organisation The organisation ID
3008
4229
  * @param {string} collectionId The collection ID
@@ -9185,6 +10406,120 @@ class KVApi extends base_1.BaseAPI {
9185
10406
  }
9186
10407
  }
9187
10408
  exports.KVApi = KVApi;
10409
+ /**
10410
+ * OrchestrationApi - axios parameter creator
10411
+ * @export
10412
+ */
10413
+ const OrchestrationApiAxiosParamCreator = function (configuration) {
10414
+ return {
10415
+ /**
10416
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
10417
+ * @summary Get Orchestration Status
10418
+ * @param {string} organisation The organisation ID
10419
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10420
+ * @param {*} [options] Override http request option.
10421
+ * @throws {RequiredError}
10422
+ */
10423
+ getAIOrchestrationStatus: (organisation_1, orchestrationId_1, ...args_1) => __awaiter(this, [organisation_1, orchestrationId_1, ...args_1], void 0, function* (organisation, orchestrationId, options = {}) {
10424
+ // verify required parameter 'organisation' is not null or undefined
10425
+ (0, common_1.assertParamExists)('getAIOrchestrationStatus', 'organisation', organisation);
10426
+ // verify required parameter 'orchestrationId' is not null or undefined
10427
+ (0, common_1.assertParamExists)('getAIOrchestrationStatus', 'orchestrationId', orchestrationId);
10428
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}`
10429
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
10430
+ .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId)));
10431
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
10432
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
10433
+ let baseOptions;
10434
+ if (configuration) {
10435
+ baseOptions = configuration.baseOptions;
10436
+ }
10437
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
10438
+ const localVarHeaderParameter = {};
10439
+ const localVarQueryParameter = {};
10440
+ // authentication BearerAuth required
10441
+ // http bearer authentication required
10442
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
10443
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
10444
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10445
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10446
+ return {
10447
+ url: (0, common_1.toPathString)(localVarUrlObj),
10448
+ options: localVarRequestOptions,
10449
+ };
10450
+ }),
10451
+ };
10452
+ };
10453
+ exports.OrchestrationApiAxiosParamCreator = OrchestrationApiAxiosParamCreator;
10454
+ /**
10455
+ * OrchestrationApi - functional programming interface
10456
+ * @export
10457
+ */
10458
+ const OrchestrationApiFp = function (configuration) {
10459
+ const localVarAxiosParamCreator = (0, exports.OrchestrationApiAxiosParamCreator)(configuration);
10460
+ return {
10461
+ /**
10462
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
10463
+ * @summary Get Orchestration Status
10464
+ * @param {string} organisation The organisation ID
10465
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10466
+ * @param {*} [options] Override http request option.
10467
+ * @throws {RequiredError}
10468
+ */
10469
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10470
+ return __awaiter(this, void 0, void 0, function* () {
10471
+ var _a, _b, _c;
10472
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options);
10473
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
10474
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrchestrationApi.getAIOrchestrationStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
10475
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10476
+ });
10477
+ },
10478
+ };
10479
+ };
10480
+ exports.OrchestrationApiFp = OrchestrationApiFp;
10481
+ /**
10482
+ * OrchestrationApi - factory interface
10483
+ * @export
10484
+ */
10485
+ const OrchestrationApiFactory = function (configuration, basePath, axios) {
10486
+ const localVarFp = (0, exports.OrchestrationApiFp)(configuration);
10487
+ return {
10488
+ /**
10489
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
10490
+ * @summary Get Orchestration Status
10491
+ * @param {string} organisation The organisation ID
10492
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10493
+ * @param {*} [options] Override http request option.
10494
+ * @throws {RequiredError}
10495
+ */
10496
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10497
+ return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath));
10498
+ },
10499
+ };
10500
+ };
10501
+ exports.OrchestrationApiFactory = OrchestrationApiFactory;
10502
+ /**
10503
+ * OrchestrationApi - object-oriented interface
10504
+ * @export
10505
+ * @class OrchestrationApi
10506
+ * @extends {BaseAPI}
10507
+ */
10508
+ class OrchestrationApi extends base_1.BaseAPI {
10509
+ /**
10510
+ * Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries
10511
+ * @summary Get Orchestration Status
10512
+ * @param {string} organisation The organisation ID
10513
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10514
+ * @param {*} [options] Override http request option.
10515
+ * @throws {RequiredError}
10516
+ * @memberof OrchestrationApi
10517
+ */
10518
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10519
+ return (0, exports.OrchestrationApiFp)(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath));
10520
+ }
10521
+ }
10522
+ exports.OrchestrationApi = OrchestrationApi;
9188
10523
  /**
9189
10524
  * OrganizationsApi - axios parameter creator
9190
10525
  * @export