@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/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services
6
6
  *
7
- * The version of the OpenAPI document: 4.8.0
7
+ * The version of the OpenAPI document: 4.9.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,6 +43,9 @@ export const ChatInference200ResponseFinishReasonEnum = {
43
43
  export const ChatInference200ResponseResponseRoleEnum = {
44
44
  Assistant: 'assistant'
45
45
  };
46
+ export const ChatInference202ResponseStatusEnum = {
47
+ Queued: 'queued'
48
+ };
46
49
  export const ChatInferenceRequestMessagesInnerRoleEnum = {
47
50
  User: 'user',
48
51
  Assistant: 'assistant',
@@ -74,6 +77,9 @@ export const ChatInferenceStreamRequestMessagesInnerRoleEnum = {
74
77
  Assistant: 'assistant',
75
78
  System: 'system'
76
79
  };
80
+ export const ChatWithAIAgent202ResponseStatusEnum = {
81
+ Queued: 'queued'
82
+ };
77
83
  export const ContainerDependsOnInnerConditionEnum = {
78
84
  Start: 'START',
79
85
  Healthy: 'HEALTHY',
@@ -96,6 +102,14 @@ export const CreateApplicationRequestDatabaseEngineEnum = {
96
102
  Mysql: 'mysql',
97
103
  Postgres: 'postgres'
98
104
  };
105
+ export const CreateTaskRequestStatusEnum = {
106
+ Pending: 'pending',
107
+ InProgress: 'in_progress',
108
+ Completed: 'completed',
109
+ Failed: 'failed',
110
+ Cancelled: 'cancelled',
111
+ Blocked: 'blocked'
112
+ };
99
113
  export const CronRunRunTypeEnum = {
100
114
  Exec: 'EXEC',
101
115
  Cron: 'CRON'
@@ -124,6 +138,34 @@ export const EnvironmentSummaryDeploymentStatusEnum = {
124
138
  InProgress: 'IN_PROGRESS',
125
139
  Failed: 'FAILED'
126
140
  };
141
+ export const GetAIOrchestrationStatus200ResponseStatusEnum = {
142
+ Pending: 'pending',
143
+ Polling: 'polling',
144
+ Synthesizing: 'synthesizing',
145
+ Complete: 'complete',
146
+ Failed: 'failed'
147
+ };
148
+ export const GetAIOrchestrationStatus200ResponseToolsInnerStatusEnum = {
149
+ Pending: 'pending',
150
+ Running: 'running',
151
+ Complete: 'complete',
152
+ Failed: 'failed'
153
+ };
154
+ export const GetDurableExecutionStatus200ResponseStatusEnum = {
155
+ Pending: 'pending',
156
+ Running: 'running',
157
+ WaitingCallback: 'waiting_callback',
158
+ Complete: 'complete',
159
+ Failed: 'failed'
160
+ };
161
+ export const GetTask200ResponseStatusEnum = {
162
+ Pending: 'pending',
163
+ InProgress: 'in_progress',
164
+ Completed: 'completed',
165
+ Failed: 'failed',
166
+ Cancelled: 'cancelled',
167
+ Blocked: 'blocked'
168
+ };
127
169
  export const ImageGenerationRequestTaskTypeEnum = {
128
170
  TextImage: 'TEXT_IMAGE',
129
171
  ColorGuidedGeneration: 'COLOR_GUIDED_GENERATION',
@@ -160,12 +202,41 @@ export const ImageGenerationRequestTextToImageParamsControlModeEnum = {
160
202
  CannyEdge: 'CANNY_EDGE',
161
203
  Segmentation: 'SEGMENTATION'
162
204
  };
205
+ export const ListTasks200ResponseTasksInnerStatusEnum = {
206
+ Pending: 'pending',
207
+ InProgress: 'in_progress',
208
+ Completed: 'completed',
209
+ Failed: 'failed',
210
+ Cancelled: 'cancelled',
211
+ Blocked: 'blocked'
212
+ };
163
213
  export const PatchEnvironmentComposeRequestSpotConfigurationStrategyEnum = {
164
214
  Off: 'off',
165
215
  SpotOnly: 'spot-only',
166
216
  MixedSafe: 'mixed-safe',
167
217
  MixedAggressive: 'mixed-aggressive'
168
218
  };
219
+ export const QueryVectorCollection200ResponseSearchModeEnum = {
220
+ Text: 'text',
221
+ Vector: 'vector',
222
+ Metadata: 'metadata'
223
+ };
224
+ export const QueryVectorCollection200ResponsePaginationSortByEnum = {
225
+ CreatedAt: 'created_at',
226
+ DocumentId: 'document_id'
227
+ };
228
+ export const QueryVectorCollection200ResponsePaginationSortOrderEnum = {
229
+ Asc: 'asc',
230
+ Desc: 'desc'
231
+ };
232
+ export const QueryVectorCollectionRequestSortByEnum = {
233
+ CreatedAt: 'created_at',
234
+ DocumentId: 'document_id'
235
+ };
236
+ export const QueryVectorCollectionRequestSortOrderEnum = {
237
+ Asc: 'asc',
238
+ Desc: 'desc'
239
+ };
169
240
  export const ScalingPolicyMetricEnum = {
170
241
  CpuUtilization: 'CPUUtilization',
171
242
  MemoryUtilization: 'MemoryUtilization',
@@ -185,6 +256,14 @@ export const UpdateAISessionRequestNewMessagesInnerRoleEnum = {
185
256
  User: 'user',
186
257
  Assistant: 'assistant'
187
258
  };
259
+ export const UpdateTaskRequestStatusEnum = {
260
+ Pending: 'pending',
261
+ InProgress: 'in_progress',
262
+ Completed: 'completed',
263
+ Failed: 'failed',
264
+ Cancelled: 'cancelled',
265
+ Blocked: 'blocked'
266
+ };
188
267
  export const V1TransitionStateEnum = {
189
268
  Published: 'published',
190
269
  Unpublished: 'unpublished'
@@ -214,7 +293,7 @@ export const WafConfigThresholdsInnerModeEnum = {
214
293
  export const AIAgentsApiAxiosParamCreator = function (configuration) {
215
294
  return {
216
295
  /**
217
- * 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
296
+ * 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
218
297
  * @summary Chat with AI Agent
219
298
  * @param {string} organisation The organisation ID
220
299
  * @param {string} agentId The agent ID
@@ -450,7 +529,7 @@ export const AIAgentsApiFp = function (configuration) {
450
529
  const localVarAxiosParamCreator = AIAgentsApiAxiosParamCreator(configuration);
451
530
  return {
452
531
  /**
453
- * 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
532
+ * 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
454
533
  * @summary Chat with AI Agent
455
534
  * @param {string} organisation The organisation ID
456
535
  * @param {string} agentId The agent ID
@@ -563,7 +642,7 @@ export const AIAgentsApiFactory = function (configuration, basePath, axios) {
563
642
  const localVarFp = AIAgentsApiFp(configuration);
564
643
  return {
565
644
  /**
566
- * 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
645
+ * 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
567
646
  * @summary Chat with AI Agent
568
647
  * @param {string} organisation The organisation ID
569
648
  * @param {string} agentId The agent ID
@@ -640,7 +719,7 @@ export const AIAgentsApiFactory = function (configuration, basePath, axios) {
640
719
  */
641
720
  export class AIAgentsApi extends BaseAPI {
642
721
  /**
643
- * 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
722
+ * 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
644
723
  * @summary Chat with AI Agent
645
724
  * @param {string} organisation The organisation ID
646
725
  * @param {string} agentId The agent ID
@@ -971,99 +1050,97 @@ export class AICustomToolsApi extends BaseAPI {
971
1050
  }
972
1051
  }
973
1052
  /**
974
- * AIInferenceApi - axios parameter creator
1053
+ * AIFileStorageApi - axios parameter creator
975
1054
  * @export
976
1055
  */
977
- export const AIInferenceApiAxiosParamCreator = function (configuration) {
1056
+ export const AIFileStorageApiAxiosParamCreator = function (configuration) {
978
1057
  return {
979
1058
  /**
980
- * 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
981
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1059
+ * Deletes a file from S3 storage.
1060
+ * @summary Delete File
982
1061
  * @param {string} organisation The organisation ID
983
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1062
+ * @param {string} fileId The file ID
984
1063
  * @param {*} [options] Override http request option.
985
1064
  * @throws {RequiredError}
986
1065
  */
987
- chatInference: (organisation_1, chatInferenceRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceRequest_1, ...args_1], void 0, function* (organisation, chatInferenceRequest, options = {}) {
1066
+ deleteFile: (organisation_1, fileId_1, ...args_1) => __awaiter(this, [organisation_1, fileId_1, ...args_1], void 0, function* (organisation, fileId, options = {}) {
988
1067
  // verify required parameter 'organisation' is not null or undefined
989
- assertParamExists('chatInference', 'organisation', organisation);
990
- // verify required parameter 'chatInferenceRequest' is not null or undefined
991
- assertParamExists('chatInference', 'chatInferenceRequest', chatInferenceRequest);
992
- const localVarPath = `/api/v3/organizations/{organisation}/ai/chat`
993
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1068
+ assertParamExists('deleteFile', 'organisation', organisation);
1069
+ // verify required parameter 'fileId' is not null or undefined
1070
+ assertParamExists('deleteFile', 'fileId', fileId);
1071
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files/{fileId}`
1072
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1073
+ .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
994
1074
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
995
1075
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
996
1076
  let baseOptions;
997
1077
  if (configuration) {
998
1078
  baseOptions = configuration.baseOptions;
999
1079
  }
1000
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1080
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1001
1081
  const localVarHeaderParameter = {};
1002
1082
  const localVarQueryParameter = {};
1003
1083
  // authentication BearerAuth required
1004
1084
  // http bearer authentication required
1005
1085
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1006
- localVarHeaderParameter['Content-Type'] = 'application/json';
1007
1086
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1008
1087
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1009
1088
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1010
- localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceRequest, localVarRequestOptions, configuration);
1011
1089
  return {
1012
1090
  url: toPathString(localVarUrlObj),
1013
1091
  options: localVarRequestOptions,
1014
1092
  };
1015
1093
  }),
1016
1094
  /**
1017
- * 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)
1018
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1095
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1096
+ * @summary Get File
1019
1097
  * @param {string} organisation The organisation ID
1020
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1098
+ * @param {string} fileId The file ID
1021
1099
  * @param {*} [options] Override http request option.
1022
1100
  * @throws {RequiredError}
1023
1101
  */
1024
- chatInferenceStream: (organisation_1, chatInferenceStreamRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceStreamRequest_1, ...args_1], void 0, function* (organisation, chatInferenceStreamRequest, options = {}) {
1102
+ getFile: (organisation_1, fileId_1, ...args_1) => __awaiter(this, [organisation_1, fileId_1, ...args_1], void 0, function* (organisation, fileId, options = {}) {
1025
1103
  // verify required parameter 'organisation' is not null or undefined
1026
- assertParamExists('chatInferenceStream', 'organisation', organisation);
1027
- // verify required parameter 'chatInferenceStreamRequest' is not null or undefined
1028
- assertParamExists('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest);
1029
- const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream`
1030
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1104
+ assertParamExists('getFile', 'organisation', organisation);
1105
+ // verify required parameter 'fileId' is not null or undefined
1106
+ assertParamExists('getFile', 'fileId', fileId);
1107
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files/{fileId}`
1108
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1109
+ .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
1031
1110
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1032
1111
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1033
1112
  let baseOptions;
1034
1113
  if (configuration) {
1035
1114
  baseOptions = configuration.baseOptions;
1036
1115
  }
1037
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1116
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1038
1117
  const localVarHeaderParameter = {};
1039
1118
  const localVarQueryParameter = {};
1040
1119
  // authentication BearerAuth required
1041
1120
  // http bearer authentication required
1042
1121
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1043
- localVarHeaderParameter['Content-Type'] = 'application/json';
1044
1122
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1045
1123
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1046
1124
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1047
- localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceStreamRequest, localVarRequestOptions, configuration);
1048
1125
  return {
1049
1126
  url: toPathString(localVarUrlObj),
1050
1127
  options: localVarRequestOptions,
1051
1128
  };
1052
1129
  }),
1053
1130
  /**
1054
- * 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)
1055
- * @summary Generate text embeddings for semantic search and RAG applications
1131
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1132
+ * @summary List Files
1056
1133
  * @param {string} organisation The organisation ID
1057
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1134
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1135
+ * @param {number} [limit] Maximum files to return
1136
+ * @param {string} [cursor] Pagination cursor from previous response
1058
1137
  * @param {*} [options] Override http request option.
1059
1138
  * @throws {RequiredError}
1060
1139
  */
1061
- embeddings: (organisation_1, embeddingsRequest_1, ...args_1) => __awaiter(this, [organisation_1, embeddingsRequest_1, ...args_1], void 0, function* (organisation, embeddingsRequest, options = {}) {
1140
+ 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 = {}) {
1062
1141
  // verify required parameter 'organisation' is not null or undefined
1063
- assertParamExists('embeddings', 'organisation', organisation);
1064
- // verify required parameter 'embeddingsRequest' is not null or undefined
1065
- assertParamExists('embeddings', 'embeddingsRequest', embeddingsRequest);
1066
- const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings`
1142
+ assertParamExists('listFiles', 'organisation', organisation);
1143
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files`
1067
1144
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1068
1145
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1069
1146
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1071,36 +1148,43 @@ export const AIInferenceApiAxiosParamCreator = function (configuration) {
1071
1148
  if (configuration) {
1072
1149
  baseOptions = configuration.baseOptions;
1073
1150
  }
1074
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1151
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1075
1152
  const localVarHeaderParameter = {};
1076
1153
  const localVarQueryParameter = {};
1077
1154
  // authentication BearerAuth required
1078
1155
  // http bearer authentication required
1079
1156
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1080
- localVarHeaderParameter['Content-Type'] = 'application/json';
1157
+ if (filter !== undefined) {
1158
+ localVarQueryParameter['filter'] = filter;
1159
+ }
1160
+ if (limit !== undefined) {
1161
+ localVarQueryParameter['limit'] = limit;
1162
+ }
1163
+ if (cursor !== undefined) {
1164
+ localVarQueryParameter['cursor'] = cursor;
1165
+ }
1081
1166
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1082
1167
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1083
1168
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1084
- localVarRequestOptions.data = serializeDataIfNeeded(embeddingsRequest, localVarRequestOptions, configuration);
1085
1169
  return {
1086
1170
  url: toPathString(localVarUrlObj),
1087
1171
  options: localVarRequestOptions,
1088
1172
  };
1089
1173
  }),
1090
1174
  /**
1091
- * 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
1092
- * @summary Generate images with Amazon Nova Canvas
1175
+ * 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.
1176
+ * @summary Upload File to S3
1093
1177
  * @param {string} organisation The organisation ID
1094
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1178
+ * @param {UploadFileRequest} uploadFileRequest
1095
1179
  * @param {*} [options] Override http request option.
1096
1180
  * @throws {RequiredError}
1097
1181
  */
1098
- imageGeneration: (organisation_1, imageGenerationRequest_1, ...args_1) => __awaiter(this, [organisation_1, imageGenerationRequest_1, ...args_1], void 0, function* (organisation, imageGenerationRequest, options = {}) {
1182
+ uploadFile: (organisation_1, uploadFileRequest_1, ...args_1) => __awaiter(this, [organisation_1, uploadFileRequest_1, ...args_1], void 0, function* (organisation, uploadFileRequest, options = {}) {
1099
1183
  // verify required parameter 'organisation' is not null or undefined
1100
- assertParamExists('imageGeneration', 'organisation', organisation);
1101
- // verify required parameter 'imageGenerationRequest' is not null or undefined
1102
- assertParamExists('imageGeneration', 'imageGenerationRequest', imageGenerationRequest);
1103
- const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation`
1184
+ assertParamExists('uploadFile', 'organisation', organisation);
1185
+ // verify required parameter 'uploadFileRequest' is not null or undefined
1186
+ assertParamExists('uploadFile', 'uploadFileRequest', uploadFileRequest);
1187
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/files`
1104
1188
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1105
1189
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1106
1190
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1118,7 +1202,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration) {
1118
1202
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1119
1203
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1120
1204
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1121
- localVarRequestOptions.data = serializeDataIfNeeded(imageGenerationRequest, localVarRequestOptions, configuration);
1205
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadFileRequest, localVarRequestOptions, configuration);
1122
1206
  return {
1123
1207
  url: toPathString(localVarUrlObj),
1124
1208
  options: localVarRequestOptions,
@@ -1127,245 +1211,254 @@ export const AIInferenceApiAxiosParamCreator = function (configuration) {
1127
1211
  };
1128
1212
  };
1129
1213
  /**
1130
- * AIInferenceApi - functional programming interface
1214
+ * AIFileStorageApi - functional programming interface
1131
1215
  * @export
1132
1216
  */
1133
- export const AIInferenceApiFp = function (configuration) {
1134
- const localVarAxiosParamCreator = AIInferenceApiAxiosParamCreator(configuration);
1217
+ export const AIFileStorageApiFp = function (configuration) {
1218
+ const localVarAxiosParamCreator = AIFileStorageApiAxiosParamCreator(configuration);
1135
1219
  return {
1136
1220
  /**
1137
- * 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
1138
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1221
+ * Deletes a file from S3 storage.
1222
+ * @summary Delete File
1139
1223
  * @param {string} organisation The organisation ID
1140
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1224
+ * @param {string} fileId The file ID
1141
1225
  * @param {*} [options] Override http request option.
1142
1226
  * @throws {RequiredError}
1143
1227
  */
1144
- chatInference(organisation, chatInferenceRequest, options) {
1228
+ deleteFile(organisation, fileId, options) {
1145
1229
  return __awaiter(this, void 0, void 0, function* () {
1146
1230
  var _a, _b, _c;
1147
- const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options);
1231
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFile(organisation, fileId, options);
1148
1232
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1149
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.chatInference']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1233
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIFileStorageApi.deleteFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1150
1234
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1151
1235
  });
1152
1236
  },
1153
1237
  /**
1154
- * 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)
1155
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1238
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1239
+ * @summary Get File
1156
1240
  * @param {string} organisation The organisation ID
1157
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1241
+ * @param {string} fileId The file ID
1158
1242
  * @param {*} [options] Override http request option.
1159
1243
  * @throws {RequiredError}
1160
1244
  */
1161
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1245
+ getFile(organisation, fileId, options) {
1162
1246
  return __awaiter(this, void 0, void 0, function* () {
1163
1247
  var _a, _b, _c;
1164
- const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options);
1248
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFile(organisation, fileId, options);
1165
1249
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1166
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.chatInferenceStream']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1250
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIFileStorageApi.getFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1167
1251
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1168
1252
  });
1169
1253
  },
1170
1254
  /**
1171
- * 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)
1172
- * @summary Generate text embeddings for semantic search and RAG applications
1255
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1256
+ * @summary List Files
1173
1257
  * @param {string} organisation The organisation ID
1174
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1258
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1259
+ * @param {number} [limit] Maximum files to return
1260
+ * @param {string} [cursor] Pagination cursor from previous response
1175
1261
  * @param {*} [options] Override http request option.
1176
1262
  * @throws {RequiredError}
1177
1263
  */
1178
- embeddings(organisation, embeddingsRequest, options) {
1264
+ listFiles(organisation, filter, limit, cursor, options) {
1179
1265
  return __awaiter(this, void 0, void 0, function* () {
1180
1266
  var _a, _b, _c;
1181
- const localVarAxiosArgs = yield localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options);
1267
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFiles(organisation, filter, limit, cursor, options);
1182
1268
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1183
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.embeddings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1269
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIFileStorageApi.listFiles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1184
1270
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1185
1271
  });
1186
1272
  },
1187
1273
  /**
1188
- * 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
1189
- * @summary Generate images with Amazon Nova Canvas
1274
+ * 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.
1275
+ * @summary Upload File to S3
1190
1276
  * @param {string} organisation The organisation ID
1191
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1277
+ * @param {UploadFileRequest} uploadFileRequest
1192
1278
  * @param {*} [options] Override http request option.
1193
1279
  * @throws {RequiredError}
1194
1280
  */
1195
- imageGeneration(organisation, imageGenerationRequest, options) {
1281
+ uploadFile(organisation, uploadFileRequest, options) {
1196
1282
  return __awaiter(this, void 0, void 0, function* () {
1197
1283
  var _a, _b, _c;
1198
- const localVarAxiosArgs = yield localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options);
1284
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadFile(organisation, uploadFileRequest, options);
1199
1285
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1200
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.imageGeneration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1286
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIFileStorageApi.uploadFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1201
1287
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1202
1288
  });
1203
1289
  },
1204
1290
  };
1205
1291
  };
1206
1292
  /**
1207
- * AIInferenceApi - factory interface
1293
+ * AIFileStorageApi - factory interface
1208
1294
  * @export
1209
1295
  */
1210
- export const AIInferenceApiFactory = function (configuration, basePath, axios) {
1211
- const localVarFp = AIInferenceApiFp(configuration);
1296
+ export const AIFileStorageApiFactory = function (configuration, basePath, axios) {
1297
+ const localVarFp = AIFileStorageApiFp(configuration);
1212
1298
  return {
1213
1299
  /**
1214
- * 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
1215
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1300
+ * Deletes a file from S3 storage.
1301
+ * @summary Delete File
1216
1302
  * @param {string} organisation The organisation ID
1217
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1303
+ * @param {string} fileId The file ID
1218
1304
  * @param {*} [options] Override http request option.
1219
1305
  * @throws {RequiredError}
1220
1306
  */
1221
- chatInference(organisation, chatInferenceRequest, options) {
1222
- return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath));
1307
+ deleteFile(organisation, fileId, options) {
1308
+ return localVarFp.deleteFile(organisation, fileId, options).then((request) => request(axios, basePath));
1223
1309
  },
1224
1310
  /**
1225
- * 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)
1226
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1311
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1312
+ * @summary Get File
1227
1313
  * @param {string} organisation The organisation ID
1228
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1314
+ * @param {string} fileId The file ID
1229
1315
  * @param {*} [options] Override http request option.
1230
1316
  * @throws {RequiredError}
1231
1317
  */
1232
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1233
- return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath));
1318
+ getFile(organisation, fileId, options) {
1319
+ return localVarFp.getFile(organisation, fileId, options).then((request) => request(axios, basePath));
1234
1320
  },
1235
1321
  /**
1236
- * 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)
1237
- * @summary Generate text embeddings for semantic search and RAG applications
1322
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1323
+ * @summary List Files
1238
1324
  * @param {string} organisation The organisation ID
1239
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1325
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1326
+ * @param {number} [limit] Maximum files to return
1327
+ * @param {string} [cursor] Pagination cursor from previous response
1240
1328
  * @param {*} [options] Override http request option.
1241
1329
  * @throws {RequiredError}
1242
1330
  */
1243
- embeddings(organisation, embeddingsRequest, options) {
1244
- return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath));
1331
+ listFiles(organisation, filter, limit, cursor, options) {
1332
+ return localVarFp.listFiles(organisation, filter, limit, cursor, options).then((request) => request(axios, basePath));
1245
1333
  },
1246
1334
  /**
1247
- * 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
1248
- * @summary Generate images with Amazon Nova Canvas
1335
+ * 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.
1336
+ * @summary Upload File to S3
1249
1337
  * @param {string} organisation The organisation ID
1250
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1338
+ * @param {UploadFileRequest} uploadFileRequest
1251
1339
  * @param {*} [options] Override http request option.
1252
1340
  * @throws {RequiredError}
1253
1341
  */
1254
- imageGeneration(organisation, imageGenerationRequest, options) {
1255
- return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath));
1342
+ uploadFile(organisation, uploadFileRequest, options) {
1343
+ return localVarFp.uploadFile(organisation, uploadFileRequest, options).then((request) => request(axios, basePath));
1256
1344
  },
1257
1345
  };
1258
1346
  };
1259
1347
  /**
1260
- * AIInferenceApi - object-oriented interface
1348
+ * AIFileStorageApi - object-oriented interface
1261
1349
  * @export
1262
- * @class AIInferenceApi
1350
+ * @class AIFileStorageApi
1263
1351
  * @extends {BaseAPI}
1264
1352
  */
1265
- export class AIInferenceApi extends BaseAPI {
1353
+ export class AIFileStorageApi extends BaseAPI {
1266
1354
  /**
1267
- * 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
1268
- * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1355
+ * Deletes a file from S3 storage.
1356
+ * @summary Delete File
1269
1357
  * @param {string} organisation The organisation ID
1270
- * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1358
+ * @param {string} fileId The file ID
1271
1359
  * @param {*} [options] Override http request option.
1272
1360
  * @throws {RequiredError}
1273
- * @memberof AIInferenceApi
1361
+ * @memberof AIFileStorageApi
1274
1362
  */
1275
- chatInference(organisation, chatInferenceRequest, options) {
1276
- return AIInferenceApiFp(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath));
1363
+ deleteFile(organisation, fileId, options) {
1364
+ return AIFileStorageApiFp(this.configuration).deleteFile(organisation, fileId, options).then((request) => request(this.axios, this.basePath));
1277
1365
  }
1278
1366
  /**
1279
- * 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)
1280
- * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1367
+ * Retrieves file metadata and a presigned download URL (valid for 1 hour).
1368
+ * @summary Get File
1281
1369
  * @param {string} organisation The organisation ID
1282
- * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1370
+ * @param {string} fileId The file ID
1283
1371
  * @param {*} [options] Override http request option.
1284
1372
  * @throws {RequiredError}
1285
- * @memberof AIInferenceApi
1373
+ * @memberof AIFileStorageApi
1286
1374
  */
1287
- chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1288
- return AIInferenceApiFp(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath));
1375
+ getFile(organisation, fileId, options) {
1376
+ return AIFileStorageApiFp(this.configuration).getFile(organisation, fileId, options).then((request) => request(this.axios, this.basePath));
1289
1377
  }
1290
1378
  /**
1291
- * 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)
1292
- * @summary Generate text embeddings for semantic search and RAG applications
1379
+ * Lists files stored in S3 for this organization with optional metadata filtering and pagination.
1380
+ * @summary List Files
1293
1381
  * @param {string} organisation The organisation ID
1294
- * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1382
+ * @param {string} [filter] JSON-encoded metadata filter. Supports exact match and array contains filters.
1383
+ * @param {number} [limit] Maximum files to return
1384
+ * @param {string} [cursor] Pagination cursor from previous response
1295
1385
  * @param {*} [options] Override http request option.
1296
1386
  * @throws {RequiredError}
1297
- * @memberof AIInferenceApi
1387
+ * @memberof AIFileStorageApi
1298
1388
  */
1299
- embeddings(organisation, embeddingsRequest, options) {
1300
- return AIInferenceApiFp(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath));
1389
+ listFiles(organisation, filter, limit, cursor, options) {
1390
+ return AIFileStorageApiFp(this.configuration).listFiles(organisation, filter, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1301
1391
  }
1302
1392
  /**
1303
- * 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
1304
- * @summary Generate images with Amazon Nova Canvas
1393
+ * 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.
1394
+ * @summary Upload File to S3
1305
1395
  * @param {string} organisation The organisation ID
1306
- * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1396
+ * @param {UploadFileRequest} uploadFileRequest
1307
1397
  * @param {*} [options] Override http request option.
1308
1398
  * @throws {RequiredError}
1309
- * @memberof AIInferenceApi
1399
+ * @memberof AIFileStorageApi
1310
1400
  */
1311
- imageGeneration(organisation, imageGenerationRequest, options) {
1312
- return AIInferenceApiFp(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath));
1401
+ uploadFile(organisation, uploadFileRequest, options) {
1402
+ return AIFileStorageApiFp(this.configuration).uploadFile(organisation, uploadFileRequest, options).then((request) => request(this.axios, this.basePath));
1313
1403
  }
1314
1404
  }
1315
1405
  /**
1316
- * AIModelsApi - axios parameter creator
1406
+ * AIInferenceApi - axios parameter creator
1317
1407
  * @export
1318
1408
  */
1319
- export const AIModelsApiAxiosParamCreator = function (configuration) {
1409
+ export const AIInferenceApiAxiosParamCreator = function (configuration) {
1320
1410
  return {
1321
1411
  /**
1322
- * 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
1323
- * @summary Get AI Model Details
1412
+ * 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
1413
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1324
1414
  * @param {string} organisation The organisation ID
1325
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1415
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1326
1416
  * @param {*} [options] Override http request option.
1327
1417
  * @throws {RequiredError}
1328
1418
  */
1329
- getAIModel: (organisation_1, modelId_1, ...args_1) => __awaiter(this, [organisation_1, modelId_1, ...args_1], void 0, function* (organisation, modelId, options = {}) {
1419
+ chatInference: (organisation_1, chatInferenceRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceRequest_1, ...args_1], void 0, function* (organisation, chatInferenceRequest, options = {}) {
1330
1420
  // verify required parameter 'organisation' is not null or undefined
1331
- assertParamExists('getAIModel', 'organisation', organisation);
1332
- // verify required parameter 'modelId' is not null or undefined
1333
- assertParamExists('getAIModel', 'modelId', modelId);
1334
- const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}`
1335
- .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1336
- .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId)));
1421
+ assertParamExists('chatInference', 'organisation', organisation);
1422
+ // verify required parameter 'chatInferenceRequest' is not null or undefined
1423
+ assertParamExists('chatInference', 'chatInferenceRequest', chatInferenceRequest);
1424
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat`
1425
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1337
1426
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1338
1427
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1339
1428
  let baseOptions;
1340
1429
  if (configuration) {
1341
1430
  baseOptions = configuration.baseOptions;
1342
1431
  }
1343
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1432
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1344
1433
  const localVarHeaderParameter = {};
1345
1434
  const localVarQueryParameter = {};
1346
1435
  // authentication BearerAuth required
1347
1436
  // http bearer authentication required
1348
1437
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1438
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1349
1439
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1350
1440
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1351
1441
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1442
+ localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceRequest, localVarRequestOptions, configuration);
1352
1443
  return {
1353
1444
  url: toPathString(localVarUrlObj),
1354
1445
  options: localVarRequestOptions,
1355
1446
  };
1356
1447
  }),
1357
1448
  /**
1358
- *
1359
- * @summary List available AI models for an organization
1449
+ * 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)
1450
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1360
1451
  * @param {string} organisation The organisation ID
1361
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1452
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1362
1453
  * @param {*} [options] Override http request option.
1363
1454
  * @throws {RequiredError}
1364
1455
  */
1365
- listAIModels: (organisation_1, feature_1, ...args_1) => __awaiter(this, [organisation_1, feature_1, ...args_1], void 0, function* (organisation, feature, options = {}) {
1456
+ chatInferenceStream: (organisation_1, chatInferenceStreamRequest_1, ...args_1) => __awaiter(this, [organisation_1, chatInferenceStreamRequest_1, ...args_1], void 0, function* (organisation, chatInferenceStreamRequest, options = {}) {
1366
1457
  // verify required parameter 'organisation' is not null or undefined
1367
- assertParamExists('listAIModels', 'organisation', organisation);
1368
- const localVarPath = `/api/v3/organizations/{organisation}/ai/models`
1458
+ assertParamExists('chatInferenceStream', 'organisation', organisation);
1459
+ // verify required parameter 'chatInferenceStreamRequest' is not null or undefined
1460
+ assertParamExists('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest);
1461
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream`
1369
1462
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1370
1463
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1371
1464
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1373,159 +1466,146 @@ export const AIModelsApiAxiosParamCreator = function (configuration) {
1373
1466
  if (configuration) {
1374
1467
  baseOptions = configuration.baseOptions;
1375
1468
  }
1376
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1469
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1377
1470
  const localVarHeaderParameter = {};
1378
1471
  const localVarQueryParameter = {};
1379
1472
  // authentication BearerAuth required
1380
1473
  // http bearer authentication required
1381
1474
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1382
- if (feature !== undefined) {
1383
- localVarQueryParameter['feature'] = feature;
1384
- }
1475
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1385
1476
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1386
1477
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1387
1478
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1479
+ localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceStreamRequest, localVarRequestOptions, configuration);
1388
1480
  return {
1389
1481
  url: toPathString(localVarUrlObj),
1390
1482
  options: localVarRequestOptions,
1391
1483
  };
1392
1484
  }),
1393
- };
1394
- };
1395
- /**
1396
- * AIModelsApi - functional programming interface
1397
- * @export
1398
- */
1399
- export const AIModelsApiFp = function (configuration) {
1400
- const localVarAxiosParamCreator = AIModelsApiAxiosParamCreator(configuration);
1401
- return {
1402
- /**
1403
- * 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
1404
- * @summary Get AI Model Details
1405
- * @param {string} organisation The organisation ID
1406
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1407
- * @param {*} [options] Override http request option.
1408
- * @throws {RequiredError}
1409
- */
1410
- getAIModel(organisation, modelId, options) {
1411
- return __awaiter(this, void 0, void 0, function* () {
1412
- var _a, _b, _c;
1413
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIModel(organisation, modelId, options);
1414
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1415
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelsApi.getAIModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1416
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1417
- });
1418
- },
1419
1485
  /**
1420
- *
1421
- * @summary List available AI models for an organization
1486
+ * 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)
1487
+ * @summary Generate text embeddings for semantic search and RAG applications
1422
1488
  * @param {string} organisation The organisation ID
1423
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1489
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1424
1490
  * @param {*} [options] Override http request option.
1425
1491
  * @throws {RequiredError}
1426
1492
  */
1427
- listAIModels(organisation, feature, options) {
1428
- return __awaiter(this, void 0, void 0, function* () {
1429
- var _a, _b, _c;
1430
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listAIModels(organisation, feature, options);
1431
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1432
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelsApi.listAIModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1433
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1434
- });
1435
- },
1436
- };
1437
- };
1438
- /**
1439
- * AIModelsApi - factory interface
1440
- * @export
1441
- */
1442
- export const AIModelsApiFactory = function (configuration, basePath, axios) {
1443
- const localVarFp = AIModelsApiFp(configuration);
1444
- return {
1493
+ embeddings: (organisation_1, embeddingsRequest_1, ...args_1) => __awaiter(this, [organisation_1, embeddingsRequest_1, ...args_1], void 0, function* (organisation, embeddingsRequest, options = {}) {
1494
+ // verify required parameter 'organisation' is not null or undefined
1495
+ assertParamExists('embeddings', 'organisation', organisation);
1496
+ // verify required parameter 'embeddingsRequest' is not null or undefined
1497
+ assertParamExists('embeddings', 'embeddingsRequest', embeddingsRequest);
1498
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings`
1499
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1500
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1501
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1502
+ let baseOptions;
1503
+ if (configuration) {
1504
+ baseOptions = configuration.baseOptions;
1505
+ }
1506
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1507
+ const localVarHeaderParameter = {};
1508
+ const localVarQueryParameter = {};
1509
+ // authentication BearerAuth required
1510
+ // http bearer authentication required
1511
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1512
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1513
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1514
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1515
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1516
+ localVarRequestOptions.data = serializeDataIfNeeded(embeddingsRequest, localVarRequestOptions, configuration);
1517
+ return {
1518
+ url: toPathString(localVarUrlObj),
1519
+ options: localVarRequestOptions,
1520
+ };
1521
+ }),
1445
1522
  /**
1446
- * 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
1447
- * @summary Get AI Model Details
1523
+ * 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)
1524
+ * @summary Get Durable Execution Status
1448
1525
  * @param {string} organisation The organisation ID
1449
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1526
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1450
1527
  * @param {*} [options] Override http request option.
1451
1528
  * @throws {RequiredError}
1452
1529
  */
1453
- getAIModel(organisation, modelId, options) {
1454
- return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath));
1455
- },
1530
+ getDurableExecutionStatus: (organisation_1, identifier_1, ...args_1) => __awaiter(this, [organisation_1, identifier_1, ...args_1], void 0, function* (organisation, identifier, options = {}) {
1531
+ // verify required parameter 'organisation' is not null or undefined
1532
+ assertParamExists('getDurableExecutionStatus', 'organisation', organisation);
1533
+ // verify required parameter 'identifier' is not null or undefined
1534
+ assertParamExists('getDurableExecutionStatus', 'identifier', identifier);
1535
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/executions/{identifier}`
1536
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1537
+ .replace(`{${"identifier"}}`, encodeURIComponent(String(identifier)));
1538
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1539
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1540
+ let baseOptions;
1541
+ if (configuration) {
1542
+ baseOptions = configuration.baseOptions;
1543
+ }
1544
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1545
+ const localVarHeaderParameter = {};
1546
+ const localVarQueryParameter = {};
1547
+ // authentication BearerAuth required
1548
+ // http bearer authentication required
1549
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1550
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1551
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1552
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1553
+ return {
1554
+ url: toPathString(localVarUrlObj),
1555
+ options: localVarRequestOptions,
1556
+ };
1557
+ }),
1456
1558
  /**
1457
- *
1458
- * @summary List available AI models for an organization
1559
+ * 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
1560
+ * @summary Generate images with Amazon Nova Canvas
1459
1561
  * @param {string} organisation The organisation ID
1460
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1562
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1461
1563
  * @param {*} [options] Override http request option.
1462
1564
  * @throws {RequiredError}
1463
1565
  */
1464
- listAIModels(organisation, feature, options) {
1465
- return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath));
1466
- },
1467
- };
1468
- };
1469
- /**
1470
- * AIModelsApi - object-oriented interface
1471
- * @export
1472
- * @class AIModelsApi
1473
- * @extends {BaseAPI}
1474
- */
1475
- export class AIModelsApi extends BaseAPI {
1476
- /**
1477
- * 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
1478
- * @summary Get AI Model Details
1479
- * @param {string} organisation The organisation ID
1480
- * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1481
- * @param {*} [options] Override http request option.
1482
- * @throws {RequiredError}
1483
- * @memberof AIModelsApi
1484
- */
1485
- getAIModel(organisation, modelId, options) {
1486
- return AIModelsApiFp(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath));
1487
- }
1488
- /**
1489
- *
1490
- * @summary List available AI models for an organization
1491
- * @param {string} organisation The organisation ID
1492
- * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1493
- * @param {*} [options] Override http request option.
1494
- * @throws {RequiredError}
1495
- * @memberof AIModelsApi
1496
- */
1497
- listAIModels(organisation, feature, options) {
1498
- return AIModelsApiFp(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath));
1499
- }
1500
- }
1501
- /**
1502
- * @export
1503
- */
1504
- export const ListAIModelsFeatureEnum = {
1505
- Chat: 'chat',
1506
- Embeddings: 'embeddings',
1507
- Vision: 'vision',
1508
- Streaming: 'streaming',
1509
- All: 'all'
1510
- };
1511
- /**
1512
- * AIMonitoringApi - axios parameter creator
1513
- * @export
1514
- */
1515
- export const AIMonitoringApiAxiosParamCreator = function (configuration) {
1516
- return {
1566
+ imageGeneration: (organisation_1, imageGenerationRequest_1, ...args_1) => __awaiter(this, [organisation_1, imageGenerationRequest_1, ...args_1], void 0, function* (organisation, imageGenerationRequest, options = {}) {
1567
+ // verify required parameter 'organisation' is not null or undefined
1568
+ assertParamExists('imageGeneration', 'organisation', organisation);
1569
+ // verify required parameter 'imageGenerationRequest' is not null or undefined
1570
+ assertParamExists('imageGeneration', 'imageGenerationRequest', imageGenerationRequest);
1571
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation`
1572
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1573
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1574
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1575
+ let baseOptions;
1576
+ if (configuration) {
1577
+ baseOptions = configuration.baseOptions;
1578
+ }
1579
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1580
+ const localVarHeaderParameter = {};
1581
+ const localVarQueryParameter = {};
1582
+ // authentication BearerAuth required
1583
+ // http bearer authentication required
1584
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1585
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1586
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1587
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1588
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1589
+ localVarRequestOptions.data = serializeDataIfNeeded(imageGenerationRequest, localVarRequestOptions, configuration);
1590
+ return {
1591
+ url: toPathString(localVarUrlObj),
1592
+ options: localVarRequestOptions,
1593
+ };
1594
+ }),
1517
1595
  /**
1518
- *
1519
- * @summary Get AI usage statistics
1596
+ * 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.
1597
+ * @summary Submit Client Tool Results (Callback)
1520
1598
  * @param {string} organisation The organisation ID
1521
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
1599
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1522
1600
  * @param {*} [options] Override http request option.
1523
1601
  * @throws {RequiredError}
1524
1602
  */
1525
- getAIUsageStats: (organisation_1, month_1, ...args_1) => __awaiter(this, [organisation_1, month_1, ...args_1], void 0, function* (organisation, month, options = {}) {
1603
+ submitToolCallback: (organisation_1, submitToolCallbackRequest_1, ...args_1) => __awaiter(this, [organisation_1, submitToolCallbackRequest_1, ...args_1], void 0, function* (organisation, submitToolCallbackRequest, options = {}) {
1526
1604
  // verify required parameter 'organisation' is not null or undefined
1527
- assertParamExists('getAIUsageStats', 'organisation', organisation);
1528
- const localVarPath = `/api/v3/organizations/{organisation}/ai/usage`
1605
+ assertParamExists('submitToolCallback', 'organisation', organisation);
1606
+ // verify required parameter 'submitToolCallbackRequest' is not null or undefined
1607
+ assertParamExists('submitToolCallback', 'submitToolCallbackRequest', submitToolCallbackRequest);
1608
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/callback`
1529
1609
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1530
1610
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1531
1611
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1533,18 +1613,17 @@ export const AIMonitoringApiAxiosParamCreator = function (configuration) {
1533
1613
  if (configuration) {
1534
1614
  baseOptions = configuration.baseOptions;
1535
1615
  }
1536
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1616
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1537
1617
  const localVarHeaderParameter = {};
1538
1618
  const localVarQueryParameter = {};
1539
1619
  // authentication BearerAuth required
1540
1620
  // http bearer authentication required
1541
1621
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1542
- if (month !== undefined) {
1543
- localVarQueryParameter['month'] = month;
1544
- }
1622
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1545
1623
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1546
1624
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1547
1625
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1626
+ localVarRequestOptions.data = serializeDataIfNeeded(submitToolCallbackRequest, localVarRequestOptions, configuration);
1548
1627
  return {
1549
1628
  url: toPathString(localVarUrlObj),
1550
1629
  options: localVarRequestOptions,
@@ -1553,91 +1632,1130 @@ export const AIMonitoringApiAxiosParamCreator = function (configuration) {
1553
1632
  };
1554
1633
  };
1555
1634
  /**
1556
- * AIMonitoringApi - functional programming interface
1635
+ * AIInferenceApi - functional programming interface
1557
1636
  * @export
1558
1637
  */
1559
- export const AIMonitoringApiFp = function (configuration) {
1560
- const localVarAxiosParamCreator = AIMonitoringApiAxiosParamCreator(configuration);
1638
+ export const AIInferenceApiFp = function (configuration) {
1639
+ const localVarAxiosParamCreator = AIInferenceApiAxiosParamCreator(configuration);
1561
1640
  return {
1562
1641
  /**
1563
- *
1564
- * @summary Get AI usage statistics
1642
+ * 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
1643
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1644
+ * @param {string} organisation The organisation ID
1645
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1646
+ * @param {*} [options] Override http request option.
1647
+ * @throws {RequiredError}
1648
+ */
1649
+ chatInference(organisation, chatInferenceRequest, options) {
1650
+ return __awaiter(this, void 0, void 0, function* () {
1651
+ var _a, _b, _c;
1652
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options);
1653
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1654
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.chatInference']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1655
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1656
+ });
1657
+ },
1658
+ /**
1659
+ * 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)
1660
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1661
+ * @param {string} organisation The organisation ID
1662
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1663
+ * @param {*} [options] Override http request option.
1664
+ * @throws {RequiredError}
1665
+ */
1666
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1667
+ return __awaiter(this, void 0, void 0, function* () {
1668
+ var _a, _b, _c;
1669
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options);
1670
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1671
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.chatInferenceStream']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1672
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1673
+ });
1674
+ },
1675
+ /**
1676
+ * 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)
1677
+ * @summary Generate text embeddings for semantic search and RAG applications
1678
+ * @param {string} organisation The organisation ID
1679
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1680
+ * @param {*} [options] Override http request option.
1681
+ * @throws {RequiredError}
1682
+ */
1683
+ embeddings(organisation, embeddingsRequest, options) {
1684
+ return __awaiter(this, void 0, void 0, function* () {
1685
+ var _a, _b, _c;
1686
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options);
1687
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1688
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.embeddings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1689
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1690
+ });
1691
+ },
1692
+ /**
1693
+ * 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)
1694
+ * @summary Get Durable Execution Status
1695
+ * @param {string} organisation The organisation ID
1696
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1697
+ * @param {*} [options] Override http request option.
1698
+ * @throws {RequiredError}
1699
+ */
1700
+ getDurableExecutionStatus(organisation, identifier, options) {
1701
+ return __awaiter(this, void 0, void 0, function* () {
1702
+ var _a, _b, _c;
1703
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDurableExecutionStatus(organisation, identifier, options);
1704
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1705
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.getDurableExecutionStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1706
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1707
+ });
1708
+ },
1709
+ /**
1710
+ * 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
1711
+ * @summary Generate images with Amazon Nova Canvas
1712
+ * @param {string} organisation The organisation ID
1713
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1714
+ * @param {*} [options] Override http request option.
1715
+ * @throws {RequiredError}
1716
+ */
1717
+ imageGeneration(organisation, imageGenerationRequest, options) {
1718
+ return __awaiter(this, void 0, void 0, function* () {
1719
+ var _a, _b, _c;
1720
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options);
1721
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1722
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.imageGeneration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1723
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1724
+ });
1725
+ },
1726
+ /**
1727
+ * 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.
1728
+ * @summary Submit Client Tool Results (Callback)
1729
+ * @param {string} organisation The organisation ID
1730
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1731
+ * @param {*} [options] Override http request option.
1732
+ * @throws {RequiredError}
1733
+ */
1734
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1735
+ return __awaiter(this, void 0, void 0, function* () {
1736
+ var _a, _b, _c;
1737
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.submitToolCallback(organisation, submitToolCallbackRequest, options);
1738
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1739
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIInferenceApi.submitToolCallback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1740
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1741
+ });
1742
+ },
1743
+ };
1744
+ };
1745
+ /**
1746
+ * AIInferenceApi - factory interface
1747
+ * @export
1748
+ */
1749
+ export const AIInferenceApiFactory = function (configuration, basePath, axios) {
1750
+ const localVarFp = AIInferenceApiFp(configuration);
1751
+ return {
1752
+ /**
1753
+ * 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
1754
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1755
+ * @param {string} organisation The organisation ID
1756
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1757
+ * @param {*} [options] Override http request option.
1758
+ * @throws {RequiredError}
1759
+ */
1760
+ chatInference(organisation, chatInferenceRequest, options) {
1761
+ return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath));
1762
+ },
1763
+ /**
1764
+ * 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)
1765
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1766
+ * @param {string} organisation The organisation ID
1767
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1768
+ * @param {*} [options] Override http request option.
1769
+ * @throws {RequiredError}
1770
+ */
1771
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1772
+ return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath));
1773
+ },
1774
+ /**
1775
+ * 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)
1776
+ * @summary Generate text embeddings for semantic search and RAG applications
1777
+ * @param {string} organisation The organisation ID
1778
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1779
+ * @param {*} [options] Override http request option.
1780
+ * @throws {RequiredError}
1781
+ */
1782
+ embeddings(organisation, embeddingsRequest, options) {
1783
+ return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath));
1784
+ },
1785
+ /**
1786
+ * 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)
1787
+ * @summary Get Durable Execution Status
1788
+ * @param {string} organisation The organisation ID
1789
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1790
+ * @param {*} [options] Override http request option.
1791
+ * @throws {RequiredError}
1792
+ */
1793
+ getDurableExecutionStatus(organisation, identifier, options) {
1794
+ return localVarFp.getDurableExecutionStatus(organisation, identifier, options).then((request) => request(axios, basePath));
1795
+ },
1796
+ /**
1797
+ * 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
1798
+ * @summary Generate images with Amazon Nova Canvas
1799
+ * @param {string} organisation The organisation ID
1800
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1801
+ * @param {*} [options] Override http request option.
1802
+ * @throws {RequiredError}
1803
+ */
1804
+ imageGeneration(organisation, imageGenerationRequest, options) {
1805
+ return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath));
1806
+ },
1807
+ /**
1808
+ * 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.
1809
+ * @summary Submit Client Tool Results (Callback)
1810
+ * @param {string} organisation The organisation ID
1811
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1812
+ * @param {*} [options] Override http request option.
1813
+ * @throws {RequiredError}
1814
+ */
1815
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1816
+ return localVarFp.submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(axios, basePath));
1817
+ },
1818
+ };
1819
+ };
1820
+ /**
1821
+ * AIInferenceApi - object-oriented interface
1822
+ * @export
1823
+ * @class AIInferenceApi
1824
+ * @extends {BaseAPI}
1825
+ */
1826
+ export class AIInferenceApi extends BaseAPI {
1827
+ /**
1828
+ * 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
1829
+ * @summary Chat inference via API Gateway (buffered responses) with multimodal support
1830
+ * @param {string} organisation The organisation ID
1831
+ * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks
1832
+ * @param {*} [options] Override http request option.
1833
+ * @throws {RequiredError}
1834
+ * @memberof AIInferenceApi
1835
+ */
1836
+ chatInference(organisation, chatInferenceRequest, options) {
1837
+ return AIInferenceApiFp(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath));
1838
+ }
1839
+ /**
1840
+ * 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)
1841
+ * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support
1842
+ * @param {string} organisation The organisation ID
1843
+ * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks
1844
+ * @param {*} [options] Override http request option.
1845
+ * @throws {RequiredError}
1846
+ * @memberof AIInferenceApi
1847
+ */
1848
+ chatInferenceStream(organisation, chatInferenceStreamRequest, options) {
1849
+ return AIInferenceApiFp(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath));
1850
+ }
1851
+ /**
1852
+ * 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)
1853
+ * @summary Generate text embeddings for semantic search and RAG applications
1854
+ * @param {string} organisation The organisation ID
1855
+ * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts
1856
+ * @param {*} [options] Override http request option.
1857
+ * @throws {RequiredError}
1858
+ * @memberof AIInferenceApi
1859
+ */
1860
+ embeddings(organisation, embeddingsRequest, options) {
1861
+ return AIInferenceApiFp(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath));
1862
+ }
1863
+ /**
1864
+ * 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)
1865
+ * @summary Get Durable Execution Status
1866
+ * @param {string} organisation The organisation ID
1867
+ * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded)
1868
+ * @param {*} [options] Override http request option.
1869
+ * @throws {RequiredError}
1870
+ * @memberof AIInferenceApi
1871
+ */
1872
+ getDurableExecutionStatus(organisation, identifier, options) {
1873
+ return AIInferenceApiFp(this.configuration).getDurableExecutionStatus(organisation, identifier, options).then((request) => request(this.axios, this.basePath));
1874
+ }
1875
+ /**
1876
+ * 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
1877
+ * @summary Generate images with Amazon Nova Canvas
1878
+ * @param {string} organisation The organisation ID
1879
+ * @param {ImageGenerationRequest} imageGenerationRequest Image generation request
1880
+ * @param {*} [options] Override http request option.
1881
+ * @throws {RequiredError}
1882
+ * @memberof AIInferenceApi
1883
+ */
1884
+ imageGeneration(organisation, imageGenerationRequest, options) {
1885
+ return AIInferenceApiFp(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath));
1886
+ }
1887
+ /**
1888
+ * 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.
1889
+ * @summary Submit Client Tool Results (Callback)
1890
+ * @param {string} organisation The organisation ID
1891
+ * @param {SubmitToolCallbackRequest} submitToolCallbackRequest
1892
+ * @param {*} [options] Override http request option.
1893
+ * @throws {RequiredError}
1894
+ * @memberof AIInferenceApi
1895
+ */
1896
+ submitToolCallback(organisation, submitToolCallbackRequest, options) {
1897
+ return AIInferenceApiFp(this.configuration).submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(this.axios, this.basePath));
1898
+ }
1899
+ }
1900
+ /**
1901
+ * AIModelsApi - axios parameter creator
1902
+ * @export
1903
+ */
1904
+ export const AIModelsApiAxiosParamCreator = function (configuration) {
1905
+ return {
1906
+ /**
1907
+ * 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
1908
+ * @summary Get AI Model Details
1909
+ * @param {string} organisation The organisation ID
1910
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1911
+ * @param {*} [options] Override http request option.
1912
+ * @throws {RequiredError}
1913
+ */
1914
+ getAIModel: (organisation_1, modelId_1, ...args_1) => __awaiter(this, [organisation_1, modelId_1, ...args_1], void 0, function* (organisation, modelId, options = {}) {
1915
+ // verify required parameter 'organisation' is not null or undefined
1916
+ assertParamExists('getAIModel', 'organisation', organisation);
1917
+ // verify required parameter 'modelId' is not null or undefined
1918
+ assertParamExists('getAIModel', 'modelId', modelId);
1919
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}`
1920
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1921
+ .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId)));
1922
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1923
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1924
+ let baseOptions;
1925
+ if (configuration) {
1926
+ baseOptions = configuration.baseOptions;
1927
+ }
1928
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1929
+ const localVarHeaderParameter = {};
1930
+ const localVarQueryParameter = {};
1931
+ // authentication BearerAuth required
1932
+ // http bearer authentication required
1933
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1934
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1935
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1936
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1937
+ return {
1938
+ url: toPathString(localVarUrlObj),
1939
+ options: localVarRequestOptions,
1940
+ };
1941
+ }),
1942
+ /**
1943
+ *
1944
+ * @summary List available AI models for an organization
1945
+ * @param {string} organisation The organisation ID
1946
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
1947
+ * @param {*} [options] Override http request option.
1948
+ * @throws {RequiredError}
1949
+ */
1950
+ listAIModels: (organisation_1, feature_1, ...args_1) => __awaiter(this, [organisation_1, feature_1, ...args_1], void 0, function* (organisation, feature, options = {}) {
1951
+ // verify required parameter 'organisation' is not null or undefined
1952
+ assertParamExists('listAIModels', 'organisation', organisation);
1953
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/models`
1954
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1955
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1956
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1957
+ let baseOptions;
1958
+ if (configuration) {
1959
+ baseOptions = configuration.baseOptions;
1960
+ }
1961
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1962
+ const localVarHeaderParameter = {};
1963
+ const localVarQueryParameter = {};
1964
+ // authentication BearerAuth required
1965
+ // http bearer authentication required
1966
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1967
+ if (feature !== undefined) {
1968
+ localVarQueryParameter['feature'] = feature;
1969
+ }
1970
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1971
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1972
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1973
+ return {
1974
+ url: toPathString(localVarUrlObj),
1975
+ options: localVarRequestOptions,
1976
+ };
1977
+ }),
1978
+ };
1979
+ };
1980
+ /**
1981
+ * AIModelsApi - functional programming interface
1982
+ * @export
1983
+ */
1984
+ export const AIModelsApiFp = function (configuration) {
1985
+ const localVarAxiosParamCreator = AIModelsApiAxiosParamCreator(configuration);
1986
+ return {
1987
+ /**
1988
+ * 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
1989
+ * @summary Get AI Model Details
1990
+ * @param {string} organisation The organisation ID
1991
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
1992
+ * @param {*} [options] Override http request option.
1993
+ * @throws {RequiredError}
1994
+ */
1995
+ getAIModel(organisation, modelId, options) {
1996
+ return __awaiter(this, void 0, void 0, function* () {
1997
+ var _a, _b, _c;
1998
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIModel(organisation, modelId, options);
1999
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2000
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelsApi.getAIModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2001
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2002
+ });
2003
+ },
2004
+ /**
2005
+ *
2006
+ * @summary List available AI models for an organization
2007
+ * @param {string} organisation The organisation ID
2008
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ listAIModels(organisation, feature, options) {
2013
+ return __awaiter(this, void 0, void 0, function* () {
2014
+ var _a, _b, _c;
2015
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAIModels(organisation, feature, options);
2016
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2017
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelsApi.listAIModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2018
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2019
+ });
2020
+ },
2021
+ };
2022
+ };
2023
+ /**
2024
+ * AIModelsApi - factory interface
2025
+ * @export
2026
+ */
2027
+ export const AIModelsApiFactory = function (configuration, basePath, axios) {
2028
+ const localVarFp = AIModelsApiFp(configuration);
2029
+ return {
2030
+ /**
2031
+ * 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
2032
+ * @summary Get AI Model Details
2033
+ * @param {string} organisation The organisation ID
2034
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
2035
+ * @param {*} [options] Override http request option.
2036
+ * @throws {RequiredError}
2037
+ */
2038
+ getAIModel(organisation, modelId, options) {
2039
+ return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath));
2040
+ },
2041
+ /**
2042
+ *
2043
+ * @summary List available AI models for an organization
2044
+ * @param {string} organisation The organisation ID
2045
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2046
+ * @param {*} [options] Override http request option.
2047
+ * @throws {RequiredError}
2048
+ */
2049
+ listAIModels(organisation, feature, options) {
2050
+ return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath));
2051
+ },
2052
+ };
2053
+ };
2054
+ /**
2055
+ * AIModelsApi - object-oriented interface
2056
+ * @export
2057
+ * @class AIModelsApi
2058
+ * @extends {BaseAPI}
2059
+ */
2060
+ export class AIModelsApi extends BaseAPI {
2061
+ /**
2062
+ * 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
2063
+ * @summary Get AI Model Details
2064
+ * @param {string} organisation The organisation ID
2065
+ * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0)
2066
+ * @param {*} [options] Override http request option.
2067
+ * @throws {RequiredError}
2068
+ * @memberof AIModelsApi
2069
+ */
2070
+ getAIModel(organisation, modelId, options) {
2071
+ return AIModelsApiFp(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath));
2072
+ }
2073
+ /**
2074
+ *
2075
+ * @summary List available AI models for an organization
2076
+ * @param {string} organisation The organisation ID
2077
+ * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature
2078
+ * @param {*} [options] Override http request option.
2079
+ * @throws {RequiredError}
2080
+ * @memberof AIModelsApi
2081
+ */
2082
+ listAIModels(organisation, feature, options) {
2083
+ return AIModelsApiFp(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath));
2084
+ }
2085
+ }
2086
+ /**
2087
+ * @export
2088
+ */
2089
+ export const ListAIModelsFeatureEnum = {
2090
+ Chat: 'chat',
2091
+ Embeddings: 'embeddings',
2092
+ Vision: 'vision',
2093
+ Streaming: 'streaming',
2094
+ All: 'all'
2095
+ };
2096
+ /**
2097
+ * AIMonitoringApi - axios parameter creator
2098
+ * @export
2099
+ */
2100
+ export const AIMonitoringApiAxiosParamCreator = function (configuration) {
2101
+ return {
2102
+ /**
2103
+ *
2104
+ * @summary Get AI usage statistics
2105
+ * @param {string} organisation The organisation ID
2106
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2107
+ * @param {*} [options] Override http request option.
2108
+ * @throws {RequiredError}
2109
+ */
2110
+ getAIUsageStats: (organisation_1, month_1, ...args_1) => __awaiter(this, [organisation_1, month_1, ...args_1], void 0, function* (organisation, month, options = {}) {
2111
+ // verify required parameter 'organisation' is not null or undefined
2112
+ assertParamExists('getAIUsageStats', 'organisation', organisation);
2113
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/usage`
2114
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2115
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2116
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2117
+ let baseOptions;
2118
+ if (configuration) {
2119
+ baseOptions = configuration.baseOptions;
2120
+ }
2121
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2122
+ const localVarHeaderParameter = {};
2123
+ const localVarQueryParameter = {};
2124
+ // authentication BearerAuth required
2125
+ // http bearer authentication required
2126
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2127
+ if (month !== undefined) {
2128
+ localVarQueryParameter['month'] = month;
2129
+ }
2130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2132
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2133
+ return {
2134
+ url: toPathString(localVarUrlObj),
2135
+ options: localVarRequestOptions,
2136
+ };
2137
+ }),
2138
+ };
2139
+ };
2140
+ /**
2141
+ * AIMonitoringApi - functional programming interface
2142
+ * @export
2143
+ */
2144
+ export const AIMonitoringApiFp = function (configuration) {
2145
+ const localVarAxiosParamCreator = AIMonitoringApiAxiosParamCreator(configuration);
2146
+ return {
2147
+ /**
2148
+ *
2149
+ * @summary Get AI usage statistics
2150
+ * @param {string} organisation The organisation ID
2151
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2152
+ * @param {*} [options] Override http request option.
2153
+ * @throws {RequiredError}
2154
+ */
2155
+ getAIUsageStats(organisation, month, options) {
2156
+ return __awaiter(this, void 0, void 0, function* () {
2157
+ var _a, _b, _c;
2158
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIUsageStats(organisation, month, options);
2159
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2160
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIMonitoringApi.getAIUsageStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2161
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2162
+ });
2163
+ },
2164
+ };
2165
+ };
2166
+ /**
2167
+ * AIMonitoringApi - factory interface
2168
+ * @export
2169
+ */
2170
+ export const AIMonitoringApiFactory = function (configuration, basePath, axios) {
2171
+ const localVarFp = AIMonitoringApiFp(configuration);
2172
+ return {
2173
+ /**
2174
+ *
2175
+ * @summary Get AI usage statistics
2176
+ * @param {string} organisation The organisation ID
2177
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2178
+ * @param {*} [options] Override http request option.
2179
+ * @throws {RequiredError}
2180
+ */
2181
+ getAIUsageStats(organisation, month, options) {
2182
+ return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath));
2183
+ },
2184
+ };
2185
+ };
2186
+ /**
2187
+ * AIMonitoringApi - object-oriented interface
2188
+ * @export
2189
+ * @class AIMonitoringApi
2190
+ * @extends {BaseAPI}
2191
+ */
2192
+ export class AIMonitoringApi extends BaseAPI {
2193
+ /**
2194
+ *
2195
+ * @summary Get AI usage statistics
2196
+ * @param {string} organisation The organisation ID
2197
+ * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2198
+ * @param {*} [options] Override http request option.
2199
+ * @throws {RequiredError}
2200
+ * @memberof AIMonitoringApi
2201
+ */
2202
+ getAIUsageStats(organisation, month, options) {
2203
+ return AIMonitoringApiFp(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath));
2204
+ }
2205
+ }
2206
+ /**
2207
+ * AISessionsApi - axios parameter creator
2208
+ * @export
2209
+ */
2210
+ export const AISessionsApiAxiosParamCreator = function (configuration) {
2211
+ return {
2212
+ /**
2213
+ * 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.
2214
+ * @summary Create a new chat session with multi-tenant isolation
2215
+ * @param {string} organisation The organisation ID
2216
+ * @param {CreateAISessionRequest} createAISessionRequest
2217
+ * @param {*} [options] Override http request option.
2218
+ * @throws {RequiredError}
2219
+ */
2220
+ createAISession: (organisation_1, createAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, createAISessionRequest_1, ...args_1], void 0, function* (organisation, createAISessionRequest, options = {}) {
2221
+ // verify required parameter 'organisation' is not null or undefined
2222
+ assertParamExists('createAISession', 'organisation', organisation);
2223
+ // verify required parameter 'createAISessionRequest' is not null or undefined
2224
+ assertParamExists('createAISession', 'createAISessionRequest', createAISessionRequest);
2225
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2226
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2227
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2228
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2229
+ let baseOptions;
2230
+ if (configuration) {
2231
+ baseOptions = configuration.baseOptions;
2232
+ }
2233
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2234
+ const localVarHeaderParameter = {};
2235
+ const localVarQueryParameter = {};
2236
+ // authentication BearerAuth required
2237
+ // http bearer authentication required
2238
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2239
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2240
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2241
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2242
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2243
+ localVarRequestOptions.data = serializeDataIfNeeded(createAISessionRequest, localVarRequestOptions, configuration);
2244
+ return {
2245
+ url: toPathString(localVarUrlObj),
2246
+ options: localVarRequestOptions,
2247
+ };
2248
+ }),
2249
+ /**
2250
+ *
2251
+ * @summary Delete a chat session
2252
+ * @param {string} organisation The organisation ID
2253
+ * @param {string} sessionId The session ID
2254
+ * @param {*} [options] Override http request option.
2255
+ * @throws {RequiredError}
2256
+ */
2257
+ deleteAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2258
+ // verify required parameter 'organisation' is not null or undefined
2259
+ assertParamExists('deleteAISession', 'organisation', organisation);
2260
+ // verify required parameter 'sessionId' is not null or undefined
2261
+ assertParamExists('deleteAISession', 'sessionId', sessionId);
2262
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2263
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2264
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2265
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2266
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2267
+ let baseOptions;
2268
+ if (configuration) {
2269
+ baseOptions = configuration.baseOptions;
2270
+ }
2271
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2272
+ const localVarHeaderParameter = {};
2273
+ const localVarQueryParameter = {};
2274
+ // authentication BearerAuth required
2275
+ // http bearer authentication required
2276
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2277
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2278
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2279
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2280
+ return {
2281
+ url: toPathString(localVarUrlObj),
2282
+ options: localVarRequestOptions,
2283
+ };
2284
+ }),
2285
+ /**
2286
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2287
+ * @summary Extend Session Expiration
2288
+ * @param {string} organisation The organisation ID
2289
+ * @param {string} sessionId The session ID
2290
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2291
+ * @param {*} [options] Override http request option.
2292
+ * @throws {RequiredError}
2293
+ */
2294
+ 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 = {}) {
2295
+ // verify required parameter 'organisation' is not null or undefined
2296
+ assertParamExists('extendAISession', 'organisation', organisation);
2297
+ // verify required parameter 'sessionId' is not null or undefined
2298
+ assertParamExists('extendAISession', 'sessionId', sessionId);
2299
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend`
2300
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2301
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2302
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2303
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2304
+ let baseOptions;
2305
+ if (configuration) {
2306
+ baseOptions = configuration.baseOptions;
2307
+ }
2308
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2309
+ const localVarHeaderParameter = {};
2310
+ const localVarQueryParameter = {};
2311
+ // authentication BearerAuth required
2312
+ // http bearer authentication required
2313
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2314
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2315
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2316
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2317
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2318
+ localVarRequestOptions.data = serializeDataIfNeeded(extendAISessionRequest, localVarRequestOptions, configuration);
2319
+ return {
2320
+ url: toPathString(localVarUrlObj),
2321
+ options: localVarRequestOptions,
2322
+ };
2323
+ }),
2324
+ /**
2325
+ *
2326
+ * @summary Get a specific chat session
2327
+ * @param {string} organisation The organisation ID
2328
+ * @param {string} sessionId The session ID
2329
+ * @param {*} [options] Override http request option.
2330
+ * @throws {RequiredError}
2331
+ */
2332
+ getAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2333
+ // verify required parameter 'organisation' is not null or undefined
2334
+ assertParamExists('getAISession', 'organisation', organisation);
2335
+ // verify required parameter 'sessionId' is not null or undefined
2336
+ assertParamExists('getAISession', 'sessionId', sessionId);
2337
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2338
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2339
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2340
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2341
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2342
+ let baseOptions;
2343
+ if (configuration) {
2344
+ baseOptions = configuration.baseOptions;
2345
+ }
2346
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2347
+ const localVarHeaderParameter = {};
2348
+ const localVarQueryParameter = {};
2349
+ // authentication BearerAuth required
2350
+ // http bearer authentication required
2351
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2352
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2353
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2354
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2355
+ return {
2356
+ url: toPathString(localVarUrlObj),
2357
+ options: localVarRequestOptions,
2358
+ };
2359
+ }),
2360
+ /**
2361
+ * 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
2362
+ * @summary List chat sessions with multi-tenant filtering
2363
+ * @param {string} organisation The organisation ID
2364
+ * @param {string} [userId] Filter sessions by user ID
2365
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2366
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2367
+ * @param {number} [offset] Offset for pagination
2368
+ * @param {string} [model] Filter by model ID
2369
+ * @param {*} [options] Override http request option.
2370
+ * @throws {RequiredError}
2371
+ */
2372
+ 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 = {}) {
2373
+ // verify required parameter 'organisation' is not null or undefined
2374
+ assertParamExists('listAISessions', 'organisation', organisation);
2375
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2376
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
2377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2378
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2379
+ let baseOptions;
2380
+ if (configuration) {
2381
+ baseOptions = configuration.baseOptions;
2382
+ }
2383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2384
+ const localVarHeaderParameter = {};
2385
+ const localVarQueryParameter = {};
2386
+ // authentication BearerAuth required
2387
+ // http bearer authentication required
2388
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2389
+ if (userId !== undefined) {
2390
+ localVarQueryParameter['userId'] = userId;
2391
+ }
2392
+ if (sessionGroup !== undefined) {
2393
+ localVarQueryParameter['sessionGroup'] = sessionGroup;
2394
+ }
2395
+ if (limit !== undefined) {
2396
+ localVarQueryParameter['limit'] = limit;
2397
+ }
2398
+ if (offset !== undefined) {
2399
+ localVarQueryParameter['offset'] = offset;
2400
+ }
2401
+ if (model !== undefined) {
2402
+ localVarQueryParameter['model'] = model;
2403
+ }
2404
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2405
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2406
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2407
+ return {
2408
+ url: toPathString(localVarUrlObj),
2409
+ options: localVarRequestOptions,
2410
+ };
2411
+ }),
2412
+ /**
2413
+ * 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
2414
+ * @summary Update Session
2415
+ * @param {string} organisation The organisation ID
2416
+ * @param {string} sessionId The session ID
2417
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2418
+ * @param {*} [options] Override http request option.
2419
+ * @throws {RequiredError}
2420
+ */
2421
+ 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 = {}) {
2422
+ // verify required parameter 'organisation' is not null or undefined
2423
+ assertParamExists('updateAISession', 'organisation', organisation);
2424
+ // verify required parameter 'sessionId' is not null or undefined
2425
+ assertParamExists('updateAISession', 'sessionId', sessionId);
2426
+ // verify required parameter 'updateAISessionRequest' is not null or undefined
2427
+ assertParamExists('updateAISession', 'updateAISessionRequest', updateAISessionRequest);
2428
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2429
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
2430
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2431
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2432
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2433
+ let baseOptions;
2434
+ if (configuration) {
2435
+ baseOptions = configuration.baseOptions;
2436
+ }
2437
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2438
+ const localVarHeaderParameter = {};
2439
+ const localVarQueryParameter = {};
2440
+ // authentication BearerAuth required
2441
+ // http bearer authentication required
2442
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2443
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2444
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2445
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2446
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2447
+ localVarRequestOptions.data = serializeDataIfNeeded(updateAISessionRequest, localVarRequestOptions, configuration);
2448
+ return {
2449
+ url: toPathString(localVarUrlObj),
2450
+ options: localVarRequestOptions,
2451
+ };
2452
+ }),
2453
+ };
2454
+ };
2455
+ /**
2456
+ * AISessionsApi - functional programming interface
2457
+ * @export
2458
+ */
2459
+ export const AISessionsApiFp = function (configuration) {
2460
+ const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration);
2461
+ return {
2462
+ /**
2463
+ * 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.
2464
+ * @summary Create a new chat session with multi-tenant isolation
2465
+ * @param {string} organisation The organisation ID
2466
+ * @param {CreateAISessionRequest} createAISessionRequest
2467
+ * @param {*} [options] Override http request option.
2468
+ * @throws {RequiredError}
2469
+ */
2470
+ createAISession(organisation, createAISessionRequest, options) {
2471
+ return __awaiter(this, void 0, void 0, function* () {
2472
+ var _a, _b, _c;
2473
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options);
2474
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2475
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.createAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2476
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2477
+ });
2478
+ },
2479
+ /**
2480
+ *
2481
+ * @summary Delete a chat session
2482
+ * @param {string} organisation The organisation ID
2483
+ * @param {string} sessionId The session ID
2484
+ * @param {*} [options] Override http request option.
2485
+ * @throws {RequiredError}
2486
+ */
2487
+ deleteAISession(organisation, sessionId, options) {
2488
+ return __awaiter(this, void 0, void 0, function* () {
2489
+ var _a, _b, _c;
2490
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options);
2491
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2492
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.deleteAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2493
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2494
+ });
2495
+ },
2496
+ /**
2497
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2498
+ * @summary Extend Session Expiration
2499
+ * @param {string} organisation The organisation ID
2500
+ * @param {string} sessionId The session ID
2501
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2502
+ * @param {*} [options] Override http request option.
2503
+ * @throws {RequiredError}
2504
+ */
2505
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2506
+ return __awaiter(this, void 0, void 0, function* () {
2507
+ var _a, _b, _c;
2508
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options);
2509
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2510
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.extendAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2511
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2512
+ });
2513
+ },
2514
+ /**
2515
+ *
2516
+ * @summary Get a specific chat session
2517
+ * @param {string} organisation The organisation ID
2518
+ * @param {string} sessionId The session ID
2519
+ * @param {*} [options] Override http request option.
2520
+ * @throws {RequiredError}
2521
+ */
2522
+ getAISession(organisation, sessionId, options) {
2523
+ return __awaiter(this, void 0, void 0, function* () {
2524
+ var _a, _b, _c;
2525
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAISession(organisation, sessionId, options);
2526
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2527
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.getAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2528
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2529
+ });
2530
+ },
2531
+ /**
2532
+ * 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
2533
+ * @summary List chat sessions with multi-tenant filtering
2534
+ * @param {string} organisation The organisation ID
2535
+ * @param {string} [userId] Filter sessions by user ID
2536
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2537
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2538
+ * @param {number} [offset] Offset for pagination
2539
+ * @param {string} [model] Filter by model ID
2540
+ * @param {*} [options] Override http request option.
2541
+ * @throws {RequiredError}
2542
+ */
2543
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2544
+ return __awaiter(this, void 0, void 0, function* () {
2545
+ var _a, _b, _c;
2546
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options);
2547
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2548
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.listAISessions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2549
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2550
+ });
2551
+ },
2552
+ /**
2553
+ * 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
2554
+ * @summary Update Session
1565
2555
  * @param {string} organisation The organisation ID
1566
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2556
+ * @param {string} sessionId The session ID
2557
+ * @param {UpdateAISessionRequest} updateAISessionRequest
1567
2558
  * @param {*} [options] Override http request option.
1568
2559
  * @throws {RequiredError}
1569
2560
  */
1570
- getAIUsageStats(organisation, month, options) {
2561
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
1571
2562
  return __awaiter(this, void 0, void 0, function* () {
1572
2563
  var _a, _b, _c;
1573
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIUsageStats(organisation, month, options);
2564
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options);
1574
2565
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1575
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIMonitoringApi.getAIUsageStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2566
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.updateAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1576
2567
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1577
2568
  });
1578
2569
  },
1579
2570
  };
1580
2571
  };
1581
2572
  /**
1582
- * AIMonitoringApi - factory interface
2573
+ * AISessionsApi - factory interface
1583
2574
  * @export
1584
2575
  */
1585
- export const AIMonitoringApiFactory = function (configuration, basePath, axios) {
1586
- const localVarFp = AIMonitoringApiFp(configuration);
2576
+ export const AISessionsApiFactory = function (configuration, basePath, axios) {
2577
+ const localVarFp = AISessionsApiFp(configuration);
1587
2578
  return {
2579
+ /**
2580
+ * 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.
2581
+ * @summary Create a new chat session with multi-tenant isolation
2582
+ * @param {string} organisation The organisation ID
2583
+ * @param {CreateAISessionRequest} createAISessionRequest
2584
+ * @param {*} [options] Override http request option.
2585
+ * @throws {RequiredError}
2586
+ */
2587
+ createAISession(organisation, createAISessionRequest, options) {
2588
+ return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath));
2589
+ },
1588
2590
  /**
1589
2591
  *
1590
- * @summary Get AI usage statistics
2592
+ * @summary Delete a chat session
1591
2593
  * @param {string} organisation The organisation ID
1592
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2594
+ * @param {string} sessionId The session ID
1593
2595
  * @param {*} [options] Override http request option.
1594
2596
  * @throws {RequiredError}
1595
2597
  */
1596
- getAIUsageStats(organisation, month, options) {
1597
- return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath));
2598
+ deleteAISession(organisation, sessionId, options) {
2599
+ return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
2600
+ },
2601
+ /**
2602
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2603
+ * @summary Extend Session Expiration
2604
+ * @param {string} organisation The organisation ID
2605
+ * @param {string} sessionId The session ID
2606
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2607
+ * @param {*} [options] Override http request option.
2608
+ * @throws {RequiredError}
2609
+ */
2610
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2611
+ return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath));
2612
+ },
2613
+ /**
2614
+ *
2615
+ * @summary Get a specific chat session
2616
+ * @param {string} organisation The organisation ID
2617
+ * @param {string} sessionId The session ID
2618
+ * @param {*} [options] Override http request option.
2619
+ * @throws {RequiredError}
2620
+ */
2621
+ getAISession(organisation, sessionId, options) {
2622
+ return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
2623
+ },
2624
+ /**
2625
+ * 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
2626
+ * @summary List chat sessions with multi-tenant filtering
2627
+ * @param {string} organisation The organisation ID
2628
+ * @param {string} [userId] Filter sessions by user ID
2629
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2630
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2631
+ * @param {number} [offset] Offset for pagination
2632
+ * @param {string} [model] Filter by model ID
2633
+ * @param {*} [options] Override http request option.
2634
+ * @throws {RequiredError}
2635
+ */
2636
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2637
+ return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath));
2638
+ },
2639
+ /**
2640
+ * 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
2641
+ * @summary Update Session
2642
+ * @param {string} organisation The organisation ID
2643
+ * @param {string} sessionId The session ID
2644
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2645
+ * @param {*} [options] Override http request option.
2646
+ * @throws {RequiredError}
2647
+ */
2648
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2649
+ return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath));
1598
2650
  },
1599
2651
  };
1600
2652
  };
1601
2653
  /**
1602
- * AIMonitoringApi - object-oriented interface
2654
+ * AISessionsApi - object-oriented interface
1603
2655
  * @export
1604
- * @class AIMonitoringApi
2656
+ * @class AISessionsApi
1605
2657
  * @extends {BaseAPI}
1606
2658
  */
1607
- export class AIMonitoringApi extends BaseAPI {
2659
+ export class AISessionsApi extends BaseAPI {
2660
+ /**
2661
+ * 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.
2662
+ * @summary Create a new chat session with multi-tenant isolation
2663
+ * @param {string} organisation The organisation ID
2664
+ * @param {CreateAISessionRequest} createAISessionRequest
2665
+ * @param {*} [options] Override http request option.
2666
+ * @throws {RequiredError}
2667
+ * @memberof AISessionsApi
2668
+ */
2669
+ createAISession(organisation, createAISessionRequest, options) {
2670
+ return AISessionsApiFp(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath));
2671
+ }
1608
2672
  /**
1609
2673
  *
1610
- * @summary Get AI usage statistics
2674
+ * @summary Delete a chat session
1611
2675
  * @param {string} organisation The organisation ID
1612
- * @param {string} [month] Month to retrieve statistics for (YYYY-MM format)
2676
+ * @param {string} sessionId The session ID
1613
2677
  * @param {*} [options] Override http request option.
1614
2678
  * @throws {RequiredError}
1615
- * @memberof AIMonitoringApi
2679
+ * @memberof AISessionsApi
1616
2680
  */
1617
- getAIUsageStats(organisation, month, options) {
1618
- return AIMonitoringApiFp(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath));
2681
+ deleteAISession(organisation, sessionId, options) {
2682
+ return AISessionsApiFp(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
2683
+ }
2684
+ /**
2685
+ * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2686
+ * @summary Extend Session Expiration
2687
+ * @param {string} organisation The organisation ID
2688
+ * @param {string} sessionId The session ID
2689
+ * @param {ExtendAISessionRequest} [extendAISessionRequest]
2690
+ * @param {*} [options] Override http request option.
2691
+ * @throws {RequiredError}
2692
+ * @memberof AISessionsApi
2693
+ */
2694
+ extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2695
+ return AISessionsApiFp(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath));
2696
+ }
2697
+ /**
2698
+ *
2699
+ * @summary Get a specific chat session
2700
+ * @param {string} organisation The organisation ID
2701
+ * @param {string} sessionId The session ID
2702
+ * @param {*} [options] Override http request option.
2703
+ * @throws {RequiredError}
2704
+ * @memberof AISessionsApi
2705
+ */
2706
+ getAISession(organisation, sessionId, options) {
2707
+ return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
2708
+ }
2709
+ /**
2710
+ * 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
2711
+ * @summary List chat sessions with multi-tenant filtering
2712
+ * @param {string} organisation The organisation ID
2713
+ * @param {string} [userId] Filter sessions by user ID
2714
+ * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2715
+ * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2716
+ * @param {number} [offset] Offset for pagination
2717
+ * @param {string} [model] Filter by model ID
2718
+ * @param {*} [options] Override http request option.
2719
+ * @throws {RequiredError}
2720
+ * @memberof AISessionsApi
2721
+ */
2722
+ listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2723
+ return AISessionsApiFp(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath));
2724
+ }
2725
+ /**
2726
+ * 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
2727
+ * @summary Update Session
2728
+ * @param {string} organisation The organisation ID
2729
+ * @param {string} sessionId The session ID
2730
+ * @param {UpdateAISessionRequest} updateAISessionRequest
2731
+ * @param {*} [options] Override http request option.
2732
+ * @throws {RequiredError}
2733
+ * @memberof AISessionsApi
2734
+ */
2735
+ updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2736
+ return AISessionsApiFp(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath));
1619
2737
  }
1620
2738
  }
1621
2739
  /**
1622
- * AISessionsApi - axios parameter creator
2740
+ * AITaskManagementApi - axios parameter creator
1623
2741
  * @export
1624
2742
  */
1625
- export const AISessionsApiAxiosParamCreator = function (configuration) {
2743
+ export const AITaskManagementApiAxiosParamCreator = function (configuration) {
1626
2744
  return {
1627
2745
  /**
1628
- * 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.
1629
- * @summary Create a new chat session with multi-tenant isolation
2746
+ * 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
2747
+ * @summary Create a new task
1630
2748
  * @param {string} organisation The organisation ID
1631
- * @param {CreateAISessionRequest} createAISessionRequest
2749
+ * @param {CreateTaskRequest} createTaskRequest
1632
2750
  * @param {*} [options] Override http request option.
1633
2751
  * @throws {RequiredError}
1634
2752
  */
1635
- createAISession: (organisation_1, createAISessionRequest_1, ...args_1) => __awaiter(this, [organisation_1, createAISessionRequest_1, ...args_1], void 0, function* (organisation, createAISessionRequest, options = {}) {
2753
+ createTask: (organisation_1, createTaskRequest_1, ...args_1) => __awaiter(this, [organisation_1, createTaskRequest_1, ...args_1], void 0, function* (organisation, createTaskRequest, options = {}) {
1636
2754
  // verify required parameter 'organisation' is not null or undefined
1637
- assertParamExists('createAISession', 'organisation', organisation);
1638
- // verify required parameter 'createAISessionRequest' is not null or undefined
1639
- assertParamExists('createAISession', 'createAISessionRequest', createAISessionRequest);
1640
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2755
+ assertParamExists('createTask', 'organisation', organisation);
2756
+ // verify required parameter 'createTaskRequest' is not null or undefined
2757
+ assertParamExists('createTask', 'createTaskRequest', createTaskRequest);
2758
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks`
1641
2759
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1642
2760
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1643
2761
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1655,28 +2773,29 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1655
2773
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1656
2774
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1657
2775
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1658
- localVarRequestOptions.data = serializeDataIfNeeded(createAISessionRequest, localVarRequestOptions, configuration);
2776
+ localVarRequestOptions.data = serializeDataIfNeeded(createTaskRequest, localVarRequestOptions, configuration);
1659
2777
  return {
1660
2778
  url: toPathString(localVarUrlObj),
1661
2779
  options: localVarRequestOptions,
1662
2780
  };
1663
2781
  }),
1664
2782
  /**
1665
- *
1666
- * @summary Delete a chat session
2783
+ * 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
2784
+ * @summary Delete a task
1667
2785
  * @param {string} organisation The organisation ID
1668
- * @param {string} sessionId The session ID
2786
+ * @param {string} taskId The task UUID
2787
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
1669
2788
  * @param {*} [options] Override http request option.
1670
2789
  * @throws {RequiredError}
1671
2790
  */
1672
- deleteAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2791
+ 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 = {}) {
1673
2792
  // verify required parameter 'organisation' is not null or undefined
1674
- assertParamExists('deleteAISession', 'organisation', organisation);
1675
- // verify required parameter 'sessionId' is not null or undefined
1676
- assertParamExists('deleteAISession', 'sessionId', sessionId);
1677
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2793
+ assertParamExists('deleteTask', 'organisation', organisation);
2794
+ // verify required parameter 'taskId' is not null or undefined
2795
+ assertParamExists('deleteTask', 'taskId', taskId);
2796
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1678
2797
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1679
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2798
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1680
2799
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1681
2800
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1682
2801
  let baseOptions;
@@ -1689,6 +2808,9 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1689
2808
  // authentication BearerAuth required
1690
2809
  // http bearer authentication required
1691
2810
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2811
+ if (cascade !== undefined) {
2812
+ localVarQueryParameter['cascade'] = cascade;
2813
+ }
1692
2814
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1693
2815
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1694
2816
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -1698,60 +2820,57 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1698
2820
  };
1699
2821
  }),
1700
2822
  /**
1701
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
1702
- * @summary Extend Session Expiration
2823
+ * 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
2824
+ * @summary Get dependency graph for a task list
1703
2825
  * @param {string} organisation The organisation ID
1704
- * @param {string} sessionId The session ID
1705
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
2826
+ * @param {string} taskListId The task list ID to get the dependency graph for
1706
2827
  * @param {*} [options] Override http request option.
1707
2828
  * @throws {RequiredError}
1708
2829
  */
1709
- 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 = {}) {
2830
+ getDependencyGraph: (organisation_1, taskListId_1, ...args_1) => __awaiter(this, [organisation_1, taskListId_1, ...args_1], void 0, function* (organisation, taskListId, options = {}) {
1710
2831
  // verify required parameter 'organisation' is not null or undefined
1711
- assertParamExists('extendAISession', 'organisation', organisation);
1712
- // verify required parameter 'sessionId' is not null or undefined
1713
- assertParamExists('extendAISession', 'sessionId', sessionId);
1714
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend`
2832
+ assertParamExists('getDependencyGraph', 'organisation', organisation);
2833
+ // verify required parameter 'taskListId' is not null or undefined
2834
+ assertParamExists('getDependencyGraph', 'taskListId', taskListId);
2835
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskListId}/dependency-graph`
1715
2836
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1716
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2837
+ .replace(`{${"taskListId"}}`, encodeURIComponent(String(taskListId)));
1717
2838
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1718
2839
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1719
2840
  let baseOptions;
1720
2841
  if (configuration) {
1721
2842
  baseOptions = configuration.baseOptions;
1722
2843
  }
1723
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2844
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1724
2845
  const localVarHeaderParameter = {};
1725
2846
  const localVarQueryParameter = {};
1726
2847
  // authentication BearerAuth required
1727
2848
  // http bearer authentication required
1728
2849
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1729
- localVarHeaderParameter['Content-Type'] = 'application/json';
1730
2850
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1731
2851
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1732
2852
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1733
- localVarRequestOptions.data = serializeDataIfNeeded(extendAISessionRequest, localVarRequestOptions, configuration);
1734
2853
  return {
1735
2854
  url: toPathString(localVarUrlObj),
1736
2855
  options: localVarRequestOptions,
1737
2856
  };
1738
2857
  }),
1739
2858
  /**
1740
- *
1741
- * @summary Get a specific chat session
2859
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
2860
+ * @summary Get task details
1742
2861
  * @param {string} organisation The organisation ID
1743
- * @param {string} sessionId The session ID
2862
+ * @param {string} taskId The task UUID
1744
2863
  * @param {*} [options] Override http request option.
1745
2864
  * @throws {RequiredError}
1746
2865
  */
1747
- getAISession: (organisation_1, sessionId_1, ...args_1) => __awaiter(this, [organisation_1, sessionId_1, ...args_1], void 0, function* (organisation, sessionId, options = {}) {
2866
+ getTask: (organisation_1, taskId_1, ...args_1) => __awaiter(this, [organisation_1, taskId_1, ...args_1], void 0, function* (organisation, taskId, options = {}) {
1748
2867
  // verify required parameter 'organisation' is not null or undefined
1749
- assertParamExists('getAISession', 'organisation', organisation);
1750
- // verify required parameter 'sessionId' is not null or undefined
1751
- assertParamExists('getAISession', 'sessionId', sessionId);
1752
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2868
+ assertParamExists('getTask', 'organisation', organisation);
2869
+ // verify required parameter 'taskId' is not null or undefined
2870
+ assertParamExists('getTask', 'taskId', taskId);
2871
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1753
2872
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1754
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2873
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1755
2874
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1756
2875
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1757
2876
  let baseOptions;
@@ -1773,21 +2892,22 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1773
2892
  };
1774
2893
  }),
1775
2894
  /**
1776
- * 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
1777
- * @summary List chat sessions with multi-tenant filtering
2895
+ * 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).
2896
+ * @summary List tasks with optional filtering
1778
2897
  * @param {string} organisation The organisation ID
1779
- * @param {string} [userId] Filter sessions by user ID
1780
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
1781
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
1782
- * @param {number} [offset] Offset for pagination
1783
- * @param {string} [model] Filter by model ID
2898
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
2899
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
2900
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
2901
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
2902
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
2903
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
1784
2904
  * @param {*} [options] Override http request option.
1785
2905
  * @throws {RequiredError}
1786
2906
  */
1787
- 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 = {}) {
2907
+ 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 = {}) {
1788
2908
  // verify required parameter 'organisation' is not null or undefined
1789
- assertParamExists('listAISessions', 'organisation', organisation);
1790
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions`
2909
+ assertParamExists('listTasks', 'organisation', organisation);
2910
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks`
1791
2911
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)));
1792
2912
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1793
2913
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1801,20 +2921,23 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1801
2921
  // authentication BearerAuth required
1802
2922
  // http bearer authentication required
1803
2923
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1804
- if (userId !== undefined) {
1805
- localVarQueryParameter['userId'] = userId;
2924
+ if (taskListId !== undefined) {
2925
+ localVarQueryParameter['taskListId'] = taskListId;
1806
2926
  }
1807
- if (sessionGroup !== undefined) {
1808
- localVarQueryParameter['sessionGroup'] = sessionGroup;
2927
+ if (status !== undefined) {
2928
+ localVarQueryParameter['status'] = status;
2929
+ }
2930
+ if (assignedAgentId !== undefined) {
2931
+ localVarQueryParameter['assignedAgentId'] = assignedAgentId;
1809
2932
  }
1810
2933
  if (limit !== undefined) {
1811
2934
  localVarQueryParameter['limit'] = limit;
1812
2935
  }
1813
- if (offset !== undefined) {
1814
- localVarQueryParameter['offset'] = offset;
2936
+ if (dependsOn !== undefined) {
2937
+ localVarQueryParameter['dependsOn'] = dependsOn;
1815
2938
  }
1816
- if (model !== undefined) {
1817
- localVarQueryParameter['model'] = model;
2939
+ if (includeDetails !== undefined) {
2940
+ localVarQueryParameter['includeDetails'] = includeDetails;
1818
2941
  }
1819
2942
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1820
2943
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1825,24 +2948,24 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1825
2948
  };
1826
2949
  }),
1827
2950
  /**
1828
- * 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
1829
- * @summary Update Session
2951
+ * 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
2952
+ * @summary Update a task
1830
2953
  * @param {string} organisation The organisation ID
1831
- * @param {string} sessionId The session ID
1832
- * @param {UpdateAISessionRequest} updateAISessionRequest
2954
+ * @param {string} taskId The task UUID
2955
+ * @param {UpdateTaskRequest} updateTaskRequest
1833
2956
  * @param {*} [options] Override http request option.
1834
2957
  * @throws {RequiredError}
1835
2958
  */
1836
- 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 = {}) {
2959
+ 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 = {}) {
1837
2960
  // verify required parameter 'organisation' is not null or undefined
1838
- assertParamExists('updateAISession', 'organisation', organisation);
1839
- // verify required parameter 'sessionId' is not null or undefined
1840
- assertParamExists('updateAISession', 'sessionId', sessionId);
1841
- // verify required parameter 'updateAISessionRequest' is not null or undefined
1842
- assertParamExists('updateAISession', 'updateAISessionRequest', updateAISessionRequest);
1843
- const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}`
2961
+ assertParamExists('updateTask', 'organisation', organisation);
2962
+ // verify required parameter 'taskId' is not null or undefined
2963
+ assertParamExists('updateTask', 'taskId', taskId);
2964
+ // verify required parameter 'updateTaskRequest' is not null or undefined
2965
+ assertParamExists('updateTask', 'updateTaskRequest', updateTaskRequest);
2966
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}`
1844
2967
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
1845
- .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
2968
+ .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
1846
2969
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1847
2970
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1848
2971
  let baseOptions;
@@ -1859,7 +2982,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1859
2982
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1860
2983
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1861
2984
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1862
- localVarRequestOptions.data = serializeDataIfNeeded(updateAISessionRequest, localVarRequestOptions, configuration);
2985
+ localVarRequestOptions.data = serializeDataIfNeeded(updateTaskRequest, localVarRequestOptions, configuration);
1863
2986
  return {
1864
2987
  url: toPathString(localVarUrlObj),
1865
2988
  options: localVarRequestOptions,
@@ -1868,295 +2991,345 @@ export const AISessionsApiAxiosParamCreator = function (configuration) {
1868
2991
  };
1869
2992
  };
1870
2993
  /**
1871
- * AISessionsApi - functional programming interface
2994
+ * AITaskManagementApi - functional programming interface
1872
2995
  * @export
1873
2996
  */
1874
- export const AISessionsApiFp = function (configuration) {
1875
- const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration);
2997
+ export const AITaskManagementApiFp = function (configuration) {
2998
+ const localVarAxiosParamCreator = AITaskManagementApiAxiosParamCreator(configuration);
1876
2999
  return {
1877
- /**
1878
- * 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.
1879
- * @summary Create a new chat session with multi-tenant isolation
3000
+ /**
3001
+ * 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
3002
+ * @summary Create a new task
1880
3003
  * @param {string} organisation The organisation ID
1881
- * @param {CreateAISessionRequest} createAISessionRequest
3004
+ * @param {CreateTaskRequest} createTaskRequest
1882
3005
  * @param {*} [options] Override http request option.
1883
3006
  * @throws {RequiredError}
1884
3007
  */
1885
- createAISession(organisation, createAISessionRequest, options) {
3008
+ createTask(organisation, createTaskRequest, options) {
1886
3009
  return __awaiter(this, void 0, void 0, function* () {
1887
3010
  var _a, _b, _c;
1888
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options);
3011
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createTask(organisation, createTaskRequest, options);
1889
3012
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1890
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.createAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3013
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.createTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1891
3014
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1892
3015
  });
1893
3016
  },
1894
3017
  /**
1895
- *
1896
- * @summary Delete a chat session
3018
+ * 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
3019
+ * @summary Delete a task
1897
3020
  * @param {string} organisation The organisation ID
1898
- * @param {string} sessionId The session ID
3021
+ * @param {string} taskId The task UUID
3022
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
1899
3023
  * @param {*} [options] Override http request option.
1900
3024
  * @throws {RequiredError}
1901
3025
  */
1902
- deleteAISession(organisation, sessionId, options) {
3026
+ deleteTask(organisation, taskId, cascade, options) {
1903
3027
  return __awaiter(this, void 0, void 0, function* () {
1904
3028
  var _a, _b, _c;
1905
- const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options);
3029
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteTask(organisation, taskId, cascade, options);
1906
3030
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1907
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.deleteAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3031
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.deleteTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1908
3032
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1909
3033
  });
1910
3034
  },
1911
3035
  /**
1912
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
1913
- * @summary Extend Session Expiration
3036
+ * 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
3037
+ * @summary Get dependency graph for a task list
1914
3038
  * @param {string} organisation The organisation ID
1915
- * @param {string} sessionId The session ID
1916
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3039
+ * @param {string} taskListId The task list ID to get the dependency graph for
1917
3040
  * @param {*} [options] Override http request option.
1918
3041
  * @throws {RequiredError}
1919
3042
  */
1920
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
3043
+ getDependencyGraph(organisation, taskListId, options) {
1921
3044
  return __awaiter(this, void 0, void 0, function* () {
1922
3045
  var _a, _b, _c;
1923
- const localVarAxiosArgs = yield localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options);
3046
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDependencyGraph(organisation, taskListId, options);
1924
3047
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1925
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.extendAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3048
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.getDependencyGraph']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1926
3049
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1927
3050
  });
1928
3051
  },
1929
3052
  /**
1930
- *
1931
- * @summary Get a specific chat session
3053
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3054
+ * @summary Get task details
1932
3055
  * @param {string} organisation The organisation ID
1933
- * @param {string} sessionId The session ID
3056
+ * @param {string} taskId The task UUID
1934
3057
  * @param {*} [options] Override http request option.
1935
3058
  * @throws {RequiredError}
1936
3059
  */
1937
- getAISession(organisation, sessionId, options) {
3060
+ getTask(organisation, taskId, options) {
1938
3061
  return __awaiter(this, void 0, void 0, function* () {
1939
3062
  var _a, _b, _c;
1940
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAISession(organisation, sessionId, options);
3063
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTask(organisation, taskId, options);
1941
3064
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1942
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.getAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3065
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.getTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1943
3066
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1944
3067
  });
1945
3068
  },
1946
3069
  /**
1947
- * 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
1948
- * @summary List chat sessions with multi-tenant filtering
3070
+ * 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).
3071
+ * @summary List tasks with optional filtering
1949
3072
  * @param {string} organisation The organisation ID
1950
- * @param {string} [userId] Filter sessions by user ID
1951
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
1952
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
1953
- * @param {number} [offset] Offset for pagination
1954
- * @param {string} [model] Filter by model ID
3073
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3074
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3075
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3076
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3077
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3078
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
1955
3079
  * @param {*} [options] Override http request option.
1956
3080
  * @throws {RequiredError}
1957
3081
  */
1958
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
3082
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
1959
3083
  return __awaiter(this, void 0, void 0, function* () {
1960
3084
  var _a, _b, _c;
1961
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options);
3085
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options);
1962
3086
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1963
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.listAISessions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3087
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.listTasks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1964
3088
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1965
3089
  });
1966
3090
  },
1967
3091
  /**
1968
- * 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
1969
- * @summary Update Session
3092
+ * 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
3093
+ * @summary Update a task
1970
3094
  * @param {string} organisation The organisation ID
1971
- * @param {string} sessionId The session ID
1972
- * @param {UpdateAISessionRequest} updateAISessionRequest
3095
+ * @param {string} taskId The task UUID
3096
+ * @param {UpdateTaskRequest} updateTaskRequest
1973
3097
  * @param {*} [options] Override http request option.
1974
3098
  * @throws {RequiredError}
1975
3099
  */
1976
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
3100
+ updateTask(organisation, taskId, updateTaskRequest, options) {
1977
3101
  return __awaiter(this, void 0, void 0, function* () {
1978
3102
  var _a, _b, _c;
1979
- const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options);
3103
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateTask(organisation, taskId, updateTaskRequest, options);
1980
3104
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1981
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AISessionsApi.updateAISession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3105
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AITaskManagementApi.updateTask']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1982
3106
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1983
3107
  });
1984
3108
  },
1985
3109
  };
1986
3110
  };
1987
3111
  /**
1988
- * AISessionsApi - factory interface
3112
+ * AITaskManagementApi - factory interface
1989
3113
  * @export
1990
3114
  */
1991
- export const AISessionsApiFactory = function (configuration, basePath, axios) {
1992
- const localVarFp = AISessionsApiFp(configuration);
3115
+ export const AITaskManagementApiFactory = function (configuration, basePath, axios) {
3116
+ const localVarFp = AITaskManagementApiFp(configuration);
1993
3117
  return {
1994
3118
  /**
1995
- * 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.
1996
- * @summary Create a new chat session with multi-tenant isolation
3119
+ * 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
3120
+ * @summary Create a new task
1997
3121
  * @param {string} organisation The organisation ID
1998
- * @param {CreateAISessionRequest} createAISessionRequest
3122
+ * @param {CreateTaskRequest} createTaskRequest
1999
3123
  * @param {*} [options] Override http request option.
2000
3124
  * @throws {RequiredError}
2001
3125
  */
2002
- createAISession(organisation, createAISessionRequest, options) {
2003
- return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath));
3126
+ createTask(organisation, createTaskRequest, options) {
3127
+ return localVarFp.createTask(organisation, createTaskRequest, options).then((request) => request(axios, basePath));
2004
3128
  },
2005
3129
  /**
2006
- *
2007
- * @summary Delete a chat session
3130
+ * 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
3131
+ * @summary Delete a task
2008
3132
  * @param {string} organisation The organisation ID
2009
- * @param {string} sessionId The session ID
3133
+ * @param {string} taskId The task UUID
3134
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
2010
3135
  * @param {*} [options] Override http request option.
2011
3136
  * @throws {RequiredError}
2012
3137
  */
2013
- deleteAISession(organisation, sessionId, options) {
2014
- return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
3138
+ deleteTask(organisation, taskId, cascade, options) {
3139
+ return localVarFp.deleteTask(organisation, taskId, cascade, options).then((request) => request(axios, basePath));
2015
3140
  },
2016
3141
  /**
2017
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2018
- * @summary Extend Session Expiration
3142
+ * 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
3143
+ * @summary Get dependency graph for a task list
2019
3144
  * @param {string} organisation The organisation ID
2020
- * @param {string} sessionId The session ID
2021
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3145
+ * @param {string} taskListId The task list ID to get the dependency graph for
2022
3146
  * @param {*} [options] Override http request option.
2023
3147
  * @throws {RequiredError}
2024
3148
  */
2025
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2026
- return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath));
3149
+ getDependencyGraph(organisation, taskListId, options) {
3150
+ return localVarFp.getDependencyGraph(organisation, taskListId, options).then((request) => request(axios, basePath));
2027
3151
  },
2028
3152
  /**
2029
- *
2030
- * @summary Get a specific chat session
3153
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3154
+ * @summary Get task details
2031
3155
  * @param {string} organisation The organisation ID
2032
- * @param {string} sessionId The session ID
3156
+ * @param {string} taskId The task UUID
2033
3157
  * @param {*} [options] Override http request option.
2034
3158
  * @throws {RequiredError}
2035
3159
  */
2036
- getAISession(organisation, sessionId, options) {
2037
- return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath));
3160
+ getTask(organisation, taskId, options) {
3161
+ return localVarFp.getTask(organisation, taskId, options).then((request) => request(axios, basePath));
2038
3162
  },
2039
3163
  /**
2040
- * 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
2041
- * @summary List chat sessions with multi-tenant filtering
3164
+ * 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).
3165
+ * @summary List tasks with optional filtering
2042
3166
  * @param {string} organisation The organisation ID
2043
- * @param {string} [userId] Filter sessions by user ID
2044
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2045
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2046
- * @param {number} [offset] Offset for pagination
2047
- * @param {string} [model] Filter by model ID
3167
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3168
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3169
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3170
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3171
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3172
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
2048
3173
  * @param {*} [options] Override http request option.
2049
3174
  * @throws {RequiredError}
2050
3175
  */
2051
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2052
- return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath));
3176
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
3177
+ return localVarFp.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(axios, basePath));
2053
3178
  },
2054
3179
  /**
2055
- * 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
2056
- * @summary Update Session
3180
+ * 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
3181
+ * @summary Update a task
2057
3182
  * @param {string} organisation The organisation ID
2058
- * @param {string} sessionId The session ID
2059
- * @param {UpdateAISessionRequest} updateAISessionRequest
3183
+ * @param {string} taskId The task UUID
3184
+ * @param {UpdateTaskRequest} updateTaskRequest
2060
3185
  * @param {*} [options] Override http request option.
2061
3186
  * @throws {RequiredError}
2062
3187
  */
2063
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2064
- return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath));
3188
+ updateTask(organisation, taskId, updateTaskRequest, options) {
3189
+ return localVarFp.updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(axios, basePath));
2065
3190
  },
2066
3191
  };
2067
3192
  };
2068
3193
  /**
2069
- * AISessionsApi - object-oriented interface
3194
+ * AITaskManagementApi - object-oriented interface
2070
3195
  * @export
2071
- * @class AISessionsApi
3196
+ * @class AITaskManagementApi
2072
3197
  * @extends {BaseAPI}
2073
3198
  */
2074
- export class AISessionsApi extends BaseAPI {
3199
+ export class AITaskManagementApi extends BaseAPI {
2075
3200
  /**
2076
- * 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.
2077
- * @summary Create a new chat session with multi-tenant isolation
3201
+ * 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
3202
+ * @summary Create a new task
2078
3203
  * @param {string} organisation The organisation ID
2079
- * @param {CreateAISessionRequest} createAISessionRequest
3204
+ * @param {CreateTaskRequest} createTaskRequest
2080
3205
  * @param {*} [options] Override http request option.
2081
3206
  * @throws {RequiredError}
2082
- * @memberof AISessionsApi
3207
+ * @memberof AITaskManagementApi
2083
3208
  */
2084
- createAISession(organisation, createAISessionRequest, options) {
2085
- return AISessionsApiFp(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3209
+ createTask(organisation, createTaskRequest, options) {
3210
+ return AITaskManagementApiFp(this.configuration).createTask(organisation, createTaskRequest, options).then((request) => request(this.axios, this.basePath));
2086
3211
  }
2087
3212
  /**
2088
- *
2089
- * @summary Delete a chat session
3213
+ * 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
3214
+ * @summary Delete a task
2090
3215
  * @param {string} organisation The organisation ID
2091
- * @param {string} sessionId The session ID
3216
+ * @param {string} taskId The task UUID
3217
+ * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively
2092
3218
  * @param {*} [options] Override http request option.
2093
3219
  * @throws {RequiredError}
2094
- * @memberof AISessionsApi
3220
+ * @memberof AITaskManagementApi
2095
3221
  */
2096
- deleteAISession(organisation, sessionId, options) {
2097
- return AISessionsApiFp(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
3222
+ deleteTask(organisation, taskId, cascade, options) {
3223
+ return AITaskManagementApiFp(this.configuration).deleteTask(organisation, taskId, cascade, options).then((request) => request(this.axios, this.basePath));
2098
3224
  }
2099
3225
  /**
2100
- * Extends the expiration time of an active session. Useful for keeping long-running conversations alive.
2101
- * @summary Extend Session Expiration
3226
+ * 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
3227
+ * @summary Get dependency graph for a task list
2102
3228
  * @param {string} organisation The organisation ID
2103
- * @param {string} sessionId The session ID
2104
- * @param {ExtendAISessionRequest} [extendAISessionRequest]
3229
+ * @param {string} taskListId The task list ID to get the dependency graph for
2105
3230
  * @param {*} [options] Override http request option.
2106
3231
  * @throws {RequiredError}
2107
- * @memberof AISessionsApi
3232
+ * @memberof AITaskManagementApi
2108
3233
  */
2109
- extendAISession(organisation, sessionId, extendAISessionRequest, options) {
2110
- return AISessionsApiFp(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3234
+ getDependencyGraph(organisation, taskListId, options) {
3235
+ return AITaskManagementApiFp(this.configuration).getDependencyGraph(organisation, taskListId, options).then((request) => request(this.axios, this.basePath));
2111
3236
  }
2112
3237
  /**
2113
- *
2114
- * @summary Get a specific chat session
3238
+ * Retrieves detailed information about a specific task including status, progress, dependencies, and results.
3239
+ * @summary Get task details
2115
3240
  * @param {string} organisation The organisation ID
2116
- * @param {string} sessionId The session ID
3241
+ * @param {string} taskId The task UUID
2117
3242
  * @param {*} [options] Override http request option.
2118
3243
  * @throws {RequiredError}
2119
- * @memberof AISessionsApi
3244
+ * @memberof AITaskManagementApi
2120
3245
  */
2121
- getAISession(organisation, sessionId, options) {
2122
- return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath));
3246
+ getTask(organisation, taskId, options) {
3247
+ return AITaskManagementApiFp(this.configuration).getTask(organisation, taskId, options).then((request) => request(this.axios, this.basePath));
2123
3248
  }
2124
3249
  /**
2125
- * 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
2126
- * @summary List chat sessions with multi-tenant filtering
3250
+ * 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).
3251
+ * @summary List tasks with optional filtering
2127
3252
  * @param {string} organisation The organisation ID
2128
- * @param {string} [userId] Filter sessions by user ID
2129
- * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group.
2130
- * @param {number} [limit] Maximum number of sessions to return (default 50, max 100)
2131
- * @param {number} [offset] Offset for pagination
2132
- * @param {string} [model] Filter by model ID
3253
+ * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used.
3254
+ * @param {ListTasksStatusEnum} [status] Filter tasks by status
3255
+ * @param {string} [assignedAgentId] Filter tasks by assigned agent ID
3256
+ * @param {number} [limit] Maximum number of tasks to return (default 50, max 100)
3257
+ * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete.
3258
+ * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses).
2133
3259
  * @param {*} [options] Override http request option.
2134
3260
  * @throws {RequiredError}
2135
- * @memberof AISessionsApi
3261
+ * @memberof AITaskManagementApi
2136
3262
  */
2137
- listAISessions(organisation, userId, sessionGroup, limit, offset, model, options) {
2138
- return AISessionsApiFp(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath));
3263
+ listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options) {
3264
+ return AITaskManagementApiFp(this.configuration).listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(this.axios, this.basePath));
2139
3265
  }
2140
3266
  /**
2141
- * 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
2142
- * @summary Update Session
3267
+ * 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
3268
+ * @summary Update a task
2143
3269
  * @param {string} organisation The organisation ID
2144
- * @param {string} sessionId The session ID
2145
- * @param {UpdateAISessionRequest} updateAISessionRequest
3270
+ * @param {string} taskId The task UUID
3271
+ * @param {UpdateTaskRequest} updateTaskRequest
2146
3272
  * @param {*} [options] Override http request option.
2147
3273
  * @throws {RequiredError}
2148
- * @memberof AISessionsApi
3274
+ * @memberof AITaskManagementApi
2149
3275
  */
2150
- updateAISession(organisation, sessionId, updateAISessionRequest, options) {
2151
- return AISessionsApiFp(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath));
3276
+ updateTask(organisation, taskId, updateTaskRequest, options) {
3277
+ return AITaskManagementApiFp(this.configuration).updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(this.axios, this.basePath));
2152
3278
  }
2153
3279
  }
3280
+ /**
3281
+ * @export
3282
+ */
3283
+ export const ListTasksStatusEnum = {
3284
+ Pending: 'pending',
3285
+ InProgress: 'in_progress',
3286
+ Completed: 'completed',
3287
+ Failed: 'failed',
3288
+ Cancelled: 'cancelled',
3289
+ Blocked: 'blocked'
3290
+ };
2154
3291
  /**
2155
3292
  * AIToolsApi - axios parameter creator
2156
3293
  * @export
2157
3294
  */
2158
3295
  export const AIToolsApiAxiosParamCreator = function (configuration) {
2159
3296
  return {
3297
+ /**
3298
+ * 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
3299
+ * @summary Get Orchestration Status
3300
+ * @param {string} organisation The organisation ID
3301
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3302
+ * @param {*} [options] Override http request option.
3303
+ * @throws {RequiredError}
3304
+ */
3305
+ getAIOrchestrationStatus: (organisation_1, orchestrationId_1, ...args_1) => __awaiter(this, [organisation_1, orchestrationId_1, ...args_1], void 0, function* (organisation, orchestrationId, options = {}) {
3306
+ // verify required parameter 'organisation' is not null or undefined
3307
+ assertParamExists('getAIOrchestrationStatus', 'organisation', organisation);
3308
+ // verify required parameter 'orchestrationId' is not null or undefined
3309
+ assertParamExists('getAIOrchestrationStatus', 'orchestrationId', orchestrationId);
3310
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}`
3311
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
3312
+ .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId)));
3313
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3314
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3315
+ let baseOptions;
3316
+ if (configuration) {
3317
+ baseOptions = configuration.baseOptions;
3318
+ }
3319
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3320
+ const localVarHeaderParameter = {};
3321
+ const localVarQueryParameter = {};
3322
+ // authentication BearerAuth required
3323
+ // http bearer authentication required
3324
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3325
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3326
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3327
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3328
+ return {
3329
+ url: toPathString(localVarUrlObj),
3330
+ options: localVarRequestOptions,
3331
+ };
3332
+ }),
2160
3333
  /**
2161
3334
  * 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
2162
3335
  * @summary Get async tool execution status and result
@@ -2306,6 +3479,23 @@ export const AIToolsApiAxiosParamCreator = function (configuration) {
2306
3479
  export const AIToolsApiFp = function (configuration) {
2307
3480
  const localVarAxiosParamCreator = AIToolsApiAxiosParamCreator(configuration);
2308
3481
  return {
3482
+ /**
3483
+ * 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
3484
+ * @summary Get Orchestration Status
3485
+ * @param {string} organisation The organisation ID
3486
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3487
+ * @param {*} [options] Override http request option.
3488
+ * @throws {RequiredError}
3489
+ */
3490
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3491
+ return __awaiter(this, void 0, void 0, function* () {
3492
+ var _a, _b, _c;
3493
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options);
3494
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3495
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIToolsApi.getAIOrchestrationStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3496
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3497
+ });
3498
+ },
2309
3499
  /**
2310
3500
  * 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
2311
3501
  * @summary Get async tool execution status and result
@@ -2382,6 +3572,17 @@ export const AIToolsApiFp = function (configuration) {
2382
3572
  export const AIToolsApiFactory = function (configuration, basePath, axios) {
2383
3573
  const localVarFp = AIToolsApiFp(configuration);
2384
3574
  return {
3575
+ /**
3576
+ * 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
3577
+ * @summary Get Orchestration Status
3578
+ * @param {string} organisation The organisation ID
3579
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3580
+ * @param {*} [options] Override http request option.
3581
+ * @throws {RequiredError}
3582
+ */
3583
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3584
+ return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath));
3585
+ },
2385
3586
  /**
2386
3587
  * 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
2387
3588
  * @summary Get async tool execution status and result
@@ -2434,6 +3635,18 @@ export const AIToolsApiFactory = function (configuration, basePath, axios) {
2434
3635
  * @extends {BaseAPI}
2435
3636
  */
2436
3637
  export class AIToolsApi extends BaseAPI {
3638
+ /**
3639
+ * 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
3640
+ * @summary Get Orchestration Status
3641
+ * @param {string} organisation The organisation ID
3642
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
3643
+ * @param {*} [options] Override http request option.
3644
+ * @throws {RequiredError}
3645
+ * @memberof AIToolsApi
3646
+ */
3647
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
3648
+ return AIToolsApiFp(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath));
3649
+ }
2437
3650
  /**
2438
3651
  * 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
2439
3652
  * @summary Get async tool execution status and result
@@ -2639,7 +3852,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration) {
2639
3852
  };
2640
3853
  }),
2641
3854
  /**
2642
- * 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
3855
+ * 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
2643
3856
  * @summary Semantic Search Query
2644
3857
  * @param {string} organisation The organisation ID
2645
3858
  * @param {string} collectionId The collection ID
@@ -2797,7 +4010,7 @@ export const AIVectorDatabaseApiFp = function (configuration) {
2797
4010
  });
2798
4011
  },
2799
4012
  /**
2800
- * 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
4013
+ * 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
2801
4014
  * @summary Semantic Search Query
2802
4015
  * @param {string} organisation The organisation ID
2803
4016
  * @param {string} collectionId The collection ID
@@ -2885,7 +4098,7 @@ export const AIVectorDatabaseApiFactory = function (configuration, basePath, axi
2885
4098
  return localVarFp.listVectorCollections(organisation, options).then((request) => request(axios, basePath));
2886
4099
  },
2887
4100
  /**
2888
- * 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
4101
+ * 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
2889
4102
  * @summary Semantic Search Query
2890
4103
  * @param {string} organisation The organisation ID
2891
4104
  * @param {string} collectionId The collection ID
@@ -2965,7 +4178,7 @@ export class AIVectorDatabaseApi extends BaseAPI {
2965
4178
  return AIVectorDatabaseApiFp(this.configuration).listVectorCollections(organisation, options).then((request) => request(this.axios, this.basePath));
2966
4179
  }
2967
4180
  /**
2968
- * 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
4181
+ * 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
2969
4182
  * @summary Semantic Search Query
2970
4183
  * @param {string} organisation The organisation ID
2971
4184
  * @param {string} collectionId The collection ID
@@ -9099,6 +10312,116 @@ export class KVApi extends BaseAPI {
9099
10312
  return KVApiFp(this.configuration).kVShow(organization, project, storeId, options).then((request) => request(this.axios, this.basePath));
9100
10313
  }
9101
10314
  }
10315
+ /**
10316
+ * OrchestrationApi - axios parameter creator
10317
+ * @export
10318
+ */
10319
+ export const OrchestrationApiAxiosParamCreator = function (configuration) {
10320
+ return {
10321
+ /**
10322
+ * 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
10323
+ * @summary Get Orchestration Status
10324
+ * @param {string} organisation The organisation ID
10325
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10326
+ * @param {*} [options] Override http request option.
10327
+ * @throws {RequiredError}
10328
+ */
10329
+ getAIOrchestrationStatus: (organisation_1, orchestrationId_1, ...args_1) => __awaiter(this, [organisation_1, orchestrationId_1, ...args_1], void 0, function* (organisation, orchestrationId, options = {}) {
10330
+ // verify required parameter 'organisation' is not null or undefined
10331
+ assertParamExists('getAIOrchestrationStatus', 'organisation', organisation);
10332
+ // verify required parameter 'orchestrationId' is not null or undefined
10333
+ assertParamExists('getAIOrchestrationStatus', 'orchestrationId', orchestrationId);
10334
+ const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}`
10335
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
10336
+ .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId)));
10337
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
10338
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10339
+ let baseOptions;
10340
+ if (configuration) {
10341
+ baseOptions = configuration.baseOptions;
10342
+ }
10343
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
10344
+ const localVarHeaderParameter = {};
10345
+ const localVarQueryParameter = {};
10346
+ // authentication BearerAuth required
10347
+ // http bearer authentication required
10348
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
10349
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
10350
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10351
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10352
+ return {
10353
+ url: toPathString(localVarUrlObj),
10354
+ options: localVarRequestOptions,
10355
+ };
10356
+ }),
10357
+ };
10358
+ };
10359
+ /**
10360
+ * OrchestrationApi - functional programming interface
10361
+ * @export
10362
+ */
10363
+ export const OrchestrationApiFp = function (configuration) {
10364
+ const localVarAxiosParamCreator = OrchestrationApiAxiosParamCreator(configuration);
10365
+ return {
10366
+ /**
10367
+ * 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
10368
+ * @summary Get Orchestration Status
10369
+ * @param {string} organisation The organisation ID
10370
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10371
+ * @param {*} [options] Override http request option.
10372
+ * @throws {RequiredError}
10373
+ */
10374
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10375
+ return __awaiter(this, void 0, void 0, function* () {
10376
+ var _a, _b, _c;
10377
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options);
10378
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
10379
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrchestrationApi.getAIOrchestrationStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
10380
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10381
+ });
10382
+ },
10383
+ };
10384
+ };
10385
+ /**
10386
+ * OrchestrationApi - factory interface
10387
+ * @export
10388
+ */
10389
+ export const OrchestrationApiFactory = function (configuration, basePath, axios) {
10390
+ const localVarFp = OrchestrationApiFp(configuration);
10391
+ return {
10392
+ /**
10393
+ * 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
10394
+ * @summary Get Orchestration Status
10395
+ * @param {string} organisation The organisation ID
10396
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10397
+ * @param {*} [options] Override http request option.
10398
+ * @throws {RequiredError}
10399
+ */
10400
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10401
+ return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath));
10402
+ },
10403
+ };
10404
+ };
10405
+ /**
10406
+ * OrchestrationApi - object-oriented interface
10407
+ * @export
10408
+ * @class OrchestrationApi
10409
+ * @extends {BaseAPI}
10410
+ */
10411
+ export class OrchestrationApi extends BaseAPI {
10412
+ /**
10413
+ * 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
10414
+ * @summary Get Orchestration Status
10415
+ * @param {string} organisation The organisation ID
10416
+ * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions
10417
+ * @param {*} [options] Override http request option.
10418
+ * @throws {RequiredError}
10419
+ * @memberof OrchestrationApi
10420
+ */
10421
+ getAIOrchestrationStatus(organisation, orchestrationId, options) {
10422
+ return OrchestrationApiFp(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath));
10423
+ }
10424
+ }
9102
10425
  /**
9103
10426
  * OrganizationsApi - axios parameter creator
9104
10427
  * @export