From b88a536c137218d002e223647dbb76944f5afb14 Mon Sep 17 00:00:00 2001 From: "quantcloud[bot]" Date: Thu, 12 Feb 2026 03:21:13 +0000 Subject: [PATCH] feat(sdk): v4.10.0 - Auto-generated from unified API spec Generated from unified API spec v4.10.0 Changes: - Auto-generated SDK updates This PR was automatically created by the API generation pipeline. --- .openapi-generator-config.json | 2 +- .openapi-generator/FILES | 19 + api.ts | 4845 ++++++++++++----- common.ts | 2 +- configuration.ts | 2 +- docs/AIOrchestrationsApi.md | 546 ++ docs/AIToolsApi.md | 4 +- docs/AIVectorDatabaseApi.md | 63 + docs/CDNMetricsApi.md | 205 + docs/ChatInferenceRequest.md | 4 + docs/ChatInferenceRequestGuardrails.md | 25 + docs/ChatInferenceStreamRequest.md | 4 + docs/CreateOrchestrationRequest.md | 40 + docs/CreateOrchestrationRequestInputSource.md | 26 + ...CreateOrchestrationRequestStopCondition.md | 24 + docs/DeleteVectorDocuments200Response.md | 24 + docs/DeleteVectorDocumentsRequest.md | 24 + docs/DeleteVectorDocumentsRequestMetadata.md | 22 + docs/KVApi.md | 125 + docs/KVLinkToProject200Response.md | 22 + docs/KVLinkToProjectRequest.md | 20 + docs/ListOrchestrationBatches200Response.md | 22 + ...estrationBatches200ResponseBatchesInner.md | 38 + docs/ListOrchestrations200Response.md | 22 + docs/OrchestrationApi.md | 4 +- docs/V2CrawlerSchedule.md | 2 +- docs/V2CrawlerScheduleRequest.md | 4 +- docs/V2MetricData.md | 26 + docs/V2MetricDataPoint.md | 22 + docs/V2MetricDataPointTimestamp.md | 19 + docs/V2MetricsMeta.md | 30 + docs/V2MetricsResponse.md | 22 + index.ts | 2 +- package-lock.json | 4 +- package.json | 2 +- 35 files changed, 4835 insertions(+), 1432 deletions(-) create mode 100644 docs/AIOrchestrationsApi.md create mode 100644 docs/CDNMetricsApi.md create mode 100644 docs/ChatInferenceRequestGuardrails.md create mode 100644 docs/CreateOrchestrationRequest.md create mode 100644 docs/CreateOrchestrationRequestInputSource.md create mode 100644 docs/CreateOrchestrationRequestStopCondition.md create mode 100644 docs/DeleteVectorDocuments200Response.md create mode 100644 docs/DeleteVectorDocumentsRequest.md create mode 100644 docs/DeleteVectorDocumentsRequestMetadata.md create mode 100644 docs/KVLinkToProject200Response.md create mode 100644 docs/KVLinkToProjectRequest.md create mode 100644 docs/ListOrchestrationBatches200Response.md create mode 100644 docs/ListOrchestrationBatches200ResponseBatchesInner.md create mode 100644 docs/ListOrchestrations200Response.md create mode 100644 docs/V2MetricData.md create mode 100644 docs/V2MetricDataPoint.md create mode 100644 docs/V2MetricDataPointTimestamp.md create mode 100644 docs/V2MetricsMeta.md create mode 100644 docs/V2MetricsResponse.md diff --git a/.openapi-generator-config.json b/.openapi-generator-config.json index c642c44..5b9a2ec 100644 --- a/.openapi-generator-config.json +++ b/.openapi-generator-config.json @@ -3,7 +3,7 @@ "gitUserId": "quantcdn", "gitRepoId": "quant-ts-client", "npmName": "@quantcdn/quant-client", - "npmVersion": "4.9.0", + "npmVersion": "4.10.0", "packageName": "quant-client", "projectName": "quant-client", "projectDescription": "TypeScript client for QuantCDN and QuantCloud Platform APIs", diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9f25771..08277aa 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,6 +9,7 @@ docs/AIFileStorageApi.md docs/AIInferenceApi.md docs/AIModelsApi.md docs/AIMonitoringApi.md +docs/AIOrchestrationsApi.md docs/AISessionsApi.md docs/AITaskManagementApi.md docs/AIToolsApi.md @@ -23,6 +24,7 @@ docs/ApplicationsApi.md docs/BackupManagementApi.md docs/BulkSetEnvironmentVariablesRequest.md docs/BulkSetEnvironmentVariablesRequestEnvironmentInner.md +docs/CDNMetricsApi.md docs/ChatInference200Response.md docs/ChatInference200ResponseResponse.md docs/ChatInference200ResponseResponseToolUse.md @@ -32,6 +34,7 @@ docs/ChatInference200ResponseResponseToolUseOneOfResult.md docs/ChatInference200ResponseUsage.md docs/ChatInference202Response.md docs/ChatInferenceRequest.md +docs/ChatInferenceRequestGuardrails.md docs/ChatInferenceRequestMessagesInner.md docs/ChatInferenceRequestMessagesInnerContent.md docs/ChatInferenceRequestMessagesInnerContentOneOfInner.md @@ -94,6 +97,9 @@ docs/CreateCustomToolRequest.md docs/CreateEnvironment403Response.md docs/CreateEnvironmentRequest.md docs/CreateEnvironmentRequestEnvironmentInner.md +docs/CreateOrchestrationRequest.md +docs/CreateOrchestrationRequestInputSource.md +docs/CreateOrchestrationRequestStopCondition.md docs/CreateTask201Response.md docs/CreateTaskRequest.md docs/CreateVectorCollection201Response.md @@ -111,6 +117,9 @@ docs/DeleteFile200Response.md docs/DeleteTask200Response.md docs/DeleteTask409Response.md docs/DeleteVectorCollection200Response.md +docs/DeleteVectorDocuments200Response.md +docs/DeleteVectorDocumentsRequest.md +docs/DeleteVectorDocumentsRequestMetadata.md docs/DomainsApi.md docs/DownloadBackup200Response.md docs/Embeddings200Response.md @@ -170,6 +179,8 @@ docs/KVItemsCreate200Response.md docs/KVItemsDelete200Response.md docs/KVItemsShow200Response.md docs/KVItemsShow200ResponseValue.md +docs/KVLinkToProject200Response.md +docs/KVLinkToProjectRequest.md docs/ListAIAgents200Response.md docs/ListAIAgents200ResponseAgentsInner.md docs/ListAIModels200Response.md @@ -190,6 +201,9 @@ docs/ListCustomTools200Response.md docs/ListCustomTools200ResponseToolsInner.md docs/ListFiles200Response.md docs/ListFiles200ResponseFilesInner.md +docs/ListOrchestrationBatches200Response.md +docs/ListOrchestrationBatches200ResponseBatchesInner.md +docs/ListOrchestrations200Response.md docs/ListTasks200Response.md docs/ListTasks200ResponseTasksInner.md docs/ListVectorCollections200Response.md @@ -292,6 +306,11 @@ docs/V2DomainDnsGoLiveRecordsInner.md docs/V2DomainDnsValidationRecordsInner.md docs/V2DomainRequest.md docs/V2Error.md +docs/V2MetricData.md +docs/V2MetricDataPoint.md +docs/V2MetricDataPointTimestamp.md +docs/V2MetricsMeta.md +docs/V2MetricsResponse.md docs/V2Organization.md docs/V2OrganizationRequest.md docs/V2Project.md diff --git a/api.ts b/api.ts index a7b77ba..1fb8c14 100644 --- a/api.ts +++ b/api.ts @@ -4,7 +4,7 @@ * QuantCDN API * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.10.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -637,7 +637,52 @@ export interface ChatInferenceRequest { * @memberof ChatInferenceRequest */ 'async'?: boolean; + /** + * Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. + * @type {Array} + * @memberof ChatInferenceRequest + */ + 'allowedTools'?: Array; + /** + * + * @type {ChatInferenceRequestGuardrails} + * @memberof ChatInferenceRequest + */ + 'guardrails'?: ChatInferenceRequestGuardrails; +} +/** + * AWS Bedrock guardrails configuration for content filtering and safety. + * @export + * @interface ChatInferenceRequestGuardrails + */ +export interface ChatInferenceRequestGuardrails { + /** + * Guardrail identifier from AWS Bedrock + * @type {string} + * @memberof ChatInferenceRequestGuardrails + */ + 'guardrailIdentifier'?: string; + /** + * Guardrail version + * @type {string} + * @memberof ChatInferenceRequestGuardrails + */ + 'guardrailVersion'?: string; + /** + * Enable guardrail trace output + * @type {string} + * @memberof ChatInferenceRequestGuardrails + */ + 'trace'?: ChatInferenceRequestGuardrailsTraceEnum; } + +export const ChatInferenceRequestGuardrailsTraceEnum = { + Enabled: 'enabled', + Disabled: 'disabled' +} as const; + +export type ChatInferenceRequestGuardrailsTraceEnum = typeof ChatInferenceRequestGuardrailsTraceEnum[keyof typeof ChatInferenceRequestGuardrailsTraceEnum]; + /** * * @export @@ -1036,6 +1081,18 @@ export interface ChatInferenceStreamRequest { * @memberof ChatInferenceStreamRequest */ 'async'?: boolean; + /** + * Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. + * @type {Array} + * @memberof ChatInferenceStreamRequest + */ + 'allowedTools'?: Array; + /** + * + * @type {ChatInferenceRequestGuardrails} + * @memberof ChatInferenceStreamRequest + */ + 'guardrails'?: ChatInferenceRequestGuardrails; } /** * @@ -2290,6 +2347,154 @@ export interface CreateEnvironmentRequestEnvironmentInner { */ 'value'?: string; } +/** + * + * @export + * @interface CreateOrchestrationRequest + */ +export interface CreateOrchestrationRequest { + /** + * Orchestration name + * @type {string} + * @memberof CreateOrchestrationRequest + */ + 'name': string; + /** + * Optional description + * @type {string} + * @memberof CreateOrchestrationRequest + */ + 'description'?: string | null; + /** + * Agent to process items + * @type {string} + * @memberof CreateOrchestrationRequest + */ + 'agentId'?: string | null; + /** + * Tool to execute for items + * @type {string} + * @memberof CreateOrchestrationRequest + */ + 'toolId'?: string | null; + /** + * Workflow to run for items + * @type {string} + * @memberof CreateOrchestrationRequest + */ + 'workflowId'?: string | null; + /** + * + * @type {CreateOrchestrationRequestInputSource} + * @memberof CreateOrchestrationRequest + */ + 'inputSource': CreateOrchestrationRequestInputSource; + /** + * Items per batch + * @type {number} + * @memberof CreateOrchestrationRequest + */ + 'batchSize'?: number; + /** + * Concurrent items within a batch + * @type {number} + * @memberof CreateOrchestrationRequest + */ + 'concurrency'?: number; + /** + * + * @type {CreateOrchestrationRequestStopCondition} + * @memberof CreateOrchestrationRequest + */ + 'stopCondition'?: CreateOrchestrationRequestStopCondition; + /** + * Skill IDs to assign + * @type {Array} + * @memberof CreateOrchestrationRequest + */ + 'assignedSkills'?: Array; + /** + * Whether to start immediately + * @type {boolean} + * @memberof CreateOrchestrationRequest + */ + 'autoStart'?: boolean; +} +/** + * + * @export + * @interface CreateOrchestrationRequestInputSource + */ +export interface CreateOrchestrationRequestInputSource { + /** + * Input source type (api type not yet supported) + * @type {string} + * @memberof CreateOrchestrationRequestInputSource + */ + 'type': CreateOrchestrationRequestInputSourceTypeEnum; + /** + * Static items (for type=static) + * @type {Array} + * @memberof CreateOrchestrationRequestInputSource + */ + 'items'?: Array; + /** + * Task query filters (for type=task_query) + * @type {object} + * @memberof CreateOrchestrationRequestInputSource + */ + 'taskQuery'?: object; + /** + * AI prompt (for type=generator) + * @type {string} + * @memberof CreateOrchestrationRequestInputSource + */ + 'generatorPrompt'?: string; +} + +export const CreateOrchestrationRequestInputSourceTypeEnum = { + Static: 'static', + TaskQuery: 'task_query', + Generator: 'generator' +} as const; + +export type CreateOrchestrationRequestInputSourceTypeEnum = typeof CreateOrchestrationRequestInputSourceTypeEnum[keyof typeof CreateOrchestrationRequestInputSourceTypeEnum]; + +/** + * + * @export + * @interface CreateOrchestrationRequestStopCondition + */ +export interface CreateOrchestrationRequestStopCondition { + /** + * + * @type {string} + * @memberof CreateOrchestrationRequestStopCondition + */ + 'type'?: CreateOrchestrationRequestStopConditionTypeEnum; + /** + * Max iterations (for type=max_iterations) + * @type {number} + * @memberof CreateOrchestrationRequestStopCondition + */ + 'maxIterations'?: number; + /** + * AI prompt to evaluate stop (for type=condition) + * @type {string} + * @memberof CreateOrchestrationRequestStopCondition + */ + 'conditionPrompt'?: string; +} + +export const CreateOrchestrationRequestStopConditionTypeEnum = { + AllComplete: 'all_complete', + MaxIterations: 'max_iterations', + Condition: 'condition', + Manual: 'manual' +} as const; + +export type CreateOrchestrationRequestStopConditionTypeEnum = typeof CreateOrchestrationRequestStopConditionTypeEnum[keyof typeof CreateOrchestrationRequestStopConditionTypeEnum]; + /** * * @export @@ -2798,6 +3003,75 @@ export interface DeleteVectorCollection200Response { */ 'message'?: string; } +/** + * + * @export + * @interface DeleteVectorDocuments200Response + */ +export interface DeleteVectorDocuments200Response { + /** + * + * @type {string} + * @memberof DeleteVectorDocuments200Response + */ + 'message'?: string; + /** + * + * @type {string} + * @memberof DeleteVectorDocuments200Response + */ + 'collectionId'?: string; + /** + * + * @type {number} + * @memberof DeleteVectorDocuments200Response + */ + 'deletedCount'?: number; +} +/** + * + * @export + * @interface DeleteVectorDocumentsRequest + */ +export interface DeleteVectorDocumentsRequest { + /** + * Delete ALL documents in collection + * @type {boolean} + * @memberof DeleteVectorDocumentsRequest + */ + 'purgeAll'?: boolean; + /** + * Delete specific documents by UUID + * @type {Array} + * @memberof DeleteVectorDocumentsRequest + */ + 'documentIds'?: Array; + /** + * + * @type {DeleteVectorDocumentsRequestMetadata} + * @memberof DeleteVectorDocumentsRequest + */ + 'metadata'?: DeleteVectorDocumentsRequestMetadata; +} +/** + * + * @export + * @interface DeleteVectorDocumentsRequestMetadata + */ +export interface DeleteVectorDocumentsRequestMetadata { + /** + * Metadata field name (e.g., \'drupal_entity_id\') + * @type {string} + * @memberof DeleteVectorDocumentsRequestMetadata + */ + 'field'?: string; + /** + * Values to match (OR logic) + * @type {Array} + * @memberof DeleteVectorDocumentsRequestMetadata + */ + 'values'?: Array; +} /** * * @export @@ -4913,6 +5187,38 @@ export interface KVItemsShow200Response { */ export type KVItemsShow200ResponseValue = object | string; +/** + * + * @export + * @interface KVLinkToProject200Response + */ +export interface KVLinkToProject200Response { + /** + * + * @type {boolean} + * @memberof KVLinkToProject200Response + */ + 'success'?: boolean; + /** + * + * @type {string} + * @memberof KVLinkToProject200Response + */ + 'message'?: string; +} +/** + * + * @export + * @interface KVLinkToProjectRequest + */ +export interface KVLinkToProjectRequest { + /** + * Target project ID to link to + * @type {number} + * @memberof KVLinkToProjectRequest + */ + 'project_id': number; +} /** * * @export @@ -5536,117 +5842,232 @@ export interface ListFiles200ResponseFilesInner { /** * * @export - * @interface ListTasks200Response + * @interface ListOrchestrationBatches200Response */ -export interface ListTasks200Response { +export interface ListOrchestrationBatches200Response { /** * - * @type {Array} - * @memberof ListTasks200Response - */ - 'tasks'?: Array; - /** - * Task IDs (only with dependsOn filter) - * @type {Array} - * @memberof ListTasks200Response + * @type {Array} + * @memberof ListOrchestrationBatches200Response */ - 'taskIds'?: Array; + 'batches'?: Array; /** * - * @type {number} - * @memberof ListTasks200Response - */ - 'count'?: number; - /** - * The queried task ID (only with dependsOn filter) * @type {string} - * @memberof ListTasks200Response + * @memberof ListOrchestrationBatches200Response */ - 'dependsOn'?: string; + 'nextCursor'?: string | null; } /** * * @export - * @interface ListTasks200ResponseTasksInner + * @interface ListOrchestrationBatches200ResponseBatchesInner */ -export interface ListTasks200ResponseTasksInner { - /** - * - * @type {string} - * @memberof ListTasks200ResponseTasksInner - */ - 'taskId'?: string; - /** - * - * @type {string} - * @memberof ListTasks200ResponseTasksInner - */ - 'orgId'?: string; +export interface ListOrchestrationBatches200ResponseBatchesInner { /** * * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'taskListId'?: string | null; + 'batchId'?: string; /** * * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'title'?: string; + 'orchestrationId'?: string; /** * - * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @type {number} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'description'?: string; + 'iteration'?: number; /** * - * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @type {number} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'status'?: ListTasks200ResponseTasksInnerStatusEnum; + 'itemCount'?: number; /** * - * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @type {number} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'assignedAgentId'?: string | null; + 'completedCount'?: number; /** * * @type {number} - * @memberof ListTasks200ResponseTasksInner + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'progress'?: number; + 'failedCount'?: number; /** * * @type {string} - * @memberof ListTasks200ResponseTasksInner + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'blockedReason'?: string | null; + 'status'?: ListOrchestrationBatches200ResponseBatchesInnerStatusEnum; /** * - * @type {Array} - * @memberof ListTasks200ResponseTasksInner + * @type {string} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'blockedByTaskIds'?: Array | null; + 'startedAt'?: string; /** * - * @type {number} - * @memberof ListTasks200ResponseTasksInner + * @type {string} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'createdAt'?: number; + 'completedAt'?: string; /** * - * @type {number} - * @memberof ListTasks200ResponseTasksInner + * @type {string} + * @memberof ListOrchestrationBatches200ResponseBatchesInner */ - 'updatedAt'?: number; + 'error'?: string | null; } -export const ListTasks200ResponseTasksInnerStatusEnum = { +export const ListOrchestrationBatches200ResponseBatchesInnerStatusEnum = { Pending: 'pending', - InProgress: 'in_progress', + Running: 'running', + Completed: 'completed', + Failed: 'failed' +} as const; + +export type ListOrchestrationBatches200ResponseBatchesInnerStatusEnum = typeof ListOrchestrationBatches200ResponseBatchesInnerStatusEnum[keyof typeof ListOrchestrationBatches200ResponseBatchesInnerStatusEnum]; + +/** + * + * @export + * @interface ListOrchestrations200Response + */ +export interface ListOrchestrations200Response { + /** + * + * @type {Array} + * @memberof ListOrchestrations200Response + */ + 'orchestrations'?: Array; + /** + * + * @type {string} + * @memberof ListOrchestrations200Response + */ + 'nextCursor'?: string | null; +} +/** + * + * @export + * @interface ListTasks200Response + */ +export interface ListTasks200Response { + /** + * + * @type {Array} + * @memberof ListTasks200Response + */ + 'tasks'?: Array; + /** + * Task IDs (only with dependsOn filter) + * @type {Array} + * @memberof ListTasks200Response + */ + 'taskIds'?: Array; + /** + * + * @type {number} + * @memberof ListTasks200Response + */ + 'count'?: number; + /** + * The queried task ID (only with dependsOn filter) + * @type {string} + * @memberof ListTasks200Response + */ + 'dependsOn'?: string; +} +/** + * + * @export + * @interface ListTasks200ResponseTasksInner + */ +export interface ListTasks200ResponseTasksInner { + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'taskId'?: string; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'orgId'?: string; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'taskListId'?: string | null; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'title'?: string; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'status'?: ListTasks200ResponseTasksInnerStatusEnum; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'assignedAgentId'?: string | null; + /** + * + * @type {number} + * @memberof ListTasks200ResponseTasksInner + */ + 'progress'?: number; + /** + * + * @type {string} + * @memberof ListTasks200ResponseTasksInner + */ + 'blockedReason'?: string | null; + /** + * + * @type {Array} + * @memberof ListTasks200ResponseTasksInner + */ + 'blockedByTaskIds'?: Array | null; + /** + * + * @type {number} + * @memberof ListTasks200ResponseTasksInner + */ + 'createdAt'?: number; + /** + * + * @type {number} + * @memberof ListTasks200ResponseTasksInner + */ + 'updatedAt'?: number; +} + +export const ListTasks200ResponseTasksInnerStatusEnum = { + Pending: 'pending', + InProgress: 'in_progress', Completed: 'completed', Failed: 'failed', Cancelled: 'cancelled', @@ -8834,7 +9255,7 @@ export interface V2CrawlerSchedule { */ 'crawler_last_run_id': number; /** - * Cron schedule string + * Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * runs daily at 2 AM. * @type {string} * @memberof V2CrawlerSchedule */ @@ -8859,13 +9280,13 @@ export interface V2CrawlerSchedule { */ export interface V2CrawlerScheduleRequest { /** - * Schedule name + * Schedule name. If not provided, defaults to \'Schedule {crawler_name}\'. * @type {string} * @memberof V2CrawlerScheduleRequest */ - 'name': string; + 'name'?: string; /** - * Cron schedule string + * Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * for daily at 2 AM. * @type {string} * @memberof V2CrawlerScheduleRequest */ @@ -9028,6 +9449,141 @@ export interface V2Error { */ 'error': boolean; } +/** + * + * @export + * @interface V2MetricData + */ +export interface V2MetricData { + /** + * Time series data points + * @type {Array} + * @memberof V2MetricData + */ + 'series': Array; + /** + * Total value for the period + * @type {number} + * @memberof V2MetricData + */ + 'period_total': number; + /** + * All-time total value + * @type {number} + * @memberof V2MetricData + */ + 'all_time_total': number; + /** + * Average value per time unit in the period + * @type {number} + * @memberof V2MetricData + */ + 'period_average': number; +} +/** + * + * @export + * @interface V2MetricDataPoint + */ +export interface V2MetricDataPoint { + /** + * + * @type {V2MetricDataPointTimestamp} + * @memberof V2MetricDataPoint + */ + 'timestamp': V2MetricDataPointTimestamp; + /** + * Metric value at this timestamp + * @type {number} + * @memberof V2MetricDataPoint + */ + 'value': number; +} +/** + * @type V2MetricDataPointTimestamp + * Timestamp for this data point (format depends on timestamp_format parameter) + * @export + */ +export type V2MetricDataPointTimestamp = number | string; + +/** + * + * @export + * @interface V2MetricsMeta + */ +export interface V2MetricsMeta { + /** + * The period type for this data + * @type {string} + * @memberof V2MetricsMeta + */ + 'period': V2MetricsMetaPeriodEnum; + /** + * The granularity of data points + * @type {string} + * @memberof V2MetricsMeta + */ + 'granularity': V2MetricsMetaGranularityEnum; + /** + * Start time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) + * @type {string} + * @memberof V2MetricsMeta + */ + 'start_time': string; + /** + * End time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) + * @type {string} + * @memberof V2MetricsMeta + */ + 'end_time': string; + /** + * List of metrics included in the response + * @type {Array} + * @memberof V2MetricsMeta + */ + 'metrics': Array; + /** + * Domain filter applied (if any) + * @type {string} + * @memberof V2MetricsMeta + */ + 'domain'?: string | null; +} + +export const V2MetricsMetaPeriodEnum = { + Hourly: 'hourly', + Daily: 'daily', + Monthly: 'monthly' +} as const; + +export type V2MetricsMetaPeriodEnum = typeof V2MetricsMetaPeriodEnum[keyof typeof V2MetricsMetaPeriodEnum]; +export const V2MetricsMetaGranularityEnum = { + Minute: 'minute', + Day: 'day', + Month: 'month' +} as const; + +export type V2MetricsMetaGranularityEnum = typeof V2MetricsMetaGranularityEnum[keyof typeof V2MetricsMetaGranularityEnum]; + +/** + * + * @export + * @interface V2MetricsResponse + */ +export interface V2MetricsResponse { + /** + * + * @type {V2MetricsMeta} + * @memberof V2MetricsResponse + */ + 'meta': V2MetricsMeta; + /** + * Metrics data keyed by metric name + * @type {{ [key: string]: V2MetricData; }} + * @memberof V2MetricsResponse + */ + 'data': { [key: string]: V2MetricData; }; +} /** * * @export @@ -14550,26 +15106,27 @@ export class AIMonitoringApi extends BaseAPI { /** - * AISessionsApi - axios parameter creator + * AIOrchestrationsApi - axios parameter creator * @export */ -export const AISessionsApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * 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. - * @summary Create a new chat session with multi-tenant isolation - * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + * @summary Cancel Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAISession: async (organisation: string, createAISessionRequest: CreateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + cancelOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('createAISession', 'organisation', organisation) - // verify required parameter 'createAISessionRequest' is not null or undefined - assertParamExists('createAISession', 'createAISessionRequest', createAISessionRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('cancelOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('cancelOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/cancel` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14587,12 +15144,9 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14600,21 +15154,20 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * - * @summary Delete a chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + * @summary Create Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {CreateOrchestrationRequest} createOrchestrationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { + createOrchestration: async (organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteAISession', 'organisation', organisation) - // verify required parameter 'sessionId' is not null or undefined - assertParamExists('deleteAISession', 'sessionId', sessionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + assertParamExists('createOrchestration', 'organisation', organisation) + // verify required parameter 'createOrchestrationRequest' is not null or undefined + assertParamExists('createOrchestration', 'createOrchestrationRequest', createOrchestrationRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14622,7 +15175,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14632,9 +15185,12 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createOrchestrationRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14642,22 +15198,21 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. - * @summary Extend Session Expiration - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + * @summary Delete Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - extendAISession: async (organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + deleteOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('extendAISession', 'organisation', organisation) - // verify required parameter 'sessionId' is not null or undefined - assertParamExists('extendAISession', 'sessionId', sessionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend` + assertParamExists('deleteOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('deleteOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14665,7 +15220,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14675,12 +15230,9 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(extendAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14688,21 +15240,21 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * - * @summary Get a specific chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + * @summary Get Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { + getOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getAISession', 'organisation', organisation) - // verify required parameter 'sessionId' is not null or undefined - assertParamExists('getAISession', 'sessionId', sessionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` + assertParamExists('getOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('getOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14730,22 +15282,23 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * 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 - * @summary List chat sessions with multi-tenant filtering - * @param {string} organisation The organisation ID - * @param {string} [userId] Filter sessions by user ID - * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. - * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) - * @param {number} [offset] Offset for pagination - * @param {string} [model] Filter by model ID + * Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + * @summary List Orchestration Batches + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {number} [limit] Maximum number of batches to return + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAISessions: async (organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options: RawAxiosRequestConfig = {}): Promise => { + listOrchestrationBatches: async (organisation: string, orchestrationId: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAISessions', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('listOrchestrationBatches', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('listOrchestrationBatches', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/batches` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14761,26 +15314,109 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (userId !== undefined) { - localVarQueryParameter['userId'] = userId; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; } - if (sessionGroup !== undefined) { - localVarQueryParameter['sessionGroup'] = sessionGroup; + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + * @summary List Durable Orchestrations + * @param {string} organisation The organisation machine name + * @param {ListOrchestrationsStatusEnum} [status] Filter by orchestration status + * @param {number} [limit] Maximum number of results + * @param {string} [cursor] Pagination cursor from previous response + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOrchestrations: async (organisation: string, status?: ListOrchestrationsStatusEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listOrchestrations', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (status !== undefined) { + localVarQueryParameter['status'] = status; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; } - if (model !== undefined) { - localVarQueryParameter['model'] = model; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + * @summary Pause Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pauseOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('pauseOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('pauseOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/pause` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14793,24 +15429,21 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * 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 - * @summary Update Session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * Resume a paused orchestration. Processing continues from where it left off. + * @summary Resume Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateAISession: async (organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + resumeOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('updateAISession', 'organisation', organisation) - // verify required parameter 'sessionId' is not null or undefined - assertParamExists('updateAISession', 'sessionId', sessionId) - // verify required parameter 'updateAISessionRequest' is not null or undefined - assertParamExists('updateAISession', 'updateAISessionRequest', updateAISessionRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` + assertParamExists('resumeOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('resumeOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/resume` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -14818,7 +15451,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -14828,12 +15461,51 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + * @summary Start Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('startOrchestration', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('startOrchestration', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/start` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -14844,301 +15516,421 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; /** - * AISessionsApi - functional programming interface + * AIOrchestrationsApi - functional programming interface * @export */ -export const AISessionsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration) +export const AIOrchestrationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIOrchestrationsApiAxiosParamCreator(configuration) return { /** - * 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. - * @summary Create a new chat session with multi-tenant isolation - * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + * @summary Cancel Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options); + async cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrchestration(organisation, orchestrationId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.createAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.cancelOrchestration']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Delete a chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + * @summary Create Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {CreateOrchestrationRequest} createOrchestrationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options); + async createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrchestration(organisation, createOrchestrationRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.deleteAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.createOrchestration']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. - * @summary Extend Session Expiration - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + * @summary Delete Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options); + async deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrchestration(organisation, orchestrationId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.extendAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.deleteOrchestration']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Get a specific chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + * @summary Get Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAISession(organisation, sessionId, options); + async getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrchestration(organisation, orchestrationId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.getAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.getOrchestration']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary List chat sessions with multi-tenant filtering - * @param {string} organisation The organisation ID - * @param {string} [userId] Filter sessions by user ID - * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. - * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) - * @param {number} [offset] Offset for pagination - * @param {string} [model] Filter by model ID + * Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + * @summary List Orchestration Batches + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {number} [limit] Maximum number of batches to return + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options); + async listOrchestrationBatches(organisation: string, orchestrationId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOrchestrationBatches(organisation, orchestrationId, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.listAISessions']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.listOrchestrationBatches']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Update Session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + * @summary List Durable Orchestrations + * @param {string} organisation The organisation machine name + * @param {ListOrchestrationsStatusEnum} [status] Filter by orchestration status + * @param {number} [limit] Maximum number of results + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options); + async listOrchestrations(organisation: string, status?: ListOrchestrationsStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOrchestrations(organisation, status, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.updateAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.listOrchestrations']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + * @summary Pause Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async pauseOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.pauseOrchestration(organisation, orchestrationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.pauseOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Resume a paused orchestration. Processing continues from where it left off. + * @summary Resume Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resumeOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resumeOrchestration(organisation, orchestrationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.resumeOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + * @summary Start Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async startOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.startOrchestration(organisation, orchestrationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIOrchestrationsApi.startOrchestration']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AISessionsApi - factory interface + * AIOrchestrationsApi - factory interface * @export */ -export const AISessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AISessionsApiFp(configuration) +export const AIOrchestrationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIOrchestrationsApiFp(configuration) return { /** - * 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. - * @summary Create a new chat session with multi-tenant isolation - * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + * @summary Cancel Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath)); + cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.cancelOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Delete a chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + * @summary Create Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {CreateOrchestrationRequest} createOrchestrationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath)); + createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createOrchestration(organisation, createOrchestrationRequest, options).then((request) => request(axios, basePath)); }, /** - * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. - * @summary Extend Session Expiration - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + * @summary Delete Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath)); + deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Get a specific chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + * @summary Get Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath)); + getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary List chat sessions with multi-tenant filtering - * @param {string} organisation The organisation ID - * @param {string} [userId] Filter sessions by user ID - * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. - * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) - * @param {number} [offset] Offset for pagination - * @param {string} [model] Filter by model ID + * Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + * @summary List Orchestration Batches + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {number} [limit] Maximum number of batches to return + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath)); + listOrchestrationBatches(organisation: string, orchestrationId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listOrchestrationBatches(organisation, orchestrationId, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Update Session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + * @summary List Durable Orchestrations + * @param {string} organisation The organisation machine name + * @param {ListOrchestrationsStatusEnum} [status] Filter by orchestration status + * @param {number} [limit] Maximum number of results + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath)); + listOrchestrations(organisation: string, status?: ListOrchestrationsStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listOrchestrations(organisation, status, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + * @summary Pause Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pauseOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.pauseOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + }, + /** + * Resume a paused orchestration. Processing continues from where it left off. + * @summary Resume Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resumeOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.resumeOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + }, + /** + * Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + * @summary Start Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.startOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); }, }; }; /** - * AISessionsApi - object-oriented interface + * AIOrchestrationsApi - object-oriented interface * @export - * @class AISessionsApi + * @class AIOrchestrationsApi * @extends {BaseAPI} */ -export class AISessionsApi extends BaseAPI { +export class AIOrchestrationsApi extends BaseAPI { /** - * 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. - * @summary Create a new chat session with multi-tenant isolation - * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + * @summary Cancel Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath)); + public cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).cancelOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Delete a chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + * @summary Create Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {CreateOrchestrationRequest} createOrchestrationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); + public createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).createOrchestration(organisation, createOrchestrationRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. - * @summary Extend Session Expiration - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + * @summary Delete Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath)); + public deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).deleteOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get a specific chat session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + * @summary Get Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); + public getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).getOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary List chat sessions with multi-tenant filtering - * @param {string} organisation The organisation ID - * @param {string} [userId] Filter sessions by user ID - * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. - * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) - * @param {number} [offset] Offset for pagination - * @param {string} [model] Filter by model ID + * Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + * @summary List Orchestration Batches + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {number} [limit] Maximum number of batches to return + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath)); + public listOrchestrationBatches(organisation: string, orchestrationId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).listOrchestrationBatches(organisation, orchestrationId, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Update Session - * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + * @summary List Durable Orchestrations + * @param {string} organisation The organisation machine name + * @param {ListOrchestrationsStatusEnum} [status] Filter by orchestration status + * @param {number} [limit] Maximum number of results + * @param {string} [cursor] Pagination cursor from previous response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AIOrchestrationsApi */ - public updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath)); + public listOrchestrations(organisation: string, status?: ListOrchestrationsStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).listOrchestrations(organisation, status, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + * @summary Pause Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIOrchestrationsApi + */ + public pauseOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).pauseOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Resume a paused orchestration. Processing continues from where it left off. + * @summary Resume Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIOrchestrationsApi + */ + public resumeOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).resumeOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + * @summary Start Durable Orchestration + * @param {string} organisation The organisation machine name + * @param {string} orchestrationId Orchestration identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIOrchestrationsApi + */ + public startOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).startOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); } } +/** + * @export + */ +export const ListOrchestrationsStatusEnum = { + Pending: 'pending', + Running: 'running', + Paused: 'paused', + Completed: 'completed', + Failed: 'failed', + Cancelled: 'cancelled' +} as const; +export type ListOrchestrationsStatusEnum = typeof ListOrchestrationsStatusEnum[keyof typeof ListOrchestrationsStatusEnum]; /** - * AITaskManagementApi - axios parameter creator + * AISessionsApi - axios parameter creator * @export */ -export const AITaskManagementApiAxiosParamCreator = function (configuration?: Configuration) { +export const AISessionsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * 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 - * @summary Create a new task + * 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. + * @summary Create a new chat session with multi-tenant isolation * @param {string} organisation The organisation ID - * @param {CreateTaskRequest} createTaskRequest + * @param {CreateAISessionRequest} createAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTask: async (organisation: string, createTaskRequest: CreateTaskRequest, options: RawAxiosRequestConfig = {}): Promise => { + createAISession: async (organisation: string, createAISessionRequest: CreateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('createTask', 'organisation', organisation) - // verify required parameter 'createTaskRequest' is not null or undefined - assertParamExists('createTask', 'createTaskRequest', createTaskRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks` + assertParamExists('createAISession', 'organisation', organisation) + // verify required parameter 'createAISessionRequest' is not null or undefined + assertParamExists('createAISession', 'createAISessionRequest', createAISessionRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -15162,7 +15954,7 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createTaskRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15170,22 +15962,21 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 - * @summary Delete a task + * + * @summary Delete a chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTask: async (organisation: string, taskId: string, cascade?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + deleteAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteTask', 'organisation', organisation) - // verify required parameter 'taskId' is not null or undefined - assertParamExists('deleteTask', 'taskId', taskId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` + assertParamExists('deleteAISession', 'organisation', organisation) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('deleteAISession', 'sessionId', sessionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); + .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15201,10 +15992,6 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (cascade !== undefined) { - localVarQueryParameter['cascade'] = cascade; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15217,21 +16004,22 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 - * @summary Get dependency graph for a task list + * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. + * @summary Extend Session Expiration * @param {string} organisation The organisation ID - * @param {string} taskListId The task list ID to get the dependency graph for + * @param {string} sessionId The session ID + * @param {ExtendAISessionRequest} [extendAISessionRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDependencyGraph: async (organisation: string, taskListId: string, options: RawAxiosRequestConfig = {}): Promise => { + extendAISession: async (organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getDependencyGraph', 'organisation', organisation) - // verify required parameter 'taskListId' is not null or undefined - assertParamExists('getDependencyGraph', 'taskListId', taskListId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskListId}/dependency-graph` + assertParamExists('extendAISession', 'organisation', organisation) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('extendAISession', 'sessionId', sessionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"taskListId"}}`, encodeURIComponent(String(taskListId))); + .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15239,7 +16027,7 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15249,9 +16037,12 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(extendAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15259,21 +16050,21 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * Retrieves detailed information about a specific task including status, progress, dependencies, and results. - * @summary Get task details + * + * @summary Get a specific chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTask: async (organisation: string, taskId: string, options: RawAxiosRequestConfig = {}): Promise => { + getAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getTask', 'organisation', organisation) - // verify required parameter 'taskId' is not null or undefined - assertParamExists('getTask', 'taskId', taskId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` + assertParamExists('getAISession', 'organisation', organisation) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('getAISession', 'sessionId', sessionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); + .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15301,22 +16092,21 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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). - * @summary List tasks with optional filtering + * 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 + * @summary List chat sessions with multi-tenant filtering * @param {string} organisation The organisation ID - * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. - * @param {ListTasksStatusEnum} [status] Filter tasks by status - * @param {string} [assignedAgentId] Filter tasks by assigned agent ID - * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) - * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. - * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). + * @param {string} [userId] Filter sessions by user ID + * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. + * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) + * @param {number} [offset] Offset for pagination + * @param {string} [model] Filter by model ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTasks: async (organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + listAISessions: async (organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listTasks', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks` + assertParamExists('listAISessions', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -15333,28 +16123,24 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (taskListId !== undefined) { - localVarQueryParameter['taskListId'] = taskListId; - } - - if (status !== undefined) { - localVarQueryParameter['status'] = status; + if (userId !== undefined) { + localVarQueryParameter['userId'] = userId; } - if (assignedAgentId !== undefined) { - localVarQueryParameter['assignedAgentId'] = assignedAgentId; + if (sessionGroup !== undefined) { + localVarQueryParameter['sessionGroup'] = sessionGroup; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } - if (dependsOn !== undefined) { - localVarQueryParameter['dependsOn'] = dependsOn; + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; } - if (includeDetails !== undefined) { - localVarQueryParameter['includeDetails'] = includeDetails; + if (model !== undefined) { + localVarQueryParameter['model'] = model; } @@ -15369,24 +16155,24 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 - * @summary Update a task - * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {UpdateTaskRequest} updateTaskRequest + * 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 + * @summary Update Session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID + * @param {UpdateAISessionRequest} updateAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTask: async (organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options: RawAxiosRequestConfig = {}): Promise => { + updateAISession: async (organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('updateTask', 'organisation', organisation) - // verify required parameter 'taskId' is not null or undefined - assertParamExists('updateTask', 'taskId', taskId) - // verify required parameter 'updateTaskRequest' is not null or undefined - assertParamExists('updateTask', 'updateTaskRequest', updateTaskRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` + assertParamExists('updateAISession', 'organisation', organisation) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('updateAISession', 'sessionId', sessionId) + // verify required parameter 'updateAISessionRequest' is not null or undefined + assertParamExists('updateAISession', 'updateAISessionRequest', updateAISessionRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions/{sessionId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); + .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15409,7 +16195,7 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateTaskRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(updateAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15420,318 +16206,302 @@ export const AITaskManagementApiAxiosParamCreator = function (configuration?: Co }; /** - * AITaskManagementApi - functional programming interface + * AISessionsApi - functional programming interface * @export */ -export const AITaskManagementApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AITaskManagementApiAxiosParamCreator(configuration) +export const AISessionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration) return { /** - * 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 - * @summary Create a new task + * 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. + * @summary Create a new chat session with multi-tenant isolation * @param {string} organisation The organisation ID - * @param {CreateTaskRequest} createTaskRequest + * @param {CreateAISessionRequest} createAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTask(organisation, createTaskRequest, options); + async createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAISession(organisation, createAISessionRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.createTask']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.createAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Delete a task + * + * @summary Delete a chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTask(organisation, taskId, cascade, options); + async deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAISession(organisation, sessionId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.deleteTask']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.deleteAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Get dependency graph for a task list + * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. + * @summary Extend Session Expiration * @param {string} organisation The organisation ID - * @param {string} taskListId The task list ID to get the dependency graph for + * @param {string} sessionId The session ID + * @param {ExtendAISessionRequest} [extendAISessionRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDependencyGraph(organisation, taskListId, options); + async extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.extendAISession(organisation, sessionId, extendAISessionRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.getDependencyGraph']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.extendAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves detailed information about a specific task including status, progress, dependencies, and results. - * @summary Get task details + * + * @summary Get a specific chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTask(organisation, taskId, options); + async getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAISession(organisation, sessionId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.getTask']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.getAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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). - * @summary List tasks with optional filtering + * 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 + * @summary List chat sessions with multi-tenant filtering * @param {string} organisation The organisation ID - * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. - * @param {ListTasksStatusEnum} [status] Filter tasks by status - * @param {string} [assignedAgentId] Filter tasks by assigned agent ID - * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) - * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. - * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). + * @param {string} [userId] Filter sessions by user ID + * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. + * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) + * @param {number} [offset] Offset for pagination + * @param {string} [model] Filter by model ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options); + async listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.listTasks']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.listAISessions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Update a task + * 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 + * @summary Update Session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {UpdateTaskRequest} updateTaskRequest + * @param {string} sessionId The session ID + * @param {UpdateAISessionRequest} updateAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateTask(organisation, taskId, updateTaskRequest, options); + async updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAISession(organisation, sessionId, updateAISessionRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.updateTask']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.updateAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AITaskManagementApi - factory interface + * AISessionsApi - factory interface * @export */ -export const AITaskManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AITaskManagementApiFp(configuration) +export const AISessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AISessionsApiFp(configuration) return { /** - * 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 - * @summary Create a new task + * 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. + * @summary Create a new chat session with multi-tenant isolation * @param {string} organisation The organisation ID - * @param {CreateTaskRequest} createTaskRequest + * @param {CreateAISessionRequest} createAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createTask(organisation, createTaskRequest, options).then((request) => request(axios, basePath)); + createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createAISession(organisation, createAISessionRequest, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Delete a task + * + * @summary Delete a chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteTask(organisation, taskId, cascade, options).then((request) => request(axios, basePath)); + deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Get dependency graph for a task list + * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. + * @summary Extend Session Expiration * @param {string} organisation The organisation ID - * @param {string} taskListId The task list ID to get the dependency graph for + * @param {string} sessionId The session ID + * @param {ExtendAISessionRequest} [extendAISessionRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getDependencyGraph(organisation, taskListId, options).then((request) => request(axios, basePath)); + extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(axios, basePath)); }, /** - * Retrieves detailed information about a specific task including status, progress, dependencies, and results. - * @summary Get task details + * + * @summary Get a specific chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTask(organisation, taskId, options).then((request) => request(axios, basePath)); + getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAISession(organisation, sessionId, options).then((request) => request(axios, basePath)); }, /** - * 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). - * @summary List tasks with optional filtering + * 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 + * @summary List chat sessions with multi-tenant filtering * @param {string} organisation The organisation ID - * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. - * @param {ListTasksStatusEnum} [status] Filter tasks by status - * @param {string} [assignedAgentId] Filter tasks by assigned agent ID - * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) - * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. - * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). + * @param {string} [userId] Filter sessions by user ID + * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. + * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) + * @param {number} [offset] Offset for pagination + * @param {string} [model] Filter by model ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(axios, basePath)); + listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Update a task + * 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 + * @summary Update Session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {UpdateTaskRequest} updateTaskRequest + * @param {string} sessionId The session ID + * @param {UpdateAISessionRequest} updateAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(axios, basePath)); + updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AITaskManagementApi - object-oriented interface + * AISessionsApi - object-oriented interface * @export - * @class AITaskManagementApi + * @class AISessionsApi * @extends {BaseAPI} */ -export class AITaskManagementApi extends BaseAPI { +export class AISessionsApi extends BaseAPI { /** - * 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 - * @summary Create a new task + * 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. + * @summary Create a new chat session with multi-tenant isolation * @param {string} organisation The organisation ID - * @param {CreateTaskRequest} createTaskRequest + * @param {CreateAISessionRequest} createAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).createTask(organisation, createTaskRequest, options).then((request) => request(this.axios, this.basePath)); + public createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Delete a task + * + * @summary Delete a chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).deleteTask(organisation, taskId, cascade, options).then((request) => request(this.axios, this.basePath)); + public deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Get dependency graph for a task list + * Extends the expiration time of an active session. Useful for keeping long-running conversations alive. + * @summary Extend Session Expiration * @param {string} organisation The organisation ID - * @param {string} taskListId The task list ID to get the dependency graph for + * @param {string} sessionId The session ID + * @param {ExtendAISessionRequest} [extendAISessionRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).getDependencyGraph(organisation, taskListId, options).then((request) => request(this.axios, this.basePath)); + public extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).extendAISession(organisation, sessionId, extendAISessionRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves detailed information about a specific task including status, progress, dependencies, and results. - * @summary Get task details + * + * @summary Get a specific chat session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).getTask(organisation, taskId, options).then((request) => request(this.axios, this.basePath)); + public getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); } /** - * 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). - * @summary List tasks with optional filtering + * 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 + * @summary List chat sessions with multi-tenant filtering * @param {string} organisation The organisation ID - * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. - * @param {ListTasksStatusEnum} [status] Filter tasks by status - * @param {string} [assignedAgentId] Filter tasks by assigned agent ID - * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) - * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. - * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). + * @param {string} [userId] Filter sessions by user ID + * @param {string} [sessionGroup] Filter by session group. Returns only sessions matching the specified group. + * @param {number} [limit] Maximum number of sessions to return (default 50, max 100) + * @param {number} [offset] Offset for pagination + * @param {string} [model] Filter by model ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(this.axios, this.basePath)); + public listAISessions(organisation: string, userId?: string, sessionGroup?: string, limit?: number, offset?: number, model?: string, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).listAISessions(organisation, userId, sessionGroup, limit, offset, model, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Update a task + * 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 + * @summary Update Session * @param {string} organisation The organisation ID - * @param {string} taskId The task UUID - * @param {UpdateTaskRequest} updateTaskRequest + * @param {string} sessionId The session ID + * @param {UpdateAISessionRequest} updateAISessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AITaskManagementApi + * @memberof AISessionsApi */ - public updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig) { - return AITaskManagementApiFp(this.configuration).updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(this.axios, this.basePath)); + public updateAISession(organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).updateAISession(organisation, sessionId, updateAISessionRequest, options).then((request) => request(this.axios, this.basePath)); } } -/** - * @export - */ -export const ListTasksStatusEnum = { - Pending: 'pending', - InProgress: 'in_progress', - Completed: 'completed', - Failed: 'failed', - Cancelled: 'cancelled', - Blocked: 'blocked' -} as const; -export type ListTasksStatusEnum = typeof ListTasksStatusEnum[keyof typeof ListTasksStatusEnum]; /** - * AIToolsApi - axios parameter creator + * AITaskManagementApi - axios parameter creator * @export */ -export const AIToolsApiAxiosParamCreator = function (configuration?: Configuration) { +export const AITaskManagementApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * 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 - * @summary Get Orchestration Status + * 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 + * @summary Create a new task * @param {string} organisation The organisation ID - * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions + * @param {CreateTaskRequest} createTaskRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIOrchestrationStatus: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + createTask: async (organisation: string, createTaskRequest: CreateTaskRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getAIOrchestrationStatus', 'organisation', organisation) - // verify required parameter 'orchestrationId' is not null or undefined - assertParamExists('getAIOrchestrationStatus', 'orchestrationId', orchestrationId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + assertParamExists('createTask', 'organisation', organisation) + // verify required parameter 'createTaskRequest' is not null or undefined + assertParamExists('createTask', 'createTaskRequest', createTaskRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15739,7 +16509,7 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15749,9 +16519,12 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createTaskRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15759,21 +16532,22 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * 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 - * @summary Get async tool execution status and result + * 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 + * @summary Delete a task * @param {string} organisation The organisation ID - * @param {string} executionId Tool execution identifier + * @param {string} taskId The task UUID + * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIToolExecutionStatus: async (organisation: string, executionId: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteTask: async (organisation: string, taskId: string, cascade?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getAIToolExecutionStatus', 'organisation', organisation) - // verify required parameter 'executionId' is not null or undefined - assertParamExists('getAIToolExecutionStatus', 'executionId', executionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/executions/{executionId}` + assertParamExists('deleteTask', 'organisation', organisation) + // verify required parameter 'taskId' is not null or undefined + assertParamExists('deleteTask', 'taskId', taskId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"executionId"}}`, encodeURIComponent(String(executionId))); + .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15781,7 +16555,7 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15789,6 +16563,10 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (cascade !== undefined) { + localVarQueryParameter['cascade'] = cascade; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15801,19 +16579,21 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations - * @summary List tool executions for monitoring and debugging + * 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 + * @summary Get dependency graph for a task list * @param {string} organisation The organisation ID - * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status - * @param {number} [limit] Maximum number of executions to return + * @param {string} taskListId The task list ID to get the dependency graph for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIToolExecutions: async (organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + getDependencyGraph: async (organisation: string, taskListId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAIToolExecutions', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/executions` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('getDependencyGraph', 'organisation', organisation) + // verify required parameter 'taskListId' is not null or undefined + assertParamExists('getDependencyGraph', 'taskListId', taskListId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskListId}/dependency-graph` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"taskListId"}}`, encodeURIComponent(String(taskListId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15829,14 +16609,48 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (status !== undefined) { - localVarQueryParameter['status'] = status; - } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves detailed information about a specific task including status, progress, dependencies, and results. + * @summary Get task details + * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTask: async (organisation: string, taskId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getTask', 'organisation', organisation) + // verify required parameter 'taskId' is not null or undefined + assertParamExists('getTask', 'taskId', taskId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15849,16 +16663,22 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. - * @summary List tool names only (lightweight response) + * 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). + * @summary List tasks with optional filtering * @param {string} organisation The organisation ID + * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. + * @param {ListTasksStatusEnum} [status] Filter tasks by status + * @param {string} [assignedAgentId] Filter tasks by assigned agent ID + * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) + * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. + * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIToolNames: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + listTasks: async (organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAIToolNames', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/names` + assertParamExists('listTasks', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -15875,6 +16695,30 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (taskListId !== undefined) { + localVarQueryParameter['taskListId'] = taskListId; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (assignedAgentId !== undefined) { + localVarQueryParameter['assignedAgentId'] = assignedAgentId; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (dependsOn !== undefined) { + localVarQueryParameter['dependsOn'] = dependsOn; + } + + if (includeDetails !== undefined) { + localVarQueryParameter['includeDetails'] = includeDetails; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15887,17 +16731,24 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) - * @summary List available built-in tools for function calling + * 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 + * @summary Update a task * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID + * @param {UpdateTaskRequest} updateTaskRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAITools: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + updateTask: async (organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAITools', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/tools` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('updateTask', 'organisation', organisation) + // verify required parameter 'taskId' is not null or undefined + assertParamExists('updateTask', 'taskId', taskId) + // verify required parameter 'updateTaskRequest' is not null or undefined + assertParamExists('updateTask', 'updateTaskRequest', updateTaskRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tasks/{taskId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15905,7 +16756,7 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15915,9 +16766,12 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateTaskRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15928,253 +16782,318 @@ export const AIToolsApiAxiosParamCreator = function (configuration?: Configurati }; /** - * AIToolsApi - functional programming interface + * AITaskManagementApi - functional programming interface * @export */ -export const AIToolsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIToolsApiAxiosParamCreator(configuration) +export const AITaskManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AITaskManagementApiAxiosParamCreator(configuration) return { /** - * 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 - * @summary Get Orchestration Status + * 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 + * @summary Create a new task * @param {string} organisation The organisation ID - * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions + * @param {CreateTaskRequest} createTaskRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options); + async createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTask(organisation, createTaskRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIToolsApi.getAIOrchestrationStatus']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.createTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Get async tool execution status and result + * 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 + * @summary Delete a task * @param {string} organisation The organisation ID - * @param {string} executionId Tool execution identifier + * @param {string} taskId The task UUID + * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAIToolExecutionStatus(organisation, executionId, options); + async deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTask(organisation, taskId, cascade, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIToolsApi.getAIToolExecutionStatus']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.deleteTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations - * @summary List tool executions for monitoring and debugging + * 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 + * @summary Get dependency graph for a task list * @param {string} organisation The organisation ID - * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status - * @param {number} [limit] Maximum number of executions to return + * @param {string} taskListId The task list ID to get the dependency graph for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolExecutions(organisation, status, limit, options); + async getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDependencyGraph(organisation, taskListId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAIToolExecutions']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.getDependencyGraph']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. - * @summary List tool names only (lightweight response) + * Retrieves detailed information about a specific task including status, progress, dependencies, and results. + * @summary Get task details * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAIToolNames(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolNames(organisation, options); + async getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTask(organisation, taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAIToolNames']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.getTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) - * @summary List available built-in tools for function calling + * 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). + * @summary List tasks with optional filtering * @param {string} organisation The organisation ID + * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. + * @param {ListTasksStatusEnum} [status] Filter tasks by status + * @param {string} [assignedAgentId] Filter tasks by assigned agent ID + * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) + * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. + * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAITools(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAITools(organisation, options); + async listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAITools']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.listTasks']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 + * @summary Update a task + * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID + * @param {UpdateTaskRequest} updateTaskRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTask(organisation, taskId, updateTaskRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AITaskManagementApi.updateTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AIToolsApi - factory interface + * AITaskManagementApi - factory interface * @export */ -export const AIToolsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIToolsApiFp(configuration) +export const AITaskManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AITaskManagementApiFp(configuration) return { /** - * 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 - * @summary Get Orchestration Status + * 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 + * @summary Create a new task * @param {string} organisation The organisation ID - * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions + * @param {CreateTaskRequest} createTaskRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createTask(organisation, createTaskRequest, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Get async tool execution status and result + * 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 + * @summary Delete a task * @param {string} organisation The organisation ID - * @param {string} executionId Tool execution identifier + * @param {string} taskId The task UUID + * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAIToolExecutionStatus(organisation, executionId, options).then((request) => request(axios, basePath)); + deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteTask(organisation, taskId, cascade, options).then((request) => request(axios, basePath)); }, /** - * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations - * @summary List tool executions for monitoring and debugging + * 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 + * @summary Get dependency graph for a task list * @param {string} organisation The organisation ID - * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status - * @param {number} [limit] Maximum number of executions to return + * @param {string} taskListId The task list ID to get the dependency graph for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAIToolExecutions(organisation, status, limit, options).then((request) => request(axios, basePath)); + getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDependencyGraph(organisation, taskListId, options).then((request) => request(axios, basePath)); }, /** - * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. - * @summary List tool names only (lightweight response) + * Retrieves detailed information about a specific task including status, progress, dependencies, and results. + * @summary Get task details * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIToolNames(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAIToolNames(organisation, options).then((request) => request(axios, basePath)); + getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTask(organisation, taskId, options).then((request) => request(axios, basePath)); }, /** - * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) - * @summary List available built-in tools for function calling + * 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). + * @summary List tasks with optional filtering * @param {string} organisation The organisation ID + * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. + * @param {ListTasksStatusEnum} [status] Filter tasks by status + * @param {string} [assignedAgentId] Filter tasks by assigned agent ID + * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) + * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. + * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAITools(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAITools(organisation, options).then((request) => request(axios, basePath)); + listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(axios, basePath)); + }, + /** + * 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 + * @summary Update a task + * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID + * @param {UpdateTaskRequest} updateTaskRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AIToolsApi - object-oriented interface + * AITaskManagementApi - object-oriented interface * @export - * @class AIToolsApi + * @class AITaskManagementApi * @extends {BaseAPI} */ -export class AIToolsApi extends BaseAPI { +export class AITaskManagementApi extends BaseAPI { /** - * 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 - * @summary Get Orchestration Status + * 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 + * @summary Create a new task * @param {string} organisation The organisation ID - * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions + * @param {CreateTaskRequest} createTaskRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIToolsApi + * @memberof AITaskManagementApi */ - public getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { - return AIToolsApiFp(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + public createTask(organisation: string, createTaskRequest: CreateTaskRequest, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).createTask(organisation, createTaskRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Get async tool execution status and result + * 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 + * @summary Delete a task * @param {string} organisation The organisation ID - * @param {string} executionId Tool execution identifier + * @param {string} taskId The task UUID + * @param {boolean} [cascade] If true, delete task and all dependent tasks recursively * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIToolsApi + * @memberof AITaskManagementApi */ - public getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig) { - return AIToolsApiFp(this.configuration).getAIToolExecutionStatus(organisation, executionId, options).then((request) => request(this.axios, this.basePath)); + public deleteTask(organisation: string, taskId: string, cascade?: boolean, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).deleteTask(organisation, taskId, cascade, options).then((request) => request(this.axios, this.basePath)); } /** - * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations - * @summary List tool executions for monitoring and debugging + * 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 + * @summary Get dependency graph for a task list * @param {string} organisation The organisation ID - * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status - * @param {number} [limit] Maximum number of executions to return + * @param {string} taskListId The task list ID to get the dependency graph for * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIToolsApi + * @memberof AITaskManagementApi */ - public listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig) { - return AIToolsApiFp(this.configuration).listAIToolExecutions(organisation, status, limit, options).then((request) => request(this.axios, this.basePath)); + public getDependencyGraph(organisation: string, taskListId: string, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).getDependencyGraph(organisation, taskListId, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. - * @summary List tool names only (lightweight response) + * Retrieves detailed information about a specific task including status, progress, dependencies, and results. + * @summary Get task details * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIToolsApi + * @memberof AITaskManagementApi */ - public listAIToolNames(organisation: string, options?: RawAxiosRequestConfig) { - return AIToolsApiFp(this.configuration).listAIToolNames(organisation, options).then((request) => request(this.axios, this.basePath)); + public getTask(organisation: string, taskId: string, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).getTask(organisation, taskId, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) - * @summary List available built-in tools for function calling + * 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). + * @summary List tasks with optional filtering * @param {string} organisation The organisation ID + * @param {string} [taskListId] Filter tasks by task list ID. Task lists are implicit groupings - any string can be used. + * @param {ListTasksStatusEnum} [status] Filter tasks by status + * @param {string} [assignedAgentId] Filter tasks by assigned agent ID + * @param {number} [limit] Maximum number of tasks to return (default 50, max 100) + * @param {string} [dependsOn] Reverse lookup: find tasks that depend on this task ID. Returns tasks waiting for the specified task to complete. + * @param {boolean} [includeDetails] When using dependsOn, return full task objects in addition to IDs. Default false (IDs only for lightweight responses). * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIToolsApi + * @memberof AITaskManagementApi */ - public listAITools(organisation: string, options?: RawAxiosRequestConfig) { - return AIToolsApiFp(this.configuration).listAITools(organisation, options).then((request) => request(this.axios, this.basePath)); + public listTasks(organisation: string, taskListId?: string, status?: ListTasksStatusEnum, assignedAgentId?: string, limit?: number, dependsOn?: string, includeDetails?: boolean, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).listTasks(organisation, taskListId, status, assignedAgentId, limit, dependsOn, includeDetails, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 + * @summary Update a task + * @param {string} organisation The organisation ID + * @param {string} taskId The task UUID + * @param {UpdateTaskRequest} updateTaskRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AITaskManagementApi + */ + public updateTask(organisation: string, taskId: string, updateTaskRequest: UpdateTaskRequest, options?: RawAxiosRequestConfig) { + return AITaskManagementApiFp(this.configuration).updateTask(organisation, taskId, updateTaskRequest, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const ListAIToolExecutionsStatusEnum = { +export const ListTasksStatusEnum = { Pending: 'pending', - Running: 'running', - Complete: 'complete', - Failed: 'failed' + InProgress: 'in_progress', + Completed: 'completed', + Failed: 'failed', + Cancelled: 'cancelled', + Blocked: 'blocked' } as const; -export type ListAIToolExecutionsStatusEnum = typeof ListAIToolExecutionsStatusEnum[keyof typeof ListAIToolExecutionsStatusEnum]; +export type ListTasksStatusEnum = typeof ListTasksStatusEnum[keyof typeof ListTasksStatusEnum]; /** - * AIVectorDatabaseApi - axios parameter creator + * AIToolsApi - axios parameter creator * @export */ -export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIToolsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') - * @summary Create Vector Database Collection + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID - * @param {CreateVectorCollectionRequest} createVectorCollectionRequest + * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createVectorCollection: async (organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { + getAIOrchestrationStatus: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('createVectorCollection', 'organisation', organisation) - // verify required parameter 'createVectorCollectionRequest' is not null or undefined - assertParamExists('createVectorCollection', 'createVectorCollectionRequest', createVectorCollectionRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('getAIOrchestrationStatus', 'organisation', organisation) + // verify required parameter 'orchestrationId' is not null or undefined + assertParamExists('getAIOrchestrationStatus', 'orchestrationId', orchestrationId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16182,7 +17101,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16192,12 +17111,9 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createVectorCollectionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16205,21 +17121,21 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co }; }, /** - * Deletes a vector database collection and all its documents. This action cannot be undone. - * @summary Delete Collection + * 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 + * @summary Get async tool execution status and result * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} executionId Tool execution identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteVectorCollection: async (organisation: string, collectionId: string, options: RawAxiosRequestConfig = {}): Promise => { + getAIToolExecutionStatus: async (organisation: string, executionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteVectorCollection', 'organisation', organisation) - // verify required parameter 'collectionId' is not null or undefined - assertParamExists('deleteVectorCollection', 'collectionId', collectionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}` + assertParamExists('getAIToolExecutionStatus', 'organisation', organisation) + // verify required parameter 'executionId' is not null or undefined + assertParamExists('getAIToolExecutionStatus', 'executionId', executionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/executions/{executionId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + .replace(`{${"executionId"}}`, encodeURIComponent(String(executionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16227,7 +17143,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16247,21 +17163,19 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co }; }, /** - * Get detailed information about a specific vector database collection. - * @summary Get Collection Details + * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations + * @summary List tool executions for monitoring and debugging * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status + * @param {number} [limit] Maximum number of executions to return * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVectorCollection: async (organisation: string, collectionId: string, options: RawAxiosRequestConfig = {}): Promise => { + listAIToolExecutions: async (organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getVectorCollection', 'organisation', organisation) - // verify required parameter 'collectionId' is not null or undefined - assertParamExists('getVectorCollection', 'collectionId', collectionId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + assertParamExists('listAIToolExecutions', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/executions` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16277,43 +17191,13 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Lists all vector database collections (knowledge bases) for an organization. - * @summary List Vector Database Collections - * @param {string} organisation The organisation ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listVectorCollections: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('listVectorCollections', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (status !== undefined) { + localVarQueryParameter['status'] = status; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } @@ -16327,24 +17211,17 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 - * @summary Semantic Search Query + * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. + * @summary List tool names only (lightweight response) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - queryVectorCollection: async (organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { + listAIToolNames: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('queryVectorCollection', 'organisation', organisation) - // verify required parameter 'collectionId' is not null or undefined - assertParamExists('queryVectorCollection', 'collectionId', collectionId) - // verify required parameter 'queryVectorCollectionRequest' is not null or undefined - assertParamExists('queryVectorCollection', 'queryVectorCollectionRequest', queryVectorCollectionRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + assertParamExists('listAIToolNames', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tools/names` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16352,7 +17229,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16362,12 +17239,9 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(queryVectorCollectionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16375,24 +17249,17 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co }; }, /** - * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. - * @summary Upload Documents to Collection + * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) + * @summary List available built-in tools for function calling * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadVectorDocuments: async (organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { + listAITools: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('uploadVectorDocuments', 'organisation', organisation) - // verify required parameter 'collectionId' is not null or undefined - assertParamExists('uploadVectorDocuments', 'collectionId', collectionId) - // verify required parameter 'uploadVectorDocumentsRequest' is not null or undefined - assertParamExists('uploadVectorDocuments', 'uploadVectorDocumentsRequest', uploadVectorDocumentsRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + assertParamExists('listAITools', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/tools` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16400,7 +17267,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16410,12 +17277,9 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(uploadVectorDocumentsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16426,286 +17290,252 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co }; /** - * AIVectorDatabaseApi - functional programming interface + * AIToolsApi - functional programming interface * @export */ -export const AIVectorDatabaseApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIVectorDatabaseApiAxiosParamCreator(configuration) +export const AIToolsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIToolsApiAxiosParamCreator(configuration) return { /** - * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') - * @summary Create Vector Database Collection - * @param {string} organisation The organisation ID - * @param {CreateVectorCollectionRequest} createVectorCollectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createVectorCollection(organisation, createVectorCollectionRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.createVectorCollection']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Deletes a vector database collection and all its documents. This action cannot be undone. - * @summary Delete Collection + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVectorCollection(organisation, collectionId, options); + async getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAIOrchestrationStatus(organisation, orchestrationId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.deleteVectorCollection']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIToolsApi.getAIOrchestrationStatus']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get detailed information about a specific vector database collection. - * @summary Get Collection Details + * 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 + * @summary Get async tool execution status and result * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} executionId Tool execution identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getVectorCollection(organisation, collectionId, options); + async getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAIToolExecutionStatus(organisation, executionId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.getVectorCollection']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIToolsApi.getAIToolExecutionStatus']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists all vector database collections (knowledge bases) for an organization. - * @summary List Vector Database Collections + * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations + * @summary List tool executions for monitoring and debugging * @param {string} organisation The organisation ID + * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status + * @param {number} [limit] Maximum number of executions to return * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listVectorCollections(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listVectorCollections(organisation, options); + async listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolExecutions(organisation, status, limit, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.listVectorCollections']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAIToolExecutions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 - * @summary Semantic Search Query + * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. + * @summary List tool names only (lightweight response) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options); + async listAIToolNames(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolNames(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.queryVectorCollection']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAIToolNames']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. - * @summary Upload Documents to Collection + * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) + * @summary List available built-in tools for function calling * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options); + async listAITools(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAITools(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.uploadVectorDocuments']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIToolsApi.listAITools']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AIVectorDatabaseApi - factory interface + * AIToolsApi - factory interface * @export */ -export const AIVectorDatabaseApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIVectorDatabaseApiFp(configuration) +export const AIToolsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIToolsApiFp(configuration) return { /** - * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') - * @summary Create Vector Database Collection - * @param {string} organisation The organisation ID - * @param {CreateVectorCollectionRequest} createVectorCollectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createVectorCollection(organisation, createVectorCollectionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Deletes a vector database collection and all its documents. This action cannot be undone. - * @summary Delete Collection + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteVectorCollection(organisation, collectionId, options).then((request) => request(axios, basePath)); + getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(axios, basePath)); }, /** - * Get detailed information about a specific vector database collection. - * @summary Get Collection Details + * 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 + * @summary Get async tool execution status and result * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} executionId Tool execution identifier * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getVectorCollection(organisation, collectionId, options).then((request) => request(axios, basePath)); + getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAIToolExecutionStatus(organisation, executionId, options).then((request) => request(axios, basePath)); }, /** - * Lists all vector database collections (knowledge bases) for an organization. - * @summary List Vector Database Collections + * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations + * @summary List tool executions for monitoring and debugging * @param {string} organisation The organisation ID + * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status + * @param {number} [limit] Maximum number of executions to return * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listVectorCollections(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listVectorCollections(organisation, options).then((request) => request(axios, basePath)); + listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAIToolExecutions(organisation, status, limit, options).then((request) => request(axios, basePath)); }, /** - * 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 - * @summary Semantic Search Query + * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. + * @summary List tool names only (lightweight response) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options).then((request) => request(axios, basePath)); + listAIToolNames(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAIToolNames(organisation, options).then((request) => request(axios, basePath)); }, /** - * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. - * @summary Upload Documents to Collection + * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) + * @summary List available built-in tools for function calling * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options).then((request) => request(axios, basePath)); + listAITools(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAITools(organisation, options).then((request) => request(axios, basePath)); }, }; }; /** - * AIVectorDatabaseApi - object-oriented interface + * AIToolsApi - object-oriented interface * @export - * @class AIVectorDatabaseApi + * @class AIToolsApi * @extends {BaseAPI} */ -export class AIVectorDatabaseApi extends BaseAPI { - /** - * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') - * @summary Create Vector Database Collection - * @param {string} organisation The organisation ID - * @param {CreateVectorCollectionRequest} createVectorCollectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AIVectorDatabaseApi - */ - public createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).createVectorCollection(organisation, createVectorCollectionRequest, options).then((request) => request(this.axios, this.basePath)); - } - +export class AIToolsApi extends BaseAPI { /** - * Deletes a vector database collection and all its documents. This action cannot be undone. - * @summary Delete Collection + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIVectorDatabaseApi + * @memberof AIToolsApi */ - public deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).deleteVectorCollection(organisation, collectionId, options).then((request) => request(this.axios, this.basePath)); + public getAIOrchestrationStatus(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIToolsApiFp(this.configuration).getAIOrchestrationStatus(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); } /** - * Get detailed information about a specific vector database collection. - * @summary Get Collection Details + * 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 + * @summary Get async tool execution status and result * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID + * @param {string} executionId Tool execution identifier * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIVectorDatabaseApi + * @memberof AIToolsApi */ - public getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).getVectorCollection(organisation, collectionId, options).then((request) => request(this.axios, this.basePath)); + public getAIToolExecutionStatus(organisation: string, executionId: string, options?: RawAxiosRequestConfig) { + return AIToolsApiFp(this.configuration).getAIToolExecutionStatus(organisation, executionId, options).then((request) => request(this.axios, this.basePath)); } /** - * Lists all vector database collections (knowledge bases) for an organization. - * @summary List Vector Database Collections + * Lists recent async tool executions for an organization. Useful for debugging, monitoring, and building admin UIs. * * **Query Patterns:** * - All recent executions: `GET /ai/tools/executions` * - Filter by status: `GET /ai/tools/executions?status=running` * - Limit results: `GET /ai/tools/executions?limit=20` * * **Results:** * - Ordered by creation time (newest first) * - Limited to 50 by default (configurable via `limit` parameter) * - Only shows executions not yet expired (24h TTL) * * **Use Cases:** * - Monitor all active tool executions * - Debug failed executions * - Build admin dashboards * - Track tool usage patterns * - Audit async operations + * @summary List tool executions for monitoring and debugging * @param {string} organisation The organisation ID + * @param {ListAIToolExecutionsStatusEnum} [status] Filter by execution status + * @param {number} [limit] Maximum number of executions to return * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIVectorDatabaseApi + * @memberof AIToolsApi */ - public listVectorCollections(organisation: string, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).listVectorCollections(organisation, options).then((request) => request(this.axios, this.basePath)); + public listAIToolExecutions(organisation: string, status?: ListAIToolExecutionsStatusEnum, limit?: number, options?: RawAxiosRequestConfig) { + return AIToolsApiFp(this.configuration).listAIToolExecutions(organisation, status, limit, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 - * @summary Semantic Search Query + * Retrieves just the names of available built-in tools. Useful for quick validation or UI dropdown population without the full tool specifications. + * @summary List tool names only (lightweight response) * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIVectorDatabaseApi + * @memberof AIToolsApi */ - public queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options).then((request) => request(this.axios, this.basePath)); + public listAIToolNames(organisation: string, options?: RawAxiosRequestConfig) { + return AIToolsApiFp(this.configuration).listAIToolNames(organisation, options).then((request) => request(this.axios, this.basePath)); } /** - * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. - * @summary Upload Documents to Collection + * Retrieves all available built-in tools that can be used with function calling. These tools can be included in `toolConfig` when making AI inference requests. * * **Available Built-in Tools:** * - `get_weather`: Get current weather for a location using Open-Meteo API * - `calculate`: Perform basic mathematical calculations (add, subtract, multiply, divide) * - `search_web`: Search the web for information (mock implementation) * - `generate_image`: Generate images with Amazon Nova Canvas (async execution, 10-15s typical runtime) * * **Use Cases:** * - Discover available tools dynamically without hardcoding * - Get complete tool specifications including input schemas * - Build UI for tool selection * - Validate tool names before sending requests * * **Dynamic Tool Discovery:** * This endpoint enables clients to: * 1. Fetch all available tools on page load * 2. Display tool capabilities to users * 3. Filter tools based on user permissions * 4. Use `allowedTools` whitelist for security * * **Alternative Endpoint:** * - `GET /ai/tools/names` - Returns only tool names (faster, lighter response) + * @summary List available built-in tools for function calling * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID - * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIVectorDatabaseApi + * @memberof AIToolsApi */ - public uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig) { - return AIVectorDatabaseApiFp(this.configuration).uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options).then((request) => request(this.axios, this.basePath)); + public listAITools(organisation: string, options?: RawAxiosRequestConfig) { + return AIToolsApiFp(this.configuration).listAITools(organisation, options).then((request) => request(this.axios, this.basePath)); } } +/** + * @export + */ +export const ListAIToolExecutionsStatusEnum = { + Pending: 'pending', + Running: 'running', + Complete: 'complete', + Failed: 'failed' +} as const; +export type ListAIToolExecutionsStatusEnum = typeof ListAIToolExecutionsStatusEnum[keyof typeof ListAIToolExecutionsStatusEnum]; /** - * ApplicationsApi - axios parameter creator + * AIVectorDatabaseApi - axios parameter creator * @export */ -export const ApplicationsApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @summary Create a new application + * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') + * @summary Create Vector Database Collection * @param {string} organisation The organisation ID - * @param {CreateApplicationRequest} createApplicationRequest + * @param {CreateVectorCollectionRequest} createVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createApplication: async (organisation: string, createApplicationRequest: CreateApplicationRequest, options: RawAxiosRequestConfig = {}): Promise => { + createVectorCollection: async (organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('createApplication', 'organisation', organisation) - // verify required parameter 'createApplicationRequest' is not null or undefined - assertParamExists('createApplication', 'createApplicationRequest', createApplicationRequest) - const localVarPath = `/api/v3/organizations/{organisation}/applications` + assertParamExists('createVectorCollection', 'organisation', organisation) + // verify required parameter 'createVectorCollectionRequest' is not null or undefined + assertParamExists('createVectorCollection', 'createVectorCollectionRequest', createVectorCollectionRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -16729,7 +17559,7 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createApplicationRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createVectorCollectionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16737,21 +17567,21 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * - * @summary Delete an application + * Deletes a vector database collection and all its documents. This action cannot be undone. + * @summary Delete Collection * @param {string} organisation The organisation ID - * @param {string} application The application ID + * @param {string} collectionId The collection ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteApplication: async (organisation: string, application: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteVectorCollection: async (organisation: string, collectionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteApplication', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('deleteApplication', 'application', application) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}` + assertParamExists('deleteVectorCollection', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('deleteVectorCollection', 'collectionId', collectionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))); + .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16779,21 +17609,24 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * - * @summary Get a single application - * @param {string} organisation The organisation ID - * @param {string} application The application ID + * Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: \'drupal_entity_id\'` to delete all chunks for specific entities * - `field: \'drupal_long_id\'` to delete specific chunks + * @summary Delete Documents from Collection + * @param {string} organisation Organisation machine name + * @param {string} collectionId Collection UUID + * @param {DeleteVectorDocumentsRequest} deleteVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getApplication: async (organisation: string, application: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteVectorDocuments: async (organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getApplication', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('getApplication', 'application', application) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}` + assertParamExists('deleteVectorDocuments', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('deleteVectorDocuments', 'collectionId', collectionId) + // verify required parameter 'deleteVectorDocumentsRequest' is not null or undefined + assertParamExists('deleteVectorDocuments', 'deleteVectorDocumentsRequest', deleteVectorDocumentsRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))); + .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16801,7 +17634,7 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16811,9 +17644,12 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteVectorDocumentsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16821,17 +17657,21 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * - * @summary Get ECR login credentials + * Get detailed information about a specific vector database collection. + * @summary Get Collection Details * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getEcrLoginCredentials: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + getVectorCollection: async (organisation: string, collectionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getEcrLoginCredentials', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/applications/ecr-login` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('getVectorCollection', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('getVectorCollection', 'collectionId', collectionId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16859,16 +17699,16 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * - * @summary Get all applications for an organisation + * Lists all vector database collections (knowledge bases) for an organization. + * @summary List Vector Database Collections * @param {string} organisation The organisation ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listApplications: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + listVectorCollections: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listApplications', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/applications` + assertParamExists('listVectorCollections', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -16896,254 +17736,1396 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config options: localVarRequestOptions, }; }, - } -}; - -/** - * ApplicationsApi - functional programming interface - * @export - */ -export const ApplicationsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ApplicationsApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Create a new application - * @param {string} organisation The organisation ID - * @param {CreateApplicationRequest} createApplicationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createApplication(organisation, createApplicationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.createApplication']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** - * - * @summary Delete an application + * 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 + * @summary Semantic Search Query * @param {string} organisation The organisation ID - * @param {string} application The application ID + * @param {string} collectionId The collection ID + * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApplication(organisation, application, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.deleteApplication']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + queryVectorCollection: async (organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('queryVectorCollection', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('queryVectorCollection', 'collectionId', collectionId) + // verify required parameter 'queryVectorCollectionRequest' is not null or undefined + assertParamExists('queryVectorCollection', 'queryVectorCollectionRequest', queryVectorCollectionRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(queryVectorCollectionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * - * @summary Get a single application + * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. + * @summary Upload Documents to Collection * @param {string} organisation The organisation ID - * @param {string} application The application ID + * @param {string} collectionId The collection ID + * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getApplication(organisation, application, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.getApplication']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Get ECR login credentials + uploadVectorDocuments: async (organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('uploadVectorDocuments', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('uploadVectorDocuments', 'collectionId', collectionId) + // verify required parameter 'uploadVectorDocumentsRequest' is not null or undefined + assertParamExists('uploadVectorDocuments', 'uploadVectorDocumentsRequest', uploadVectorDocumentsRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(uploadVectorDocumentsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AIVectorDatabaseApi - functional programming interface + * @export + */ +export const AIVectorDatabaseApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIVectorDatabaseApiAxiosParamCreator(configuration) + return { + /** + * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') + * @summary Create Vector Database Collection + * @param {string} organisation The organisation ID + * @param {CreateVectorCollectionRequest} createVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createVectorCollection(organisation, createVectorCollectionRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.createVectorCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a vector database collection and all its documents. This action cannot be undone. + * @summary Delete Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVectorCollection(organisation, collectionId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.deleteVectorCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: \'drupal_entity_id\'` to delete all chunks for specific entities * - `field: \'drupal_long_id\'` to delete specific chunks + * @summary Delete Documents from Collection + * @param {string} organisation Organisation machine name + * @param {string} collectionId Collection UUID + * @param {DeleteVectorDocumentsRequest} deleteVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteVectorDocuments(organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVectorDocuments(organisation, collectionId, deleteVectorDocumentsRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.deleteVectorDocuments']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get detailed information about a specific vector database collection. + * @summary Get Collection Details + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getVectorCollection(organisation, collectionId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.getVectorCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists all vector database collections (knowledge bases) for an organization. + * @summary List Vector Database Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listVectorCollections(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listVectorCollections(organisation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.listVectorCollections']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 + * @summary Semantic Search Query + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.queryVectorCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. + * @summary Upload Documents to Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.uploadVectorDocuments']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AIVectorDatabaseApi - factory interface + * @export + */ +export const AIVectorDatabaseApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIVectorDatabaseApiFp(configuration) + return { + /** + * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') + * @summary Create Vector Database Collection + * @param {string} organisation The organisation ID + * @param {CreateVectorCollectionRequest} createVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createVectorCollection(organisation, createVectorCollectionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a vector database collection and all its documents. This action cannot be undone. + * @summary Delete Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteVectorCollection(organisation, collectionId, options).then((request) => request(axios, basePath)); + }, + /** + * Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: \'drupal_entity_id\'` to delete all chunks for specific entities * - `field: \'drupal_long_id\'` to delete specific chunks + * @summary Delete Documents from Collection + * @param {string} organisation Organisation machine name + * @param {string} collectionId Collection UUID + * @param {DeleteVectorDocumentsRequest} deleteVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteVectorDocuments(organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteVectorDocuments(organisation, collectionId, deleteVectorDocumentsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get detailed information about a specific vector database collection. + * @summary Get Collection Details + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getVectorCollection(organisation, collectionId, options).then((request) => request(axios, basePath)); + }, + /** + * Lists all vector database collections (knowledge bases) for an organization. + * @summary List Vector Database Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listVectorCollections(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listVectorCollections(organisation, options).then((request) => request(axios, basePath)); + }, + /** + * 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 + * @summary Semantic Search Query + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. + * @summary Upload Documents to Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AIVectorDatabaseApi - object-oriented interface + * @export + * @class AIVectorDatabaseApi + * @extends {BaseAPI} + */ +export class AIVectorDatabaseApi extends BaseAPI { + /** + * Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * **Use Cases:** * - Product documentation (\'docs\') * - Company policies (\'policies\') * - Support knowledge base (\'support\') * - Technical specifications (\'specs\') + * @summary Create Vector Database Collection + * @param {string} organisation The organisation ID + * @param {CreateVectorCollectionRequest} createVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public createVectorCollection(organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).createVectorCollection(organisation, createVectorCollectionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a vector database collection and all its documents. This action cannot be undone. + * @summary Delete Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public deleteVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).deleteVectorCollection(organisation, collectionId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: \'drupal_entity_id\'` to delete all chunks for specific entities * - `field: \'drupal_long_id\'` to delete specific chunks + * @summary Delete Documents from Collection + * @param {string} organisation Organisation machine name + * @param {string} collectionId Collection UUID + * @param {DeleteVectorDocumentsRequest} deleteVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public deleteVectorDocuments(organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).deleteVectorDocuments(organisation, collectionId, deleteVectorDocumentsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get detailed information about a specific vector database collection. + * @summary Get Collection Details + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public getVectorCollection(organisation: string, collectionId: string, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).getVectorCollection(organisation, collectionId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists all vector database collections (knowledge bases) for an organization. + * @summary List Vector Database Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public listVectorCollections(organisation: string, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).listVectorCollections(organisation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 + * @summary Semantic Search Query + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {QueryVectorCollectionRequest} queryVectorCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public queryVectorCollection(organisation: string, collectionId: string, queryVectorCollectionRequest: QueryVectorCollectionRequest, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).queryVectorCollection(organisation, collectionId, queryVectorCollectionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection\'s embedding model, and stored. * * **Supported Content:** * - Plain text content * - URLs to fetch content from * - Markdown documents * * **Metadata:** * Each document can include metadata (title, source_url, section, tags) that is returned with search results. + * @summary Upload Documents to Collection + * @param {string} organisation The organisation ID + * @param {string} collectionId The collection ID + * @param {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public uploadVectorDocuments(organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).uploadVectorDocuments(organisation, collectionId, uploadVectorDocumentsRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ApplicationsApi - axios parameter creator + * @export + */ +export const ApplicationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a new application + * @param {string} organisation The organisation ID + * @param {CreateApplicationRequest} createApplicationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createApplication: async (organisation: string, createApplicationRequest: CreateApplicationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('createApplication', 'organisation', organisation) + // verify required parameter 'createApplicationRequest' is not null or undefined + assertParamExists('createApplication', 'createApplicationRequest', createApplicationRequest) + const localVarPath = `/api/v3/organizations/{organisation}/applications` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createApplicationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete an application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteApplication: async (organisation: string, application: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('deleteApplication', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('deleteApplication', 'application', application) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a single application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplication: async (organisation: string, application: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getApplication', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('getApplication', 'application', application) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get ECR login credentials + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEcrLoginCredentials: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getEcrLoginCredentials', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/applications/ecr-login` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get all applications for an organisation + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listApplications: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listApplications', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/applications` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ApplicationsApi - functional programming interface + * @export + */ +export const ApplicationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ApplicationsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a new application + * @param {string} organisation The organisation ID + * @param {CreateApplicationRequest} createApplicationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createApplication(organisation, createApplicationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.createApplication']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Delete an application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApplication(organisation, application, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.deleteApplication']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get a single application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getApplication(organisation, application, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.getApplication']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get ECR login credentials + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getEcrLoginCredentials(organisation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.getEcrLoginCredentials']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get all applications for an organisation + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listApplications(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listApplications(organisation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.listApplications']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ApplicationsApi - factory interface + * @export + */ +export const ApplicationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ApplicationsApiFp(configuration) + return { + /** + * + * @summary Create a new application + * @param {string} organisation The organisation ID + * @param {CreateApplicationRequest} createApplicationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createApplication(organisation, createApplicationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Delete an application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteApplication(organisation, application, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a single application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getApplication(organisation, application, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get ECR login credentials + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getEcrLoginCredentials(organisation, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get all applications for an organisation + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listApplications(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listApplications(organisation, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ApplicationsApi - object-oriented interface + * @export + * @class ApplicationsApi + * @extends {BaseAPI} + */ +export class ApplicationsApi extends BaseAPI { + /** + * + * @summary Create a new application + * @param {string} organisation The organisation ID + * @param {CreateApplicationRequest} createApplicationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).createApplication(organisation, createApplicationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Delete an application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).deleteApplication(organisation, application, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a single application + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).getApplication(organisation, application, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get ECR login credentials + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).getEcrLoginCredentials(organisation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get all applications for an organisation + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public listApplications(organisation: string, options?: RawAxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).listApplications(organisation, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * BackupManagementApi - axios parameter creator + * @export + */ +export const BackupManagementApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a backup for an environment + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {CreateBackupTypeEnum} type The backup type + * @param {CreateBackupRequest} [createBackupRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBackup: async (organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('createBackup', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('createBackup', 'application', application) + // verify required parameter 'environment' is not null or undefined + assertParamExists('createBackup', 'environment', environment) + // verify required parameter 'type' is not null or undefined + assertParamExists('createBackup', 'type', type) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))) + .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) + .replace(`{${"type"}}`, encodeURIComponent(String(type))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createBackupRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete a backup + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DeleteBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBackup: async (organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('deleteBackup', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('deleteBackup', 'application', application) + // verify required parameter 'environment' is not null or undefined + assertParamExists('deleteBackup', 'environment', environment) + // verify required parameter 'type' is not null or undefined + assertParamExists('deleteBackup', 'type', type) + // verify required parameter 'backupId' is not null or undefined + assertParamExists('deleteBackup', 'backupId', backupId) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))) + .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) + .replace(`{${"type"}}`, encodeURIComponent(String(type))) + .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Generate a download URL for a backup + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DownloadBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downloadBackup: async (organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('downloadBackup', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('downloadBackup', 'application', application) + // verify required parameter 'environment' is not null or undefined + assertParamExists('downloadBackup', 'environment', environment) + // verify required parameter 'type' is not null or undefined + assertParamExists('downloadBackup', 'type', type) + // verify required parameter 'backupId' is not null or undefined + assertParamExists('downloadBackup', 'backupId', backupId) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}/download` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))) + .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) + .replace(`{${"type"}}`, encodeURIComponent(String(type))) + .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. + * @summary List backups for an environment + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {ListBackupsTypeEnum} type The backup type + * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) + * @param {number} [limit] Maximum number of backups to return (max 100) + * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) + * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) + * @param {ListBackupsStatusEnum} [status] Filter backups by status + * @param {string} [nextToken] Token for retrieving the next page of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBackups: async (organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listBackups', 'organisation', organisation) + // verify required parameter 'application' is not null or undefined + assertParamExists('listBackups', 'application', application) + // verify required parameter 'environment' is not null or undefined + assertParamExists('listBackups', 'environment', environment) + // verify required parameter 'type' is not null or undefined + assertParamExists('listBackups', 'type', type) + const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"application"}}`, encodeURIComponent(String(application))) + .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) + .replace(`{${"type"}}`, encodeURIComponent(String(type))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (createdBefore !== undefined) { + localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? + (createdBefore as any).toISOString() : + createdBefore; + } + + if (createdAfter !== undefined) { + localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? + (createdAfter as any).toISOString() : + createdAfter; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BackupManagementApi - functional programming interface + * @export + */ +export const BackupManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BackupManagementApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a backup for an environment * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {CreateBackupTypeEnum} type The backup type + * @param {CreateBackupRequest} [createBackupRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getEcrLoginCredentials(organisation, options); + async createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBackup(organisation, application, environment, type, createBackupRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.getEcrLoginCredentials']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.createBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Get all applications for an organisation + * @summary Delete a backup * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DeleteBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listApplications(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listApplications(organisation, options); + async deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackup(organisation, application, environment, type, backupId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApplicationsApi.listApplications']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.deleteBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - } -}; - -/** - * ApplicationsApi - factory interface - * @export - */ -export const ApplicationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ApplicationsApiFp(configuration) - return { /** * - * @summary Create a new application + * @summary Generate a download URL for a backup * @param {string} organisation The organisation ID - * @param {CreateApplicationRequest} createApplicationRequest + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DownloadBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createApplication(organisation, createApplicationRequest, options).then((request) => request(axios, basePath)); + async downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadBackup(organisation, application, environment, type, backupId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.downloadBackup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Delete an application + * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. + * @summary List backups for an environment * @param {string} organisation The organisation ID * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {ListBackupsTypeEnum} type The backup type + * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) + * @param {number} [limit] Maximum number of backups to return (max 100) + * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) + * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) + * @param {ListBackupsStatusEnum} [status] Filter backups by status + * @param {string} [nextToken] Token for retrieving the next page of results * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteApplication(organisation, application, options).then((request) => request(axios, basePath)); + async listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.listBackups']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * BackupManagementApi - factory interface + * @export + */ +export const BackupManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BackupManagementApiFp(configuration) + return { /** * - * @summary Get a single application + * @summary Create a backup for an environment * @param {string} organisation The organisation ID * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {CreateBackupTypeEnum} type The backup type + * @param {CreateBackupRequest} [createBackupRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getApplication(organisation, application, options).then((request) => request(axios, basePath)); + createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createBackup(organisation, application, environment, type, createBackupRequest, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get ECR login credentials + * @summary Delete a backup * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DeleteBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getEcrLoginCredentials(organisation, options).then((request) => request(axios, basePath)); + deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteBackup(organisation, application, environment, type, backupId, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get all applications for an organisation + * @summary Generate a download URL for a backup * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DownloadBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listApplications(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.listApplications(organisation, options).then((request) => request(axios, basePath)); + downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.downloadBackup(organisation, application, environment, type, backupId, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. + * @summary List backups for an environment + * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {ListBackupsTypeEnum} type The backup type + * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) + * @param {number} [limit] Maximum number of backups to return (max 100) + * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) + * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) + * @param {ListBackupsStatusEnum} [status] Filter backups by status + * @param {string} [nextToken] Token for retrieving the next page of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options).then((request) => request(axios, basePath)); }, }; }; /** - * ApplicationsApi - object-oriented interface + * BackupManagementApi - object-oriented interface * @export - * @class ApplicationsApi + * @class BackupManagementApi * @extends {BaseAPI} */ -export class ApplicationsApi extends BaseAPI { - /** - * - * @summary Create a new application - * @param {string} organisation The organisation ID - * @param {CreateApplicationRequest} createApplicationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ApplicationsApi - */ - public createApplication(organisation: string, createApplicationRequest: CreateApplicationRequest, options?: RawAxiosRequestConfig) { - return ApplicationsApiFp(this.configuration).createApplication(organisation, createApplicationRequest, options).then((request) => request(this.axios, this.basePath)); - } - +export class BackupManagementApi extends BaseAPI { /** * - * @summary Delete an application + * @summary Create a backup for an environment * @param {string} organisation The organisation ID * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {CreateBackupTypeEnum} type The backup type + * @param {CreateBackupRequest} [createBackupRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApplicationsApi + * @memberof BackupManagementApi */ - public deleteApplication(organisation: string, application: string, options?: RawAxiosRequestConfig) { - return ApplicationsApiFp(this.configuration).deleteApplication(organisation, application, options).then((request) => request(this.axios, this.basePath)); + public createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig) { + return BackupManagementApiFp(this.configuration).createBackup(organisation, application, environment, type, createBackupRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get a single application + * @summary Delete a backup * @param {string} organisation The organisation ID * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DeleteBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApplicationsApi + * @memberof BackupManagementApi */ - public getApplication(organisation: string, application: string, options?: RawAxiosRequestConfig) { - return ApplicationsApiFp(this.configuration).getApplication(organisation, application, options).then((request) => request(this.axios, this.basePath)); + public deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig) { + return BackupManagementApiFp(this.configuration).deleteBackup(organisation, application, environment, type, backupId, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get ECR login credentials + * @summary Generate a download URL for a backup * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {DownloadBackupTypeEnum} type The backup type + * @param {string} backupId The backup ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApplicationsApi + * @memberof BackupManagementApi */ - public getEcrLoginCredentials(organisation: string, options?: RawAxiosRequestConfig) { - return ApplicationsApiFp(this.configuration).getEcrLoginCredentials(organisation, options).then((request) => request(this.axios, this.basePath)); + public downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig) { + return BackupManagementApiFp(this.configuration).downloadBackup(organisation, application, environment, type, backupId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get all applications for an organisation + * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. + * @summary List backups for an environment * @param {string} organisation The organisation ID + * @param {string} application The application ID + * @param {string} environment The environment ID + * @param {ListBackupsTypeEnum} type The backup type + * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) + * @param {number} [limit] Maximum number of backups to return (max 100) + * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) + * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) + * @param {ListBackupsStatusEnum} [status] Filter backups by status + * @param {string} [nextToken] Token for retrieving the next page of results * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApplicationsApi + * @memberof BackupManagementApi */ - public listApplications(organisation: string, options?: RawAxiosRequestConfig) { - return ApplicationsApiFp(this.configuration).listApplications(organisation, options).then((request) => request(this.axios, this.basePath)); + public listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig) { + return BackupManagementApiFp(this.configuration).listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options).then((request) => request(this.axios, this.basePath)); } } +/** + * @export + */ +export const CreateBackupTypeEnum = { + Database: 'database', + Filesystem: 'filesystem' +} as const; +export type CreateBackupTypeEnum = typeof CreateBackupTypeEnum[keyof typeof CreateBackupTypeEnum]; +/** + * @export + */ +export const DeleteBackupTypeEnum = { + Database: 'database', + Filesystem: 'filesystem' +} as const; +export type DeleteBackupTypeEnum = typeof DeleteBackupTypeEnum[keyof typeof DeleteBackupTypeEnum]; +/** + * @export + */ +export const DownloadBackupTypeEnum = { + Database: 'database', + Filesystem: 'filesystem' +} as const; +export type DownloadBackupTypeEnum = typeof DownloadBackupTypeEnum[keyof typeof DownloadBackupTypeEnum]; +/** + * @export + */ +export const ListBackupsTypeEnum = { + Database: 'database', + Filesystem: 'filesystem' +} as const; +export type ListBackupsTypeEnum = typeof ListBackupsTypeEnum[keyof typeof ListBackupsTypeEnum]; +/** + * @export + */ +export const ListBackupsOrderEnum = { + Asc: 'asc', + Desc: 'desc' +} as const; +export type ListBackupsOrderEnum = typeof ListBackupsOrderEnum[keyof typeof ListBackupsOrderEnum]; +/** + * @export + */ +export const ListBackupsStatusEnum = { + Completed: 'completed', + Failed: 'failed', + Running: 'running' +} as const; +export type ListBackupsStatusEnum = typeof ListBackupsStatusEnum[keyof typeof ListBackupsStatusEnum]; /** - * BackupManagementApi - axios parameter creator + * CDNMetricsApi - axios parameter creator * @export */ -export const BackupManagementApiAxiosParamCreator = function (configuration?: Configuration) { +export const CDNMetricsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @summary Create a backup for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {CreateBackupTypeEnum} type The backup type - * @param {CreateBackupRequest} [createBackupRequest] + * Returns the last 30 days of daily metrics data + * @summary Get daily metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetDailyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createBackup: async (organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('createBackup', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('createBackup', 'application', application) - // verify required parameter 'environment' is not null or undefined - assertParamExists('createBackup', 'environment', environment) - // verify required parameter 'type' is not null or undefined - assertParamExists('createBackup', 'type', type) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))) - .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) - .replace(`{${"type"}}`, encodeURIComponent(String(type))); + getDailyMetrics: async (organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetDailyMetricsTimestampFormatEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organization' is not null or undefined + assertParamExists('getDailyMetrics', 'organization', organization) + // verify required parameter 'project' is not null or undefined + assertParamExists('getDailyMetrics', 'project', project) + const localVarPath = `/v2/organizations/{organization}/projects/{project}/metrics/daily` + .replace(`{${"organization"}}`, encodeURIComponent(String(organization))) + .replace(`{${"project"}}`, encodeURIComponent(String(project))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17151,7 +19133,7 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -17159,62 +19141,17 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createBackupRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Delete a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DeleteBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteBackup: async (organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteBackup', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('deleteBackup', 'application', application) - // verify required parameter 'environment' is not null or undefined - assertParamExists('deleteBackup', 'environment', environment) - // verify required parameter 'type' is not null or undefined - assertParamExists('deleteBackup', 'type', type) - // verify required parameter 'backupId' is not null or undefined - assertParamExists('deleteBackup', 'backupId', backupId) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))) - .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) - .replace(`{${"type"}}`, encodeURIComponent(String(type))) - .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (domain !== undefined) { + localVarQueryParameter['domain'] = domain; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + if (metrics) { + localVarQueryParameter['metrics[]'] = metrics; + } - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (timestampFormat !== undefined) { + localVarQueryParameter['timestamp_format'] = timestampFormat; + } @@ -17228,33 +19165,24 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * - * @summary Generate a download URL for a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DownloadBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last hour of minute-by-minute metrics data + * @summary Get hourly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetHourlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadBackup: async (organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('downloadBackup', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('downloadBackup', 'application', application) - // verify required parameter 'environment' is not null or undefined - assertParamExists('downloadBackup', 'environment', environment) - // verify required parameter 'type' is not null or undefined - assertParamExists('downloadBackup', 'type', type) - // verify required parameter 'backupId' is not null or undefined - assertParamExists('downloadBackup', 'backupId', backupId) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}/download` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))) - .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) - .replace(`{${"type"}}`, encodeURIComponent(String(type))) - .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); + getHourlyMetrics: async (organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetHourlyMetricsTimestampFormatEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organization' is not null or undefined + assertParamExists('getHourlyMetrics', 'organization', organization) + // verify required parameter 'project' is not null or undefined + assertParamExists('getHourlyMetrics', 'project', project) + const localVarPath = `/v2/organizations/{organization}/projects/{project}/metrics/hourly` + .replace(`{${"organization"}}`, encodeURIComponent(String(organization))) + .replace(`{${"project"}}`, encodeURIComponent(String(project))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17270,6 +19198,18 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (domain !== undefined) { + localVarQueryParameter['domain'] = domain; + } + + if (metrics) { + localVarQueryParameter['metrics[]'] = metrics; + } + + if (timestampFormat !== undefined) { + localVarQueryParameter['timestamp_format'] = timestampFormat; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17282,35 +19222,24 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co }; }, /** - * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. - * @summary List backups for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {ListBackupsTypeEnum} type The backup type - * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) - * @param {number} [limit] Maximum number of backups to return (max 100) - * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) - * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) - * @param {ListBackupsStatusEnum} [status] Filter backups by status - * @param {string} [nextToken] Token for retrieving the next page of results + * Returns the last 12 months of monthly metrics data + * @summary Get monthly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetMonthlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listBackups: async (organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('listBackups', 'organisation', organisation) - // verify required parameter 'application' is not null or undefined - assertParamExists('listBackups', 'application', application) - // verify required parameter 'environment' is not null or undefined - assertParamExists('listBackups', 'environment', environment) - // verify required parameter 'type' is not null or undefined - assertParamExists('listBackups', 'type', type) - const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"application"}}`, encodeURIComponent(String(application))) - .replace(`{${"environment"}}`, encodeURIComponent(String(environment))) - .replace(`{${"type"}}`, encodeURIComponent(String(type))); + getMonthlyMetrics: async (organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetMonthlyMetricsTimestampFormatEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organization' is not null or undefined + assertParamExists('getMonthlyMetrics', 'organization', organization) + // verify required parameter 'project' is not null or undefined + assertParamExists('getMonthlyMetrics', 'project', project) + const localVarPath = `/v2/organizations/{organization}/projects/{project}/metrics/monthly` + .replace(`{${"organization"}}`, encodeURIComponent(String(organization))) + .replace(`{${"project"}}`, encodeURIComponent(String(project))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17326,32 +19255,16 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (order !== undefined) { - localVarQueryParameter['order'] = order; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (createdBefore !== undefined) { - localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? - (createdBefore as any).toISOString() : - createdBefore; - } - - if (createdAfter !== undefined) { - localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? - (createdAfter as any).toISOString() : - createdAfter; + if (domain !== undefined) { + localVarQueryParameter['domain'] = domain; } - if (status !== undefined) { - localVarQueryParameter['status'] = status; + if (metrics) { + localVarQueryParameter['metrics[]'] = metrics; } - if (nextToken !== undefined) { - localVarQueryParameter['nextToken'] = nextToken; + if (timestampFormat !== undefined) { + localVarQueryParameter['timestamp_format'] = timestampFormat; } @@ -17369,285 +19282,198 @@ export const BackupManagementApiAxiosParamCreator = function (configuration?: Co }; /** - * BackupManagementApi - functional programming interface + * CDNMetricsApi - functional programming interface * @export */ -export const BackupManagementApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = BackupManagementApiAxiosParamCreator(configuration) +export const CDNMetricsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CDNMetricsApiAxiosParamCreator(configuration) return { /** - * - * @summary Create a backup for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {CreateBackupTypeEnum} type The backup type - * @param {CreateBackupRequest} [createBackupRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createBackup(organisation, application, environment, type, createBackupRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.createBackup']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Delete a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DeleteBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last 30 days of daily metrics data + * @summary Get daily metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetDailyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackup(organisation, application, environment, type, backupId, options); + async getDailyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetDailyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDailyMetrics(organization, project, domain, metrics, timestampFormat, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.deleteBackup']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CDNMetricsApi.getDailyMetrics']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Generate a download URL for a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DownloadBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last hour of minute-by-minute metrics data + * @summary Get hourly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetHourlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadBackup(organisation, application, environment, type, backupId, options); + async getHourlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetHourlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHourlyMetrics(organization, project, domain, metrics, timestampFormat, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.downloadBackup']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CDNMetricsApi.getHourlyMetrics']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. - * @summary List backups for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {ListBackupsTypeEnum} type The backup type - * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) - * @param {number} [limit] Maximum number of backups to return (max 100) - * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) - * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) - * @param {ListBackupsStatusEnum} [status] Filter backups by status - * @param {string} [nextToken] Token for retrieving the next page of results + * Returns the last 12 months of monthly metrics data + * @summary Get monthly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetMonthlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options); + async getMonthlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetMonthlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMonthlyMetrics(organization, project, domain, metrics, timestampFormat, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BackupManagementApi.listBackups']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CDNMetricsApi.getMonthlyMetrics']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * BackupManagementApi - factory interface - * @export - */ -export const BackupManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = BackupManagementApiFp(configuration) - return { - /** - * - * @summary Create a backup for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {CreateBackupTypeEnum} type The backup type - * @param {CreateBackupRequest} [createBackupRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createBackup(organisation, application, environment, type, createBackupRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Delete a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DeleteBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * CDNMetricsApi - factory interface + * @export + */ +export const CDNMetricsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CDNMetricsApiFp(configuration) + return { + /** + * Returns the last 30 days of daily metrics data + * @summary Get daily metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetDailyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteBackup(organisation, application, environment, type, backupId, options).then((request) => request(axios, basePath)); + getDailyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetDailyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDailyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Generate a download URL for a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DownloadBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last hour of minute-by-minute metrics data + * @summary Get hourly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetHourlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.downloadBackup(organisation, application, environment, type, backupId, options).then((request) => request(axios, basePath)); + getHourlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetHourlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getHourlyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(axios, basePath)); }, /** - * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. - * @summary List backups for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {ListBackupsTypeEnum} type The backup type - * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) - * @param {number} [limit] Maximum number of backups to return (max 100) - * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) - * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) - * @param {ListBackupsStatusEnum} [status] Filter backups by status - * @param {string} [nextToken] Token for retrieving the next page of results + * Returns the last 12 months of monthly metrics data + * @summary Get monthly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetMonthlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options).then((request) => request(axios, basePath)); + getMonthlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetMonthlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMonthlyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(axios, basePath)); }, }; }; /** - * BackupManagementApi - object-oriented interface + * CDNMetricsApi - object-oriented interface * @export - * @class BackupManagementApi + * @class CDNMetricsApi * @extends {BaseAPI} */ -export class BackupManagementApi extends BaseAPI { - /** - * - * @summary Create a backup for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {CreateBackupTypeEnum} type The backup type - * @param {CreateBackupRequest} [createBackupRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BackupManagementApi - */ - public createBackup(organisation: string, application: string, environment: string, type: CreateBackupTypeEnum, createBackupRequest?: CreateBackupRequest, options?: RawAxiosRequestConfig) { - return BackupManagementApiFp(this.configuration).createBackup(organisation, application, environment, type, createBackupRequest, options).then((request) => request(this.axios, this.basePath)); - } - +export class CDNMetricsApi extends BaseAPI { /** - * - * @summary Delete a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DeleteBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last 30 days of daily metrics data + * @summary Get daily metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetDailyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof BackupManagementApi + * @memberof CDNMetricsApi */ - public deleteBackup(organisation: string, application: string, environment: string, type: DeleteBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig) { - return BackupManagementApiFp(this.configuration).deleteBackup(organisation, application, environment, type, backupId, options).then((request) => request(this.axios, this.basePath)); + public getDailyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetDailyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig) { + return CDNMetricsApiFp(this.configuration).getDailyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Generate a download URL for a backup - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {DownloadBackupTypeEnum} type The backup type - * @param {string} backupId The backup ID + * Returns the last hour of minute-by-minute metrics data + * @summary Get hourly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetHourlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof BackupManagementApi + * @memberof CDNMetricsApi */ - public downloadBackup(organisation: string, application: string, environment: string, type: DownloadBackupTypeEnum, backupId: string, options?: RawAxiosRequestConfig) { - return BackupManagementApiFp(this.configuration).downloadBackup(organisation, application, environment, type, backupId, options).then((request) => request(this.axios, this.basePath)); + public getHourlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetHourlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig) { + return CDNMetricsApiFp(this.configuration).getHourlyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters. - * @summary List backups for an environment - * @param {string} organisation The organisation ID - * @param {string} application The application ID - * @param {string} environment The environment ID - * @param {ListBackupsTypeEnum} type The backup type - * @param {ListBackupsOrderEnum} [order] Sort order for backups by creation date (asc = oldest first, desc = newest first) - * @param {number} [limit] Maximum number of backups to return (max 100) - * @param {string} [createdBefore] Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) - * @param {string} [createdAfter] Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) - * @param {ListBackupsStatusEnum} [status] Filter backups by status - * @param {string} [nextToken] Token for retrieving the next page of results + * Returns the last 12 months of monthly metrics data + * @summary Get monthly metrics + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} [domain] Filter by domain ID or domain name + * @param {Array} [metrics] Metrics to return (default: hits, bytes) + * @param {GetMonthlyMetricsTimestampFormatEnum} [timestampFormat] Timestamp format in response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof BackupManagementApi + * @memberof CDNMetricsApi */ - public listBackups(organisation: string, application: string, environment: string, type: ListBackupsTypeEnum, order?: ListBackupsOrderEnum, limit?: number, createdBefore?: string, createdAfter?: string, status?: ListBackupsStatusEnum, nextToken?: string, options?: RawAxiosRequestConfig) { - return BackupManagementApiFp(this.configuration).listBackups(organisation, application, environment, type, order, limit, createdBefore, createdAfter, status, nextToken, options).then((request) => request(this.axios, this.basePath)); + public getMonthlyMetrics(organization: string, project: string, domain?: string, metrics?: Array, timestampFormat?: GetMonthlyMetricsTimestampFormatEnum, options?: RawAxiosRequestConfig) { + return CDNMetricsApiFp(this.configuration).getMonthlyMetrics(organization, project, domain, metrics, timestampFormat, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const CreateBackupTypeEnum = { - Database: 'database', - Filesystem: 'filesystem' -} as const; -export type CreateBackupTypeEnum = typeof CreateBackupTypeEnum[keyof typeof CreateBackupTypeEnum]; -/** - * @export - */ -export const DeleteBackupTypeEnum = { - Database: 'database', - Filesystem: 'filesystem' -} as const; -export type DeleteBackupTypeEnum = typeof DeleteBackupTypeEnum[keyof typeof DeleteBackupTypeEnum]; -/** - * @export - */ -export const DownloadBackupTypeEnum = { - Database: 'database', - Filesystem: 'filesystem' -} as const; -export type DownloadBackupTypeEnum = typeof DownloadBackupTypeEnum[keyof typeof DownloadBackupTypeEnum]; -/** - * @export - */ -export const ListBackupsTypeEnum = { - Database: 'database', - Filesystem: 'filesystem' +export const GetDailyMetricsTimestampFormatEnum = { + Iso8601: 'iso8601', + Unix: 'unix' } as const; -export type ListBackupsTypeEnum = typeof ListBackupsTypeEnum[keyof typeof ListBackupsTypeEnum]; +export type GetDailyMetricsTimestampFormatEnum = typeof GetDailyMetricsTimestampFormatEnum[keyof typeof GetDailyMetricsTimestampFormatEnum]; /** * @export */ -export const ListBackupsOrderEnum = { - Asc: 'asc', - Desc: 'desc' +export const GetHourlyMetricsTimestampFormatEnum = { + Iso8601: 'iso8601', + Unix: 'unix' } as const; -export type ListBackupsOrderEnum = typeof ListBackupsOrderEnum[keyof typeof ListBackupsOrderEnum]; +export type GetHourlyMetricsTimestampFormatEnum = typeof GetHourlyMetricsTimestampFormatEnum[keyof typeof GetHourlyMetricsTimestampFormatEnum]; /** * @export */ -export const ListBackupsStatusEnum = { - Completed: 'completed', - Failed: 'failed', - Running: 'running' +export const GetMonthlyMetricsTimestampFormatEnum = { + Iso8601: 'iso8601', + Unix: 'unix' } as const; -export type ListBackupsStatusEnum = typeof ListBackupsStatusEnum[keyof typeof ListBackupsStatusEnum]; +export type GetMonthlyMetricsTimestampFormatEnum = typeof GetMonthlyMetricsTimestampFormatEnum[keyof typeof GetMonthlyMetricsTimestampFormatEnum]; /** @@ -22649,6 +24475,58 @@ export const KVApiAxiosParamCreator = function (configuration?: Configuration) { options: localVarRequestOptions, }; }, + /** + * Share a KV store from the source project with a target project. The store will be accessible in the target project. + * @summary Link a KV store to another project + * @param {string} organization Organization identifier + * @param {string} project Source project identifier + * @param {string} storeId KV store identifier + * @param {KVLinkToProjectRequest} kVLinkToProjectRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + kVLinkToProject: async (organization: string, project: string, storeId: string, kVLinkToProjectRequest: KVLinkToProjectRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organization' is not null or undefined + assertParamExists('kVLinkToProject', 'organization', organization) + // verify required parameter 'project' is not null or undefined + assertParamExists('kVLinkToProject', 'project', project) + // verify required parameter 'storeId' is not null or undefined + assertParamExists('kVLinkToProject', 'storeId', storeId) + // verify required parameter 'kVLinkToProjectRequest' is not null or undefined + assertParamExists('kVLinkToProject', 'kVLinkToProjectRequest', kVLinkToProjectRequest) + const localVarPath = `/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link` + .replace(`{${"organization"}}`, encodeURIComponent(String(organization))) + .replace(`{${"project"}}`, encodeURIComponent(String(project))) + .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(kVLinkToProjectRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary List key-value stores @@ -22728,6 +24606,52 @@ export const KVApiAxiosParamCreator = function (configuration?: Configuration) { + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + * @summary Unlink a KV store from this project + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} storeId KV store identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + kVUnlinkFromProject: async (organization: string, project: string, storeId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organization' is not null or undefined + assertParamExists('kVUnlinkFromProject', 'organization', organization) + // verify required parameter 'project' is not null or undefined + assertParamExists('kVUnlinkFromProject', 'project', project) + // verify required parameter 'storeId' is not null or undefined + assertParamExists('kVUnlinkFromProject', 'storeId', storeId) + const localVarPath = `/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link` + .replace(`{${"organization"}}`, encodeURIComponent(String(organization))) + .replace(`{${"project"}}`, encodeURIComponent(String(project))) + .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -22861,6 +24785,22 @@ export const KVApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['KVApi.kVItemsUpdate']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Share a KV store from the source project with a target project. The store will be accessible in the target project. + * @summary Link a KV store to another project + * @param {string} organization Organization identifier + * @param {string} project Source project identifier + * @param {string} storeId KV store identifier + * @param {KVLinkToProjectRequest} kVLinkToProjectRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async kVLinkToProject(organization: string, project: string, storeId: string, kVLinkToProjectRequest: KVLinkToProjectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.kVLinkToProject(organization, project, storeId, kVLinkToProjectRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['KVApi.kVLinkToProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * * @summary List key-value stores @@ -22890,6 +24830,21 @@ export const KVApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['KVApi.kVShow']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + * @summary Unlink a KV store from this project + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} storeId KV store identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async kVUnlinkFromProject(organization: string, project: string, storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.kVUnlinkFromProject(organization, project, storeId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['KVApi.kVUnlinkFromProject']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -22993,6 +24948,19 @@ export const KVApiFactory = function (configuration?: Configuration, basePath?: kVItemsUpdate(organization: string, project: string, storeId: string, key: string, v2StoreItemUpdateRequest: V2StoreItemUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.kVItemsUpdate(organization, project, storeId, key, v2StoreItemUpdateRequest, options).then((request) => request(axios, basePath)); }, + /** + * Share a KV store from the source project with a target project. The store will be accessible in the target project. + * @summary Link a KV store to another project + * @param {string} organization Organization identifier + * @param {string} project Source project identifier + * @param {string} storeId KV store identifier + * @param {KVLinkToProjectRequest} kVLinkToProjectRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + kVLinkToProject(organization: string, project: string, storeId: string, kVLinkToProjectRequest: KVLinkToProjectRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.kVLinkToProject(organization, project, storeId, kVLinkToProjectRequest, options).then((request) => request(axios, basePath)); + }, /** * * @summary List key-value stores @@ -23016,6 +24984,18 @@ export const KVApiFactory = function (configuration?: Configuration, basePath?: kVShow(organization: string, project: string, storeId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.kVShow(organization, project, storeId, options).then((request) => request(axios, basePath)); }, + /** + * Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + * @summary Unlink a KV store from this project + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} storeId KV store identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + kVUnlinkFromProject(organization: string, project: string, storeId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.kVUnlinkFromProject(organization, project, storeId, options).then((request) => request(axios, basePath)); + }, }; }; @@ -23133,6 +25113,21 @@ export class KVApi extends BaseAPI { return KVApiFp(this.configuration).kVItemsUpdate(organization, project, storeId, key, v2StoreItemUpdateRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * Share a KV store from the source project with a target project. The store will be accessible in the target project. + * @summary Link a KV store to another project + * @param {string} organization Organization identifier + * @param {string} project Source project identifier + * @param {string} storeId KV store identifier + * @param {KVLinkToProjectRequest} kVLinkToProjectRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof KVApi + */ + public kVLinkToProject(organization: string, project: string, storeId: string, kVLinkToProjectRequest: KVLinkToProjectRequest, options?: RawAxiosRequestConfig) { + return KVApiFp(this.configuration).kVLinkToProject(organization, project, storeId, kVLinkToProjectRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @summary List key-value stores @@ -23159,6 +25154,20 @@ export class KVApi extends BaseAPI { public kVShow(organization: string, project: string, storeId: string, options?: RawAxiosRequestConfig) { return KVApiFp(this.configuration).kVShow(organization, project, storeId, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + * @summary Unlink a KV store from this project + * @param {string} organization Organization identifier + * @param {string} project Project identifier + * @param {string} storeId KV store identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof KVApi + */ + public kVUnlinkFromProject(organization: string, project: string, storeId: string, options?: RawAxiosRequestConfig) { + return KVApiFp(this.configuration).kVUnlinkFromProject(organization, project, storeId, options).then((request) => request(this.axios, this.basePath)); + } } @@ -23170,8 +25179,8 @@ export class KVApi extends BaseAPI { export const OrchestrationApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * 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 - * @summary Get Orchestration Status + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. @@ -23222,8 +25231,8 @@ export const OrchestrationApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = OrchestrationApiAxiosParamCreator(configuration) return { /** - * 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 - * @summary Get Orchestration Status + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. @@ -23246,8 +25255,8 @@ export const OrchestrationApiFactory = function (configuration?: Configuration, const localVarFp = OrchestrationApiFp(configuration) return { /** - * 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 - * @summary Get Orchestration Status + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. @@ -23267,8 +25276,8 @@ export const OrchestrationApiFactory = function (configuration?: Configuration, */ export class OrchestrationApi extends BaseAPI { /** - * 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 - * @summary Get Orchestration Status + * Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 + * @summary Get Tool Orchestration Status (Async Tool Polling) * @param {string} organisation The organisation ID * @param {string} orchestrationId Orchestration identifier for aggregated async tool executions * @param {*} [options] Override http request option. diff --git a/common.ts b/common.ts index d8d5bbd..d058013 100644 --- a/common.ts +++ b/common.ts @@ -4,7 +4,7 @@ * QuantCDN API * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.10.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/configuration.ts b/configuration.ts index f2ec991..e691ce9 100644 --- a/configuration.ts +++ b/configuration.ts @@ -4,7 +4,7 @@ * QuantCDN API * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.10.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/docs/AIOrchestrationsApi.md b/docs/AIOrchestrationsApi.md new file mode 100644 index 0000000..99d41dd --- /dev/null +++ b/docs/AIOrchestrationsApi.md @@ -0,0 +1,546 @@ +# AIOrchestrationsApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**cancelOrchestration**](#cancelorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/cancel | Cancel Durable Orchestration| +|[**createOrchestration**](#createorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations | Create Durable Orchestration| +|[**deleteOrchestration**](#deleteorchestration) | **DELETE** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Delete Durable Orchestration| +|[**getOrchestration**](#getorchestration) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Get Durable Orchestration| +|[**listOrchestrationBatches**](#listorchestrationbatches) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/batches | List Orchestration Batches| +|[**listOrchestrations**](#listorchestrations) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations | List Durable Orchestrations| +|[**pauseOrchestration**](#pauseorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/pause | Pause Durable Orchestration| +|[**resumeOrchestration**](#resumeorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/resume | Resume Durable Orchestration| +|[**startOrchestration**](#startorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/start | Start Durable Orchestration| + +# **cancelOrchestration** +> object cancelOrchestration() + +Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.cancelOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Orchestration cancelled | - | +|**400** | Orchestration already completed/cancelled | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to cancel orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createOrchestration** +> object createOrchestration(createOrchestrationRequest) + +Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration, + CreateOrchestrationRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let createOrchestrationRequest: CreateOrchestrationRequest; // + +const { status, data } = await apiInstance.createOrchestration( + organisation, + createOrchestrationRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createOrchestrationRequest** | **CreateOrchestrationRequest**| | | +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**201** | Orchestration created | - | +|**400** | Invalid request | - | +|**403** | Access denied | - | +|**500** | Failed to create orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteOrchestration** +> deleteOrchestration() + +Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.deleteOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Orchestration deleted | - | +|**400** | Cannot delete active orchestration | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to delete orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrchestration** +> object getOrchestration() + +Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.getOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Orchestration details | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to get orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listOrchestrationBatches** +> ListOrchestrationBatches200Response listOrchestrationBatches() + +Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) +let limit: number; //Maximum number of batches to return (optional) (default to 20) +let cursor: string; //Pagination cursor from previous response (optional) (default to undefined) + +const { status, data } = await apiInstance.listOrchestrationBatches( + organisation, + orchestrationId, + limit, + cursor +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| +| **limit** | [**number**] | Maximum number of batches to return | (optional) defaults to 20| +| **cursor** | [**string**] | Pagination cursor from previous response | (optional) defaults to undefined| + + +### Return type + +**ListOrchestrationBatches200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Batch history | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to list orchestration batches | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listOrchestrations** +> ListOrchestrations200Response listOrchestrations() + +List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let status: 'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled'; //Filter by orchestration status (optional) (default to undefined) +let limit: number; //Maximum number of results (optional) (default to 20) +let cursor: string; //Pagination cursor from previous response (optional) (default to undefined) + +const { status, data } = await apiInstance.listOrchestrations( + organisation, + status, + limit, + cursor +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **status** | [**'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled'**]**Array<'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled'>** | Filter by orchestration status | (optional) defaults to undefined| +| **limit** | [**number**] | Maximum number of results | (optional) defaults to 20| +| **cursor** | [**string**] | Pagination cursor from previous response | (optional) defaults to undefined| + + +### Return type + +**ListOrchestrations200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | List of orchestrations | - | +|**403** | Access denied | - | +|**500** | Failed to list orchestrations | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **pauseOrchestration** +> object pauseOrchestration() + +Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.pauseOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Orchestration paused | - | +|**400** | Orchestration not running | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to pause orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resumeOrchestration** +> object resumeOrchestration() + +Resume a paused orchestration. Processing continues from where it left off. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.resumeOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Orchestration resumed | - | +|**400** | Orchestration not paused | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to resume orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **startOrchestration** +> object startOrchestration() + +Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + +### Example + +```typescript +import { + AIOrchestrationsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIOrchestrationsApi(configuration); + +let organisation: string; //The organisation machine name (default to undefined) +let orchestrationId: string; //Orchestration identifier (default to undefined) + +const { status, data } = await apiInstance.startOrchestration( + organisation, + orchestrationId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation machine name | defaults to undefined| +| **orchestrationId** | [**string**] | Orchestration identifier | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Orchestration started | - | +|**400** | Orchestration not in pending state | - | +|**403** | Access denied | - | +|**404** | Orchestration not found | - | +|**500** | Failed to start orchestration | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AIToolsApi.md b/docs/AIToolsApi.md index 5936f09..8f510fa 100644 --- a/docs/AIToolsApi.md +++ b/docs/AIToolsApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://dashboard.quantcdn.io* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**getAIOrchestrationStatus**](#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status| +|[**getAIOrchestrationStatus**](#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Tool Orchestration Status (Async Tool Polling)| |[**getAIToolExecutionStatus**](#getaitoolexecutionstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions/{executionId} | Get async tool execution status and result| |[**listAIToolExecutions**](#listaitoolexecutions) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions | List tool executions for monitoring and debugging| |[**listAIToolNames**](#listaitoolnames) | **GET** /api/v3/organizations/{organisation}/ai/tools/names | List tool names only (lightweight response)| @@ -13,7 +13,7 @@ All URIs are relative to *https://dashboard.quantcdn.io* # **getAIOrchestrationStatus** > GetAIOrchestrationStatus200Response getAIOrchestrationStatus() -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 +Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 ### Example diff --git a/docs/AIVectorDatabaseApi.md b/docs/AIVectorDatabaseApi.md index 28c191c..fd77b23 100644 --- a/docs/AIVectorDatabaseApi.md +++ b/docs/AIVectorDatabaseApi.md @@ -6,6 +6,7 @@ All URIs are relative to *https://dashboard.quantcdn.io* |------------- | ------------- | -------------| |[**createVectorCollection**](#createvectorcollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections | Create Vector Database Collection| |[**deleteVectorCollection**](#deletevectorcollection) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Delete Collection| +|[**deleteVectorDocuments**](#deletevectordocuments) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Delete Documents from Collection| |[**getVectorCollection**](#getvectorcollection) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Get Collection Details| |[**listVectorCollections**](#listvectorcollections) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections | List Vector Database Collections| |[**queryVectorCollection**](#queryvectorcollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query| @@ -127,6 +128,68 @@ const { status, data } = await apiInstance.deleteVectorCollection( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **deleteVectorDocuments** +> DeleteVectorDocuments200Response deleteVectorDocuments(deleteVectorDocumentsRequest) + +Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: \'drupal_entity_id\'` to delete all chunks for specific entities * - `field: \'drupal_long_id\'` to delete specific chunks + +### Example + +```typescript +import { + AIVectorDatabaseApi, + Configuration, + DeleteVectorDocumentsRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIVectorDatabaseApi(configuration); + +let organisation: string; //Organisation machine name (default to undefined) +let collectionId: string; //Collection UUID (default to undefined) +let deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest; // + +const { status, data } = await apiInstance.deleteVectorDocuments( + organisation, + collectionId, + deleteVectorDocumentsRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **deleteVectorDocumentsRequest** | **DeleteVectorDocumentsRequest**| | | +| **organisation** | [**string**] | Organisation machine name | defaults to undefined| +| **collectionId** | [**string**] | Collection UUID | defaults to undefined| + + +### Return type + +**DeleteVectorDocuments200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Documents deleted successfully | - | +|**400** | Invalid request - must specify purgeAll, documentIds, or metadata | - | +|**403** | Access denied | - | +|**404** | Collection not found | - | +|**500** | Failed to delete documents | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getVectorCollection** > GetVectorCollection200Response getVectorCollection() diff --git a/docs/CDNMetricsApi.md b/docs/CDNMetricsApi.md new file mode 100644 index 0000000..7622781 --- /dev/null +++ b/docs/CDNMetricsApi.md @@ -0,0 +1,205 @@ +# CDNMetricsApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getDailyMetrics**](#getdailymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/daily | Get daily metrics| +|[**getHourlyMetrics**](#gethourlymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/hourly | Get hourly metrics| +|[**getMonthlyMetrics**](#getmonthlymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/monthly | Get monthly metrics| + +# **getDailyMetrics** +> V2MetricsResponse getDailyMetrics() + +Returns the last 30 days of daily metrics data + +### Example + +```typescript +import { + CDNMetricsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new CDNMetricsApi(configuration); + +let organization: string; //Organization identifier (default to undefined) +let project: string; //Project identifier (default to undefined) +let domain: string; //Filter by domain ID or domain name (optional) (default to undefined) +let metrics: Array; //Metrics to return (default: hits, bytes) (optional) (default to undefined) +let timestampFormat: 'iso8601' | 'unix'; //Timestamp format in response (optional) (default to 'iso8601') + +const { status, data } = await apiInstance.getDailyMetrics( + organization, + project, + domain, + metrics, + timestampFormat +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organization** | [**string**] | Organization identifier | defaults to undefined| +| **project** | [**string**] | Project identifier | defaults to undefined| +| **domain** | [**string**] | Filter by domain ID or domain name | (optional) defaults to undefined| +| **metrics** | **Array<string>** | Metrics to return (default: hits, bytes) | (optional) defaults to undefined| +| **timestampFormat** | [**'iso8601' | 'unix'**]**Array<'iso8601' | 'unix'>** | Timestamp format in response | (optional) defaults to 'iso8601'| + + +### Return type + +**V2MetricsResponse** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Daily metrics data | - | +|**400** | Invalid metric requested | - | +|**404** | No domains found or domain not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getHourlyMetrics** +> V2MetricsResponse getHourlyMetrics() + +Returns the last hour of minute-by-minute metrics data + +### Example + +```typescript +import { + CDNMetricsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new CDNMetricsApi(configuration); + +let organization: string; //Organization identifier (default to undefined) +let project: string; //Project identifier (default to undefined) +let domain: string; //Filter by domain ID or domain name (optional) (default to undefined) +let metrics: Array; //Metrics to return (default: hits, bytes) (optional) (default to undefined) +let timestampFormat: 'iso8601' | 'unix'; //Timestamp format in response (optional) (default to 'iso8601') + +const { status, data } = await apiInstance.getHourlyMetrics( + organization, + project, + domain, + metrics, + timestampFormat +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organization** | [**string**] | Organization identifier | defaults to undefined| +| **project** | [**string**] | Project identifier | defaults to undefined| +| **domain** | [**string**] | Filter by domain ID or domain name | (optional) defaults to undefined| +| **metrics** | **Array<string>** | Metrics to return (default: hits, bytes) | (optional) defaults to undefined| +| **timestampFormat** | [**'iso8601' | 'unix'**]**Array<'iso8601' | 'unix'>** | Timestamp format in response | (optional) defaults to 'iso8601'| + + +### Return type + +**V2MetricsResponse** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Hourly metrics data | - | +|**400** | Invalid metric requested | - | +|**404** | No domains found or domain not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMonthlyMetrics** +> V2MetricsResponse getMonthlyMetrics() + +Returns the last 12 months of monthly metrics data + +### Example + +```typescript +import { + CDNMetricsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new CDNMetricsApi(configuration); + +let organization: string; //Organization identifier (default to undefined) +let project: string; //Project identifier (default to undefined) +let domain: string; //Filter by domain ID or domain name (optional) (default to undefined) +let metrics: Array; //Metrics to return (default: hits, bytes) (optional) (default to undefined) +let timestampFormat: 'iso8601' | 'unix'; //Timestamp format in response (optional) (default to 'iso8601') + +const { status, data } = await apiInstance.getMonthlyMetrics( + organization, + project, + domain, + metrics, + timestampFormat +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organization** | [**string**] | Organization identifier | defaults to undefined| +| **project** | [**string**] | Project identifier | defaults to undefined| +| **domain** | [**string**] | Filter by domain ID or domain name | (optional) defaults to undefined| +| **metrics** | **Array<string>** | Metrics to return (default: hits, bytes) | (optional) defaults to undefined| +| **timestampFormat** | [**'iso8601' | 'unix'**]**Array<'iso8601' | 'unix'>** | Timestamp format in response | (optional) defaults to 'iso8601'| + + +### Return type + +**V2MetricsResponse** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Monthly metrics data | - | +|**400** | Invalid metric requested | - | +|**404** | No domains found or domain not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ChatInferenceRequest.md b/docs/ChatInferenceRequest.md index b8e9ce0..f11dfb5 100644 --- a/docs/ChatInferenceRequest.md +++ b/docs/ChatInferenceRequest.md @@ -17,6 +17,8 @@ Name | Type | Description | Notes **toolConfig** | [**ChatInferenceRequestToolConfig**](ChatInferenceRequestToolConfig.md) | | [optional] [default to undefined] **sessionId** | **string** | Optional session ID for conversation continuity. Omit to use stateless mode, include to continue an existing session. | [optional] [default to undefined] **async** | **boolean** | Enable async/durable execution mode. When true, returns 202 with pollUrl instead of waiting for completion. Use for long-running inference, client-executed tools, or operations >30 seconds. | [optional] [default to false] +**allowedTools** | **Array<string>** | Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. | [optional] [default to undefined] +**guardrails** | [**ChatInferenceRequestGuardrails**](ChatInferenceRequestGuardrails.md) | | [optional] [default to undefined] ## Example @@ -36,6 +38,8 @@ const instance: ChatInferenceRequest = { toolConfig, sessionId, async, + allowedTools, + guardrails, }; ``` diff --git a/docs/ChatInferenceRequestGuardrails.md b/docs/ChatInferenceRequestGuardrails.md new file mode 100644 index 0000000..009fd99 --- /dev/null +++ b/docs/ChatInferenceRequestGuardrails.md @@ -0,0 +1,25 @@ +# ChatInferenceRequestGuardrails + +AWS Bedrock guardrails configuration for content filtering and safety. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guardrailIdentifier** | **string** | Guardrail identifier from AWS Bedrock | [optional] [default to undefined] +**guardrailVersion** | **string** | Guardrail version | [optional] [default to undefined] +**trace** | **string** | Enable guardrail trace output | [optional] [default to undefined] + +## Example + +```typescript +import { ChatInferenceRequestGuardrails } from '@quantcdn/quant-client'; + +const instance: ChatInferenceRequestGuardrails = { + guardrailIdentifier, + guardrailVersion, + trace, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChatInferenceStreamRequest.md b/docs/ChatInferenceStreamRequest.md index 264072b..f907eb0 100644 --- a/docs/ChatInferenceStreamRequest.md +++ b/docs/ChatInferenceStreamRequest.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **toolConfig** | [**ChatInferenceRequestToolConfig**](ChatInferenceRequestToolConfig.md) | | [optional] [default to undefined] **sessionId** | **string** | Optional session ID for conversation continuity. Omit to use stateless mode, include to continue an existing session. | [optional] [default to undefined] **async** | **boolean** | Enable async/durable execution mode. When true, returns 202 with pollUrl instead of streaming. Use for long-running inference, client-executed tools, or operations >30 seconds. | [optional] [default to false] +**allowedTools** | **Array<string>** | Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. | [optional] [default to undefined] +**guardrails** | [**ChatInferenceRequestGuardrails**](ChatInferenceRequestGuardrails.md) | | [optional] [default to undefined] ## Example @@ -34,6 +36,8 @@ const instance: ChatInferenceStreamRequest = { toolConfig, sessionId, async, + allowedTools, + guardrails, }; ``` diff --git a/docs/CreateOrchestrationRequest.md b/docs/CreateOrchestrationRequest.md new file mode 100644 index 0000000..e687c87 --- /dev/null +++ b/docs/CreateOrchestrationRequest.md @@ -0,0 +1,40 @@ +# CreateOrchestrationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Orchestration name | [default to undefined] +**description** | **string** | Optional description | [optional] [default to undefined] +**agentId** | **string** | Agent to process items | [optional] [default to undefined] +**toolId** | **string** | Tool to execute for items | [optional] [default to undefined] +**workflowId** | **string** | Workflow to run for items | [optional] [default to undefined] +**inputSource** | [**CreateOrchestrationRequestInputSource**](CreateOrchestrationRequestInputSource.md) | | [default to undefined] +**batchSize** | **number** | Items per batch | [optional] [default to 10] +**concurrency** | **number** | Concurrent items within a batch | [optional] [default to 1] +**stopCondition** | [**CreateOrchestrationRequestStopCondition**](CreateOrchestrationRequestStopCondition.md) | | [optional] [default to undefined] +**assignedSkills** | **Array<string>** | Skill IDs to assign | [optional] [default to undefined] +**autoStart** | **boolean** | Whether to start immediately | [optional] [default to true] + +## Example + +```typescript +import { CreateOrchestrationRequest } from '@quantcdn/quant-client'; + +const instance: CreateOrchestrationRequest = { + name, + description, + agentId, + toolId, + workflowId, + inputSource, + batchSize, + concurrency, + stopCondition, + assignedSkills, + autoStart, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOrchestrationRequestInputSource.md b/docs/CreateOrchestrationRequestInputSource.md new file mode 100644 index 0000000..03ef6d5 --- /dev/null +++ b/docs/CreateOrchestrationRequestInputSource.md @@ -0,0 +1,26 @@ +# CreateOrchestrationRequestInputSource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Input source type (api type not yet supported) | [default to undefined] +**items** | **Array<object>** | Static items (for type=static) | [optional] [default to undefined] +**taskQuery** | **object** | Task query filters (for type=task_query) | [optional] [default to undefined] +**generatorPrompt** | **string** | AI prompt (for type=generator) | [optional] [default to undefined] + +## Example + +```typescript +import { CreateOrchestrationRequestInputSource } from '@quantcdn/quant-client'; + +const instance: CreateOrchestrationRequestInputSource = { + type, + items, + taskQuery, + generatorPrompt, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOrchestrationRequestStopCondition.md b/docs/CreateOrchestrationRequestStopCondition.md new file mode 100644 index 0000000..60a0ab5 --- /dev/null +++ b/docs/CreateOrchestrationRequestStopCondition.md @@ -0,0 +1,24 @@ +# CreateOrchestrationRequestStopCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] [default to TypeEnum_AllComplete] +**maxIterations** | **number** | Max iterations (for type=max_iterations) | [optional] [default to undefined] +**conditionPrompt** | **string** | AI prompt to evaluate stop (for type=condition) | [optional] [default to undefined] + +## Example + +```typescript +import { CreateOrchestrationRequestStopCondition } from '@quantcdn/quant-client'; + +const instance: CreateOrchestrationRequestStopCondition = { + type, + maxIterations, + conditionPrompt, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteVectorDocuments200Response.md b/docs/DeleteVectorDocuments200Response.md new file mode 100644 index 0000000..3266174 --- /dev/null +++ b/docs/DeleteVectorDocuments200Response.md @@ -0,0 +1,24 @@ +# DeleteVectorDocuments200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | | [optional] [default to undefined] +**collectionId** | **string** | | [optional] [default to undefined] +**deletedCount** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { DeleteVectorDocuments200Response } from '@quantcdn/quant-client'; + +const instance: DeleteVectorDocuments200Response = { + message, + collectionId, + deletedCount, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteVectorDocumentsRequest.md b/docs/DeleteVectorDocumentsRequest.md new file mode 100644 index 0000000..0c89dc1 --- /dev/null +++ b/docs/DeleteVectorDocumentsRequest.md @@ -0,0 +1,24 @@ +# DeleteVectorDocumentsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purgeAll** | **boolean** | Delete ALL documents in collection | [optional] [default to undefined] +**documentIds** | **Array<string>** | Delete specific documents by UUID | [optional] [default to undefined] +**metadata** | [**DeleteVectorDocumentsRequestMetadata**](DeleteVectorDocumentsRequestMetadata.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { DeleteVectorDocumentsRequest } from '@quantcdn/quant-client'; + +const instance: DeleteVectorDocumentsRequest = { + purgeAll, + documentIds, + metadata, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteVectorDocumentsRequestMetadata.md b/docs/DeleteVectorDocumentsRequestMetadata.md new file mode 100644 index 0000000..510cc70 --- /dev/null +++ b/docs/DeleteVectorDocumentsRequestMetadata.md @@ -0,0 +1,22 @@ +# DeleteVectorDocumentsRequestMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **string** | Metadata field name (e.g., \'drupal_entity_id\') | [optional] [default to undefined] +**values** | **Array<string>** | Values to match (OR logic) | [optional] [default to undefined] + +## Example + +```typescript +import { DeleteVectorDocumentsRequestMetadata } from '@quantcdn/quant-client'; + +const instance: DeleteVectorDocumentsRequestMetadata = { + field, + values, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KVApi.md b/docs/KVApi.md index 829f346..0e092f9 100644 --- a/docs/KVApi.md +++ b/docs/KVApi.md @@ -11,8 +11,10 @@ All URIs are relative to *https://dashboard.quantcdn.io* |[**kVItemsList**](#kvitemslist) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items | List items in a kv store| |[**kVItemsShow**](#kvitemsshow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Get an item from a kv store| |[**kVItemsUpdate**](#kvitemsupdate) | **PUT** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Update an item in a kv store| +|[**kVLinkToProject**](#kvlinktoproject) | **POST** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Link a KV store to another project| |[**kVList**](#kvlist) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv | List key-value stores| |[**kVShow**](#kvshow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id} | Get a kv store| +|[**kVUnlinkFromProject**](#kvunlinkfromproject) | **DELETE** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Unlink a KV store from this project| # **kVCreate** > V2Store kVCreate(v2StoreRequest) @@ -453,6 +455,70 @@ const { status, data } = await apiInstance.kVItemsUpdate( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **kVLinkToProject** +> KVLinkToProject200Response kVLinkToProject(kVLinkToProjectRequest) + +Share a KV store from the source project with a target project. The store will be accessible in the target project. + +### Example + +```typescript +import { + KVApi, + Configuration, + KVLinkToProjectRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new KVApi(configuration); + +let organization: string; //Organization identifier (default to undefined) +let project: string; //Source project identifier (default to undefined) +let storeId: string; //KV store identifier (default to undefined) +let kVLinkToProjectRequest: KVLinkToProjectRequest; // + +const { status, data } = await apiInstance.kVLinkToProject( + organization, + project, + storeId, + kVLinkToProjectRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **kVLinkToProjectRequest** | **KVLinkToProjectRequest**| | | +| **organization** | [**string**] | Organization identifier | defaults to undefined| +| **project** | [**string**] | Source project identifier | defaults to undefined| +| **storeId** | [**string**] | KV store identifier | defaults to undefined| + + +### Return type + +**KVLinkToProject200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Store linked successfully | - | +|**400** | Store already linked or invalid request | - | +|**404** | Store or target project not found | - | +|**403** | Access forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **kVList** > Array kVList() @@ -566,3 +632,62 @@ const { status, data } = await apiInstance.kVShow( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **kVUnlinkFromProject** +> KVLinkToProject200Response kVUnlinkFromProject() + +Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + +### Example + +```typescript +import { + KVApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new KVApi(configuration); + +let organization: string; //Organization identifier (default to undefined) +let project: string; //Project identifier (default to undefined) +let storeId: string; //KV store identifier (default to undefined) + +const { status, data } = await apiInstance.kVUnlinkFromProject( + organization, + project, + storeId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organization** | [**string**] | Organization identifier | defaults to undefined| +| **project** | [**string**] | Project identifier | defaults to undefined| +| **storeId** | [**string**] | KV store identifier | defaults to undefined| + + +### Return type + +**KVLinkToProject200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Store unlinked successfully | - | +|**400** | Store not linked or invalid request | - | +|**403** | Cannot unlink store owned by this project | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/KVLinkToProject200Response.md b/docs/KVLinkToProject200Response.md new file mode 100644 index 0000000..c584303 --- /dev/null +++ b/docs/KVLinkToProject200Response.md @@ -0,0 +1,22 @@ +# KVLinkToProject200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **boolean** | | [optional] [default to undefined] +**message** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { KVLinkToProject200Response } from '@quantcdn/quant-client'; + +const instance: KVLinkToProject200Response = { + success, + message, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KVLinkToProjectRequest.md b/docs/KVLinkToProjectRequest.md new file mode 100644 index 0000000..f192ee6 --- /dev/null +++ b/docs/KVLinkToProjectRequest.md @@ -0,0 +1,20 @@ +# KVLinkToProjectRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **number** | Target project ID to link to | [default to undefined] + +## Example + +```typescript +import { KVLinkToProjectRequest } from '@quantcdn/quant-client'; + +const instance: KVLinkToProjectRequest = { + project_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListOrchestrationBatches200Response.md b/docs/ListOrchestrationBatches200Response.md new file mode 100644 index 0000000..0d49614 --- /dev/null +++ b/docs/ListOrchestrationBatches200Response.md @@ -0,0 +1,22 @@ +# ListOrchestrationBatches200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batches** | [**Array<ListOrchestrationBatches200ResponseBatchesInner>**](ListOrchestrationBatches200ResponseBatchesInner.md) | | [optional] [default to undefined] +**nextCursor** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ListOrchestrationBatches200Response } from '@quantcdn/quant-client'; + +const instance: ListOrchestrationBatches200Response = { + batches, + nextCursor, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListOrchestrationBatches200ResponseBatchesInner.md b/docs/ListOrchestrationBatches200ResponseBatchesInner.md new file mode 100644 index 0000000..85a109f --- /dev/null +++ b/docs/ListOrchestrationBatches200ResponseBatchesInner.md @@ -0,0 +1,38 @@ +# ListOrchestrationBatches200ResponseBatchesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batchId** | **string** | | [optional] [default to undefined] +**orchestrationId** | **string** | | [optional] [default to undefined] +**iteration** | **number** | | [optional] [default to undefined] +**itemCount** | **number** | | [optional] [default to undefined] +**completedCount** | **number** | | [optional] [default to undefined] +**failedCount** | **number** | | [optional] [default to undefined] +**status** | **string** | | [optional] [default to undefined] +**startedAt** | **string** | | [optional] [default to undefined] +**completedAt** | **string** | | [optional] [default to undefined] +**error** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ListOrchestrationBatches200ResponseBatchesInner } from '@quantcdn/quant-client'; + +const instance: ListOrchestrationBatches200ResponseBatchesInner = { + batchId, + orchestrationId, + iteration, + itemCount, + completedCount, + failedCount, + status, + startedAt, + completedAt, + error, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListOrchestrations200Response.md b/docs/ListOrchestrations200Response.md new file mode 100644 index 0000000..d02350d --- /dev/null +++ b/docs/ListOrchestrations200Response.md @@ -0,0 +1,22 @@ +# ListOrchestrations200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orchestrations** | **Array<object>** | | [optional] [default to undefined] +**nextCursor** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ListOrchestrations200Response } from '@quantcdn/quant-client'; + +const instance: ListOrchestrations200Response = { + orchestrations, + nextCursor, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrchestrationApi.md b/docs/OrchestrationApi.md index afd4bc4..80225be 100644 --- a/docs/OrchestrationApi.md +++ b/docs/OrchestrationApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://dashboard.quantcdn.io* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**getAIOrchestrationStatus**](#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status| +|[**getAIOrchestrationStatus**](#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Tool Orchestration Status (Async Tool Polling)| # **getAIOrchestrationStatus** > GetAIOrchestrationStatus200Response getAIOrchestrationStatus() -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 +Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **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 ### Example diff --git a/docs/V2CrawlerSchedule.md b/docs/V2CrawlerSchedule.md index e1f8883..f882da2 100644 --- a/docs/V2CrawlerSchedule.md +++ b/docs/V2CrawlerSchedule.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **crawler_uuid** | **string** | Crawler UUID | [optional] [default to undefined] **project_id** | **number** | Project ID | [default to undefined] **crawler_last_run_id** | **number** | Last run ID | [default to undefined] -**schedule_cron_string** | **string** | Cron schedule string | [default to undefined] +**schedule_cron_string** | **string** | Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * runs daily at 2 AM. | [default to undefined] **created_at** | **string** | Creation timestamp | [optional] [default to undefined] **updated_at** | **string** | Last update timestamp | [optional] [default to undefined] diff --git a/docs/V2CrawlerScheduleRequest.md b/docs/V2CrawlerScheduleRequest.md index 1464908..fe5b665 100644 --- a/docs/V2CrawlerScheduleRequest.md +++ b/docs/V2CrawlerScheduleRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Schedule name | [default to undefined] -**schedule_cron_string** | **string** | Cron schedule string | [default to undefined] +**name** | **string** | Schedule name. If not provided, defaults to \'Schedule {crawler_name}\'. | [optional] [default to undefined] +**schedule_cron_string** | **string** | Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * for daily at 2 AM. | [default to undefined] ## Example diff --git a/docs/V2MetricData.md b/docs/V2MetricData.md new file mode 100644 index 0000000..584393e --- /dev/null +++ b/docs/V2MetricData.md @@ -0,0 +1,26 @@ +# V2MetricData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**series** | [**Array<V2MetricDataPoint>**](V2MetricDataPoint.md) | Time series data points | [default to undefined] +**period_total** | **number** | Total value for the period | [default to undefined] +**all_time_total** | **number** | All-time total value | [default to undefined] +**period_average** | **number** | Average value per time unit in the period | [default to undefined] + +## Example + +```typescript +import { V2MetricData } from '@quantcdn/quant-client'; + +const instance: V2MetricData = { + series, + period_total, + all_time_total, + period_average, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V2MetricDataPoint.md b/docs/V2MetricDataPoint.md new file mode 100644 index 0000000..00d1b3c --- /dev/null +++ b/docs/V2MetricDataPoint.md @@ -0,0 +1,22 @@ +# V2MetricDataPoint + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | [**V2MetricDataPointTimestamp**](V2MetricDataPointTimestamp.md) | | [default to undefined] +**value** | **number** | Metric value at this timestamp | [default to undefined] + +## Example + +```typescript +import { V2MetricDataPoint } from '@quantcdn/quant-client'; + +const instance: V2MetricDataPoint = { + timestamp, + value, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V2MetricDataPointTimestamp.md b/docs/V2MetricDataPointTimestamp.md new file mode 100644 index 0000000..161a14a --- /dev/null +++ b/docs/V2MetricDataPointTimestamp.md @@ -0,0 +1,19 @@ +# V2MetricDataPointTimestamp + +Timestamp for this data point (format depends on timestamp_format parameter) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```typescript +import { V2MetricDataPointTimestamp } from '@quantcdn/quant-client'; + +const instance: V2MetricDataPointTimestamp = { +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V2MetricsMeta.md b/docs/V2MetricsMeta.md new file mode 100644 index 0000000..280d34d --- /dev/null +++ b/docs/V2MetricsMeta.md @@ -0,0 +1,30 @@ +# V2MetricsMeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**period** | **string** | The period type for this data | [default to undefined] +**granularity** | **string** | The granularity of data points | [default to undefined] +**start_time** | **string** | Start time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) | [default to undefined] +**end_time** | **string** | End time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) | [default to undefined] +**metrics** | **Array<string>** | List of metrics included in the response | [default to undefined] +**domain** | **string** | Domain filter applied (if any) | [optional] [default to undefined] + +## Example + +```typescript +import { V2MetricsMeta } from '@quantcdn/quant-client'; + +const instance: V2MetricsMeta = { + period, + granularity, + start_time, + end_time, + metrics, + domain, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V2MetricsResponse.md b/docs/V2MetricsResponse.md new file mode 100644 index 0000000..a093973 --- /dev/null +++ b/docs/V2MetricsResponse.md @@ -0,0 +1,22 @@ +# V2MetricsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**V2MetricsMeta**](V2MetricsMeta.md) | | [default to undefined] +**data** | [**{ [key: string]: V2MetricData; }**](V2MetricData.md) | Metrics data keyed by metric name | [default to undefined] + +## Example + +```typescript +import { V2MetricsResponse } from '@quantcdn/quant-client'; + +const instance: V2MetricsResponse = { + meta, + data, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/index.ts b/index.ts index 72a6a3d..d6e60c8 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,7 @@ * QuantCDN API * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.10.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/package-lock.json b/package-lock.json index 58e82f6..90ff96f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quantcdn/quant-client", - "version": "4.9.0", + "version": "4.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@quantcdn/quant-client", - "version": "4.9.0", + "version": "4.10.0", "license": "MIT", "dependencies": { "axios": "^1.6.1" diff --git a/package.json b/package.json index 14d9d0e..91a1da5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quantcdn/quant-client", - "version": "4.9.0", + "version": "4.10.0", "description": "OpenAPI client for @quantcdn/quant-client", "author": "QuantCDN", "repository": {