From c3de8c89e0bbf7d137375d6eeb718c2b9e03e3f9 Mon Sep 17 00:00:00 2001 From: "quantcloud[bot]" Date: Tue, 31 Mar 2026 11:24:10 +0000 Subject: [PATCH 1/2] feat(sdk): v4.15.0 - Auto-generated from unified API spec Generated from unified API spec v4.15.0 Changes: - Auto-generated SDK updates This PR was automatically created by the API generation pipeline. --- .openapi-generator-config.json | 2 +- .openapi-generator/FILES | 38 +- api.ts | 7084 ++++++++++++----- common.ts | 2 +- configuration.ts | 2 +- docs/AIAgentsApi.md | 180 + docs/AIFilterPoliciesApi.md | 396 + docs/AIGovernanceApi.md | 168 + docs/AISlackBotsApi.md | 421 + docs/AIUsageApi.md | 60 + docs/AIVectorDatabaseApi.md | 63 - docs/ChatWithAIAgentRequest.md | 6 + docs/CreateAIAgentRequest.md | 8 + docs/CreateFilterPolicyRequest.md | 26 + docs/CreateFilterPolicyRequestRulesInner.md | 26 + ...reateFilterPolicyRequestRulesInnerMatch.md | 25 + docs/CreateSlackBot201Response.md | 20 + docs/CreateSlackBotRequest.md | 32 + docs/Cron.md | 12 +- ...se.md => DeleteAgentOverlay200Response.md} | 10 +- docs/DeleteSlackBot200Response.md | 22 + docs/DeleteVectorDocumentsRequest.md | 2 + docs/GetAIAgent200ResponseAgent.md | 10 + docs/GetAgentOverlay200Response.md | 22 + docs/GetAgentOverlay200ResponseBase.md | 29 + docs/GetAgentOverlay200ResponseOverlay.md | 40 + docs/GetGovernanceConfig200Response.md | 34 + ...tGovernanceConfig200ResponseSpendLimits.md | 28 + docs/GetMyUsage200Response.md | 28 + docs/GetMyUsage200ResponseDaily.md | 20 + ...est.md => GetMyUsage200ResponseMonthly.md} | 12 +- docs/GetSlackBot200Response.md | 20 + docs/GetSlackBot200ResponseBot.md | 42 + docs/ListAIAgents200ResponseAgentsInner.md | 10 + docs/ListSlackBots200Response.md | 20 + docs/ListSlackBots200ResponseBotsInner.md | 34 + ...SearchSlackWorkspaceChannels200Response.md | 20 + ...orkspaceChannels200ResponseResultsInner.md | 22 + docs/SearchSlackWorkspaceUsers200Response.md | 20 + ...ckWorkspaceUsers200ResponseResultsInner.md | 24 + docs/TokensApi.md | 1 + docs/TokensCreate201Response.md | 10 + docs/TokensCreateRequest.md | 8 + docs/UpdateAIAgentRequest.md | 8 + docs/UpdateFilterPolicyRequest.md | 26 + docs/UpdateGovernanceConfig200Response.md | 22 + docs/UpdateGovernanceConfigRequest.md | 32 + docs/UpdateSlackBotRequest.md | 32 + ...oadVectorDocumentsRequestDocumentsInner.md | 22 - ...rDocumentsRequestDocumentsInnerMetadata.md | 26 - docs/UpsertAgentOverlay200Response.md | 20 + docs/UpsertAgentOverlayRequest.md | 40 + docs/V2Rule.md | 6 + docs/V2RuleAuth.md | 6 + docs/V2RuleAuthRequest.md | 6 + docs/V2RuleBotChallenge.md | 6 + docs/V2RuleBotChallengeRequest.md | 6 + docs/V2RuleContentFilter.md | 6 + docs/V2RuleContentFilterRequest.md | 6 + docs/V2RuleCustomResponse.md | 6 + docs/V2RuleCustomResponseRequest.md | 6 + docs/V2RuleFunction.md | 6 + docs/V2RuleFunctionRequest.md | 6 + docs/V2RuleHeader.md | 6 + docs/V2RuleHeaderRequest.md | 6 + docs/V2RuleProxy.md | 6 + docs/V2RuleProxyRequest.md | 6 + docs/V2RuleRedirect.md | 6 + docs/V2RuleRedirectRequest.md | 6 + docs/V2RuleRequest.md | 6 + docs/V2RuleServeStatic.md | 6 + docs/V2RuleServeStaticRequest.md | 6 + docs/VectorDatabaseApi.md | 74 + index.ts | 2 +- package-lock.json | 4 +- package.json | 2 +- 76 files changed, 7532 insertions(+), 1957 deletions(-) create mode 100644 docs/AIFilterPoliciesApi.md create mode 100644 docs/AIGovernanceApi.md create mode 100644 docs/AISlackBotsApi.md create mode 100644 docs/AIUsageApi.md create mode 100644 docs/CreateFilterPolicyRequest.md create mode 100644 docs/CreateFilterPolicyRequestRulesInner.md create mode 100644 docs/CreateFilterPolicyRequestRulesInnerMatch.md create mode 100644 docs/CreateSlackBot201Response.md create mode 100644 docs/CreateSlackBotRequest.md rename docs/{UploadVectorDocuments200Response.md => DeleteAgentOverlay200Response.md} (57%) create mode 100644 docs/DeleteSlackBot200Response.md create mode 100644 docs/GetAgentOverlay200Response.md create mode 100644 docs/GetAgentOverlay200ResponseBase.md create mode 100644 docs/GetAgentOverlay200ResponseOverlay.md create mode 100644 docs/GetGovernanceConfig200Response.md create mode 100644 docs/GetGovernanceConfig200ResponseSpendLimits.md create mode 100644 docs/GetMyUsage200Response.md create mode 100644 docs/GetMyUsage200ResponseDaily.md rename docs/{UploadVectorDocumentsRequest.md => GetMyUsage200ResponseMonthly.md} (50%) create mode 100644 docs/GetSlackBot200Response.md create mode 100644 docs/GetSlackBot200ResponseBot.md create mode 100644 docs/ListSlackBots200Response.md create mode 100644 docs/ListSlackBots200ResponseBotsInner.md create mode 100644 docs/SearchSlackWorkspaceChannels200Response.md create mode 100644 docs/SearchSlackWorkspaceChannels200ResponseResultsInner.md create mode 100644 docs/SearchSlackWorkspaceUsers200Response.md create mode 100644 docs/SearchSlackWorkspaceUsers200ResponseResultsInner.md create mode 100644 docs/UpdateFilterPolicyRequest.md create mode 100644 docs/UpdateGovernanceConfig200Response.md create mode 100644 docs/UpdateGovernanceConfigRequest.md create mode 100644 docs/UpdateSlackBotRequest.md delete mode 100644 docs/UploadVectorDocumentsRequestDocumentsInner.md delete mode 100644 docs/UploadVectorDocumentsRequestDocumentsInnerMetadata.md create mode 100644 docs/UpsertAgentOverlay200Response.md create mode 100644 docs/UpsertAgentOverlayRequest.md create mode 100644 docs/VectorDatabaseApi.md diff --git a/.openapi-generator-config.json b/.openapi-generator-config.json index f3e40e6..e99c085 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.12.0", + "npmVersion": "4.15.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 5796aec..47f7c07 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -6,14 +6,18 @@ configuration.ts docs/AIAgentsApi.md docs/AICustomToolsApi.md docs/AIFileStorageApi.md +docs/AIFilterPoliciesApi.md +docs/AIGovernanceApi.md docs/AIInferenceApi.md docs/AIModelsApi.md docs/AIMonitoringApi.md docs/AIOrchestrationsApi.md docs/AISessionsApi.md docs/AISkillsApi.md +docs/AISlackBotsApi.md docs/AITaskManagementApi.md docs/AIToolsApi.md +docs/AIUsageApi.md docs/AIVectorDatabaseApi.md docs/Application.md docs/ApplicationDatabase.md @@ -98,11 +102,16 @@ docs/CreateCustomToolRequest.md docs/CreateEnvironment403Response.md docs/CreateEnvironmentRequest.md docs/CreateEnvironmentRequestEnvironmentInner.md +docs/CreateFilterPolicyRequest.md +docs/CreateFilterPolicyRequestRulesInner.md +docs/CreateFilterPolicyRequestRulesInnerMatch.md docs/CreateOrchestrationRequest.md docs/CreateOrchestrationRequestInputSource.md docs/CreateOrchestrationRequestStopCondition.md docs/CreateSkill201Response.md docs/CreateSkillRequest.md +docs/CreateSlackBot201Response.md +docs/CreateSlackBotRequest.md docs/CreateTask201Response.md docs/CreateTaskRequest.md docs/CreateVectorCollection201Response.md @@ -114,11 +123,13 @@ docs/CronApi.md docs/CronRun.md docs/DeleteAIAgent200Response.md docs/DeleteAISession200Response.md +docs/DeleteAgentOverlay200Response.md docs/DeleteBackup200Response.md docs/DeleteCustomTool200Response.md docs/DeleteFile200Response.md docs/DeleteSkill200Response.md docs/DeleteSkillCollection200Response.md +docs/DeleteSlackBot200Response.md docs/DeleteTask200Response.md docs/DeleteTask409Response.md docs/DeleteVectorDocuments200Response.md @@ -152,6 +163,9 @@ docs/GetAIToolExecutionStatus200ResponseResult.md docs/GetAIToolExecutionStatus404Response.md docs/GetAIUsageStats200Response.md docs/GetAIUsageStats200ResponseByModelValue.md +docs/GetAgentOverlay200Response.md +docs/GetAgentOverlay200ResponseBase.md +docs/GetAgentOverlay200ResponseOverlay.md docs/GetDependencyGraph200Response.md docs/GetDurableExecutionStatus200Response.md docs/GetDurableExecutionStatus200ResponseError.md @@ -163,8 +177,15 @@ docs/GetEcrLoginCredentials200Response.md docs/GetEnvironmentLogs200Response.md docs/GetEnvironmentLogs200ResponseLogEventsInner.md docs/GetFile200Response.md +docs/GetGovernanceConfig200Response.md +docs/GetGovernanceConfig200ResponseSpendLimits.md +docs/GetMyUsage200Response.md +docs/GetMyUsage200ResponseDaily.md +docs/GetMyUsage200ResponseMonthly.md docs/GetSkill200Response.md docs/GetSkill200ResponseSkill.md +docs/GetSlackBot200Response.md +docs/GetSlackBot200ResponseBot.md docs/GetSshAccessCredentials200Response.md docs/GetSshAccessCredentials200ResponseCredentials.md docs/GetTask200Response.md @@ -220,6 +241,8 @@ docs/ListSkillCollections200Response.md docs/ListSkillCollections200ResponseCollectionsInner.md docs/ListSkills200Response.md docs/ListSkills200ResponseSkillsInner.md +docs/ListSlackBots200Response.md +docs/ListSlackBots200ResponseBotsInner.md docs/ListTasks200Response.md docs/ListTasks200ResponseTasksInner.md docs/ListVectorCollections200Response.md @@ -243,6 +266,10 @@ docs/RulesApi.md docs/SSHAccessApi.md docs/ScalingPolicy.md docs/ScalingPolicyApi.md +docs/SearchSlackWorkspaceChannels200Response.md +docs/SearchSlackWorkspaceChannels200ResponseResultsInner.md +docs/SearchSlackWorkspaceUsers200Response.md +docs/SearchSlackWorkspaceUsers200ResponseResultsInner.md docs/SpotConfiguration.md docs/SubmitToolCallback200Response.md docs/SubmitToolCallbackRequest.md @@ -264,16 +291,18 @@ docs/UpdateCronJobRequest.md docs/UpdateEnvironmentRequest.md docs/UpdateEnvironmentStateRequest.md docs/UpdateEnvironmentVariableRequest.md +docs/UpdateFilterPolicyRequest.md +docs/UpdateGovernanceConfig200Response.md +docs/UpdateGovernanceConfigRequest.md docs/UpdateSkill200Response.md docs/UpdateSkillRequest.md +docs/UpdateSlackBotRequest.md docs/UpdateTask200Response.md docs/UpdateTaskRequest.md docs/UploadFile201Response.md docs/UploadFileRequest.md -docs/UploadVectorDocuments200Response.md -docs/UploadVectorDocumentsRequest.md -docs/UploadVectorDocumentsRequestDocumentsInner.md -docs/UploadVectorDocumentsRequestDocumentsInnerMetadata.md +docs/UpsertAgentOverlay200Response.md +docs/UpsertAgentOverlayRequest.md docs/V1ContentItem.md docs/V1ContentListResponse.md docs/V1ContentRequest.md @@ -382,6 +411,7 @@ docs/ValidateCompose422Response.md docs/ValidateComposeRequest.md docs/Variable.md docs/VariablesApi.md +docs/VectorDatabaseApi.md docs/Volume.md docs/VolumesApi.md docs/WafConfig.md diff --git a/api.ts b/api.ts index 2d317ca..5aa7704 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.12.0 + * The version of the OpenAPI document: 4.15.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -1307,6 +1307,24 @@ export interface ChatWithAIAgentRequest { * @memberof ChatWithAIAgentRequest */ 'system'?: string; + /** + * Per-request override to force 1M context window routing + * @type {boolean} + * @memberof ChatWithAIAgentRequest + */ + 'longContext'?: boolean; + /** + * Maximum tool auto-execution iterations for this request + * @type {number} + * @memberof ChatWithAIAgentRequest + */ + 'maxToolIterations'?: number; + /** + * Per-request override for vector DB collections the agent can query + * @type {Array} + * @memberof ChatWithAIAgentRequest + */ + 'allowedCollections'?: Array; } /** * @@ -1843,13 +1861,46 @@ export interface CreateAIAgentRequest { * @memberof CreateAIAgentRequest */ 'allowedCollections'?: Array; + /** + * Skill IDs to assign to this agent + * @type {Array} + * @memberof CreateAIAgentRequest + */ + 'assignedSkills'?: Array; /** * User identifier who created the agent * @type {string} * @memberof CreateAIAgentRequest */ 'createdBy'?: string; + /** + * Enable 1M context window support + * @type {boolean} + * @memberof CreateAIAgentRequest + */ + 'longContext'?: boolean; + /** + * Guardrail preset name + * @type {string} + * @memberof CreateAIAgentRequest + */ + 'guardrailPreset'?: CreateAIAgentRequestGuardrailPresetEnum; + /** + * Filter policy IDs to apply to this agent\'s inference requests + * @type {Array} + * @memberof CreateAIAgentRequest + */ + 'filterPolicies'?: Array; } + +export const CreateAIAgentRequestGuardrailPresetEnum = { + Official: 'official', + OfficialSensitive: 'official-sensitive', + Protected: 'protected' +} as const; + +export type CreateAIAgentRequestGuardrailPresetEnum = typeof CreateAIAgentRequestGuardrailPresetEnum[keyof typeof CreateAIAgentRequestGuardrailPresetEnum]; + /** * * @export @@ -2359,6 +2410,116 @@ export interface CreateEnvironmentRequestEnvironmentInner { */ 'value'?: string; } +/** + * + * @export + * @interface CreateFilterPolicyRequest + */ +export interface CreateFilterPolicyRequest { + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequest + */ + 'name': string; + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequest + */ + 'description'?: string | null; + /** + * + * @type {boolean} + * @memberof CreateFilterPolicyRequest + */ + 'enabled'?: boolean; + /** + * + * @type {Array} + * @memberof CreateFilterPolicyRequest + */ + 'rules': Array; +} +/** + * + * @export + * @interface CreateFilterPolicyRequestRulesInner + */ +export interface CreateFilterPolicyRequestRulesInner { + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequestRulesInner + */ + 'name'?: string; + /** + * + * @type {CreateFilterPolicyRequestRulesInnerMatch} + * @memberof CreateFilterPolicyRequestRulesInner + */ + 'match'?: CreateFilterPolicyRequestRulesInnerMatch; + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequestRulesInner + */ + 'action'?: CreateFilterPolicyRequestRulesInnerActionEnum; + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequestRulesInner + */ + 'applyTo'?: CreateFilterPolicyRequestRulesInnerApplyToEnum; +} + +export const CreateFilterPolicyRequestRulesInnerActionEnum = { + Block: 'BLOCK', + Redact: 'REDACT' +} as const; + +export type CreateFilterPolicyRequestRulesInnerActionEnum = typeof CreateFilterPolicyRequestRulesInnerActionEnum[keyof typeof CreateFilterPolicyRequestRulesInnerActionEnum]; +export const CreateFilterPolicyRequestRulesInnerApplyToEnum = { + Input: 'input', + Output: 'output', + Both: 'both' +} as const; + +export type CreateFilterPolicyRequestRulesInnerApplyToEnum = typeof CreateFilterPolicyRequestRulesInnerApplyToEnum[keyof typeof CreateFilterPolicyRequestRulesInnerApplyToEnum]; + +/** + * Match criteria + * @export + * @interface CreateFilterPolicyRequestRulesInnerMatch + */ +export interface CreateFilterPolicyRequestRulesInnerMatch { + /** + * + * @type {string} + * @memberof CreateFilterPolicyRequestRulesInnerMatch + */ + 'type'?: CreateFilterPolicyRequestRulesInnerMatchTypeEnum; + /** + * Required when type=word + * @type {Array} + * @memberof CreateFilterPolicyRequestRulesInnerMatch + */ + 'values'?: Array; + /** + * Required when type=regex + * @type {string} + * @memberof CreateFilterPolicyRequestRulesInnerMatch + */ + 'pattern'?: string; +} + +export const CreateFilterPolicyRequestRulesInnerMatchTypeEnum = { + Word: 'word', + Regex: 'regex' +} as const; + +export type CreateFilterPolicyRequestRulesInnerMatchTypeEnum = typeof CreateFilterPolicyRequestRulesInnerMatchTypeEnum[keyof typeof CreateFilterPolicyRequestRulesInnerMatchTypeEnum]; + /** * * @export @@ -2611,6 +2772,76 @@ export interface CreateSkillRequest { */ 'installedBy'?: string; } +/** + * + * @export + * @interface CreateSlackBot201Response + */ +export interface CreateSlackBot201Response { + /** + * + * @type {object} + * @memberof CreateSlackBot201Response + */ + 'bot'?: object; +} +/** + * + * @export + * @interface CreateSlackBotRequest + */ +export interface CreateSlackBotRequest { + /** + * The AI agent that powers this bot + * @type {string} + * @memberof CreateSlackBotRequest + */ + 'agentId': string; + /** + * Whether to use Quant-managed or customer-provided Slack app + * @type {string} + * @memberof CreateSlackBotRequest + */ + 'setupType': CreateSlackBotRequestSetupTypeEnum; + /** + * Session TTL in days + * @type {number} + * @memberof CreateSlackBotRequest + */ + 'sessionTtlDays'?: number; + /** + * Slack channel IDs the bot may respond in + * @type {Array} + * @memberof CreateSlackBotRequest + */ + 'allowedChannels'?: Array; + /** + * Whether keyword triggers are enabled + * @type {boolean} + * @memberof CreateSlackBotRequest + */ + 'keywordsEnabled'?: boolean; + /** + * Keywords that trigger the bot + * @type {Array} + * @memberof CreateSlackBotRequest + */ + 'keywords'?: Array; + /** + * Slash commands the bot responds to + * @type {Array} + * @memberof CreateSlackBotRequest + */ + 'slashCommands'?: Array; +} + +export const CreateSlackBotRequestSetupTypeEnum = { + Quant: 'quant', + Byo: 'byo' +} as const; + +export type CreateSlackBotRequestSetupTypeEnum = typeof CreateSlackBotRequestSetupTypeEnum[keyof typeof CreateSlackBotRequestSetupTypeEnum]; + /** * * @export @@ -2868,13 +3099,31 @@ export interface Cron { * @type {string} * @memberof Cron */ - 'schedule'?: string; + 'description'?: string | null; /** * * @type {string} * @memberof Cron */ - 'command'?: string; + 'scheduleExpression'?: string; + /** + * + * @type {Array} + * @memberof Cron + */ + 'command'?: Array; + /** + * + * @type {string} + * @memberof Cron + */ + 'targetContainerName'?: string | null; + /** + * + * @type {boolean} + * @memberof Cron + */ + 'isEnabled'?: boolean; } /** * @@ -2993,6 +3242,25 @@ export interface DeleteAISession200Response { */ 'message'?: string; } +/** + * + * @export + * @interface DeleteAgentOverlay200Response + */ +export interface DeleteAgentOverlay200Response { + /** + * + * @type {boolean} + * @memberof DeleteAgentOverlay200Response + */ + 'success'?: boolean; + /** + * + * @type {string} + * @memberof DeleteAgentOverlay200Response + */ + 'message'?: string; +} /** * * @export @@ -3088,6 +3356,25 @@ export interface DeleteSkillCollection200Response { */ 'message'?: string; } +/** + * + * @export + * @interface DeleteSlackBot200Response + */ +export interface DeleteSlackBot200Response { + /** + * + * @type {boolean} + * @memberof DeleteSlackBot200Response + */ + 'success'?: boolean; + /** + * + * @type {string} + * @memberof DeleteSlackBot200Response + */ + 'message'?: string; +} /** * * @export @@ -3181,6 +3468,12 @@ export interface DeleteVectorDocumentsRequest { * @memberof DeleteVectorDocumentsRequest */ 'documentIds'?: Array; + /** + * Delete documents by key + * @type {Array} + * @memberof DeleteVectorDocumentsRequest + */ + 'keys'?: Array; /** * * @type {DeleteVectorDocumentsRequestMetadata} @@ -3703,6 +3996,36 @@ export interface GetAIAgent200ResponseAgent { * @memberof GetAIAgent200ResponseAgent */ 'allowedCollections'?: Array; + /** + * + * @type {Array} + * @memberof GetAIAgent200ResponseAgent + */ + 'assignedSkills'?: Array; + /** + * Whether 1M context window is enabled + * @type {boolean} + * @memberof GetAIAgent200ResponseAgent + */ + 'longContext'?: boolean; + /** + * Guardrail preset name + * @type {string} + * @memberof GetAIAgent200ResponseAgent + */ + 'guardrailPreset'?: string; + /** + * Whether this is a platform-managed global agent + * @type {boolean} + * @memberof GetAIAgent200ResponseAgent + */ + 'isGlobal'?: boolean; + /** + * Whether the requesting org has a per-org overlay for this global agent + * @type {boolean} + * @memberof GetAIAgent200ResponseAgent + */ + 'hasOverlay'?: boolean; /** * * @type {string} @@ -4194,6 +4517,135 @@ export interface GetAIUsageStats200ResponseByModelValue { */ 'tokens'?: number; } +/** + * + * @export + * @interface GetAgentOverlay200Response + */ +export interface GetAgentOverlay200Response { + /** + * + * @type {GetAgentOverlay200ResponseOverlay} + * @memberof GetAgentOverlay200Response + */ + 'overlay'?: GetAgentOverlay200ResponseOverlay | null; + /** + * + * @type {GetAgentOverlay200ResponseBase} + * @memberof GetAgentOverlay200Response + */ + 'base'?: GetAgentOverlay200ResponseBase; +} +/** + * Base global agent metadata + * @export + * @interface GetAgentOverlay200ResponseBase + */ +export interface GetAgentOverlay200ResponseBase { + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseBase + */ + 'agentId'?: string; + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseBase + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseBase + */ + 'modelId'?: string; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseBase + */ + 'allowedTools'?: Array; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseBase + */ + 'assignedSkillIds'?: Array; +} +/** + * + * @export + * @interface GetAgentOverlay200ResponseOverlay + */ +export interface GetAgentOverlay200ResponseOverlay { + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'modelId'?: string; + /** + * + * @type {number} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'temperature'?: number; + /** + * + * @type {number} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'maxTokens'?: number; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'disabledSkills'?: Array; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'additionalSkills'?: Array; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'additionalTools'?: Array; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'disabledTools'?: Array; + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'systemPromptAppend'?: string; + /** + * + * @type {Array} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'allowedCollections'?: Array; + /** + * + * @type {string} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'guardrailPreset'?: string; + /** + * + * @type {number} + * @memberof GetAgentOverlay200ResponseOverlay + */ + 'version'?: number; +} /** * * @export @@ -4534,6 +4986,176 @@ export interface GetFile200Response { */ 'createdAt'?: string; } +/** + * + * @export + * @interface GetGovernanceConfig200Response + */ +export interface GetGovernanceConfig200Response { + /** + * + * @type {string} + * @memberof GetGovernanceConfig200Response + */ + 'orgId'?: string; + /** + * + * @type {boolean} + * @memberof GetGovernanceConfig200Response + */ + 'aiEnabled'?: boolean; + /** + * + * @type {string} + * @memberof GetGovernanceConfig200Response + */ + 'modelPolicy'?: GetGovernanceConfig200ResponseModelPolicyEnum; + /** + * + * @type {Array} + * @memberof GetGovernanceConfig200Response + */ + 'modelList'?: Array; + /** + * + * @type {string} + * @memberof GetGovernanceConfig200Response + */ + 'mandatoryGuardrailPreset'?: string | null; + /** + * + * @type {Array} + * @memberof GetGovernanceConfig200Response + */ + 'mandatoryFilterPolicies'?: Array; + /** + * + * @type {GetGovernanceConfig200ResponseSpendLimits} + * @memberof GetGovernanceConfig200Response + */ + 'spendLimits'?: GetGovernanceConfig200ResponseSpendLimits; + /** + * + * @type {number} + * @memberof GetGovernanceConfig200Response + */ + 'version'?: number; +} + +export const GetGovernanceConfig200ResponseModelPolicyEnum = { + Unrestricted: 'unrestricted', + Allowlist: 'allowlist', + Blocklist: 'blocklist' +} as const; + +export type GetGovernanceConfig200ResponseModelPolicyEnum = typeof GetGovernanceConfig200ResponseModelPolicyEnum[keyof typeof GetGovernanceConfig200ResponseModelPolicyEnum]; + +/** + * + * @export + * @interface GetGovernanceConfig200ResponseSpendLimits + */ +export interface GetGovernanceConfig200ResponseSpendLimits { + /** + * + * @type {number} + * @memberof GetGovernanceConfig200ResponseSpendLimits + */ + 'monthlyBudgetCents'?: number | null; + /** + * + * @type {number} + * @memberof GetGovernanceConfig200ResponseSpendLimits + */ + 'dailyBudgetCents'?: number | null; + /** + * + * @type {number} + * @memberof GetGovernanceConfig200ResponseSpendLimits + */ + 'perUserMonthlyBudgetCents'?: number | null; + /** + * + * @type {number} + * @memberof GetGovernanceConfig200ResponseSpendLimits + */ + 'perUserDailyBudgetCents'?: number | null; + /** + * + * @type {number} + * @memberof GetGovernanceConfig200ResponseSpendLimits + */ + 'warningThresholdPercent'?: number | null; +} +/** + * + * @export + * @interface GetMyUsage200Response + */ +export interface GetMyUsage200Response { + /** + * + * @type {string} + * @memberof GetMyUsage200Response + */ + 'userId'?: string; + /** + * + * @type {string} + * @memberof GetMyUsage200Response + */ + 'currentMonth'?: string; + /** + * + * @type {GetMyUsage200ResponseMonthly} + * @memberof GetMyUsage200Response + */ + 'monthly'?: GetMyUsage200ResponseMonthly; + /** + * + * @type {GetMyUsage200ResponseDaily} + * @memberof GetMyUsage200Response + */ + 'daily'?: GetMyUsage200ResponseDaily; + /** + * + * @type {object} + * @memberof GetMyUsage200Response + */ + 'quota'?: object | null; +} +/** + * + * @export + * @interface GetMyUsage200ResponseDaily + */ +export interface GetMyUsage200ResponseDaily { + /** + * + * @type {number} + * @memberof GetMyUsage200ResponseDaily + */ + 'spendCents'?: number; +} +/** + * + * @export + * @interface GetMyUsage200ResponseMonthly + */ +export interface GetMyUsage200ResponseMonthly { + /** + * + * @type {number} + * @memberof GetMyUsage200ResponseMonthly + */ + 'spendCents'?: number; + /** + * + * @type {number} + * @memberof GetMyUsage200ResponseMonthly + */ + 'requestCount'?: number; +} /** * * @export @@ -4638,6 +5260,112 @@ export interface GetSkill200ResponseSkill { */ 'updatedAt'?: string; } +/** + * + * @export + * @interface GetSlackBot200Response + */ +export interface GetSlackBot200Response { + /** + * + * @type {GetSlackBot200ResponseBot} + * @memberof GetSlackBot200Response + */ + 'bot'?: GetSlackBot200ResponseBot; +} +/** + * + * @export + * @interface GetSlackBot200ResponseBot + */ +export interface GetSlackBot200ResponseBot { + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'botId'?: string; + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'agentId'?: string; + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'setupType'?: GetSlackBot200ResponseBotSetupTypeEnum; + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'status'?: GetSlackBot200ResponseBotStatusEnum; + /** + * + * @type {boolean} + * @memberof GetSlackBot200ResponseBot + */ + 'connected'?: boolean; + /** + * + * @type {number} + * @memberof GetSlackBot200ResponseBot + */ + 'sessionTtlDays'?: number; + /** + * + * @type {Array} + * @memberof GetSlackBot200ResponseBot + */ + 'allowedChannels'?: Array; + /** + * + * @type {boolean} + * @memberof GetSlackBot200ResponseBot + */ + 'keywordsEnabled'?: boolean; + /** + * + * @type {Array} + * @memberof GetSlackBot200ResponseBot + */ + 'keywords'?: Array; + /** + * + * @type {Array} + * @memberof GetSlackBot200ResponseBot + */ + 'slashCommands'?: Array; + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'createdAt'?: string; + /** + * + * @type {string} + * @memberof GetSlackBot200ResponseBot + */ + 'updatedAt'?: string; +} + +export const GetSlackBot200ResponseBotSetupTypeEnum = { + Quant: 'quant', + Byo: 'byo' +} as const; + +export type GetSlackBot200ResponseBotSetupTypeEnum = typeof GetSlackBot200ResponseBotSetupTypeEnum[keyof typeof GetSlackBot200ResponseBotSetupTypeEnum]; +export const GetSlackBot200ResponseBotStatusEnum = { + Active: 'active', + Inactive: 'inactive' +} as const; + +export type GetSlackBot200ResponseBotStatusEnum = typeof GetSlackBot200ResponseBotStatusEnum[keyof typeof GetSlackBot200ResponseBotStatusEnum]; + /** * * @export @@ -5756,6 +6484,36 @@ export interface ListAIAgents200ResponseAgentsInner { * @memberof ListAIAgents200ResponseAgentsInner */ 'allowedTools'?: Array; + /** + * + * @type {Array} + * @memberof ListAIAgents200ResponseAgentsInner + */ + 'assignedSkills'?: Array; + /** + * + * @type {boolean} + * @memberof ListAIAgents200ResponseAgentsInner + */ + 'longContext'?: boolean; + /** + * + * @type {string} + * @memberof ListAIAgents200ResponseAgentsInner + */ + 'guardrailPreset'?: string; + /** + * + * @type {boolean} + * @memberof ListAIAgents200ResponseAgentsInner + */ + 'isGlobal'?: boolean; + /** + * + * @type {boolean} + * @memberof ListAIAgents200ResponseAgentsInner + */ + 'hasOverlay'?: boolean; /** * * @type {string} @@ -6542,6 +7300,88 @@ export interface ListSkills200ResponseSkillsInner { */ 'updatedAt'?: string; } +/** + * + * @export + * @interface ListSlackBots200Response + */ +export interface ListSlackBots200Response { + /** + * + * @type {Array} + * @memberof ListSlackBots200Response + */ + 'bots'?: Array; +} +/** + * + * @export + * @interface ListSlackBots200ResponseBotsInner + */ +export interface ListSlackBots200ResponseBotsInner { + /** + * + * @type {string} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'botId'?: string; + /** + * + * @type {string} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'agentId'?: string; + /** + * + * @type {string} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'setupType'?: ListSlackBots200ResponseBotsInnerSetupTypeEnum; + /** + * + * @type {string} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'status'?: ListSlackBots200ResponseBotsInnerStatusEnum; + /** + * + * @type {boolean} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'connected'?: boolean; + /** + * + * @type {number} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'sessionTtlDays'?: number; + /** + * + * @type {boolean} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'keywordsEnabled'?: boolean; + /** + * + * @type {string} + * @memberof ListSlackBots200ResponseBotsInner + */ + 'createdAt'?: string; +} + +export const ListSlackBots200ResponseBotsInnerSetupTypeEnum = { + Quant: 'quant', + Byo: 'byo' +} as const; + +export type ListSlackBots200ResponseBotsInnerSetupTypeEnum = typeof ListSlackBots200ResponseBotsInnerSetupTypeEnum[keyof typeof ListSlackBots200ResponseBotsInnerSetupTypeEnum]; +export const ListSlackBots200ResponseBotsInnerStatusEnum = { + Active: 'active', + Inactive: 'inactive' +} as const; + +export type ListSlackBots200ResponseBotsInnerStatusEnum = typeof ListSlackBots200ResponseBotsInnerStatusEnum[keyof typeof ListSlackBots200ResponseBotsInnerStatusEnum]; + /** * * @export @@ -7251,6 +8091,76 @@ export const ScalingPolicyMetricEnum = { export type ScalingPolicyMetricEnum = typeof ScalingPolicyMetricEnum[keyof typeof ScalingPolicyMetricEnum]; +/** + * + * @export + * @interface SearchSlackWorkspaceChannels200Response + */ +export interface SearchSlackWorkspaceChannels200Response { + /** + * + * @type {Array} + * @memberof SearchSlackWorkspaceChannels200Response + */ + 'results'?: Array; +} +/** + * + * @export + * @interface SearchSlackWorkspaceChannels200ResponseResultsInner + */ +export interface SearchSlackWorkspaceChannels200ResponseResultsInner { + /** + * + * @type {string} + * @memberof SearchSlackWorkspaceChannels200ResponseResultsInner + */ + 'id'?: string; + /** + * + * @type {string} + * @memberof SearchSlackWorkspaceChannels200ResponseResultsInner + */ + 'name'?: string; +} +/** + * + * @export + * @interface SearchSlackWorkspaceUsers200Response + */ +export interface SearchSlackWorkspaceUsers200Response { + /** + * + * @type {Array} + * @memberof SearchSlackWorkspaceUsers200Response + */ + 'results'?: Array; +} +/** + * + * @export + * @interface SearchSlackWorkspaceUsers200ResponseResultsInner + */ +export interface SearchSlackWorkspaceUsers200ResponseResultsInner { + /** + * + * @type {string} + * @memberof SearchSlackWorkspaceUsers200ResponseResultsInner + */ + 'id'?: string; + /** + * + * @type {string} + * @memberof SearchSlackWorkspaceUsers200ResponseResultsInner + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof SearchSlackWorkspaceUsers200ResponseResultsInner + */ + 'real_name'?: string; +} /** * Spot instance strategy configuration for controlling cost vs reliability. Spot instances provide significant cost savings (~70%) but may be interrupted by AWS. Available for non-production environments. * @export @@ -7454,12 +8364,42 @@ export interface TokensCreate201Response { * @memberof TokensCreate201Response */ 'token'?: string; + /** + * Token ID + * @type {number} + * @memberof TokensCreate201Response + */ + 'id'?: number; /** * * @type {string} * @memberof TokensCreate201Response */ 'name'?: string; + /** + * + * @type {Array} + * @memberof TokensCreate201Response + */ + 'scopes'?: Array | null; + /** + * + * @type {Array} + * @memberof TokensCreate201Response + */ + 'projects'?: Array | null; + /** + * + * @type {string} + * @memberof TokensCreate201Response + */ + 'preset'?: string | null; + /** + * + * @type {string} + * @memberof TokensCreate201Response + */ + 'expires_at'?: string | null; /** * * @type {string} @@ -7479,7 +8419,41 @@ export interface TokensCreateRequest { * @memberof TokensCreateRequest */ 'name': string; + /** + * Preset scope bundle + * @type {string} + * @memberof TokensCreateRequest + */ + 'preset'?: string | null; + /** + * Individual scopes (mutually exclusive with preset) + * @type {Array} + * @memberof TokensCreateRequest + */ + 'scopes'?: Array | null; + /** + * Project IDs to restrict this token to + * @type {Array} + * @memberof TokensCreateRequest + */ + 'projects'?: Array | null; + /** + * Token expiration period + * @type {string} + * @memberof TokensCreateRequest + */ + 'expires_in'?: TokensCreateRequestExpiresInEnum | null; } + +export const TokensCreateRequestExpiresInEnum = { + _30d: '30d', + _90d: '90d', + _365d: '365d', + Never: 'never' +} as const; + +export type TokensCreateRequestExpiresInEnum = typeof TokensCreateRequestExpiresInEnum[keyof typeof TokensCreateRequestExpiresInEnum]; + /** * * @export @@ -7609,7 +8583,40 @@ export interface UpdateAIAgentRequest { * @memberof UpdateAIAgentRequest */ 'allowedCollections'?: Array; + /** + * Skill IDs to assign to this agent + * @type {Array} + * @memberof UpdateAIAgentRequest + */ + 'assignedSkills'?: Array; + /** + * Enable 1M context window support + * @type {boolean} + * @memberof UpdateAIAgentRequest + */ + 'longContext'?: boolean; + /** + * Guardrail preset name + * @type {string} + * @memberof UpdateAIAgentRequest + */ + 'guardrailPreset'?: UpdateAIAgentRequestGuardrailPresetEnum; + /** + * Filter policy IDs to apply to this agent\'s inference requests + * @type {Array} + * @memberof UpdateAIAgentRequest + */ + 'filterPolicies'?: Array; } + +export const UpdateAIAgentRequestGuardrailPresetEnum = { + Official: 'official', + OfficialSensitive: 'official-sensitive', + Protected: 'protected' +} as const; + +export type UpdateAIAgentRequestGuardrailPresetEnum = typeof UpdateAIAgentRequestGuardrailPresetEnum[keyof typeof UpdateAIAgentRequestGuardrailPresetEnum]; + /** * * @export @@ -7807,6 +8814,121 @@ export interface UpdateEnvironmentVariableRequest { */ 'value'?: string; } +/** + * + * @export + * @interface UpdateFilterPolicyRequest + */ +export interface UpdateFilterPolicyRequest { + /** + * + * @type {string} + * @memberof UpdateFilterPolicyRequest + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof UpdateFilterPolicyRequest + */ + 'description'?: string | null; + /** + * + * @type {boolean} + * @memberof UpdateFilterPolicyRequest + */ + 'enabled'?: boolean; + /** + * + * @type {Array} + * @memberof UpdateFilterPolicyRequest + */ + 'rules'?: Array; +} +/** + * + * @export + * @interface UpdateGovernanceConfig200Response + */ +export interface UpdateGovernanceConfig200Response { + /** + * + * @type {boolean} + * @memberof UpdateGovernanceConfig200Response + */ + 'success'?: boolean; + /** + * + * @type {object} + * @memberof UpdateGovernanceConfig200Response + */ + 'config'?: object; +} +/** + * + * @export + * @interface UpdateGovernanceConfigRequest + */ +export interface UpdateGovernanceConfigRequest { + /** + * + * @type {boolean} + * @memberof UpdateGovernanceConfigRequest + */ + 'aiEnabled': boolean; + /** + * + * @type {string} + * @memberof UpdateGovernanceConfigRequest + */ + 'modelPolicy': UpdateGovernanceConfigRequestModelPolicyEnum; + /** + * + * @type {Array} + * @memberof UpdateGovernanceConfigRequest + */ + 'modelList'?: Array; + /** + * + * @type {string} + * @memberof UpdateGovernanceConfigRequest + */ + 'mandatoryGuardrailPreset'?: UpdateGovernanceConfigRequestMandatoryGuardrailPresetEnum | null; + /** + * + * @type {Array} + * @memberof UpdateGovernanceConfigRequest + */ + 'mandatoryFilterPolicies'?: Array; + /** + * + * @type {object} + * @memberof UpdateGovernanceConfigRequest + */ + 'spendLimits'?: object; + /** + * + * @type {number} + * @memberof UpdateGovernanceConfigRequest + */ + 'version'?: number; +} + +export const UpdateGovernanceConfigRequestModelPolicyEnum = { + Unrestricted: 'unrestricted', + Allowlist: 'allowlist', + Blocklist: 'blocklist' +} as const; + +export type UpdateGovernanceConfigRequestModelPolicyEnum = typeof UpdateGovernanceConfigRequestModelPolicyEnum[keyof typeof UpdateGovernanceConfigRequestModelPolicyEnum]; +export const UpdateGovernanceConfigRequestMandatoryGuardrailPresetEnum = { + Official: 'official', + OfficialSensitive: 'official-sensitive', + Protected: 'protected' +} as const; + +export type UpdateGovernanceConfigRequestMandatoryGuardrailPresetEnum = typeof UpdateGovernanceConfigRequestMandatoryGuardrailPresetEnum[keyof typeof UpdateGovernanceConfigRequestMandatoryGuardrailPresetEnum]; + /** * * @export @@ -7905,6 +9027,63 @@ export interface UpdateSkillRequest { */ 'namespace'?: string; } +/** + * + * @export + * @interface UpdateSlackBotRequest + */ +export interface UpdateSlackBotRequest { + /** + * Change the backing AI agent + * @type {string} + * @memberof UpdateSlackBotRequest + */ + 'agentId'?: string; + /** + * Enable or disable the bot + * @type {string} + * @memberof UpdateSlackBotRequest + */ + 'status'?: UpdateSlackBotRequestStatusEnum; + /** + * Session TTL in days + * @type {number} + * @memberof UpdateSlackBotRequest + */ + 'sessionTtlDays'?: number; + /** + * Slack channel IDs the bot may respond in + * @type {Array} + * @memberof UpdateSlackBotRequest + */ + 'allowedChannels'?: Array; + /** + * Whether keyword triggers are enabled + * @type {boolean} + * @memberof UpdateSlackBotRequest + */ + 'keywordsEnabled'?: boolean; + /** + * Keywords that trigger the bot + * @type {Array} + * @memberof UpdateSlackBotRequest + */ + 'keywords'?: Array; + /** + * Slash commands the bot responds to + * @type {Array} + * @memberof UpdateSlackBotRequest + */ + 'slashCommands'?: Array; +} + +export const UpdateSlackBotRequestStatusEnum = { + Active: 'active', + Inactive: 'inactive' +} as const; + +export type UpdateSlackBotRequestStatusEnum = typeof UpdateSlackBotRequestStatusEnum[keyof typeof UpdateSlackBotRequestStatusEnum]; + /** * * @export @@ -8158,97 +9337,98 @@ export interface UploadFileRequest { /** * * @export - * @interface UploadVectorDocuments200Response + * @interface UpsertAgentOverlay200Response */ -export interface UploadVectorDocuments200Response { +export interface UpsertAgentOverlay200Response { /** * - * @type {boolean} - * @memberof UploadVectorDocuments200Response + * @type {object} + * @memberof UpsertAgentOverlay200Response */ - 'success'?: boolean; + 'overlay'?: object; +} +/** + * + * @export + * @interface UpsertAgentOverlayRequest + */ +export interface UpsertAgentOverlayRequest { /** - * - * @type {Array} - * @memberof UploadVectorDocuments200Response + * Override the base agent\'s model + * @type {string} + * @memberof UpsertAgentOverlayRequest */ - 'documentIds'?: Array; + 'modelId'?: string; /** - * + * Override temperature * @type {number} - * @memberof UploadVectorDocuments200Response + * @memberof UpsertAgentOverlayRequest */ - 'chunksCreated'?: number; + 'temperature'?: number; /** - * - * @type {string} - * @memberof UploadVectorDocuments200Response + * Override max tokens + * @type {number} + * @memberof UpsertAgentOverlayRequest */ - 'message'?: string; -} -/** - * - * @export - * @interface UploadVectorDocumentsRequest - */ -export interface UploadVectorDocumentsRequest { + 'maxTokens'?: number; /** - * - * @type {Array} - * @memberof UploadVectorDocumentsRequest + * Global skill IDs to exclude + * @type {Array} + * @memberof UpsertAgentOverlayRequest */ - 'documents': Array; -} -/** - * - * @export - * @interface UploadVectorDocumentsRequestDocumentsInner - */ -export interface UploadVectorDocumentsRequestDocumentsInner { + 'disabledSkills'?: Array; /** - * Document text content - * @type {string} - * @memberof UploadVectorDocumentsRequestDocumentsInner + * Org-owned skill IDs to add + * @type {Array} + * @memberof UpsertAgentOverlayRequest */ - 'content': string; + 'additionalSkills'?: Array; /** - * - * @type {UploadVectorDocumentsRequestDocumentsInnerMetadata} - * @memberof UploadVectorDocumentsRequestDocumentsInner + * Tool names to add + * @type {Array} + * @memberof UpsertAgentOverlayRequest */ - 'metadata'?: UploadVectorDocumentsRequestDocumentsInnerMetadata; -} -/** - * - * @export - * @interface UploadVectorDocumentsRequestDocumentsInnerMetadata - */ -export interface UploadVectorDocumentsRequestDocumentsInnerMetadata { + 'additionalTools'?: Array; /** - * - * @type {string} - * @memberof UploadVectorDocumentsRequestDocumentsInnerMetadata + * Tool names to remove + * @type {Array} + * @memberof UpsertAgentOverlayRequest */ - 'title'?: string; + 'disabledTools'?: Array; /** - * + * Text appended to base system prompt * @type {string} - * @memberof UploadVectorDocumentsRequestDocumentsInnerMetadata + * @memberof UpsertAgentOverlayRequest */ - 'source_url'?: string; + 'systemPromptAppend'?: string; /** - * + * Vector DB collections + * @type {Array} + * @memberof UpsertAgentOverlayRequest + */ + 'allowedCollections'?: Array; + /** + * Guardrail preset * @type {string} - * @memberof UploadVectorDocumentsRequestDocumentsInnerMetadata + * @memberof UpsertAgentOverlayRequest */ - 'section'?: string; + 'guardrailPreset'?: UpsertAgentOverlayRequestGuardrailPresetEnum; /** - * - * @type {Array} - * @memberof UploadVectorDocumentsRequestDocumentsInnerMetadata + * Current version for optimistic concurrency + * @type {number} + * @memberof UpsertAgentOverlayRequest */ - 'tags'?: Array; + 'version'?: number; } + +export const UpsertAgentOverlayRequestGuardrailPresetEnum = { + Official: 'official', + OfficialSensitive: 'official-sensitive', + Protected: 'protected' +} as const; + +export type UpsertAgentOverlayRequestGuardrailPresetEnum = typeof UpsertAgentOverlayRequestGuardrailPresetEnum[keyof typeof UpsertAgentOverlayRequestGuardrailPresetEnum]; + /** * * @export @@ -10645,6 +11825,24 @@ export interface V2Rule { * @memberof V2Rule */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2Rule + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2Rule + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2Rule + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -10760,6 +11958,24 @@ export interface V2RuleAuth { * @memberof V2RuleAuth */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleAuth + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleAuth + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleAuth + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -10906,6 +12122,24 @@ export interface V2RuleAuthRequest { * @memberof V2RuleAuthRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleAuthRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleAuthRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleAuthRequest + */ + 'asn_is_not'?: Array; /** * Authentication username * @type {string} @@ -11009,6 +12243,24 @@ export interface V2RuleBotChallenge { * @memberof V2RuleBotChallenge */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleBotChallenge + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleBotChallenge + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleBotChallenge + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -11161,6 +12413,24 @@ export interface V2RuleBotChallengeRequest { * @memberof V2RuleBotChallengeRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleBotChallengeRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleBotChallengeRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleBotChallengeRequest + */ + 'asn_is_not'?: Array; /** * Challenge type (invisible or checkbox) * @type {string} @@ -11270,6 +12540,24 @@ export interface V2RuleContentFilter { * @memberof V2RuleContentFilter */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleContentFilter + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleContentFilter + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleContentFilter + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -11410,6 +12698,24 @@ export interface V2RuleContentFilterRequest { * @memberof V2RuleContentFilterRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleContentFilterRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleContentFilterRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleContentFilterRequest + */ + 'asn_is_not'?: Array; /** * Function UUID * @type {string} @@ -11507,6 +12813,24 @@ export interface V2RuleCustomResponse { * @memberof V2RuleCustomResponse */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleCustomResponse + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleCustomResponse + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleCustomResponse + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -11653,6 +12977,24 @@ export interface V2RuleCustomResponseRequest { * @memberof V2RuleCustomResponseRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleCustomResponseRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleCustomResponseRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleCustomResponseRequest + */ + 'asn_is_not'?: Array; /** * Custom response body content * @type {string} @@ -11768,6 +13110,24 @@ export interface V2RuleFunction { * @memberof V2RuleFunction */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleFunction + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleFunction + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleFunction + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -11908,6 +13268,24 @@ export interface V2RuleFunctionRequest { * @memberof V2RuleFunctionRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleFunctionRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleFunctionRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleFunctionRequest + */ + 'asn_is_not'?: Array; /** * Function UUID * @type {string} @@ -12005,6 +13383,24 @@ export interface V2RuleHeader { * @memberof V2RuleHeader */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleHeader + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleHeader + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleHeader + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -12145,6 +13541,24 @@ export interface V2RuleHeaderRequest { * @memberof V2RuleHeaderRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleHeaderRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleHeaderRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleHeaderRequest + */ + 'asn_is_not'?: Array; /** * Headers to set * @type {{ [key: string]: string; }} @@ -12242,6 +13656,24 @@ export interface V2RuleProxy { * @memberof V2RuleProxy */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleProxy + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleProxy + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleProxy + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -12602,6 +14034,24 @@ export interface V2RuleProxyRequest { * @memberof V2RuleProxyRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleProxyRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleProxyRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleProxyRequest + */ + 'asn_is_not'?: Array; /** * Target URL to proxy to * @type {string} @@ -12843,6 +14293,24 @@ export interface V2RuleRedirect { * @memberof V2RuleRedirect */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleRedirect + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleRedirect + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleRedirect + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -12989,6 +14457,24 @@ export interface V2RuleRedirectRequest { * @memberof V2RuleRedirectRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleRedirectRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleRedirectRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleRedirectRequest + */ + 'asn_is_not'?: Array; /** * Redirect destination URL * @type {string} @@ -13098,6 +14584,24 @@ export interface V2RuleRequest { * @memberof V2RuleRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleRequest + */ + 'asn_is_not'?: Array; } /** * @@ -13189,6 +14693,24 @@ export interface V2RuleServeStatic { * @memberof V2RuleServeStatic */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleServeStatic + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleServeStatic + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleServeStatic + */ + 'asn_is_not'?: Array; /** * Country code * @type {string} @@ -13329,6 +14851,24 @@ export interface V2RuleServeStaticRequest { * @memberof V2RuleServeStaticRequest */ 'ip_is_not'?: Array; + /** + * ASN filter type (asn_is, asn_is_not, any) + * @type {string} + * @memberof V2RuleServeStaticRequest + */ + 'asn'?: string; + /** + * Allowed AS numbers + * @type {Array} + * @memberof V2RuleServeStaticRequest + */ + 'asn_is'?: Array; + /** + * Excluded AS numbers + * @type {Array} + * @memberof V2RuleServeStaticRequest + */ + 'asn_is_not'?: Array; /** * Path to the static file to serve * @type {string} @@ -13995,6 +15535,48 @@ export const AIAgentsApiAxiosParamCreator = function (configuration?: Configurat + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + * @summary Delete Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAgentOverlay: async (organisation: string, agentId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('deleteAgentOverlay', 'organisation', organisation) + // verify required parameter 'agentId' is not null or undefined + assertParamExists('deleteAgentOverlay', 'agentId', agentId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"agentId"}}`, encodeURIComponent(String(agentId))); + // 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}; @@ -14037,6 +15619,48 @@ export const AIAgentsApiAxiosParamCreator = function (configuration?: Configurat + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + * @summary Get Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier (e.g., \'quantgov-code\') + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAgentOverlay: async (organisation: string, agentId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getAgentOverlay', 'organisation', organisation) + // verify required parameter 'agentId' is not null or undefined + assertParamExists('getAgentOverlay', 'agentId', agentId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"agentId"}}`, encodeURIComponent(String(agentId))); + // 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}; @@ -14132,6 +15756,54 @@ export const AIAgentsApiAxiosParamCreator = function (configuration?: Configurat localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateAIAgentRequest, localVarRequestOptions, configuration) + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + * @summary Upsert Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {UpsertAgentOverlayRequest} upsertAgentOverlayRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upsertAgentOverlay: async (organisation: string, agentId: string, upsertAgentOverlayRequest: UpsertAgentOverlayRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('upsertAgentOverlay', 'organisation', organisation) + // verify required parameter 'agentId' is not null or undefined + assertParamExists('upsertAgentOverlay', 'agentId', agentId) + // verify required parameter 'upsertAgentOverlayRequest' is not null or undefined + assertParamExists('upsertAgentOverlay', 'upsertAgentOverlayRequest', upsertAgentOverlayRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"agentId"}}`, encodeURIComponent(String(agentId))); + // 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: 'PUT', ...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(upsertAgentOverlayRequest, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -14190,6 +15862,20 @@ export const AIAgentsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.deleteAIAgent']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + * @summary Delete Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAgentOverlay(organisation, agentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.deleteAgentOverlay']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Retrieves detailed configuration for a specific AI agent. * @summary Get Agent Details @@ -14204,6 +15890,20 @@ export const AIAgentsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.getAIAgent']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + * @summary Get Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier (e.g., \'quantgov-code\') + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentOverlay(organisation, agentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.getAgentOverlay']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Lists all AI agents for an organization. Agents are pre-configured AI assistants with specific system prompts, model settings, and tool permissions. * * **Features:** * - Filter by group (e.g., \'development\', \'compliance\') * - Organization-scoped * - Returns agent configurations without execution history * @summary List AI Agents @@ -14233,6 +15933,21 @@ export const AIAgentsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.updateAIAgent']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + * @summary Upsert Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {UpsertAgentOverlayRequest} upsertAgentOverlayRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async upsertAgentOverlay(organisation: string, agentId: string, upsertAgentOverlayRequest: UpsertAgentOverlayRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.upsertAgentOverlay(organisation, agentId, upsertAgentOverlayRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIAgentsApi.upsertAgentOverlay']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -14277,6 +15992,17 @@ export const AIAgentsApiFactory = function (configuration?: Configuration, baseP deleteAIAgent(organisation: string, agentId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteAIAgent(organisation, agentId, options).then((request) => request(axios, basePath)); }, + /** + * Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + * @summary Delete Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAgentOverlay(organisation, agentId, options).then((request) => request(axios, basePath)); + }, /** * Retrieves detailed configuration for a specific AI agent. * @summary Get Agent Details @@ -14288,6 +16014,17 @@ export const AIAgentsApiFactory = function (configuration?: Configuration, baseP getAIAgent(organisation: string, agentId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAIAgent(organisation, agentId, options).then((request) => request(axios, basePath)); }, + /** + * Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + * @summary Get Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier (e.g., \'quantgov-code\') + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAgentOverlay(organisation, agentId, options).then((request) => request(axios, basePath)); + }, /** * Lists all AI agents for an organization. Agents are pre-configured AI assistants with specific system prompts, model settings, and tool permissions. * * **Features:** * - Filter by group (e.g., \'development\', \'compliance\') * - Organization-scoped * - Returns agent configurations without execution history * @summary List AI Agents @@ -14311,6 +16048,18 @@ export const AIAgentsApiFactory = function (configuration?: Configuration, baseP updateAIAgent(organisation: string, agentId: string, updateAIAgentRequest: UpdateAIAgentRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateAIAgent(organisation, agentId, updateAIAgentRequest, options).then((request) => request(axios, basePath)); }, + /** + * Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + * @summary Upsert Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {UpsertAgentOverlayRequest} upsertAgentOverlayRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upsertAgentOverlay(organisation: string, agentId: string, upsertAgentOverlayRequest: UpsertAgentOverlayRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.upsertAgentOverlay(organisation, agentId, upsertAgentOverlayRequest, options).then((request) => request(axios, basePath)); + }, }; }; @@ -14361,6 +16110,19 @@ export class AIAgentsApi extends BaseAPI { return AIAgentsApiFp(this.configuration).deleteAIAgent(organisation, agentId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + * @summary Delete Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIAgentsApi + */ + public deleteAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig) { + return AIAgentsApiFp(this.configuration).deleteAgentOverlay(organisation, agentId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Retrieves detailed configuration for a specific AI agent. * @summary Get Agent Details @@ -14374,6 +16136,19 @@ export class AIAgentsApi extends BaseAPI { return AIAgentsApiFp(this.configuration).getAIAgent(organisation, agentId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + * @summary Get Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier (e.g., \'quantgov-code\') + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIAgentsApi + */ + public getAgentOverlay(organisation: string, agentId: string, options?: RawAxiosRequestConfig) { + return AIAgentsApiFp(this.configuration).getAgentOverlay(organisation, agentId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Lists all AI agents for an organization. Agents are pre-configured AI assistants with specific system prompts, model settings, and tool permissions. * * **Features:** * - Filter by group (e.g., \'development\', \'compliance\') * - Organization-scoped * - Returns agent configurations without execution history * @summary List AI Agents @@ -14400,6 +16175,20 @@ export class AIAgentsApi extends BaseAPI { public updateAIAgent(organisation: string, agentId: string, updateAIAgentRequest: UpdateAIAgentRequest, options?: RawAxiosRequestConfig) { return AIAgentsApiFp(this.configuration).updateAIAgent(organisation, agentId, updateAIAgentRequest, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + * @summary Upsert Agent Overlay + * @param {string} organisation The organisation ID + * @param {string} agentId Global agent identifier + * @param {UpsertAgentOverlayRequest} upsertAgentOverlayRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIAgentsApi + */ + public upsertAgentOverlay(organisation: string, agentId: string, upsertAgentOverlayRequest: UpsertAgentOverlayRequest, options?: RawAxiosRequestConfig) { + return AIAgentsApiFp(this.configuration).upsertAgentOverlay(organisation, agentId, upsertAgentOverlayRequest, options).then((request) => request(this.axios, this.basePath)); + } } @@ -15057,25 +16846,25 @@ export class AIFileStorageApi extends BaseAPI { /** - * AIInferenceApi - axios parameter creator + * AIFilterPoliciesApi - axios parameter creator * @export */ -export const AIInferenceApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIFilterPoliciesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling - * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * + * @summary Create an AI filter policy for an organisation * @param {string} organisation The organisation ID - * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {CreateFilterPolicyRequest} createFilterPolicyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - chatInference: async (organisation: string, chatInferenceRequest: ChatInferenceRequest, options: RawAxiosRequestConfig = {}): Promise => { + createFilterPolicy: async (organisation: string, createFilterPolicyRequest: CreateFilterPolicyRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('chatInference', 'organisation', organisation) - // verify required parameter 'chatInferenceRequest' is not null or undefined - assertParamExists('chatInference', 'chatInferenceRequest', chatInferenceRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/chat` + assertParamExists('createFilterPolicy', 'organisation', organisation) + // verify required parameter 'createFilterPolicyRequest' is not null or undefined + assertParamExists('createFilterPolicy', 'createFilterPolicyRequest', createFilterPolicyRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies` .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); @@ -15099,7 +16888,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createFilterPolicyRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15107,20 +16896,21 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) - * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support - * @param {string} organisation The organisation ID - * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * + * @summary Delete a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - chatInferenceStream: async (organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options: RawAxiosRequestConfig = {}): Promise => { + deleteFilterPolicy: async (organisation: string, policyId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('chatInferenceStream', 'organisation', organisation) - // verify required parameter 'chatInferenceStreamRequest' is not null or undefined - assertParamExists('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('deleteFilterPolicy', 'organisation', organisation) + // verify required parameter 'policyId' is not null or undefined + assertParamExists('deleteFilterPolicy', 'policyId', policyId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"policyId"}}`, encodeURIComponent(String(policyId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15128,7 +16918,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15138,12 +16928,51 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu - 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, + }; + }, + /** + * + * @summary Disable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + disableFilterPolicy: async (organisation: string, policyId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('disableFilterPolicy', 'organisation', organisation) + // verify required parameter 'policyId' is not null or undefined + assertParamExists('disableFilterPolicy', 'policyId', policyId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/disable` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"policyId"}}`, encodeURIComponent(String(policyId))); + // 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: 'PUT', ...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(chatInferenceStreamRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15151,20 +16980,21 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) - * @summary Generate text embeddings for semantic search and RAG applications - * @param {string} organisation The organisation ID - * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * + * @summary Enable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - embeddings: async (organisation: string, embeddingsRequest: EmbeddingsRequest, options: RawAxiosRequestConfig = {}): Promise => { + enableFilterPolicy: async (organisation: string, policyId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('embeddings', 'organisation', organisation) - // verify required parameter 'embeddingsRequest' is not null or undefined - assertParamExists('embeddings', 'embeddingsRequest', embeddingsRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('enableFilterPolicy', 'organisation', organisation) + // verify required parameter 'policyId' is not null or undefined + assertParamExists('enableFilterPolicy', 'policyId', policyId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/enable` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"policyId"}}`, encodeURIComponent(String(policyId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15172,7 +17002,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15182,12 +17012,51 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu - 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, + }; + }, + /** + * + * @summary Get a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFilterPolicy: async (organisation: string, policyId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getFilterPolicy', 'organisation', organisation) + // verify required parameter 'policyId' is not null or undefined + assertParamExists('getFilterPolicy', 'policyId', policyId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"policyId"}}`, encodeURIComponent(String(policyId))); + // 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}; - localVarRequestOptions.data = serializeDataIfNeeded(embeddingsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15195,21 +17064,17 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) - * @summary Get Durable Execution Status + * + * @summary List AI filter policies for an organisation * @param {string} organisation The organisation ID - * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDurableExecutionStatus: async (organisation: string, identifier: string, options: RawAxiosRequestConfig = {}): Promise => { + listFilterPolicies: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getDurableExecutionStatus', 'organisation', organisation) - // verify required parameter 'identifier' is not null or undefined - assertParamExists('getDurableExecutionStatus', 'identifier', identifier) - const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/executions/{identifier}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"identifier"}}`, encodeURIComponent(String(identifier))); + assertParamExists('listFilterPolicies', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies` + .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; @@ -15237,64 +17102,24 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes - * @summary Generate images with Amazon Nova Canvas - * @param {string} organisation The organisation ID - * @param {ImageGenerationRequest} imageGenerationRequest Image generation request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - imageGeneration: async (organisation: string, imageGenerationRequest: ImageGenerationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('imageGeneration', 'organisation', organisation) - // verify required parameter 'imageGenerationRequest' is not null or undefined - assertParamExists('imageGeneration', 'imageGenerationRequest', imageGenerationRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation` - .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(imageGenerationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. - * @summary Submit Client Tool Results (Callback) - * @param {string} organisation The organisation ID - * @param {SubmitToolCallbackRequest} submitToolCallbackRequest + * + * @summary Update a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {UpdateFilterPolicyRequest} updateFilterPolicyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - submitToolCallback: async (organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options: RawAxiosRequestConfig = {}): Promise => { + updateFilterPolicy: async (organisation: string, policyId: string, updateFilterPolicyRequest: UpdateFilterPolicyRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('submitToolCallback', 'organisation', organisation) - // verify required parameter 'submitToolCallbackRequest' is not null or undefined - assertParamExists('submitToolCallback', 'submitToolCallbackRequest', submitToolCallbackRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/callback` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('updateFilterPolicy', 'organisation', organisation) + // verify required parameter 'policyId' is not null or undefined + assertParamExists('updateFilterPolicy', 'policyId', policyId) + // verify required parameter 'updateFilterPolicyRequest' is not null or undefined + assertParamExists('updateFilterPolicy', 'updateFilterPolicyRequest', updateFilterPolicyRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"policyId"}}`, encodeURIComponent(String(policyId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -15302,7 +17127,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15317,7 +17142,7 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(submitToolCallbackRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(updateFilterPolicyRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15328,285 +17153,319 @@ export const AIInferenceApiAxiosParamCreator = function (configuration?: Configu }; /** - * AIInferenceApi - functional programming interface + * AIFilterPoliciesApi - functional programming interface * @export */ -export const AIInferenceApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIInferenceApiAxiosParamCreator(configuration) +export const AIFilterPoliciesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIFilterPoliciesApiAxiosParamCreator(configuration) return { /** - * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling - * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * + * @summary Create an AI filter policy for an organisation * @param {string} organisation The organisation ID - * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {CreateFilterPolicyRequest} createFilterPolicyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options); + async createFilterPolicy(organisation: string, createFilterPolicyRequest: CreateFilterPolicyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFilterPolicy(organisation, createFilterPolicyRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.chatInference']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.createFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) - * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support - * @param {string} organisation The organisation ID - * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * + * @summary Delete a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options); + async deleteFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFilterPolicy(organisation, policyId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.chatInferenceStream']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.deleteFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) - * @summary Generate text embeddings for semantic search and RAG applications - * @param {string} organisation The organisation ID - * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * + * @summary Disable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options); + async disableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.disableFilterPolicy(organisation, policyId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.embeddings']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.disableFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) - * @summary Get Durable Execution Status - * @param {string} organisation The organisation ID - * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * + * @summary Enable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDurableExecutionStatus(organisation, identifier, options); + async enableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.enableFilterPolicy(organisation, policyId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.getDurableExecutionStatus']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.enableFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes - * @summary Generate images with Amazon Nova Canvas - * @param {string} organisation The organisation ID - * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * + * @summary Get a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options); + async getFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFilterPolicy(organisation, policyId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.imageGeneration']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.getFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. - * @summary Submit Client Tool Results (Callback) + * + * @summary List AI filter policies for an organisation * @param {string} organisation The organisation ID - * @param {SubmitToolCallbackRequest} submitToolCallbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.submitToolCallback(organisation, submitToolCallbackRequest, options); + async listFilterPolicies(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFilterPolicies(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.submitToolCallback']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.listFilterPolicies']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {UpdateFilterPolicyRequest} updateFilterPolicyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateFilterPolicy(organisation: string, policyId: string, updateFilterPolicyRequest: UpdateFilterPolicyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateFilterPolicy(organisation, policyId, updateFilterPolicyRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIFilterPoliciesApi.updateFilterPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AIInferenceApi - factory interface + * AIFilterPoliciesApi - factory interface * @export */ -export const AIInferenceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIInferenceApiFp(configuration) +export const AIFilterPoliciesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIFilterPoliciesApiFp(configuration) return { /** - * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling - * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * + * @summary Create an AI filter policy for an organisation * @param {string} organisation The organisation ID - * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {CreateFilterPolicyRequest} createFilterPolicyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath)); + createFilterPolicy(organisation: string, createFilterPolicyRequest: CreateFilterPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createFilterPolicy(organisation, createFilterPolicyRequest, options).then((request) => request(axios, basePath)); }, /** - * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) - * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support - * @param {string} organisation The organisation ID - * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * + * @summary Delete a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath)); + deleteFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteFilterPolicy(organisation, policyId, options).then((request) => request(axios, basePath)); }, /** - * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) - * @summary Generate text embeddings for semantic search and RAG applications - * @param {string} organisation The organisation ID - * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * + * @summary Disable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath)); + disableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.disableFilterPolicy(organisation, policyId, options).then((request) => request(axios, basePath)); }, /** - * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) - * @summary Get Durable Execution Status - * @param {string} organisation The organisation ID - * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * + * @summary Enable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getDurableExecutionStatus(organisation, identifier, options).then((request) => request(axios, basePath)); + enableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.enableFilterPolicy(organisation, policyId, options).then((request) => request(axios, basePath)); }, /** - * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes - * @summary Generate images with Amazon Nova Canvas - * @param {string} organisation The organisation ID - * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * + * @summary Get a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} */ - imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath)); + getFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFilterPolicy(organisation, policyId, options).then((request) => request(axios, basePath)); }, /** - * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. - * @summary Submit Client Tool Results (Callback) + * + * @summary List AI filter policies for an organisation * @param {string} organisation The organisation ID - * @param {SubmitToolCallbackRequest} submitToolCallbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(axios, basePath)); + listFilterPolicies(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listFilterPolicies(organisation, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {UpdateFilterPolicyRequest} updateFilterPolicyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateFilterPolicy(organisation: string, policyId: string, updateFilterPolicyRequest: UpdateFilterPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateFilterPolicy(organisation, policyId, updateFilterPolicyRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AIInferenceApi - object-oriented interface + * AIFilterPoliciesApi - object-oriented interface * @export - * @class AIInferenceApi + * @class AIFilterPoliciesApi * @extends {BaseAPI} */ -export class AIInferenceApi extends BaseAPI { +export class AIFilterPoliciesApi extends BaseAPI { /** - * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling - * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * + * @summary Create an AI filter policy for an organisation * @param {string} organisation The organisation ID - * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {CreateFilterPolicyRequest} createFilterPolicyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath)); + public createFilterPolicy(organisation: string, createFilterPolicyRequest: CreateFilterPolicyRequest, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).createFilterPolicy(organisation, createFilterPolicyRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) - * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support - * @param {string} organisation The organisation ID - * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * + * @summary Delete a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath)); + public deleteFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).deleteFilterPolicy(organisation, policyId, options).then((request) => request(this.axios, this.basePath)); } /** - * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) - * @summary Generate text embeddings for semantic search and RAG applications - * @param {string} organisation The organisation ID - * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * + * @summary Disable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath)); + public disableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).disableFilterPolicy(organisation, policyId, options).then((request) => request(this.axios, this.basePath)); } /** - * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) - * @summary Get Durable Execution Status - * @param {string} organisation The organisation ID - * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * + * @summary Enable a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).getDurableExecutionStatus(organisation, identifier, options).then((request) => request(this.axios, this.basePath)); + public enableFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).enableFilterPolicy(organisation, policyId, options).then((request) => request(this.axios, this.basePath)); } /** - * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes - * @summary Generate images with Amazon Nova Canvas - * @param {string} organisation The organisation ID - * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * + * @summary Get a specific AI filter policy + * @param {string} organisation + * @param {string} policyId * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath)); + public getFilterPolicy(organisation: string, policyId: string, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).getFilterPolicy(organisation, policyId, options).then((request) => request(this.axios, this.basePath)); } /** - * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. - * @summary Submit Client Tool Results (Callback) + * + * @summary List AI filter policies for an organisation * @param {string} organisation The organisation ID - * @param {SubmitToolCallbackRequest} submitToolCallbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIInferenceApi + * @memberof AIFilterPoliciesApi */ - public submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig) { - return AIInferenceApiFp(this.configuration).submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(this.axios, this.basePath)); + public listFilterPolicies(organisation: string, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).listFilterPolicies(organisation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update a specific AI filter policy + * @param {string} organisation + * @param {string} policyId + * @param {UpdateFilterPolicyRequest} updateFilterPolicyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIFilterPoliciesApi + */ + public updateFilterPolicy(organisation: string, policyId: string, updateFilterPolicyRequest: UpdateFilterPolicyRequest, options?: RawAxiosRequestConfig) { + return AIFilterPoliciesApiFp(this.configuration).updateFilterPolicy(organisation, policyId, updateFilterPolicyRequest, options).then((request) => request(this.axios, this.basePath)); } } /** - * AIModelsApi - axios parameter creator + * AIGovernanceApi - axios parameter creator * @export */ -export const AIModelsApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIGovernanceApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings - * @summary Get AI Model Details + * + * @summary Get AI governance configuration for an organisation * @param {string} organisation The organisation ID - * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIModel: async (organisation: string, modelId: string, options: RawAxiosRequestConfig = {}): Promise => { + getGovernanceConfig: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getAIModel', 'organisation', organisation) - // verify required parameter 'modelId' is not null or undefined - assertParamExists('getAIModel', 'modelId', modelId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId))); + assertParamExists('getGovernanceConfig', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/governance` + .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; @@ -15635,16 +17494,15 @@ export const AIModelsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary List available AI models for an organization + * @summary Get AI spend summary for an organisation * @param {string} organisation The organisation ID - * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIModels: async (organisation: string, feature?: ListAIModelsFeatureEnum, options: RawAxiosRequestConfig = {}): Promise => { + getGovernanceSpend: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAIModels', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/models` + assertParamExists('getGovernanceSpend', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/governance/spend` .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); @@ -15661,15 +17519,55 @@ export const AIModelsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (feature !== undefined) { - localVarQueryParameter['feature'] = feature; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update AI governance configuration for an organisation + * @param {string} organisation The organisation ID + * @param {UpdateGovernanceConfigRequest} updateGovernanceConfigRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGovernanceConfig: async (organisation: string, updateGovernanceConfigRequest: UpdateGovernanceConfigRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('updateGovernanceConfig', 'organisation', organisation) + // verify required parameter 'updateGovernanceConfigRequest' is not null or undefined + assertParamExists('updateGovernanceConfig', 'updateGovernanceConfigRequest', updateGovernanceConfigRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/governance` + .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: 'PUT', ...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(updateGovernanceConfigRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15680,140 +17578,163 @@ export const AIModelsApiAxiosParamCreator = function (configuration?: Configurat }; /** - * AIModelsApi - functional programming interface + * AIGovernanceApi - functional programming interface * @export */ -export const AIModelsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIModelsApiAxiosParamCreator(configuration) +export const AIGovernanceApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIGovernanceApiAxiosParamCreator(configuration) return { /** - * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings - * @summary Get AI Model Details + * + * @summary Get AI governance configuration for an organisation * @param {string} organisation The organisation ID - * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAIModel(organisation, modelId, options); + async getGovernanceConfig(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernanceConfig(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIModelsApi.getAIModel']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIGovernanceApi.getGovernanceConfig']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary List available AI models for an organization + * @summary Get AI spend summary for an organisation * @param {string} organisation The organisation ID - * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAIModels(organisation, feature, options); + async getGovernanceSpend(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernanceSpend(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIModelsApi.listAIModels']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AIGovernanceApi.getGovernanceSpend']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Update AI governance configuration for an organisation + * @param {string} organisation The organisation ID + * @param {UpdateGovernanceConfigRequest} updateGovernanceConfigRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateGovernanceConfig(organisation: string, updateGovernanceConfigRequest: UpdateGovernanceConfigRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGovernanceConfig(organisation, updateGovernanceConfigRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIGovernanceApi.updateGovernanceConfig']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AIModelsApi - factory interface + * AIGovernanceApi - factory interface * @export */ -export const AIModelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIModelsApiFp(configuration) +export const AIGovernanceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIGovernanceApiFp(configuration) return { /** - * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings - * @summary Get AI Model Details + * + * @summary Get AI governance configuration for an organisation * @param {string} organisation The organisation ID - * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath)); + getGovernanceConfig(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getGovernanceConfig(organisation, options).then((request) => request(axios, basePath)); }, /** * - * @summary List available AI models for an organization + * @summary Get AI spend summary for an organisation * @param {string} organisation The organisation ID - * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath)); + getGovernanceSpend(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getGovernanceSpend(organisation, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update AI governance configuration for an organisation + * @param {string} organisation The organisation ID + * @param {UpdateGovernanceConfigRequest} updateGovernanceConfigRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGovernanceConfig(organisation: string, updateGovernanceConfigRequest: UpdateGovernanceConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateGovernanceConfig(organisation, updateGovernanceConfigRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AIModelsApi - object-oriented interface + * AIGovernanceApi - object-oriented interface * @export - * @class AIModelsApi + * @class AIGovernanceApi * @extends {BaseAPI} */ -export class AIModelsApi extends BaseAPI { +export class AIGovernanceApi extends BaseAPI { /** - * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings - * @summary Get AI Model Details + * + * @summary Get AI governance configuration for an organisation * @param {string} organisation The organisation ID - * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIModelsApi + * @memberof AIGovernanceApi */ - public getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig) { - return AIModelsApiFp(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath)); + public getGovernanceConfig(organisation: string, options?: RawAxiosRequestConfig) { + return AIGovernanceApiFp(this.configuration).getGovernanceConfig(organisation, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary List available AI models for an organization + * @summary Get AI spend summary for an organisation * @param {string} organisation The organisation ID - * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIModelsApi + * @memberof AIGovernanceApi */ - public listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig) { - return AIModelsApiFp(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath)); + public getGovernanceSpend(organisation: string, options?: RawAxiosRequestConfig) { + return AIGovernanceApiFp(this.configuration).getGovernanceSpend(organisation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update AI governance configuration for an organisation + * @param {string} organisation The organisation ID + * @param {UpdateGovernanceConfigRequest} updateGovernanceConfigRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIGovernanceApi + */ + public updateGovernanceConfig(organisation: string, updateGovernanceConfigRequest: UpdateGovernanceConfigRequest, options?: RawAxiosRequestConfig) { + return AIGovernanceApiFp(this.configuration).updateGovernanceConfig(organisation, updateGovernanceConfigRequest, options).then((request) => request(this.axios, this.basePath)); } } -/** - * @export - */ -export const ListAIModelsFeatureEnum = { - Chat: 'chat', - Embeddings: 'embeddings', - Vision: 'vision', - Streaming: 'streaming', - All: 'all' -} as const; -export type ListAIModelsFeatureEnum = typeof ListAIModelsFeatureEnum[keyof typeof ListAIModelsFeatureEnum]; /** - * AIMonitoringApi - axios parameter creator + * AIInferenceApi - axios parameter creator * @export */ -export const AIMonitoringApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIInferenceApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @summary Get AI usage statistics + * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling + * @summary Chat inference via API Gateway (buffered responses) with multimodal support * @param {string} organisation The organisation ID - * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) + * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAIUsageStats: async (organisation: string, month?: string, options: RawAxiosRequestConfig = {}): Promise => { + chatInference: async (organisation: string, chatInferenceRequest: ChatInferenceRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getAIUsageStats', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/usage` + assertParamExists('chatInference', 'organisation', organisation) + // verify required parameter 'chatInferenceRequest' is not null or undefined + assertParamExists('chatInference', 'chatInferenceRequest', chatInferenceRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/chat` .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); @@ -15822,7 +17743,7 @@ export const AIMonitoringApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -15830,114 +17751,35 @@ export const AIMonitoringApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (month !== undefined) { - localVarQueryParameter['month'] = month; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(chatInferenceRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, - } -}; - -/** - * AIMonitoringApi - functional programming interface - * @export - */ -export const AIMonitoringApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIMonitoringApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get AI usage statistics - * @param {string} organisation The organisation ID - * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAIUsageStats(organisation, month, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIMonitoringApi.getAIUsageStats']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * AIMonitoringApi - factory interface - * @export - */ -export const AIMonitoringApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIMonitoringApiFp(configuration) - return { /** - * - * @summary Get AI usage statistics + * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) + * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support * @param {string} organisation The organisation ID - * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * AIMonitoringApi - object-oriented interface - * @export - * @class AIMonitoringApi - * @extends {BaseAPI} - */ -export class AIMonitoringApi extends BaseAPI { - /** - * - * @summary Get AI usage statistics - * @param {string} organisation The organisation ID - * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AIMonitoringApi - */ - public getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig) { - return AIMonitoringApiFp(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * AIOrchestrationsApi - axios parameter creator - * @export - */ -export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * 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 {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks * @param {*} [options] Override http request option. * @throws {RequiredError} */ - cancelOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + chatInferenceStream: async (organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - 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))); + assertParamExists('chatInferenceStream', 'organisation', organisation) + // verify required parameter 'chatInferenceStreamRequest' is not null or undefined + assertParamExists('chatInferenceStream', 'chatInferenceStreamRequest', chatInferenceStreamRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/stream` + .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; @@ -15955,9 +17797,12 @@ export const AIOrchestrationsApiAxiosParamCreator = 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(chatInferenceStreamRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -15965,19 +17810,19 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) + * @summary Generate text embeddings for semantic search and RAG applications + * @param {string} organisation The organisation ID + * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOrchestration: async (organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options: RawAxiosRequestConfig = {}): Promise => { + embeddings: async (organisation: string, embeddingsRequest: EmbeddingsRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - 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` + assertParamExists('embeddings', 'organisation', organisation) + // verify required parameter 'embeddingsRequest' is not null or undefined + assertParamExists('embeddings', 'embeddingsRequest', embeddingsRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/embeddings` .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); @@ -16001,7 +17846,7 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createOrchestrationRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(embeddingsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16009,21 +17854,21 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) + * @summary Get Durable Execution Status + * @param {string} organisation The organisation ID + * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + getDurableExecutionStatus: async (organisation: string, identifier: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - 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}` + assertParamExists('getDurableExecutionStatus', 'organisation', organisation) + // verify required parameter 'identifier' is not null or undefined + assertParamExists('getDurableExecutionStatus', 'identifier', identifier) + const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/executions/{identifier}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + .replace(`{${"identifier"}}`, encodeURIComponent(String(identifier))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16031,7 +17876,7 @@ export const AIOrchestrationsApiAxiosParamCreator = 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; @@ -16051,21 +17896,20 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes + * @summary Generate images with Amazon Nova Canvas + * @param {string} organisation The organisation ID + * @param {ImageGenerationRequest} imageGenerationRequest Image generation request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + imageGeneration: async (organisation: string, imageGenerationRequest: ImageGenerationRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - 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(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + assertParamExists('imageGeneration', 'organisation', organisation) + // verify required parameter 'imageGenerationRequest' is not null or undefined + assertParamExists('imageGeneration', 'imageGenerationRequest', imageGenerationRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/image-generation` + .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; @@ -16073,7 +17917,7 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16083,9 +17927,12 @@ export const AIOrchestrationsApiAxiosParamCreator = 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(imageGenerationRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16093,23 +17940,20 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. + * @summary Submit Client Tool Results (Callback) + * @param {string} organisation The organisation ID + * @param {SubmitToolCallbackRequest} submitToolCallbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOrchestrationBatches: async (organisation: string, orchestrationId: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + submitToolCallback: async (organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - 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))); + assertParamExists('submitToolCallback', 'organisation', organisation) + // verify required parameter 'submitToolCallbackRequest' is not null or undefined + assertParamExists('submitToolCallback', 'submitToolCallbackRequest', submitToolCallbackRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/chat/callback` + .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; @@ -16117,7 +17961,7 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16125,40 +17969,303 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(submitToolCallbackRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * AIInferenceApi - functional programming interface + * @export + */ +export const AIInferenceApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIInferenceApiAxiosParamCreator(configuration) + return { /** - * 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 + * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling + * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOrchestrations: async (organisation: string, status?: ListOrchestrationsStatusEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + async chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.chatInference(organisation, chatInferenceRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.chatInference']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) + * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.chatInferenceStream(organisation, chatInferenceStreamRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.chatInferenceStream']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) + * @summary Generate text embeddings for semantic search and RAG applications + * @param {string} organisation The organisation ID + * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.embeddings(organisation, embeddingsRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.embeddings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) + * @summary Get Durable Execution Status + * @param {string} organisation The organisation ID + * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDurableExecutionStatus(organisation, identifier, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.getDurableExecutionStatus']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes + * @summary Generate images with Amazon Nova Canvas + * @param {string} organisation The organisation ID + * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.imageGeneration(organisation, imageGenerationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.imageGeneration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. + * @summary Submit Client Tool Results (Callback) + * @param {string} organisation The organisation ID + * @param {SubmitToolCallbackRequest} submitToolCallbackRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitToolCallback(organisation, submitToolCallbackRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIInferenceApi.submitToolCallback']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AIInferenceApi - factory interface + * @export + */ +export const AIInferenceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIInferenceApiFp(configuration) + return { + /** + * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling + * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.chatInference(organisation, chatInferenceRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) + * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) + * @summary Generate text embeddings for semantic search and RAG applications + * @param {string} organisation The organisation ID + * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.embeddings(organisation, embeddingsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) + * @summary Get Durable Execution Status + * @param {string} organisation The organisation ID + * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDurableExecutionStatus(organisation, identifier, options).then((request) => request(axios, basePath)); + }, + /** + * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes + * @summary Generate images with Amazon Nova Canvas + * @param {string} organisation The organisation ID + * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. + * @summary Submit Client Tool Results (Callback) + * @param {string} organisation The organisation ID + * @param {SubmitToolCallbackRequest} submitToolCallbackRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AIInferenceApi - object-oriented interface + * @export + * @class AIInferenceApi + * @extends {BaseAPI} + */ +export class AIInferenceApi extends BaseAPI { + /** + * Sends requests to the AI API Gateway endpoint which buffers responses. Supports text, images, videos, and documents via base64 encoding. * * **Execution Modes:** * - **Sync Mode** (default): Standard JSON response, waits for completion (200 response) * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * - Ideal for complex prompts, large contexts, or client-side tools * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * * **Response Patterns:** * - **Text-only**: Returns simple text response when no tools requested * - **Single tool**: Returns `toolUse` object when AI requests one tool * - **Multiple tools**: Returns `toolUse` array when AI requests multiple tools * - **Auto-execute sync**: Automatically executes tool and returns final text response * - **Auto-execute async**: Returns toolUse with `executionId` and `status` for polling + * @summary Chat inference via API Gateway (buffered responses) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceRequest} chatInferenceRequest Chat request with optional multimodal content blocks + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public chatInference(organisation: string, chatInferenceRequest: ChatInferenceRequest, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).chatInference(organisation, chatInferenceRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Streams responses from the AI streaming subdomain using Server-Sent Events (SSE). Tokens are streamed in real-time as they are generated. * * **Execution Modes:** * - **Streaming Mode** (default): Real-time SSE token-by-token responses * - **Async Mode**: Set `async: true` for long-running tasks with polling (202 response) * * **Async/Durable Mode (`async: true`):** * - Returns immediately with `requestId` and `pollUrl` (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running inference * - Supports client-executed tools via `waiting_callback` state * - Poll `/ai/chat/executions/{requestId}` for status * - Submit client tool results via `/ai/chat/callback` * * **Multimodal Support:** * - **Text**: Simple string content * - **Images**: Base64-encoded PNG, JPEG, GIF, WebP (up to 25MB) * - **Videos**: Base64-encoded MP4, MOV, WebM, etc. (up to 25MB) * - **Documents**: Base64-encoded PDF, DOCX, CSV, etc. (up to 25MB) * * **Supported Models (Multimodal):** * - **Claude 4.5 Series**: Sonnet 4.5, Haiku 4.5, Opus 4.5 (images, up to 20 per request) * - **Claude 3.5 Series**: Sonnet v1/v2 (images, up to 20 per request) * - **Amazon Nova**: Lite, Pro, Micro (images, videos, documents) * * **Usage Tips:** * - Use base64 encoding for images/videos < 5-10MB * - Place media before text prompts for best results * - Label multiple media files (e.g., \'Image 1:\', \'Image 2:\') * - Maximum 25MB total payload size * - Streaming works with all content types (text, image, video, document) + * @summary Chat inference via streaming endpoint (true HTTP streaming) with multimodal support + * @param {string} organisation The organisation ID + * @param {ChatInferenceStreamRequest} chatInferenceStreamRequest Chat request with optional multimodal content blocks + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public chatInferenceStream(organisation: string, chatInferenceStreamRequest: ChatInferenceStreamRequest, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).chatInferenceStream(organisation, chatInferenceStreamRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * **Features:** * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * **Use Cases:** * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * **Available Embedding Models:** * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed) + * @summary Generate text embeddings for semantic search and RAG applications + * @param {string} organisation The organisation ID + * @param {EmbeddingsRequest} embeddingsRequest Embedding request with single or multiple texts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public embeddings(organisation: string, embeddingsRequest: EmbeddingsRequest, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).embeddings(organisation, embeddingsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Poll the status of an async/durable chat execution. * * **When to use:** After starting chat inference with `async: true`, poll this endpoint * to check execution status and retrieve results when complete. * * **Identifier:** Accepts either: * - `requestId` (recommended): The short ID returned from the async request * - `executionArn`: The full AWS Lambda durable execution ARN (must be URL-encoded) * * **Statuses:** * - `pending`: Execution is starting (retry shortly) * - `running`: Execution is in progress * - `waiting_callback`: Execution paused, waiting for client tool results * - `complete`: Execution finished successfully * - `failed`: Execution failed with error * * **Client Tool Callback:** * When status is `waiting_callback`, submit tool results via `POST /ai/chat/callback`. * * **Polling Recommendations:** * - Start with 1 second delay, exponential backoff up to 30 seconds * - Stop polling after 15 minutes (consider failed) + * @summary Get Durable Execution Status + * @param {string} organisation The organisation ID + * @param {string} identifier Either the requestId from async response, or full executionArn (URL-encoded) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public getDurableExecutionStatus(organisation: string, identifier: string, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).getDurableExecutionStatus(organisation, identifier, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Generates images using Amazon Nova Canvas image generation model. * * **Region Restriction:** Nova Canvas is ONLY available in: * - `us-east-1` (US East, N. Virginia) * - `ap-northeast-1` (Asia Pacific, Tokyo) * - `eu-west-1` (Europe, Ireland) * ❌ NOT available in `ap-southeast-2` (Sydney) * * **Supported Task Types:** * - **TEXT_IMAGE**: Basic text-to-image generation * - **TEXT_IMAGE with Conditioning**: Layout-guided generation using edge detection or segmentation * - **COLOR_GUIDED_GENERATION**: Generate images with specific color palettes * - **IMAGE_VARIATION**: Create variations of existing images * - **INPAINTING**: Fill masked areas in images * - **OUTPAINTING**: Extend images beyond their borders * - **BACKGROUND_REMOVAL**: Remove backgrounds from images * - **VIRTUAL_TRY_ON**: Try on garments/objects on people * * **Quality Options:** * - **standard**: Faster generation, lower cost * - **premium**: Higher quality, slower generation * * **Timeout:** Image generation can take up to 5 minutes + * @summary Generate images with Amazon Nova Canvas + * @param {string} organisation The organisation ID + * @param {ImageGenerationRequest} imageGenerationRequest Image generation request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public imageGeneration(organisation: string, imageGenerationRequest: ImageGenerationRequest, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).imageGeneration(organisation, imageGenerationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Submit tool execution results to resume a suspended durable execution. * * **When to use:** When polling the execution status returns `waiting_callback`, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * **Flow:** * 1. Start async chat with client-executed tools (`autoExecute: []` or tools not in autoExecute list) * 2. Poll status until `waiting_callback` * 3. Execute tools locally using `pendingTools` from status response * 4. Submit results here with the `callbackId` * 5. Poll status until `complete` * * **Important:** Each `callbackId` can only be used once. After submission, poll the execution * status to see the updated state. + * @summary Submit Client Tool Results (Callback) + * @param {string} organisation The organisation ID + * @param {SubmitToolCallbackRequest} submitToolCallbackRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIInferenceApi + */ + public submitToolCallback(organisation: string, submitToolCallbackRequest: SubmitToolCallbackRequest, options?: RawAxiosRequestConfig) { + return AIInferenceApiFp(this.configuration).submitToolCallback(organisation, submitToolCallbackRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AIModelsApi - axios parameter creator + * @export + */ +export const AIModelsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings + * @summary Get AI Model Details + * @param {string} organisation The organisation ID + * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAIModel: async (organisation: string, modelId: 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))); + assertParamExists('getAIModel', 'organisation', organisation) + // verify required parameter 'modelId' is not null or undefined + assertParamExists('getAIModel', 'modelId', modelId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/models/{modelId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"modelId"}}`, encodeURIComponent(String(modelId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16174,18 +18281,6 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (status !== undefined) { - localVarQueryParameter['status'] = status; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16198,21 +18293,18 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * + * @summary List available AI models for an organization + * @param {string} organisation The organisation ID + * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature * @param {*} [options] Override http request option. * @throws {RequiredError} */ - pauseOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + listAIModels: async (organisation: string, feature?: ListAIModelsFeatureEnum, 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))); + assertParamExists('listAIModels', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/models` + .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; @@ -16220,7 +18312,7 @@ export const AIOrchestrationsApiAxiosParamCreator = 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; @@ -16228,6 +18320,10 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (feature !== undefined) { + localVarQueryParameter['feature'] = feature; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16239,22 +18335,1249 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co options: localVarRequestOptions, }; }, + } +}; + +/** + * AIModelsApi - functional programming interface + * @export + */ +export const AIModelsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIModelsApiAxiosParamCreator(configuration) + return { /** - * 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 + * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings + * @summary Get AI Model Details + * @param {string} organisation The organisation ID + * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAIModel(organisation, modelId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIModelsApi.getAIModel']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List available AI models for an organization + * @param {string} organisation The organisation ID + * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAIModels(organisation, feature, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIModelsApi.listAIModels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AIModelsApi - factory interface + * @export + */ +export const AIModelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIModelsApiFp(configuration) + return { + /** + * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings + * @summary Get AI Model Details + * @param {string} organisation The organisation ID + * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAIModel(organisation, modelId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List available AI models for an organization + * @param {string} organisation The organisation ID + * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAIModels(organisation, feature, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AIModelsApi - object-oriented interface + * @export + * @class AIModelsApi + * @extends {BaseAPI} + */ +export class AIModelsApi extends BaseAPI { + /** + * Retrieves detailed information about a specific Bedrock model from the catalog. * * **Features:** * - Complete pricing breakdown (input/output per million tokens) * - Context window and output token limits * - Supported features (chat, vision, streaming, embeddings) * - Model availability and deprecation status * - Release date for version tracking * * **Example Model IDs:** * - `amazon.nova-lite-v1:0` - Default multimodal model * - `anthropic.claude-3-5-sonnet-20241022-v2:0` - Latest Claude * - `amazon.titan-embed-text-v2:0` - Latest embeddings + * @summary Get AI Model Details + * @param {string} organisation The organisation ID + * @param {string} modelId The model identifier (e.g., amazon.nova-lite-v1:0) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIModelsApi + */ + public getAIModel(organisation: string, modelId: string, options?: RawAxiosRequestConfig) { + return AIModelsApiFp(this.configuration).getAIModel(organisation, modelId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List available AI models for an organization + * @param {string} organisation The organisation ID + * @param {ListAIModelsFeatureEnum} [feature] Filter models by supported feature + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIModelsApi + */ + public listAIModels(organisation: string, feature?: ListAIModelsFeatureEnum, options?: RawAxiosRequestConfig) { + return AIModelsApiFp(this.configuration).listAIModels(organisation, feature, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const ListAIModelsFeatureEnum = { + Chat: 'chat', + Embeddings: 'embeddings', + Vision: 'vision', + Streaming: 'streaming', + All: 'all' +} as const; +export type ListAIModelsFeatureEnum = typeof ListAIModelsFeatureEnum[keyof typeof ListAIModelsFeatureEnum]; + + +/** + * AIMonitoringApi - axios parameter creator + * @export + */ +export const AIMonitoringApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Get AI usage statistics + * @param {string} organisation The organisation ID + * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAIUsageStats: async (organisation: string, month?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('getAIUsageStats', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/usage` + .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 (month !== undefined) { + localVarQueryParameter['month'] = month; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AIMonitoringApi - functional programming interface + * @export + */ +export const AIMonitoringApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIMonitoringApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Get AI usage statistics + * @param {string} organisation The organisation ID + * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAIUsageStats(organisation, month, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIMonitoringApi.getAIUsageStats']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AIMonitoringApi - factory interface + * @export + */ +export const AIMonitoringApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIMonitoringApiFp(configuration) + return { + /** + * + * @summary Get AI usage statistics + * @param {string} organisation The organisation ID + * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAIUsageStats(organisation, month, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AIMonitoringApi - object-oriented interface + * @export + * @class AIMonitoringApi + * @extends {BaseAPI} + */ +export class AIMonitoringApi extends BaseAPI { + /** + * + * @summary Get AI usage statistics + * @param {string} organisation The organisation ID + * @param {string} [month] Month to retrieve statistics for (YYYY-MM format) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIMonitoringApi + */ + public getAIUsageStats(organisation: string, month?: string, options?: RawAxiosRequestConfig) { + return AIMonitoringApiFp(this.configuration).getAIUsageStats(organisation, month, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AIOrchestrationsApi - axios parameter creator + * @export + */ +export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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} + */ + cancelOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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; + 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}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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} + */ + createOrchestration: async (organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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; + 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(createOrchestrationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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} + */ + deleteOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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(`{${"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: '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, + }; + }, + /** + * 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} + */ + getOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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(`{${"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: '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, + }; + }, + /** + * 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} + */ + listOrchestrationBatches: async (organisation: string, orchestrationId: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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; + 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 (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + 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 (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, + }; + }, + /** + * 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); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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(`{${"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}; + + 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}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AIOrchestrationsApi - functional programming interface + * @export + */ +export const AIOrchestrationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIOrchestrationsApiAxiosParamCreator(configuration) + return { + /** + * 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 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['AIOrchestrationsApi.cancelOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 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['AIOrchestrationsApi.createOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 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['AIOrchestrationsApi.deleteOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 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['AIOrchestrationsApi.getOrchestration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 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['AIOrchestrationsApi.listOrchestrationBatches']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 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['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); + }, + } +}; + +/** + * AIOrchestrationsApi - factory interface + * @export + */ +export const AIOrchestrationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIOrchestrationsApiFp(configuration) + return { + /** + * 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} + */ + cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.cancelOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + }, + /** + * 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} + */ + createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createOrchestration(organisation, createOrchestrationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * 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} + */ + deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + }, + /** + * 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} + */ + getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); + }, + /** + * 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} + */ + 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)); + }, + /** + * 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(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)); + }, + }; +}; + +/** + * AIOrchestrationsApi - object-oriented interface + * @export + * @class AIOrchestrationsApi + * @extends {BaseAPI} + */ +export class AIOrchestrationsApi extends BaseAPI { + /** + * 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 AIOrchestrationsApi + */ + public cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).cancelOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 AIOrchestrationsApi + */ + public createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).createOrchestration(organisation, createOrchestrationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 AIOrchestrationsApi + */ + public deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).deleteOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 AIOrchestrationsApi + */ + public getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { + return AIOrchestrationsApiFp(this.configuration).getOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 AIOrchestrationsApi + */ + 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)); + } + + /** + * 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 AIOrchestrationsApi + */ + 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]; + + +/** + * AISessionsApi - axios parameter creator + * @export + */ +export const AISessionsApiAxiosParamCreator = 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 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAISession: async (organisation: string, createAISessionRequest: CreateAISessionRequest, 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))); + // 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(createAISessionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete a chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAISession: async (organisation: string, sessionId: string, 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))); + // 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, + }; + }, + /** + * 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] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + extendAISession: async (organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, 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` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .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; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...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(extendAISessionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a specific chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAISession: async (organisation: string, sessionId: 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}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .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; + 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, + }; + }, + /** + * 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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resumeOrchestration: async (organisation: string, orchestrationId: string, 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('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(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + 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); let baseOptions; @@ -16262,7 +19585,7 @@ export const AIOrchestrationsApiAxiosParamCreator = 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; @@ -16270,6 +19593,26 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (userId !== undefined) { + localVarQueryParameter['userId'] = userId; + } + + if (sessionGroup !== undefined) { + localVarQueryParameter['sessionGroup'] = sessionGroup; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (model !== undefined) { + localVarQueryParameter['model'] = model; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16282,21 +19625,24 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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 + * 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} */ - startOrchestration: async (organisation: string, orchestrationId: string, options: RawAxiosRequestConfig = {}): Promise => { + updateAISession: async (organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, 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` + 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(`{${"orchestrationId"}}`, encodeURIComponent(String(orchestrationId))); + .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; @@ -16304,7 +19650,7 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16314,9 +19660,12 @@ export const AIOrchestrationsApiAxiosParamCreator = 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(updateAISessionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16327,422 +19676,347 @@ export const AIOrchestrationsApiAxiosParamCreator = function (configuration?: Co }; /** - * AIOrchestrationsApi - functional programming interface + * AISessionsApi - functional programming interface * @export */ -export const AIOrchestrationsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIOrchestrationsApiAxiosParamCreator(configuration) +export const AISessionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration) return { /** - * 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 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['AIOrchestrationsApi.cancelOrchestration']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 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 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['AIOrchestrationsApi.createOrchestration']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 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 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['AIOrchestrationsApi.deleteOrchestration']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 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 + * 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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOrchestration(organisation, orchestrationId, 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['AIOrchestrationsApi.getOrchestration']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.createAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 + * + * @summary Delete a chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - 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); + 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['AIOrchestrationsApi.listOrchestrationBatches']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.deleteAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 + * 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] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - 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); + 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['AIOrchestrationsApi.listOrchestrations']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.extendAISession']?.[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 + * + * @summary Get a specific chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @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); + 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['AIOrchestrationsApi.pauseOrchestration']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.getAISession']?.[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 + * 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 * @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); + 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['AIOrchestrationsApi.resumeOrchestration']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.listAISessions']?.[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 + * 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} */ - async startOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.startOrchestration(organisation, orchestrationId, 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['AIOrchestrationsApi.startOrchestration']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISessionsApi.updateAISession']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AIOrchestrationsApi - factory interface + * AISessionsApi - factory interface * @export */ -export const AIOrchestrationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIOrchestrationsApiFp(configuration) +export const AISessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AISessionsApiFp(configuration) return { /** - * 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} - */ - cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.cancelOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); - }, - /** - * 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} - */ - createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createOrchestration(organisation, createOrchestrationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * 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} - */ - deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteOrchestration(organisation, orchestrationId, options).then((request) => request(axios, basePath)); - }, - /** - * 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 + * 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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getOrchestration(organisation, orchestrationId, 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)); }, /** - * 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 + * + * @summary Delete a chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - 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)); + deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAISession(organisation, sessionId, options).then((request) => request(axios, basePath)); }, /** - * 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 + * 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] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - 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)); + extendAISession(organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.extendAISession(organisation, sessionId, extendAISessionRequest, 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 + * + * @summary Get a specific chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @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)); + getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAISession(organisation, sessionId, 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 + * 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 * @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)); + 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)); }, /** - * 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 + * 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} */ - startOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.startOrchestration(organisation, orchestrationId, 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)); }, }; }; /** - * AIOrchestrationsApi - object-oriented interface + * AISessionsApi - object-oriented interface * @export - * @class AIOrchestrationsApi + * @class AISessionsApi * @extends {BaseAPI} */ -export class AIOrchestrationsApi extends BaseAPI { - /** - * 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 AIOrchestrationsApi - */ - public cancelOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { - return AIOrchestrationsApiFp(this.configuration).cancelOrchestration(organisation, orchestrationId, options).then((request) => request(this.axios, this.basePath)); - } - +export class AISessionsApi extends BaseAPI { /** - * 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 + * 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 * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - public createOrchestration(organisation: string, createOrchestrationRequest: CreateOrchestrationRequest, options?: RawAxiosRequestConfig) { - return AIOrchestrationsApiFp(this.configuration).createOrchestration(organisation, createOrchestrationRequest, 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)); } /** - * 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 + * + * @summary Delete a chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - public deleteOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { - return AIOrchestrationsApiFp(this.configuration).deleteOrchestration(organisation, orchestrationId, 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)); } /** - * 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 + * 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] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - public getOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { - return AIOrchestrationsApiFp(this.configuration).getOrchestration(organisation, orchestrationId, 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)); } /** - * 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 + * + * @summary Get a specific chat session + * @param {string} organisation The organisation ID + * @param {string} sessionId The session ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - 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)); + public getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { + return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 + * 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 * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - 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)); + 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)); } /** - * 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 + * 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} - * @memberof AIOrchestrationsApi + * @memberof AISessionsApi */ - public pauseOrchestration(organisation: string, orchestrationId: string, options?: RawAxiosRequestConfig) { - return AIOrchestrationsApiFp(this.configuration).pauseOrchestration(organisation, orchestrationId, 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)); } +} - /** - * 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)); - } -} /** + * AISkillsApi - axios parameter creator * @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]; +export const AISkillsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' + * @summary Create Inline Skill + * @param {string} organisation The organisation ID + * @param {CreateSkillRequest} createSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSkill: async (organisation: string, createSkillRequest: CreateSkillRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('createSkill', 'organisation', organisation) + // verify required parameter 'createSkillRequest' is not null or undefined + assertParamExists('createSkill', 'createSkillRequest', createSkillRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills` + .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(createSkillRequest, localVarRequestOptions, configuration) -/** - * AISessionsApi - axios parameter creator - * @export - */ -export const AISessionsApiAxiosParamCreator = function (configuration?: Configuration) { - return { + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** - * 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 + * Permanently deletes a skill. This will also remove it from any agents that have it assigned. + * @summary Delete Skill * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * @param {string} skillId The skill ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAISession: async (organisation: string, createAISessionRequest: CreateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + deleteSkill: async (organisation: string, skillId: 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('deleteSkill', 'organisation', organisation) + // verify required parameter 'skillId' is not null or undefined + assertParamExists('deleteSkill', 'skillId', skillId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16750,7 +20024,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -16760,12 +20034,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), @@ -16773,21 +20044,21 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * - * @summary Delete a chat session + * Permanently deletes all skills in the specified namespace. + * @summary Delete Skill Collection * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} namespace Collection namespace * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteSkillCollection: async (organisation: string, namespace: string, 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}` + assertParamExists('deleteSkillCollection', 'organisation', organisation) + // verify required parameter 'namespace' is not null or undefined + assertParamExists('deleteSkillCollection', 'namespace', namespace) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16815,22 +20086,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 + * Retrieves full details of a skill including its content, source information, and metadata. + * @summary Get Skill Details * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * @param {string} skillId The skill ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - extendAISession: async (organisation: string, sessionId: string, extendAISessionRequest?: ExtendAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + getSkill: async (organisation: string, skillId: 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('getSkill', 'organisation', organisation) + // verify required parameter 'skillId' is not null or undefined + assertParamExists('getSkill', 'skillId', skillId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -16838,7 +20108,48 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + 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, + }; + }, + /** + * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version + * @summary Import Skill from External Source + * @param {string} organisation The organisation ID + * @param {ImportSkillRequest} importSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + importSkill: async (organisation: string, importSkillRequest: ImportSkillRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('importSkill', 'organisation', organisation) + // verify required parameter 'importSkillRequest' is not null or undefined + assertParamExists('importSkill', 'importSkillRequest', importSkillRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/import` + .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; @@ -16853,7 +20164,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(extendAISessionRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(importSkillRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -16861,21 +20172,61 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * - * @summary Get a specific chat session + * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. + * @summary Import Skill Collection from GitHub * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {ImportSkillCollectionRequest} importSkillCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAISession: async (organisation: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise => { + importSkillCollection: async (organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, 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}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + assertParamExists('importSkillCollection', 'organisation', organisation) + // verify required parameter 'importSkillCollectionRequest' is not null or undefined + assertParamExists('importSkillCollection', 'importSkillCollectionRequest', importSkillCollectionRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/import-collection` + .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(importSkillCollectionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. + * @summary List Skill Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSkillCollections: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listSkillCollections', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/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; @@ -16903,21 +20254,19 @@ 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 + * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file + * @summary List Organization\'s Skills * @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 + * @param {string} [tag] Filter skills by tag + * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') + * @param {number} [limit] Maximum number of skills to return * @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 => { + listSkills: async (organisation: string, tag?: string, namespace?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listAISessions', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/sessions` + assertParamExists('listSkills', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills` .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); @@ -16934,26 +20283,102 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (userId !== undefined) { - localVarQueryParameter['userId'] = userId; + if (tag !== undefined) { + localVarQueryParameter['tag'] = tag; } - if (sessionGroup !== undefined) { - localVarQueryParameter['sessionGroup'] = sessionGroup; + if (namespace !== undefined) { + localVarQueryParameter['namespace'] = namespace; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest + * @summary Sync Skill from Source + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + syncSkill: async (organisation: string, skillId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('syncSkill', 'organisation', organisation) + // verify required parameter 'skillId' is not null or undefined + assertParamExists('syncSkill', 'skillId', skillId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}/sync` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); + // 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 (model !== undefined) { - localVarQueryParameter['model'] = model; + 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}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. + * @summary Sync Skill Collection + * @param {string} organisation The organisation ID + * @param {string} namespace Collection namespace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + syncSkillCollection: async (organisation: string, namespace: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('syncSkillCollection', 'organisation', organisation) + // verify required parameter 'namespace' is not null or undefined + assertParamExists('syncSkillCollection', 'namespace', namespace) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}/sync` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))); + // 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); @@ -16966,24 +20391,24 @@ 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 + * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. + * @summary Update Skill * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * @param {string} skillId The skill ID + * @param {UpdateSkillRequest} updateSkillRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateAISession: async (organisation: string, sessionId: string, updateAISessionRequest: UpdateAISessionRequest, options: RawAxiosRequestConfig = {}): Promise => { + updateSkill: async (organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, 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('updateSkill', 'organisation', organisation) + // verify required parameter 'skillId' is not null or undefined + assertParamExists('updateSkill', 'skillId', skillId) + // verify required parameter 'updateSkillRequest' is not null or undefined + assertParamExists('updateSkill', 'updateSkillRequest', updateSkillRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))); + .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17006,7 +20431,7 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateAISessionRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(updateSkillRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -17017,301 +20442,479 @@ export const AISessionsApiAxiosParamCreator = function (configuration?: Configur }; /** - * AISessionsApi - functional programming interface + * AISkillsApi - functional programming interface * @export */ -export const AISessionsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AISessionsApiAxiosParamCreator(configuration) +export const AISkillsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AISkillsApiAxiosParamCreator(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 + * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' + * @summary Create Inline Skill * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * @param {CreateSkillRequest} createSkillRequest * @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 createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSkill(organisation, createSkillRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.createAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.createSkill']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Delete a chat session + * Permanently deletes a skill. This will also remove it from any agents that have it assigned. + * @summary Delete Skill * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} skillId The skill ID * @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 deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSkill(organisation, skillId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.deleteAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.deleteSkill']?.[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 + * Permanently deletes all skills in the specified namespace. + * @summary Delete Skill Collection * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * @param {string} namespace Collection namespace * @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 deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSkillCollection(organisation, namespace, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.extendAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.deleteSkillCollection']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Get a specific chat session + * Retrieves full details of a skill including its content, source information, and metadata. + * @summary Get Skill Details * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} skillId The skill ID * @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 getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSkill(organisation, skillId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.getAISession']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.getSkill']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version + * @summary Import Skill from External Source + * @param {string} organisation The organisation ID + * @param {ImportSkillRequest} importSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.importSkill(organisation, importSkillRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.importSkill']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. + * @summary Import Skill Collection from GitHub + * @param {string} organisation The organisation ID + * @param {ImportSkillCollectionRequest} importSkillCollectionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.importSkillCollection(organisation, importSkillCollectionRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.importSkillCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. + * @summary List Skill Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSkillCollections(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSkillCollections(organisation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.listSkillCollections']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file + * @summary List Organization\'s Skills + * @param {string} organisation The organisation ID + * @param {string} [tag] Filter skills by tag + * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') + * @param {number} [limit] Maximum number of skills to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSkills(organisation, tag, namespace, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.listSkills']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest + * @summary Sync Skill from Source + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.syncSkill(organisation, skillId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.syncSkill']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. + * @summary Sync Skill Collection + * @param {string} organisation The organisation ID + * @param {string} namespace Collection namespace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.syncSkillCollection(organisation, namespace, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.syncSkillCollection']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. + * @summary Update Skill + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {UpdateSkillRequest} updateSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSkill(organisation, skillId, updateSkillRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AISkillsApi.updateSkill']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * AISkillsApi - factory interface + * @export + */ +export const AISkillsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AISkillsApiFp(configuration) + return { + /** + * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' + * @summary Create Inline Skill + * @param {string} organisation The organisation ID + * @param {CreateSkillRequest} createSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSkill(organisation, createSkillRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Permanently deletes a skill. This will also remove it from any agents that have it assigned. + * @summary Delete Skill + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteSkill(organisation, skillId, options).then((request) => request(axios, basePath)); + }, + /** + * Permanently deletes all skills in the specified namespace. + * @summary Delete Skill Collection + * @param {string} organisation The organisation ID + * @param {string} namespace Collection namespace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteSkillCollection(organisation, namespace, 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 + * Retrieves full details of a skill including its content, source information, and metadata. + * @summary Get Skill Details * @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 + * @param {string} skillId The skill ID * @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); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.listAISessions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSkill(organisation, skillId, 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 + * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version + * @summary Import Skill from External Source * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * @param {ImportSkillRequest} importSkillRequest * @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); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISessionsApi.updateAISession']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.importSkill(organisation, importSkillRequest, options).then((request) => request(axios, basePath)); }, - } -}; - -/** - * AISessionsApi - factory interface - * @export - */ -export const AISessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AISessionsApiFp(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 + * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. + * @summary Import Skill Collection from GitHub * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * @param {ImportSkillCollectionRequest} importSkillCollectionRequest * @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)); + importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.importSkillCollection(organisation, importSkillCollectionRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Delete a chat session + * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. + * @summary List Skill Collections * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID * @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)); + listSkillCollections(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listSkillCollections(organisation, 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 + * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file + * @summary List Organization\'s Skills * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * @param {string} [tag] Filter skills by tag + * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') + * @param {number} [limit] Maximum number of skills to return * @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)); + listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listSkills(organisation, tag, namespace, limit, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Get a specific chat session + * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest + * @summary Sync Skill from Source * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} skillId The skill ID * @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)); + syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.syncSkill(organisation, skillId, 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 + * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. + * @summary Sync Skill Collection * @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 + * @param {string} namespace Collection namespace * @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)); + syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.syncSkillCollection(organisation, namespace, 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 + * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. + * @summary Update Skill * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * @param {string} skillId The skill ID + * @param {UpdateSkillRequest} updateSkillRequest * @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)); + updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateSkill(organisation, skillId, updateSkillRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AISessionsApi - object-oriented interface + * AISkillsApi - object-oriented interface * @export - * @class AISessionsApi + * @class AISkillsApi * @extends {BaseAPI} */ -export class AISessionsApi extends BaseAPI { +export class AISkillsApi 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 + * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' + * @summary Create Inline Skill * @param {string} organisation The organisation ID - * @param {CreateAISessionRequest} createAISessionRequest + * @param {CreateSkillRequest} createSkillRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - public createAISession(organisation: string, createAISessionRequest: CreateAISessionRequest, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).createAISession(organisation, createAISessionRequest, options).then((request) => request(this.axios, this.basePath)); + public createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).createSkill(organisation, createSkillRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Delete a chat session + * Permanently deletes a skill. This will also remove it from any agents that have it assigned. + * @summary Delete Skill * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} skillId The skill ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - public deleteAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).deleteAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); + public deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).deleteSkill(organisation, skillId, 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 + * Permanently deletes all skills in the specified namespace. + * @summary Delete Skill Collection * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {ExtendAISessionRequest} [extendAISessionRequest] + * @param {string} namespace Collection namespace * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - 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 deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).deleteSkillCollection(organisation, namespace, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get a specific chat session + * Retrieves full details of a skill including its content, source information, and metadata. + * @summary Get Skill Details * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID + * @param {string} skillId The skill ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - public getAISession(organisation: string, sessionId: string, options?: RawAxiosRequestConfig) { - return AISessionsApiFp(this.configuration).getAISession(organisation, sessionId, options).then((request) => request(this.axios, this.basePath)); + public getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).getSkill(organisation, skillId, 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 + * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version + * @summary Import Skill from External Source * @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 + * @param {ImportSkillRequest} importSkillRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - 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 importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).importSkill(organisation, importSkillRequest, 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 + * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. + * @summary Import Skill Collection from GitHub * @param {string} organisation The organisation ID - * @param {string} sessionId The session ID - * @param {UpdateAISessionRequest} updateAISessionRequest + * @param {ImportSkillCollectionRequest} importSkillCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISessionsApi + * @memberof AISkillsApi */ - 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 importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).importSkillCollection(organisation, importSkillCollectionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. + * @summary List Skill Collections + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AISkillsApi + */ + public listSkillCollections(organisation: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).listSkillCollections(organisation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file + * @summary List Organization\'s Skills + * @param {string} organisation The organisation ID + * @param {string} [tag] Filter skills by tag + * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') + * @param {number} [limit] Maximum number of skills to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AISkillsApi + */ + public listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).listSkills(organisation, tag, namespace, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest + * @summary Sync Skill from Source + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AISkillsApi + */ + public syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).syncSkill(organisation, skillId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. + * @summary Sync Skill Collection + * @param {string} organisation The organisation ID + * @param {string} namespace Collection namespace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AISkillsApi + */ + public syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).syncSkillCollection(organisation, namespace, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. + * @summary Update Skill + * @param {string} organisation The organisation ID + * @param {string} skillId The skill ID + * @param {UpdateSkillRequest} updateSkillRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AISkillsApi + */ + public updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig) { + return AISkillsApiFp(this.configuration).updateSkill(organisation, skillId, updateSkillRequest, options).then((request) => request(this.axios, this.basePath)); } } /** - * AISkillsApi - axios parameter creator + * AISlackBotsApi - axios parameter creator * @export */ -export const AISkillsApiAxiosParamCreator = function (configuration?: Configuration) { +export const AISlackBotsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' - * @summary Create Inline Skill + * Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + * @summary Create Slack Bot * @param {string} organisation The organisation ID - * @param {CreateSkillRequest} createSkillRequest + * @param {CreateSlackBotRequest} createSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSkill: async (organisation: string, createSkillRequest: CreateSkillRequest, options: RawAxiosRequestConfig = {}): Promise => { + createSlackBot: async (organisation: string, createSlackBotRequest: CreateSlackBotRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('createSkill', 'organisation', organisation) - // verify required parameter 'createSkillRequest' is not null or undefined - assertParamExists('createSkill', 'createSkillRequest', createSkillRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills` + assertParamExists('createSlackBot', 'organisation', organisation) + // verify required parameter 'createSlackBotRequest' is not null or undefined + assertParamExists('createSlackBot', 'createSlackBotRequest', createSlackBotRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots` .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); @@ -17335,49 +20938,7 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createSkillRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Permanently deletes a skill. This will also remove it from any agents that have it assigned. - * @summary Delete Skill - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteSkill: async (organisation: string, skillId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteSkill', 'organisation', organisation) - // verify required parameter 'skillId' is not null or undefined - assertParamExists('deleteSkill', 'skillId', skillId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); - // 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}; + localVarRequestOptions.data = serializeDataIfNeeded(createSlackBotRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -17385,21 +20946,21 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Permanently deletes all skills in the specified namespace. - * @summary Delete Skill Collection + * Permanently deletes a Slack bot and disconnects it from the workspace. + * @summary Delete Slack Bot * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSkillCollection: async (organisation: string, namespace: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteSlackBot: async (organisation: string, botId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('deleteSkillCollection', 'organisation', organisation) - // verify required parameter 'namespace' is not null or undefined - assertParamExists('deleteSkillCollection', 'namespace', namespace) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}` + assertParamExists('deleteSlackBot', 'organisation', organisation) + // verify required parameter 'botId' is not null or undefined + assertParamExists('deleteSlackBot', 'botId', botId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots/{botId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))); + .replace(`{${"botId"}}`, encodeURIComponent(String(botId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17427,21 +20988,21 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Retrieves full details of a skill including its content, source information, and metadata. - * @summary Get Skill Details + * Retrieves details for a specific Slack bot including its configuration and connection status. + * @summary Get Slack Bot * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSkill: async (organisation: string, skillId: string, options: RawAxiosRequestConfig = {}): Promise => { + getSlackBot: async (organisation: string, botId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('getSkill', 'organisation', organisation) - // verify required parameter 'skillId' is not null or undefined - assertParamExists('getSkill', 'skillId', skillId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` + assertParamExists('getSlackBot', 'organisation', organisation) + // verify required parameter 'botId' is not null or undefined + assertParamExists('getSlackBot', 'botId', botId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots/{botId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); + .replace(`{${"botId"}}`, encodeURIComponent(String(botId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17469,104 +21030,16 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version - * @summary Import Skill from External Source - * @param {string} organisation The organisation ID - * @param {ImportSkillRequest} importSkillRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - importSkill: async (organisation: string, importSkillRequest: ImportSkillRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('importSkill', 'organisation', organisation) - // verify required parameter 'importSkillRequest' is not null or undefined - assertParamExists('importSkill', 'importSkillRequest', importSkillRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/import` - .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(importSkillRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. - * @summary Import Skill Collection from GitHub - * @param {string} organisation The organisation ID - * @param {ImportSkillCollectionRequest} importSkillCollectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - importSkillCollection: async (organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('importSkillCollection', 'organisation', organisation) - // verify required parameter 'importSkillCollectionRequest' is not null or undefined - assertParamExists('importSkillCollection', 'importSkillCollectionRequest', importSkillCollectionRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/import-collection` - .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(importSkillCollectionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. - * @summary List Skill Collections + * Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + * @summary List Slack Bots * @param {string} organisation The organisation ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSkillCollections: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + listSlackBots: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listSkillCollections', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/collections` + assertParamExists('listSlackBots', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots` .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); @@ -17595,20 +21068,22 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file - * @summary List Organization\'s Skills + * Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Channels * @param {string} organisation The organisation ID - * @param {string} [tag] Filter skills by tag - * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') - * @param {number} [limit] Maximum number of skills to return + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter channels by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSkills: async (organisation: string, tag?: string, namespace?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + searchSlackWorkspaceChannels: async (organisation: string, botId: string, q?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listSkills', 'organisation', organisation) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))); + assertParamExists('searchSlackWorkspaceChannels', 'organisation', organisation) + // verify required parameter 'botId' is not null or undefined + assertParamExists('searchSlackWorkspaceChannels', 'botId', botId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/channels` + .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) + .replace(`{${"botId"}}`, encodeURIComponent(String(botId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17624,16 +21099,8 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (tag !== undefined) { - localVarQueryParameter['tag'] = tag; - } - - if (namespace !== undefined) { - localVarQueryParameter['namespace'] = namespace; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (q !== undefined) { + localVarQueryParameter['q'] = q; } @@ -17648,21 +21115,22 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest - * @summary Sync Skill from Source + * Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Users * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter users by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - syncSkill: async (organisation: string, skillId: string, options: RawAxiosRequestConfig = {}): Promise => { + searchSlackWorkspaceUsers: async (organisation: string, botId: string, q?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('syncSkill', 'organisation', organisation) - // verify required parameter 'skillId' is not null or undefined - assertParamExists('syncSkill', 'skillId', skillId) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}/sync` + assertParamExists('searchSlackWorkspaceUsers', 'organisation', organisation) + // verify required parameter 'botId' is not null or undefined + assertParamExists('searchSlackWorkspaceUsers', 'botId', botId) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/users` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); + .replace(`{${"botId"}}`, encodeURIComponent(String(botId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17670,7 +21138,7 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -17678,48 +21146,10 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat // 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, - }; - }, - /** - * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. - * @summary Sync Skill Collection - * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - syncSkillCollection: async (organisation: string, namespace: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('syncSkillCollection', 'organisation', organisation) - // verify required parameter 'namespace' is not null or undefined - assertParamExists('syncSkillCollection', 'namespace', namespace) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}/sync` - .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))); - // 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 (q !== undefined) { + localVarQueryParameter['q'] = q; } - 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); @@ -17732,24 +21162,24 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. - * @summary Update Skill + * Updates a Slack bot\'s configuration. Only provided fields are updated. + * @summary Update Slack Bot * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {UpdateSkillRequest} updateSkillRequest + * @param {string} botId The Slack bot ID + * @param {UpdateSlackBotRequest} updateSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateSkill: async (organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options: RawAxiosRequestConfig = {}): Promise => { + updateSlackBot: async (organisation: string, botId: string, updateSlackBotRequest: UpdateSlackBotRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('updateSkill', 'organisation', organisation) - // verify required parameter 'skillId' is not null or undefined - assertParamExists('updateSkill', 'skillId', skillId) - // verify required parameter 'updateSkillRequest' is not null or undefined - assertParamExists('updateSkill', 'updateSkillRequest', updateSkillRequest) - const localVarPath = `/api/v3/organizations/{organisation}/ai/skills/{skillId}` + assertParamExists('updateSlackBot', 'organisation', organisation) + // verify required parameter 'botId' is not null or undefined + assertParamExists('updateSlackBot', 'botId', botId) + // verify required parameter 'updateSlackBotRequest' is not null or undefined + assertParamExists('updateSlackBot', 'updateSlackBotRequest', updateSlackBotRequest) + const localVarPath = `/api/v3/organizations/{organisation}/ai/slack-bots/{botId}` .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation))) - .replace(`{${"skillId"}}`, encodeURIComponent(String(skillId))); + .replace(`{${"botId"}}`, encodeURIComponent(String(botId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -17772,7 +21202,7 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateSkillRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(updateSlackBotRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -17783,454 +21213,302 @@ export const AISkillsApiAxiosParamCreator = function (configuration?: Configurat }; /** - * AISkillsApi - functional programming interface + * AISlackBotsApi - functional programming interface * @export */ -export const AISkillsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AISkillsApiAxiosParamCreator(configuration) +export const AISlackBotsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AISlackBotsApiAxiosParamCreator(configuration) return { /** - * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' - * @summary Create Inline Skill - * @param {string} organisation The organisation ID - * @param {CreateSkillRequest} createSkillRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createSkill(organisation, createSkillRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.createSkill']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Permanently deletes a skill. This will also remove it from any agents that have it assigned. - * @summary Delete Skill - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSkill(organisation, skillId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.deleteSkill']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Permanently deletes all skills in the specified namespace. - * @summary Delete Skill Collection - * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSkillCollection(organisation, namespace, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.deleteSkillCollection']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Retrieves full details of a skill including its content, source information, and metadata. - * @summary Get Skill Details - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSkill(organisation, skillId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.getSkill']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version - * @summary Import Skill from External Source + * Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + * @summary Create Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillRequest} importSkillRequest + * @param {CreateSlackBotRequest} createSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.importSkill(organisation, importSkillRequest, options); + async createSlackBot(organisation: string, createSlackBotRequest: CreateSlackBotRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSlackBot(organisation, createSlackBotRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.importSkill']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.createSlackBot']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. - * @summary Import Skill Collection from GitHub + * Permanently deletes a Slack bot and disconnects it from the workspace. + * @summary Delete Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillCollectionRequest} importSkillCollectionRequest + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.importSkillCollection(organisation, importSkillCollectionRequest, options); + async deleteSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSlackBot(organisation, botId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.importSkillCollection']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.deleteSlackBot']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. - * @summary List Skill Collections + * Retrieves details for a specific Slack bot including its configuration and connection status. + * @summary Get Slack Bot * @param {string} organisation The organisation ID + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSkillCollections(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSkillCollections(organisation, options); + async getSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSlackBot(organisation, botId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.listSkillCollections']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.getSlackBot']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file - * @summary List Organization\'s Skills + * Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + * @summary List Slack Bots * @param {string} organisation The organisation ID - * @param {string} [tag] Filter skills by tag - * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') - * @param {number} [limit] Maximum number of skills to return * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSkills(organisation, tag, namespace, limit, options); + async listSlackBots(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSlackBots(organisation, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.listSkills']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.listSlackBots']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest - * @summary Sync Skill from Source + * Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Channels * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter channels by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.syncSkill(organisation, skillId, options); + async searchSlackWorkspaceChannels(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchSlackWorkspaceChannels(organisation, botId, q, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.syncSkill']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.searchSlackWorkspaceChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. - * @summary Sync Skill Collection + * Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Users * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter users by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.syncSkillCollection(organisation, namespace, options); + async searchSlackWorkspaceUsers(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchSlackWorkspaceUsers(organisation, botId, q, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.syncSkillCollection']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.searchSlackWorkspaceUsers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. - * @summary Update Skill + * Updates a Slack bot\'s configuration. Only provided fields are updated. + * @summary Update Slack Bot * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {UpdateSkillRequest} updateSkillRequest + * @param {string} botId The Slack bot ID + * @param {UpdateSlackBotRequest} updateSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateSkill(organisation, skillId, updateSkillRequest, options); + async updateSlackBot(organisation: string, botId: string, updateSlackBotRequest: UpdateSlackBotRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSlackBot(organisation, botId, updateSlackBotRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AISkillsApi.updateSkill']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AISlackBotsApi.updateSlackBot']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AISkillsApi - factory interface + * AISlackBotsApi - factory interface * @export */ -export const AISkillsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AISkillsApiFp(configuration) +export const AISlackBotsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AISlackBotsApiFp(configuration) return { /** - * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' - * @summary Create Inline Skill - * @param {string} organisation The organisation ID - * @param {CreateSkillRequest} createSkillRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createSkill(organisation, createSkillRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Permanently deletes a skill. This will also remove it from any agents that have it assigned. - * @summary Delete Skill - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteSkill(organisation, skillId, options).then((request) => request(axios, basePath)); - }, - /** - * Permanently deletes all skills in the specified namespace. - * @summary Delete Skill Collection - * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteSkillCollection(organisation, namespace, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieves full details of a skill including its content, source information, and metadata. - * @summary Get Skill Details - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSkill(organisation, skillId, options).then((request) => request(axios, basePath)); - }, - /** - * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version - * @summary Import Skill from External Source + * Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + * @summary Create Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillRequest} importSkillRequest + * @param {CreateSlackBotRequest} createSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.importSkill(organisation, importSkillRequest, options).then((request) => request(axios, basePath)); + createSlackBot(organisation: string, createSlackBotRequest: CreateSlackBotRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSlackBot(organisation, createSlackBotRequest, options).then((request) => request(axios, basePath)); }, /** - * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. - * @summary Import Skill Collection from GitHub + * Permanently deletes a Slack bot and disconnects it from the workspace. + * @summary Delete Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillCollectionRequest} importSkillCollectionRequest + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.importSkillCollection(organisation, importSkillCollectionRequest, options).then((request) => request(axios, basePath)); + deleteSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteSlackBot(organisation, botId, options).then((request) => request(axios, basePath)); }, /** - * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. - * @summary List Skill Collections + * Retrieves details for a specific Slack bot including its configuration and connection status. + * @summary Get Slack Bot * @param {string} organisation The organisation ID + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSkillCollections(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listSkillCollections(organisation, options).then((request) => request(axios, basePath)); + getSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSlackBot(organisation, botId, options).then((request) => request(axios, basePath)); }, /** - * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file - * @summary List Organization\'s Skills + * Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + * @summary List Slack Bots * @param {string} organisation The organisation ID - * @param {string} [tag] Filter skills by tag - * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') - * @param {number} [limit] Maximum number of skills to return * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listSkills(organisation, tag, namespace, limit, options).then((request) => request(axios, basePath)); + listSlackBots(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listSlackBots(organisation, options).then((request) => request(axios, basePath)); }, /** - * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest - * @summary Sync Skill from Source + * Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Channels * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter channels by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.syncSkill(organisation, skillId, options).then((request) => request(axios, basePath)); + searchSlackWorkspaceChannels(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.searchSlackWorkspaceChannels(organisation, botId, q, options).then((request) => request(axios, basePath)); }, /** - * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. - * @summary Sync Skill Collection + * Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Users * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter users by name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.syncSkillCollection(organisation, namespace, options).then((request) => request(axios, basePath)); + searchSlackWorkspaceUsers(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.searchSlackWorkspaceUsers(organisation, botId, q, options).then((request) => request(axios, basePath)); }, /** - * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. - * @summary Update Skill + * Updates a Slack bot\'s configuration. Only provided fields are updated. + * @summary Update Slack Bot * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {UpdateSkillRequest} updateSkillRequest + * @param {string} botId The Slack bot ID + * @param {UpdateSlackBotRequest} updateSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateSkill(organisation, skillId, updateSkillRequest, options).then((request) => request(axios, basePath)); + updateSlackBot(organisation: string, botId: string, updateSlackBotRequest: UpdateSlackBotRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateSlackBot(organisation, botId, updateSlackBotRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * AISkillsApi - object-oriented interface + * AISlackBotsApi - object-oriented interface * @export - * @class AISkillsApi + * @class AISlackBotsApi * @extends {BaseAPI} */ -export class AISkillsApi extends BaseAPI { - /** - * Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: \'When the user asks about code review or security analysis\' - * @summary Create Inline Skill - * @param {string} organisation The organisation ID - * @param {CreateSkillRequest} createSkillRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AISkillsApi - */ - public createSkill(organisation: string, createSkillRequest: CreateSkillRequest, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).createSkill(organisation, createSkillRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Permanently deletes a skill. This will also remove it from any agents that have it assigned. - * @summary Delete Skill - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AISkillsApi - */ - public deleteSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).deleteSkill(organisation, skillId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Permanently deletes all skills in the specified namespace. - * @summary Delete Skill Collection - * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AISkillsApi - */ - public deleteSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).deleteSkillCollection(organisation, namespace, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieves full details of a skill including its content, source information, and metadata. - * @summary Get Skill Details - * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AISkillsApi - */ - public getSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).getSkill(organisation, skillId, options).then((request) => request(this.axios, this.basePath)); - } - +export class AISlackBotsApi extends BaseAPI { /** - * Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version - * @summary Import Skill from External Source + * Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + * @summary Create Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillRequest} importSkillRequest + * @param {CreateSlackBotRequest} createSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public importSkill(organisation: string, importSkillRequest: ImportSkillRequest, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).importSkill(organisation, importSkillRequest, options).then((request) => request(this.axios, this.basePath)); + public createSlackBot(organisation: string, createSlackBotRequest: CreateSlackBotRequest, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).createSlackBot(organisation, createSlackBotRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. - * @summary Import Skill Collection from GitHub + * Permanently deletes a Slack bot and disconnects it from the workspace. + * @summary Delete Slack Bot * @param {string} organisation The organisation ID - * @param {ImportSkillCollectionRequest} importSkillCollectionRequest + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public importSkillCollection(organisation: string, importSkillCollectionRequest: ImportSkillCollectionRequest, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).importSkillCollection(organisation, importSkillCollectionRequest, options).then((request) => request(this.axios, this.basePath)); + public deleteSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).deleteSlackBot(organisation, botId, options).then((request) => request(this.axios, this.basePath)); } /** - * Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. - * @summary List Skill Collections + * Retrieves details for a specific Slack bot including its configuration and connection status. + * @summary Get Slack Bot * @param {string} organisation The organisation ID + * @param {string} botId The Slack bot ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public listSkillCollections(organisation: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).listSkillCollections(organisation, options).then((request) => request(this.axios, this.basePath)); + public getSlackBot(organisation: string, botId: string, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).getSlackBot(organisation, botId, options).then((request) => request(this.axios, this.basePath)); } /** - * Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file - * @summary List Organization\'s Skills + * Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + * @summary List Slack Bots * @param {string} organisation The organisation ID - * @param {string} [tag] Filter skills by tag - * @param {string} [namespace] Filter skills by collection namespace (e.g. \'superpowers\') - * @param {number} [limit] Maximum number of skills to return * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public listSkills(organisation: string, tag?: string, namespace?: string, limit?: number, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).listSkills(organisation, tag, namespace, limit, options).then((request) => request(this.axios, this.basePath)); + public listSlackBots(organisation: string, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).listSlackBots(organisation, options).then((request) => request(this.axios, this.basePath)); } /** - * Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest - * @summary Sync Skill from Source + * Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Channels * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter channels by name * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public syncSkill(organisation: string, skillId: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).syncSkill(organisation, skillId, options).then((request) => request(this.axios, this.basePath)); + public searchSlackWorkspaceChannels(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).searchSlackWorkspaceChannels(organisation, botId, q, options).then((request) => request(this.axios, this.basePath)); } /** - * Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. - * @summary Sync Skill Collection + * Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + * @summary Search Slack Workspace Users * @param {string} organisation The organisation ID - * @param {string} namespace Collection namespace + * @param {string} botId The Slack bot ID + * @param {string} [q] Search query to filter users by name * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public syncSkillCollection(organisation: string, namespace: string, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).syncSkillCollection(organisation, namespace, options).then((request) => request(this.axios, this.basePath)); + public searchSlackWorkspaceUsers(organisation: string, botId: string, q?: string, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).searchSlackWorkspaceUsers(organisation, botId, q, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. - * @summary Update Skill + * Updates a Slack bot\'s configuration. Only provided fields are updated. + * @summary Update Slack Bot * @param {string} organisation The organisation ID - * @param {string} skillId The skill ID - * @param {UpdateSkillRequest} updateSkillRequest + * @param {string} botId The Slack bot ID + * @param {UpdateSlackBotRequest} updateSlackBotRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AISkillsApi + * @memberof AISlackBotsApi */ - public updateSkill(organisation: string, skillId: string, updateSkillRequest: UpdateSkillRequest, options?: RawAxiosRequestConfig) { - return AISkillsApiFp(this.configuration).updateSkill(organisation, skillId, updateSkillRequest, options).then((request) => request(this.axios, this.basePath)); + public updateSlackBot(organisation: string, botId: string, updateSlackBotRequest: UpdateSlackBotRequest, options?: RawAxiosRequestConfig) { + return AISlackBotsApiFp(this.configuration).updateSlackBot(organisation, botId, updateSlackBotRequest, options).then((request) => request(this.axios, this.basePath)); } } @@ -19272,25 +22550,22 @@ export type ListAIToolExecutionsStatusEnum = typeof ListAIToolExecutionsStatusEn /** - * AIVectorDatabaseApi - axios parameter creator + * AIUsageApi - axios parameter creator * @export */ -export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { +export const AIUsageApiAxiosParamCreator = 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 + * + * @summary Get AI usage summary for the authenticated user * @param {string} organisation The organisation ID - * @param {CreateVectorCollectionRequest} createVectorCollectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createVectorCollection: async (organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { + getMyUsage: async (organisation: 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` + assertParamExists('getMyUsage', 'organisation', organisation) + const localVarPath = `/api/v3/organizations/{organisation}/ai/usage/me` .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); @@ -19299,7 +22574,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; @@ -19309,160 +22584,102 @@ 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), options: localVarRequestOptions, }; }, + } +}; + +/** + * AIUsageApi - functional programming interface + * @export + */ +export const AIUsageApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AIUsageApiAxiosParamCreator(configuration) + return { /** - * Deletes a vector database collection and all its documents. This action cannot be undone. - * @summary Delete Collection + * + * @summary Get AI usage summary for the authenticated user * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteVectorCollection: async (organisation: string, collectionId: 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}` - .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: '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, - }; + async getMyUsage(organisation: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMyUsage(organisation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIUsageApi.getMyUsage']?.[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} - */ - deleteVectorDocuments: async (organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - 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(`{${"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: 'DELETE', ...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(deleteVectorDocumentsRequest, localVarRequestOptions, configuration) + } +}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * AIUsageApi - factory interface + * @export + */ +export const AIUsageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AIUsageApiFp(configuration) + return { /** - * Get detailed information about a specific vector database collection. - * @summary Get Collection Details + * + * @summary Get AI usage summary for the authenticated user * @param {string} organisation The organisation ID - * @param {string} collectionId The collection ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVectorCollection: async (organisation: string, collectionId: string, 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))); - // 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; + getMyUsage(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMyUsage(organisation, options).then((request) => request(axios, basePath)); + }, + }; +}; - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) +/** + * AIUsageApi - object-oriented interface + * @export + * @class AIUsageApi + * @extends {BaseAPI} + */ +export class AIUsageApi extends BaseAPI { + /** + * + * @summary Get AI usage summary for the authenticated user + * @param {string} organisation The organisation ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIUsageApi + */ + public getMyUsage(organisation: string, options?: RawAxiosRequestConfig) { + return AIUsageApiFp(this.configuration).getMyUsage(organisation, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * AIVectorDatabaseApi - axios parameter creator + * @export + */ +export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Lists all vector database collections (knowledge bases) for an organization. - * @summary List Vector Database Collections + * 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} */ - listVectorCollections: async (organisation: string, options: RawAxiosRequestConfig = {}): Promise => { + createVectorCollection: async (organisation: string, createVectorCollectionRequest: CreateVectorCollectionRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('listVectorCollections', 'organisation', organisation) + 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. @@ -19472,51 +22689,6 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co 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, - }; - }, - /** - * 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: 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; @@ -19532,7 +22704,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(queryVectorCollectionRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createVectorCollectionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -19540,21 +22712,63 @@ 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 + * 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 {UploadVectorDocumentsRequest} uploadVectorDocumentsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadVectorDocuments: async (organisation: string, collectionId: string, uploadVectorDocumentsRequest: UploadVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { + deleteVectorCollection: async (organisation: string, collectionId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'organisation' is not null or undefined - assertParamExists('uploadVectorDocuments', 'organisation', organisation) + assertParamExists('deleteVectorCollection', '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) + assertParamExists('deleteVectorCollection', '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; + 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, + }; + }, + /** + * 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: async (organisation: string, collectionId: string, deleteVectorDocumentsRequest: DeleteVectorDocumentsRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + 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(`{${"collectionId"}}`, encodeURIComponent(String(collectionId))); @@ -19565,6 +22779,134 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co 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) + + + + 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), + options: localVarRequestOptions, + }; + }, + /** + * 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: async (organisation: string, collectionId: string, 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))); + // 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, + }; + }, + /** + * 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; + } + + 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, + }; + }, + /** + * 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: 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; @@ -19580,7 +22922,7 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(uploadVectorDocumentsRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(queryVectorCollectionRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -19682,21 +23024,6 @@ export const AIVectorDatabaseApiFp = function(configuration?: Configuration) { 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); - }, } }; @@ -19774,18 +23101,6 @@ export const AIVectorDatabaseApiFactory = function (configuration?: Configuratio 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)); - }, }; }; @@ -19874,20 +23189,6 @@ export class AIVectorDatabaseApi extends BaseAPI { 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)); - } } @@ -32898,6 +36199,149 @@ export class VariablesApi extends BaseAPI { +/** + * VectorDatabaseApi - axios parameter creator + * @export + */ +export const VectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listVectorDocuments: async (organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listVectorDocuments', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('listVectorDocuments', 'collectionId', collectionId) + 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * VectorDatabaseApi - functional programming interface + * @export + */ +export const VectorDatabaseApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = VectorDatabaseApiAxiosParamCreator(configuration) + return { + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listVectorDocuments(organisation, collectionId, key, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VectorDatabaseApi.listVectorDocuments']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * VectorDatabaseApi - factory interface + * @export + */ +export const VectorDatabaseApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = VectorDatabaseApiFp(configuration) + return { + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listVectorDocuments(organisation, collectionId, key, limit, offset, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * VectorDatabaseApi - object-oriented interface + * @export + * @class VectorDatabaseApi + * @extends {BaseAPI} + */ +export class VectorDatabaseApi extends BaseAPI { + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VectorDatabaseApi + */ + public listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return VectorDatabaseApiFp(this.configuration).listVectorDocuments(organisation, collectionId, key, limit, offset, options).then((request) => request(this.axios, this.basePath)); + } +} + + + /** * VolumesApi - axios parameter creator * @export diff --git a/common.ts b/common.ts index ad48064..dadf607 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.12.0 + * The version of the OpenAPI document: 4.15.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/configuration.ts b/configuration.ts index 0c775bf..4600892 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.12.0 + * The version of the OpenAPI document: 4.15.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/docs/AIAgentsApi.md b/docs/AIAgentsApi.md index 8524dea..b2ef759 100644 --- a/docs/AIAgentsApi.md +++ b/docs/AIAgentsApi.md @@ -7,9 +7,12 @@ All URIs are relative to *https://dashboard.quantcdn.io* |[**chatWithAIAgent**](#chatwithaiagent) | **POST** /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat | Chat with AI Agent| |[**createAIAgent**](#createaiagent) | **POST** /api/v3/organizations/{organisation}/ai/agents | Create AI Agent| |[**deleteAIAgent**](#deleteaiagent) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Delete Agent| +|[**deleteAgentOverlay**](#deleteagentoverlay) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Delete Agent Overlay| |[**getAIAgent**](#getaiagent) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Get Agent Details| +|[**getAgentOverlay**](#getagentoverlay) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Get Agent Overlay| |[**listAIAgents**](#listaiagents) | **GET** /api/v3/organizations/{organisation}/ai/agents | List AI Agents| |[**updateAIAgent**](#updateaiagent) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Update Agent| +|[**upsertAgentOverlay**](#upsertagentoverlay) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Upsert Agent Overlay| # **chatWithAIAgent** > ChatWithAIAgent200Response chatWithAIAgent(chatWithAIAgentRequest) @@ -189,6 +192,63 @@ const { status, data } = await apiInstance.deleteAIAgent( [[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) +# **deleteAgentOverlay** +> DeleteAgentOverlay200Response deleteAgentOverlay() + +Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + +### Example + +```typescript +import { + AIAgentsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIAgentsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let agentId: string; //Global agent identifier (default to undefined) + +const { status, data } = await apiInstance.deleteAgentOverlay( + organisation, + agentId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **agentId** | [**string**] | Global agent identifier | defaults to undefined| + + +### Return type + +**DeleteAgentOverlay200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Overlay deleted — agent reverted to defaults | - | +|**403** | Access denied | - | +|**404** | Not a global agent | - | +|**500** | Failed to reset overlay | - | + +[[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) + # **getAIAgent** > GetAIAgent200Response getAIAgent() @@ -246,6 +306,63 @@ const { status, data } = await apiInstance.getAIAgent( [[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) +# **getAgentOverlay** +> GetAgentOverlay200Response getAgentOverlay() + +Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + +### Example + +```typescript +import { + AIAgentsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIAgentsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let agentId: string; //Global agent identifier (e.g., \'quantgov-code\') (default to undefined) + +const { status, data } = await apiInstance.getAgentOverlay( + organisation, + agentId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **agentId** | [**string**] | Global agent identifier (e.g., \'quantgov-code\') | defaults to undefined| + + +### Return type + +**GetAgentOverlay200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Overlay retrieved (may be null if none set) | - | +|**403** | Access denied | - | +|**404** | Not a global agent | - | +|**500** | Failed to retrieve overlay | - | + +[[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) + # **listAIAgents** > ListAIAgents200Response listAIAgents() @@ -364,3 +481,66 @@ const { status, data } = await apiInstance.updateAIAgent( [[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) +# **upsertAgentOverlay** +> UpsertAgentOverlay200Response upsertAgentOverlay(upsertAgentOverlayRequest) + +Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + +### Example + +```typescript +import { + AIAgentsApi, + Configuration, + UpsertAgentOverlayRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIAgentsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let agentId: string; //Global agent identifier (default to undefined) +let upsertAgentOverlayRequest: UpsertAgentOverlayRequest; // + +const { status, data } = await apiInstance.upsertAgentOverlay( + organisation, + agentId, + upsertAgentOverlayRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **upsertAgentOverlayRequest** | **UpsertAgentOverlayRequest**| | | +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **agentId** | [**string**] | Global agent identifier | defaults to undefined| + + +### Return type + +**UpsertAgentOverlay200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Overlay created or updated | - | +|**400** | Invalid request parameters | - | +|**403** | Access denied | - | +|**404** | Not a global agent | - | +|**409** | Version conflict — overlay was modified concurrently | - | +|**500** | Failed to save overlay | - | + +[[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/AIFilterPoliciesApi.md b/docs/AIFilterPoliciesApi.md new file mode 100644 index 0000000..e60d7f2 --- /dev/null +++ b/docs/AIFilterPoliciesApi.md @@ -0,0 +1,396 @@ +# AIFilterPoliciesApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**createFilterPolicy**](#createfilterpolicy) | **POST** /api/v3/organizations/{organisation}/ai/filter-policies | Create an AI filter policy for an organisation| +|[**deleteFilterPolicy**](#deletefilterpolicy) | **DELETE** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Delete a specific AI filter policy| +|[**disableFilterPolicy**](#disablefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/disable | Disable a specific AI filter policy| +|[**enableFilterPolicy**](#enablefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/enable | Enable a specific AI filter policy| +|[**getFilterPolicy**](#getfilterpolicy) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Get a specific AI filter policy| +|[**listFilterPolicies**](#listfilterpolicies) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies | List AI filter policies for an organisation| +|[**updateFilterPolicy**](#updatefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Update a specific AI filter policy| + +# **createFilterPolicy** +> object createFilterPolicy(createFilterPolicyRequest) + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration, + CreateFilterPolicyRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let createFilterPolicyRequest: CreateFilterPolicyRequest; // + +const { status, data } = await apiInstance.createFilterPolicy( + organisation, + createFilterPolicyRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createFilterPolicyRequest** | **CreateFilterPolicyRequest**| | | +| **organisation** | [**string**] | The organisation ID | 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** | Filter policy created successfully | - | +|**422** | Validation error | - | +|**500** | Failed to create filter policy | - | + +[[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) + +# **deleteFilterPolicy** +> object deleteFilterPolicy() + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; // (default to undefined) +let policyId: string; // (default to undefined) + +const { status, data } = await apiInstance.deleteFilterPolicy( + organisation, + policyId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **policyId** | [**string**] | | 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** | Filter policy deleted successfully | - | +|**500** | Failed to delete filter policy | - | + +[[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) + +# **disableFilterPolicy** +> object disableFilterPolicy() + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; // (default to undefined) +let policyId: string; // (default to undefined) + +const { status, data } = await apiInstance.disableFilterPolicy( + organisation, + policyId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **policyId** | [**string**] | | 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** | Filter policy disabled successfully | - | +|**500** | Failed to disable filter policy | - | + +[[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) + +# **enableFilterPolicy** +> object enableFilterPolicy() + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; // (default to undefined) +let policyId: string; // (default to undefined) + +const { status, data } = await apiInstance.enableFilterPolicy( + organisation, + policyId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **policyId** | [**string**] | | 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** | Filter policy enabled successfully | - | +|**500** | Failed to enable filter policy | - | + +[[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) + +# **getFilterPolicy** +> object getFilterPolicy() + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; // (default to undefined) +let policyId: string; // (default to undefined) + +const { status, data } = await apiInstance.getFilterPolicy( + organisation, + policyId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **policyId** | [**string**] | | 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** | Filter policy details | - | +|**404** | Filter policy 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) + +# **listFilterPolicies** +> object listFilterPolicies() + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) + +const { status, data } = await apiInstance.listFilterPolicies( + organisation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | 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** | List of filter policies | - | +|**500** | Failed to retrieve filter policies | - | + +[[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) + +# **updateFilterPolicy** +> object updateFilterPolicy(updateFilterPolicyRequest) + + +### Example + +```typescript +import { + AIFilterPoliciesApi, + Configuration, + UpdateFilterPolicyRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIFilterPoliciesApi(configuration); + +let organisation: string; // (default to undefined) +let policyId: string; // (default to undefined) +let updateFilterPolicyRequest: UpdateFilterPolicyRequest; // + +const { status, data } = await apiInstance.updateFilterPolicy( + organisation, + policyId, + updateFilterPolicyRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **updateFilterPolicyRequest** | **UpdateFilterPolicyRequest**| | | +| **organisation** | [**string**] | | defaults to undefined| +| **policyId** | [**string**] | | 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 | +|-------------|-------------|------------------| +|**200** | Filter policy updated successfully | - | +|**422** | Validation error | - | +|**500** | Failed to update filter policy | - | + +[[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/AIGovernanceApi.md b/docs/AIGovernanceApi.md new file mode 100644 index 0000000..a9232db --- /dev/null +++ b/docs/AIGovernanceApi.md @@ -0,0 +1,168 @@ +# AIGovernanceApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getGovernanceConfig**](#getgovernanceconfig) | **GET** /api/v3/organizations/{organisation}/ai/governance | Get AI governance configuration for an organisation| +|[**getGovernanceSpend**](#getgovernancespend) | **GET** /api/v3/organizations/{organisation}/ai/governance/spend | Get AI spend summary for an organisation| +|[**updateGovernanceConfig**](#updategovernanceconfig) | **PUT** /api/v3/organizations/{organisation}/ai/governance | Update AI governance configuration for an organisation| + +# **getGovernanceConfig** +> GetGovernanceConfig200Response getGovernanceConfig() + + +### Example + +```typescript +import { + AIGovernanceApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIGovernanceApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) + +const { status, data } = await apiInstance.getGovernanceConfig( + organisation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| + + +### Return type + +**GetGovernanceConfig200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | AI governance configuration | - | +|**500** | Failed to retrieve governance configuration | - | + +[[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) + +# **getGovernanceSpend** +> object getGovernanceSpend() + + +### Example + +```typescript +import { + AIGovernanceApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIGovernanceApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) + +const { status, data } = await apiInstance.getGovernanceSpend( + organisation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | 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** | AI spend summary | - | +|**500** | Failed to retrieve spend summary | - | + +[[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) + +# **updateGovernanceConfig** +> UpdateGovernanceConfig200Response updateGovernanceConfig(updateGovernanceConfigRequest) + + +### Example + +```typescript +import { + AIGovernanceApi, + Configuration, + UpdateGovernanceConfigRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIGovernanceApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let updateGovernanceConfigRequest: UpdateGovernanceConfigRequest; // + +const { status, data } = await apiInstance.updateGovernanceConfig( + organisation, + updateGovernanceConfigRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **updateGovernanceConfigRequest** | **UpdateGovernanceConfigRequest**| | | +| **organisation** | [**string**] | The organisation ID | defaults to undefined| + + +### Return type + +**UpdateGovernanceConfig200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Governance configuration updated successfully | - | +|**422** | Validation error | - | +|**500** | Failed to update governance configuration | - | + +[[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/AISlackBotsApi.md b/docs/AISlackBotsApi.md new file mode 100644 index 0000000..6983805 --- /dev/null +++ b/docs/AISlackBotsApi.md @@ -0,0 +1,421 @@ +# AISlackBotsApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**createSlackBot**](#createslackbot) | **POST** /api/v3/organizations/{organisation}/ai/slack-bots | Create Slack Bot| +|[**deleteSlackBot**](#deleteslackbot) | **DELETE** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Delete Slack Bot| +|[**getSlackBot**](#getslackbot) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Get Slack Bot| +|[**listSlackBots**](#listslackbots) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots | List Slack Bots| +|[**searchSlackWorkspaceChannels**](#searchslackworkspacechannels) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/channels | Search Slack Workspace Channels| +|[**searchSlackWorkspaceUsers**](#searchslackworkspaceusers) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/users | Search Slack Workspace Users| +|[**updateSlackBot**](#updateslackbot) | **PUT** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Update Slack Bot| + +# **createSlackBot** +> CreateSlackBot201Response createSlackBot(createSlackBotRequest) + +Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration, + CreateSlackBotRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let createSlackBotRequest: CreateSlackBotRequest; // + +const { status, data } = await apiInstance.createSlackBot( + organisation, + createSlackBotRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createSlackBotRequest** | **CreateSlackBotRequest**| | | +| **organisation** | [**string**] | The organisation ID | defaults to undefined| + + +### Return type + +**CreateSlackBot201Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**201** | Slack bot created successfully | - | +|**400** | Invalid request parameters | - | +|**403** | Access denied | - | +|**500** | Failed to create Slack bot | - | + +[[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) + +# **deleteSlackBot** +> DeleteSlackBot200Response deleteSlackBot() + +Permanently deletes a Slack bot and disconnects it from the workspace. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let botId: string; //The Slack bot ID (default to undefined) + +const { status, data } = await apiInstance.deleteSlackBot( + organisation, + botId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **botId** | [**string**] | The Slack bot ID | defaults to undefined| + + +### Return type + +**DeleteSlackBot200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Slack bot deleted successfully | - | +|**403** | Access denied | - | +|**404** | Slack bot not found | - | +|**500** | Failed to delete Slack bot | - | + +[[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) + +# **getSlackBot** +> GetSlackBot200Response getSlackBot() + +Retrieves details for a specific Slack bot including its configuration and connection status. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let botId: string; //The Slack bot ID (default to undefined) + +const { status, data } = await apiInstance.getSlackBot( + organisation, + botId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **botId** | [**string**] | The Slack bot ID | defaults to undefined| + + +### Return type + +**GetSlackBot200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Slack bot details retrieved successfully | - | +|**403** | Access denied | - | +|**404** | Slack bot not found | - | +|**500** | Failed to retrieve Slack bot | - | + +[[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) + +# **listSlackBots** +> ListSlackBots200Response listSlackBots() + +Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) + +const { status, data } = await apiInstance.listSlackBots( + organisation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| + + +### Return type + +**ListSlackBots200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Slack bots retrieved successfully | - | +|**403** | Access denied | - | +|**500** | Failed to retrieve Slack bots | - | + +[[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) + +# **searchSlackWorkspaceChannels** +> SearchSlackWorkspaceChannels200Response searchSlackWorkspaceChannels() + +Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let botId: string; //The Slack bot ID (default to undefined) +let q: string; //Search query to filter channels by name (optional) (default to undefined) + +const { status, data } = await apiInstance.searchSlackWorkspaceChannels( + organisation, + botId, + q +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **botId** | [**string**] | The Slack bot ID | defaults to undefined| +| **q** | [**string**] | Search query to filter channels by name | (optional) defaults to undefined| + + +### Return type + +**SearchSlackWorkspaceChannels200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Workspace channels retrieved successfully | - | +|**403** | Access denied | - | +|**404** | Slack bot not found or not connected | - | +|**500** | Failed to search channels | - | + +[[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) + +# **searchSlackWorkspaceUsers** +> SearchSlackWorkspaceUsers200Response searchSlackWorkspaceUsers() + +Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let botId: string; //The Slack bot ID (default to undefined) +let q: string; //Search query to filter users by name (optional) (default to undefined) + +const { status, data } = await apiInstance.searchSlackWorkspaceUsers( + organisation, + botId, + q +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **botId** | [**string**] | The Slack bot ID | defaults to undefined| +| **q** | [**string**] | Search query to filter users by name | (optional) defaults to undefined| + + +### Return type + +**SearchSlackWorkspaceUsers200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Workspace users retrieved successfully | - | +|**403** | Access denied | - | +|**404** | Slack bot not found or not connected | - | +|**500** | Failed to search users | - | + +[[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) + +# **updateSlackBot** +> CreateSlackBot201Response updateSlackBot(updateSlackBotRequest) + +Updates a Slack bot\'s configuration. Only provided fields are updated. + +### Example + +```typescript +import { + AISlackBotsApi, + Configuration, + UpdateSlackBotRequest +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AISlackBotsApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) +let botId: string; //The Slack bot ID (default to undefined) +let updateSlackBotRequest: UpdateSlackBotRequest; // + +const { status, data } = await apiInstance.updateSlackBot( + organisation, + botId, + updateSlackBotRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **updateSlackBotRequest** | **UpdateSlackBotRequest**| | | +| **organisation** | [**string**] | The organisation ID | defaults to undefined| +| **botId** | [**string**] | The Slack bot ID | defaults to undefined| + + +### Return type + +**CreateSlackBot201Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Slack bot updated successfully | - | +|**400** | Invalid request parameters | - | +|**403** | Access denied | - | +|**404** | Slack bot not found | - | +|**500** | Failed to update Slack bot | - | + +[[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/AIUsageApi.md b/docs/AIUsageApi.md new file mode 100644 index 0000000..94afec9 --- /dev/null +++ b/docs/AIUsageApi.md @@ -0,0 +1,60 @@ +# AIUsageApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getMyUsage**](#getmyusage) | **GET** /api/v3/organizations/{organisation}/ai/usage/me | Get AI usage summary for the authenticated user| + +# **getMyUsage** +> GetMyUsage200Response getMyUsage() + + +### Example + +```typescript +import { + AIUsageApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIUsageApi(configuration); + +let organisation: string; //The organisation ID (default to undefined) + +const { status, data } = await apiInstance.getMyUsage( + organisation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | The organisation ID | defaults to undefined| + + +### Return type + +**GetMyUsage200Response** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | User AI usage summary | - | +|**401** | Cannot determine caller identity | - | +|**500** | Failed to retrieve usage data | - | + +[[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/AIVectorDatabaseApi.md b/docs/AIVectorDatabaseApi.md index 2fb531a..464ecc3 100644 --- a/docs/AIVectorDatabaseApi.md +++ b/docs/AIVectorDatabaseApi.md @@ -10,7 +10,6 @@ All URIs are relative to *https://dashboard.quantcdn.io* |[**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| -|[**uploadVectorDocuments**](#uploadvectordocuments) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Upload Documents to Collection| # **createVectorCollection** > CreateVectorCollection201Response createVectorCollection(createVectorCollectionRequest) @@ -362,65 +361,3 @@ const { status, data } = await apiInstance.queryVectorCollection( [[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) -# **uploadVectorDocuments** -> UploadVectorDocuments200Response uploadVectorDocuments(uploadVectorDocumentsRequest) - -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. - -### Example - -```typescript -import { - AIVectorDatabaseApi, - Configuration, - UploadVectorDocumentsRequest -} from '@quantcdn/quant-client'; - -const configuration = new Configuration(); -const apiInstance = new AIVectorDatabaseApi(configuration); - -let organisation: string; //The organisation ID (default to undefined) -let collectionId: string; //The collection ID (default to undefined) -let uploadVectorDocumentsRequest: UploadVectorDocumentsRequest; // - -const { status, data } = await apiInstance.uploadVectorDocuments( - organisation, - collectionId, - uploadVectorDocumentsRequest -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **uploadVectorDocumentsRequest** | **UploadVectorDocumentsRequest**| | | -| **organisation** | [**string**] | The organisation ID | defaults to undefined| -| **collectionId** | [**string**] | The collection ID | defaults to undefined| - - -### Return type - -**UploadVectorDocuments200Response** - -### 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 uploaded successfully | - | -|**400** | Invalid request parameters | - | -|**403** | Access denied | - | -|**404** | Collection not found | - | -|**500** | Failed to upload 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) - diff --git a/docs/ChatWithAIAgentRequest.md b/docs/ChatWithAIAgentRequest.md index 3347b4c..a91fb6d 100644 --- a/docs/ChatWithAIAgentRequest.md +++ b/docs/ChatWithAIAgentRequest.md @@ -11,6 +11,9 @@ Name | Type | Description | Notes **stream** | **boolean** | Whether to stream the response (SSE) | [optional] [default to false] **async** | **boolean** | Enable async/durable execution mode. When true, returns 202 with pollUrl. Use for long-running agent tasks. | [optional] [default to false] **system** | **string** | Optional additional system prompt (appended to agent\'s configured prompt) | [optional] [default to undefined] +**longContext** | **boolean** | Per-request override to force 1M context window routing | [optional] [default to false] +**maxToolIterations** | **number** | Maximum tool auto-execution iterations for this request | [optional] [default to undefined] +**allowedCollections** | **Array<string>** | Per-request override for vector DB collections the agent can query | [optional] [default to undefined] ## Example @@ -24,6 +27,9 @@ const instance: ChatWithAIAgentRequest = { stream, async, system, + longContext, + maxToolIterations, + allowedCollections, }; ``` diff --git a/docs/CreateAIAgentRequest.md b/docs/CreateAIAgentRequest.md index c50dd57..82ce81b 100644 --- a/docs/CreateAIAgentRequest.md +++ b/docs/CreateAIAgentRequest.md @@ -14,7 +14,11 @@ Name | Type | Description | Notes **maxTokens** | **number** | | [optional] [default to undefined] **allowedTools** | **Array<string>** | | [optional] [default to undefined] **allowedCollections** | **Array<string>** | | [optional] [default to undefined] +**assignedSkills** | **Array<string>** | Skill IDs to assign to this agent | [optional] [default to undefined] **createdBy** | **string** | User identifier who created the agent | [optional] [default to undefined] +**longContext** | **boolean** | Enable 1M context window support | [optional] [default to undefined] +**guardrailPreset** | **string** | Guardrail preset name | [optional] [default to undefined] +**filterPolicies** | **Array<string>** | Filter policy IDs to apply to this agent\'s inference requests | [optional] [default to undefined] ## Example @@ -31,7 +35,11 @@ const instance: CreateAIAgentRequest = { maxTokens, allowedTools, allowedCollections, + assignedSkills, createdBy, + longContext, + guardrailPreset, + filterPolicies, }; ``` diff --git a/docs/CreateFilterPolicyRequest.md b/docs/CreateFilterPolicyRequest.md new file mode 100644 index 0000000..c186a9b --- /dev/null +++ b/docs/CreateFilterPolicyRequest.md @@ -0,0 +1,26 @@ +# CreateFilterPolicyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [default to undefined] +**description** | **string** | | [optional] [default to undefined] +**enabled** | **boolean** | | [optional] [default to undefined] +**rules** | [**Array<CreateFilterPolicyRequestRulesInner>**](CreateFilterPolicyRequestRulesInner.md) | | [default to undefined] + +## Example + +```typescript +import { CreateFilterPolicyRequest } from '@quantcdn/quant-client'; + +const instance: CreateFilterPolicyRequest = { + name, + description, + enabled, + rules, +}; +``` + +[[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/CreateFilterPolicyRequestRulesInner.md b/docs/CreateFilterPolicyRequestRulesInner.md new file mode 100644 index 0000000..a337c46 --- /dev/null +++ b/docs/CreateFilterPolicyRequestRulesInner.md @@ -0,0 +1,26 @@ +# CreateFilterPolicyRequestRulesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] [default to undefined] +**match** | [**CreateFilterPolicyRequestRulesInnerMatch**](CreateFilterPolicyRequestRulesInnerMatch.md) | | [optional] [default to undefined] +**action** | **string** | | [optional] [default to undefined] +**applyTo** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { CreateFilterPolicyRequestRulesInner } from '@quantcdn/quant-client'; + +const instance: CreateFilterPolicyRequestRulesInner = { + name, + match, + action, + applyTo, +}; +``` + +[[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/CreateFilterPolicyRequestRulesInnerMatch.md b/docs/CreateFilterPolicyRequestRulesInnerMatch.md new file mode 100644 index 0000000..c19a073 --- /dev/null +++ b/docs/CreateFilterPolicyRequestRulesInnerMatch.md @@ -0,0 +1,25 @@ +# CreateFilterPolicyRequestRulesInnerMatch + +Match criteria + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] [default to undefined] +**values** | **Array<string>** | Required when type=word | [optional] [default to undefined] +**pattern** | **string** | Required when type=regex | [optional] [default to undefined] + +## Example + +```typescript +import { CreateFilterPolicyRequestRulesInnerMatch } from '@quantcdn/quant-client'; + +const instance: CreateFilterPolicyRequestRulesInnerMatch = { + type, + values, + pattern, +}; +``` + +[[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/CreateSlackBot201Response.md b/docs/CreateSlackBot201Response.md new file mode 100644 index 0000000..f53739a --- /dev/null +++ b/docs/CreateSlackBot201Response.md @@ -0,0 +1,20 @@ +# CreateSlackBot201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot** | **object** | | [optional] [default to undefined] + +## Example + +```typescript +import { CreateSlackBot201Response } from '@quantcdn/quant-client'; + +const instance: CreateSlackBot201Response = { + bot, +}; +``` + +[[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/CreateSlackBotRequest.md b/docs/CreateSlackBotRequest.md new file mode 100644 index 0000000..d2ef215 --- /dev/null +++ b/docs/CreateSlackBotRequest.md @@ -0,0 +1,32 @@ +# CreateSlackBotRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agentId** | **string** | The AI agent that powers this bot | [default to undefined] +**setupType** | **string** | Whether to use Quant-managed or customer-provided Slack app | [default to undefined] +**sessionTtlDays** | **number** | Session TTL in days | [optional] [default to undefined] +**allowedChannels** | **Array<string>** | Slack channel IDs the bot may respond in | [optional] [default to undefined] +**keywordsEnabled** | **boolean** | Whether keyword triggers are enabled | [optional] [default to undefined] +**keywords** | **Array<string>** | Keywords that trigger the bot | [optional] [default to undefined] +**slashCommands** | **Array<string>** | Slash commands the bot responds to | [optional] [default to undefined] + +## Example + +```typescript +import { CreateSlackBotRequest } from '@quantcdn/quant-client'; + +const instance: CreateSlackBotRequest = { + agentId, + setupType, + sessionTtlDays, + allowedChannels, + keywordsEnabled, + keywords, + slashCommands, +}; +``` + +[[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/Cron.md b/docs/Cron.md index ab00773..7291d01 100644 --- a/docs/Cron.md +++ b/docs/Cron.md @@ -6,8 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | | [optional] [default to undefined] -**schedule** | **string** | | [optional] [default to undefined] -**command** | **string** | | [optional] [default to undefined] +**description** | **string** | | [optional] [default to undefined] +**scheduleExpression** | **string** | | [optional] [default to undefined] +**command** | **Array<string>** | | [optional] [default to undefined] +**targetContainerName** | **string** | | [optional] [default to undefined] +**isEnabled** | **boolean** | | [optional] [default to undefined] ## Example @@ -16,8 +19,11 @@ import { Cron } from '@quantcdn/quant-client'; const instance: Cron = { name, - schedule, + description, + scheduleExpression, command, + targetContainerName, + isEnabled, }; ``` diff --git a/docs/UploadVectorDocuments200Response.md b/docs/DeleteAgentOverlay200Response.md similarity index 57% rename from docs/UploadVectorDocuments200Response.md rename to docs/DeleteAgentOverlay200Response.md index 084485f..c4fe2b5 100644 --- a/docs/UploadVectorDocuments200Response.md +++ b/docs/DeleteAgentOverlay200Response.md @@ -1,4 +1,4 @@ -# UploadVectorDocuments200Response +# DeleteAgentOverlay200Response ## Properties @@ -6,19 +6,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **boolean** | | [optional] [default to undefined] -**documentIds** | **Array<string>** | | [optional] [default to undefined] -**chunksCreated** | **number** | | [optional] [default to undefined] **message** | **string** | | [optional] [default to undefined] ## Example ```typescript -import { UploadVectorDocuments200Response } from '@quantcdn/quant-client'; +import { DeleteAgentOverlay200Response } from '@quantcdn/quant-client'; -const instance: UploadVectorDocuments200Response = { +const instance: DeleteAgentOverlay200Response = { success, - documentIds, - chunksCreated, message, }; ``` diff --git a/docs/DeleteSlackBot200Response.md b/docs/DeleteSlackBot200Response.md new file mode 100644 index 0000000..bc8a591 --- /dev/null +++ b/docs/DeleteSlackBot200Response.md @@ -0,0 +1,22 @@ +# DeleteSlackBot200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **boolean** | | [optional] [default to undefined] +**message** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { DeleteSlackBot200Response } from '@quantcdn/quant-client'; + +const instance: DeleteSlackBot200Response = { + 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/DeleteVectorDocumentsRequest.md b/docs/DeleteVectorDocumentsRequest.md index 0c89dc1..2cdcf05 100644 --- a/docs/DeleteVectorDocumentsRequest.md +++ b/docs/DeleteVectorDocumentsRequest.md @@ -7,6 +7,7 @@ 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] +**keys** | **Array<string>** | Delete documents by key | [optional] [default to undefined] **metadata** | [**DeleteVectorDocumentsRequestMetadata**](DeleteVectorDocumentsRequestMetadata.md) | | [optional] [default to undefined] ## Example @@ -17,6 +18,7 @@ import { DeleteVectorDocumentsRequest } from '@quantcdn/quant-client'; const instance: DeleteVectorDocumentsRequest = { purgeAll, documentIds, + keys, metadata, }; ``` diff --git a/docs/GetAIAgent200ResponseAgent.md b/docs/GetAIAgent200ResponseAgent.md index 076fb76..3d5d915 100644 --- a/docs/GetAIAgent200ResponseAgent.md +++ b/docs/GetAIAgent200ResponseAgent.md @@ -15,6 +15,11 @@ Name | Type | Description | Notes **maxTokens** | **number** | | [optional] [default to undefined] **allowedTools** | **Array<string>** | | [optional] [default to undefined] **allowedCollections** | **Array<string>** | | [optional] [default to undefined] +**assignedSkills** | **Array<string>** | | [optional] [default to undefined] +**longContext** | **boolean** | Whether 1M context window is enabled | [optional] [default to undefined] +**guardrailPreset** | **string** | Guardrail preset name | [optional] [default to undefined] +**isGlobal** | **boolean** | Whether this is a platform-managed global agent | [optional] [default to undefined] +**hasOverlay** | **boolean** | Whether the requesting org has a per-org overlay for this global agent | [optional] [default to undefined] **createdBy** | **string** | | [optional] [default to undefined] **createdAt** | **string** | | [optional] [default to undefined] **updatedAt** | **string** | | [optional] [default to undefined] @@ -35,6 +40,11 @@ const instance: GetAIAgent200ResponseAgent = { maxTokens, allowedTools, allowedCollections, + assignedSkills, + longContext, + guardrailPreset, + isGlobal, + hasOverlay, createdBy, createdAt, updatedAt, diff --git a/docs/GetAgentOverlay200Response.md b/docs/GetAgentOverlay200Response.md new file mode 100644 index 0000000..18d333d --- /dev/null +++ b/docs/GetAgentOverlay200Response.md @@ -0,0 +1,22 @@ +# GetAgentOverlay200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**overlay** | [**GetAgentOverlay200ResponseOverlay**](GetAgentOverlay200ResponseOverlay.md) | | [optional] [default to undefined] +**base** | [**GetAgentOverlay200ResponseBase**](GetAgentOverlay200ResponseBase.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { GetAgentOverlay200Response } from '@quantcdn/quant-client'; + +const instance: GetAgentOverlay200Response = { + overlay, + base, +}; +``` + +[[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/GetAgentOverlay200ResponseBase.md b/docs/GetAgentOverlay200ResponseBase.md new file mode 100644 index 0000000..ff71b54 --- /dev/null +++ b/docs/GetAgentOverlay200ResponseBase.md @@ -0,0 +1,29 @@ +# GetAgentOverlay200ResponseBase + +Base global agent metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agentId** | **string** | | [optional] [default to undefined] +**name** | **string** | | [optional] [default to undefined] +**modelId** | **string** | | [optional] [default to undefined] +**allowedTools** | **Array<string>** | | [optional] [default to undefined] +**assignedSkillIds** | **Array<string>** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetAgentOverlay200ResponseBase } from '@quantcdn/quant-client'; + +const instance: GetAgentOverlay200ResponseBase = { + agentId, + name, + modelId, + allowedTools, + assignedSkillIds, +}; +``` + +[[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/GetAgentOverlay200ResponseOverlay.md b/docs/GetAgentOverlay200ResponseOverlay.md new file mode 100644 index 0000000..420287f --- /dev/null +++ b/docs/GetAgentOverlay200ResponseOverlay.md @@ -0,0 +1,40 @@ +# GetAgentOverlay200ResponseOverlay + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**modelId** | **string** | | [optional] [default to undefined] +**temperature** | **number** | | [optional] [default to undefined] +**maxTokens** | **number** | | [optional] [default to undefined] +**disabledSkills** | **Array<string>** | | [optional] [default to undefined] +**additionalSkills** | **Array<string>** | | [optional] [default to undefined] +**additionalTools** | **Array<string>** | | [optional] [default to undefined] +**disabledTools** | **Array<string>** | | [optional] [default to undefined] +**systemPromptAppend** | **string** | | [optional] [default to undefined] +**allowedCollections** | **Array<string>** | | [optional] [default to undefined] +**guardrailPreset** | **string** | | [optional] [default to undefined] +**version** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetAgentOverlay200ResponseOverlay } from '@quantcdn/quant-client'; + +const instance: GetAgentOverlay200ResponseOverlay = { + modelId, + temperature, + maxTokens, + disabledSkills, + additionalSkills, + additionalTools, + disabledTools, + systemPromptAppend, + allowedCollections, + guardrailPreset, + version, +}; +``` + +[[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/GetGovernanceConfig200Response.md b/docs/GetGovernanceConfig200Response.md new file mode 100644 index 0000000..5999c74 --- /dev/null +++ b/docs/GetGovernanceConfig200Response.md @@ -0,0 +1,34 @@ +# GetGovernanceConfig200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orgId** | **string** | | [optional] [default to undefined] +**aiEnabled** | **boolean** | | [optional] [default to undefined] +**modelPolicy** | **string** | | [optional] [default to undefined] +**modelList** | **Array<string>** | | [optional] [default to undefined] +**mandatoryGuardrailPreset** | **string** | | [optional] [default to undefined] +**mandatoryFilterPolicies** | **Array<string>** | | [optional] [default to undefined] +**spendLimits** | [**GetGovernanceConfig200ResponseSpendLimits**](GetGovernanceConfig200ResponseSpendLimits.md) | | [optional] [default to undefined] +**version** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetGovernanceConfig200Response } from '@quantcdn/quant-client'; + +const instance: GetGovernanceConfig200Response = { + orgId, + aiEnabled, + modelPolicy, + modelList, + mandatoryGuardrailPreset, + mandatoryFilterPolicies, + spendLimits, + version, +}; +``` + +[[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/GetGovernanceConfig200ResponseSpendLimits.md b/docs/GetGovernanceConfig200ResponseSpendLimits.md new file mode 100644 index 0000000..16a90c2 --- /dev/null +++ b/docs/GetGovernanceConfig200ResponseSpendLimits.md @@ -0,0 +1,28 @@ +# GetGovernanceConfig200ResponseSpendLimits + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monthlyBudgetCents** | **number** | | [optional] [default to undefined] +**dailyBudgetCents** | **number** | | [optional] [default to undefined] +**perUserMonthlyBudgetCents** | **number** | | [optional] [default to undefined] +**perUserDailyBudgetCents** | **number** | | [optional] [default to undefined] +**warningThresholdPercent** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetGovernanceConfig200ResponseSpendLimits } from '@quantcdn/quant-client'; + +const instance: GetGovernanceConfig200ResponseSpendLimits = { + monthlyBudgetCents, + dailyBudgetCents, + perUserMonthlyBudgetCents, + perUserDailyBudgetCents, + warningThresholdPercent, +}; +``` + +[[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/GetMyUsage200Response.md b/docs/GetMyUsage200Response.md new file mode 100644 index 0000000..466d087 --- /dev/null +++ b/docs/GetMyUsage200Response.md @@ -0,0 +1,28 @@ +# GetMyUsage200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **string** | | [optional] [default to undefined] +**currentMonth** | **string** | | [optional] [default to undefined] +**monthly** | [**GetMyUsage200ResponseMonthly**](GetMyUsage200ResponseMonthly.md) | | [optional] [default to undefined] +**daily** | [**GetMyUsage200ResponseDaily**](GetMyUsage200ResponseDaily.md) | | [optional] [default to undefined] +**quota** | **object** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetMyUsage200Response } from '@quantcdn/quant-client'; + +const instance: GetMyUsage200Response = { + userId, + currentMonth, + monthly, + daily, + quota, +}; +``` + +[[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/GetMyUsage200ResponseDaily.md b/docs/GetMyUsage200ResponseDaily.md new file mode 100644 index 0000000..01b7d3f --- /dev/null +++ b/docs/GetMyUsage200ResponseDaily.md @@ -0,0 +1,20 @@ +# GetMyUsage200ResponseDaily + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spendCents** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetMyUsage200ResponseDaily } from '@quantcdn/quant-client'; + +const instance: GetMyUsage200ResponseDaily = { + spendCents, +}; +``` + +[[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/UploadVectorDocumentsRequest.md b/docs/GetMyUsage200ResponseMonthly.md similarity index 50% rename from docs/UploadVectorDocumentsRequest.md rename to docs/GetMyUsage200ResponseMonthly.md index 5a71b8f..6053da6 100644 --- a/docs/UploadVectorDocumentsRequest.md +++ b/docs/GetMyUsage200ResponseMonthly.md @@ -1,19 +1,21 @@ -# UploadVectorDocumentsRequest +# GetMyUsage200ResponseMonthly ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**documents** | [**Array<UploadVectorDocumentsRequestDocumentsInner>**](UploadVectorDocumentsRequestDocumentsInner.md) | | [default to undefined] +**spendCents** | **number** | | [optional] [default to undefined] +**requestCount** | **number** | | [optional] [default to undefined] ## Example ```typescript -import { UploadVectorDocumentsRequest } from '@quantcdn/quant-client'; +import { GetMyUsage200ResponseMonthly } from '@quantcdn/quant-client'; -const instance: UploadVectorDocumentsRequest = { - documents, +const instance: GetMyUsage200ResponseMonthly = { + spendCents, + requestCount, }; ``` diff --git a/docs/GetSlackBot200Response.md b/docs/GetSlackBot200Response.md new file mode 100644 index 0000000..7e7ded1 --- /dev/null +++ b/docs/GetSlackBot200Response.md @@ -0,0 +1,20 @@ +# GetSlackBot200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot** | [**GetSlackBot200ResponseBot**](GetSlackBot200ResponseBot.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { GetSlackBot200Response } from '@quantcdn/quant-client'; + +const instance: GetSlackBot200Response = { + bot, +}; +``` + +[[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/GetSlackBot200ResponseBot.md b/docs/GetSlackBot200ResponseBot.md new file mode 100644 index 0000000..334d86a --- /dev/null +++ b/docs/GetSlackBot200ResponseBot.md @@ -0,0 +1,42 @@ +# GetSlackBot200ResponseBot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**botId** | **string** | | [optional] [default to undefined] +**agentId** | **string** | | [optional] [default to undefined] +**setupType** | **string** | | [optional] [default to undefined] +**status** | **string** | | [optional] [default to undefined] +**connected** | **boolean** | | [optional] [default to undefined] +**sessionTtlDays** | **number** | | [optional] [default to undefined] +**allowedChannels** | **Array<string>** | | [optional] [default to undefined] +**keywordsEnabled** | **boolean** | | [optional] [default to undefined] +**keywords** | **Array<string>** | | [optional] [default to undefined] +**slashCommands** | **Array<string>** | | [optional] [default to undefined] +**createdAt** | **string** | | [optional] [default to undefined] +**updatedAt** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { GetSlackBot200ResponseBot } from '@quantcdn/quant-client'; + +const instance: GetSlackBot200ResponseBot = { + botId, + agentId, + setupType, + status, + connected, + sessionTtlDays, + allowedChannels, + keywordsEnabled, + keywords, + slashCommands, + createdAt, + updatedAt, +}; +``` + +[[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/ListAIAgents200ResponseAgentsInner.md b/docs/ListAIAgents200ResponseAgentsInner.md index a5ace63..c39cc12 100644 --- a/docs/ListAIAgents200ResponseAgentsInner.md +++ b/docs/ListAIAgents200ResponseAgentsInner.md @@ -13,6 +13,11 @@ Name | Type | Description | Notes **temperature** | **number** | | [optional] [default to undefined] **maxTokens** | **number** | | [optional] [default to undefined] **allowedTools** | **Array<string>** | | [optional] [default to undefined] +**assignedSkills** | **Array<string>** | | [optional] [default to undefined] +**longContext** | **boolean** | | [optional] [default to undefined] +**guardrailPreset** | **string** | | [optional] [default to undefined] +**isGlobal** | **boolean** | | [optional] [default to undefined] +**hasOverlay** | **boolean** | | [optional] [default to undefined] **createdAt** | **string** | | [optional] [default to undefined] **updatedAt** | **string** | | [optional] [default to undefined] @@ -30,6 +35,11 @@ const instance: ListAIAgents200ResponseAgentsInner = { temperature, maxTokens, allowedTools, + assignedSkills, + longContext, + guardrailPreset, + isGlobal, + hasOverlay, createdAt, updatedAt, }; diff --git a/docs/ListSlackBots200Response.md b/docs/ListSlackBots200Response.md new file mode 100644 index 0000000..16de218 --- /dev/null +++ b/docs/ListSlackBots200Response.md @@ -0,0 +1,20 @@ +# ListSlackBots200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bots** | [**Array<ListSlackBots200ResponseBotsInner>**](ListSlackBots200ResponseBotsInner.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { ListSlackBots200Response } from '@quantcdn/quant-client'; + +const instance: ListSlackBots200Response = { + bots, +}; +``` + +[[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/ListSlackBots200ResponseBotsInner.md b/docs/ListSlackBots200ResponseBotsInner.md new file mode 100644 index 0000000..de6c4f1 --- /dev/null +++ b/docs/ListSlackBots200ResponseBotsInner.md @@ -0,0 +1,34 @@ +# ListSlackBots200ResponseBotsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**botId** | **string** | | [optional] [default to undefined] +**agentId** | **string** | | [optional] [default to undefined] +**setupType** | **string** | | [optional] [default to undefined] +**status** | **string** | | [optional] [default to undefined] +**connected** | **boolean** | | [optional] [default to undefined] +**sessionTtlDays** | **number** | | [optional] [default to undefined] +**keywordsEnabled** | **boolean** | | [optional] [default to undefined] +**createdAt** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ListSlackBots200ResponseBotsInner } from '@quantcdn/quant-client'; + +const instance: ListSlackBots200ResponseBotsInner = { + botId, + agentId, + setupType, + status, + connected, + sessionTtlDays, + keywordsEnabled, + createdAt, +}; +``` + +[[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/SearchSlackWorkspaceChannels200Response.md b/docs/SearchSlackWorkspaceChannels200Response.md new file mode 100644 index 0000000..9d7ed62 --- /dev/null +++ b/docs/SearchSlackWorkspaceChannels200Response.md @@ -0,0 +1,20 @@ +# SearchSlackWorkspaceChannels200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**Array<SearchSlackWorkspaceChannels200ResponseResultsInner>**](SearchSlackWorkspaceChannels200ResponseResultsInner.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { SearchSlackWorkspaceChannels200Response } from '@quantcdn/quant-client'; + +const instance: SearchSlackWorkspaceChannels200Response = { + results, +}; +``` + +[[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/SearchSlackWorkspaceChannels200ResponseResultsInner.md b/docs/SearchSlackWorkspaceChannels200ResponseResultsInner.md new file mode 100644 index 0000000..5ca4e5e --- /dev/null +++ b/docs/SearchSlackWorkspaceChannels200ResponseResultsInner.md @@ -0,0 +1,22 @@ +# SearchSlackWorkspaceChannels200ResponseResultsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] [default to undefined] +**name** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { SearchSlackWorkspaceChannels200ResponseResultsInner } from '@quantcdn/quant-client'; + +const instance: SearchSlackWorkspaceChannels200ResponseResultsInner = { + id, + name, +}; +``` + +[[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/SearchSlackWorkspaceUsers200Response.md b/docs/SearchSlackWorkspaceUsers200Response.md new file mode 100644 index 0000000..e6715de --- /dev/null +++ b/docs/SearchSlackWorkspaceUsers200Response.md @@ -0,0 +1,20 @@ +# SearchSlackWorkspaceUsers200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**Array<SearchSlackWorkspaceUsers200ResponseResultsInner>**](SearchSlackWorkspaceUsers200ResponseResultsInner.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { SearchSlackWorkspaceUsers200Response } from '@quantcdn/quant-client'; + +const instance: SearchSlackWorkspaceUsers200Response = { + results, +}; +``` + +[[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/SearchSlackWorkspaceUsers200ResponseResultsInner.md b/docs/SearchSlackWorkspaceUsers200ResponseResultsInner.md new file mode 100644 index 0000000..e6d81bc --- /dev/null +++ b/docs/SearchSlackWorkspaceUsers200ResponseResultsInner.md @@ -0,0 +1,24 @@ +# SearchSlackWorkspaceUsers200ResponseResultsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] [default to undefined] +**name** | **string** | | [optional] [default to undefined] +**real_name** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { SearchSlackWorkspaceUsers200ResponseResultsInner } from '@quantcdn/quant-client'; + +const instance: SearchSlackWorkspaceUsers200ResponseResultsInner = { + id, + name, + real_name, +}; +``` + +[[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/TokensApi.md b/docs/TokensApi.md index e9bbee4..79b9adb 100644 --- a/docs/TokensApi.md +++ b/docs/TokensApi.md @@ -61,6 +61,7 @@ const { status, data } = await apiInstance.tokensCreate( |**201** | Token created. The plain token is returned once and cannot be retrieved again. | - | |**400** | Bad request. | - | |**403** | Access is forbidden. | - | +|**422** | Validation error. | - | [[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/TokensCreate201Response.md b/docs/TokensCreate201Response.md index 566ffbe..c03d17a 100644 --- a/docs/TokensCreate201Response.md +++ b/docs/TokensCreate201Response.md @@ -6,7 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **token** | **string** | The plain text token (shown once) | [optional] [default to undefined] +**id** | **number** | Token ID | [optional] [default to undefined] **name** | **string** | | [optional] [default to undefined] +**scopes** | **Array<string>** | | [optional] [default to undefined] +**projects** | **Array<number>** | | [optional] [default to undefined] +**preset** | **string** | | [optional] [default to undefined] +**expires_at** | **string** | | [optional] [default to undefined] **created_at** | **string** | | [optional] [default to undefined] ## Example @@ -16,7 +21,12 @@ import { TokensCreate201Response } from '@quantcdn/quant-client'; const instance: TokensCreate201Response = { token, + id, name, + scopes, + projects, + preset, + expires_at, created_at, }; ``` diff --git a/docs/TokensCreateRequest.md b/docs/TokensCreateRequest.md index a8b8690..ed1789c 100644 --- a/docs/TokensCreateRequest.md +++ b/docs/TokensCreateRequest.md @@ -6,6 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name for the token | [default to undefined] +**preset** | **string** | Preset scope bundle | [optional] [default to undefined] +**scopes** | **Array<string>** | Individual scopes (mutually exclusive with preset) | [optional] [default to undefined] +**projects** | **Array<number>** | Project IDs to restrict this token to | [optional] [default to undefined] +**expires_in** | **string** | Token expiration period | [optional] [default to undefined] ## Example @@ -14,6 +18,10 @@ import { TokensCreateRequest } from '@quantcdn/quant-client'; const instance: TokensCreateRequest = { name, + preset, + scopes, + projects, + expires_in, }; ``` diff --git a/docs/UpdateAIAgentRequest.md b/docs/UpdateAIAgentRequest.md index 733f7a3..b95bdaa 100644 --- a/docs/UpdateAIAgentRequest.md +++ b/docs/UpdateAIAgentRequest.md @@ -14,6 +14,10 @@ Name | Type | Description | Notes **maxTokens** | **number** | | [optional] [default to undefined] **allowedTools** | **Array<string>** | | [optional] [default to undefined] **allowedCollections** | **Array<string>** | | [optional] [default to undefined] +**assignedSkills** | **Array<string>** | Skill IDs to assign to this agent | [optional] [default to undefined] +**longContext** | **boolean** | Enable 1M context window support | [optional] [default to undefined] +**guardrailPreset** | **string** | Guardrail preset name | [optional] [default to undefined] +**filterPolicies** | **Array<string>** | Filter policy IDs to apply to this agent\'s inference requests | [optional] [default to undefined] ## Example @@ -30,6 +34,10 @@ const instance: UpdateAIAgentRequest = { maxTokens, allowedTools, allowedCollections, + assignedSkills, + longContext, + guardrailPreset, + filterPolicies, }; ``` diff --git a/docs/UpdateFilterPolicyRequest.md b/docs/UpdateFilterPolicyRequest.md new file mode 100644 index 0000000..7afed1c --- /dev/null +++ b/docs/UpdateFilterPolicyRequest.md @@ -0,0 +1,26 @@ +# UpdateFilterPolicyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] [default to undefined] +**description** | **string** | | [optional] [default to undefined] +**enabled** | **boolean** | | [optional] [default to undefined] +**rules** | [**Array<CreateFilterPolicyRequestRulesInner>**](CreateFilterPolicyRequestRulesInner.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { UpdateFilterPolicyRequest } from '@quantcdn/quant-client'; + +const instance: UpdateFilterPolicyRequest = { + name, + description, + enabled, + rules, +}; +``` + +[[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/UpdateGovernanceConfig200Response.md b/docs/UpdateGovernanceConfig200Response.md new file mode 100644 index 0000000..5707567 --- /dev/null +++ b/docs/UpdateGovernanceConfig200Response.md @@ -0,0 +1,22 @@ +# UpdateGovernanceConfig200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **boolean** | | [optional] [default to undefined] +**config** | **object** | | [optional] [default to undefined] + +## Example + +```typescript +import { UpdateGovernanceConfig200Response } from '@quantcdn/quant-client'; + +const instance: UpdateGovernanceConfig200Response = { + success, + config, +}; +``` + +[[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/UpdateGovernanceConfigRequest.md b/docs/UpdateGovernanceConfigRequest.md new file mode 100644 index 0000000..7738b14 --- /dev/null +++ b/docs/UpdateGovernanceConfigRequest.md @@ -0,0 +1,32 @@ +# UpdateGovernanceConfigRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aiEnabled** | **boolean** | | [default to undefined] +**modelPolicy** | **string** | | [default to undefined] +**modelList** | **Array<string>** | | [optional] [default to undefined] +**mandatoryGuardrailPreset** | **string** | | [optional] [default to undefined] +**mandatoryFilterPolicies** | **Array<string>** | | [optional] [default to undefined] +**spendLimits** | **object** | | [optional] [default to undefined] +**version** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { UpdateGovernanceConfigRequest } from '@quantcdn/quant-client'; + +const instance: UpdateGovernanceConfigRequest = { + aiEnabled, + modelPolicy, + modelList, + mandatoryGuardrailPreset, + mandatoryFilterPolicies, + spendLimits, + version, +}; +``` + +[[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/UpdateSlackBotRequest.md b/docs/UpdateSlackBotRequest.md new file mode 100644 index 0000000..b721861 --- /dev/null +++ b/docs/UpdateSlackBotRequest.md @@ -0,0 +1,32 @@ +# UpdateSlackBotRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agentId** | **string** | Change the backing AI agent | [optional] [default to undefined] +**status** | **string** | Enable or disable the bot | [optional] [default to undefined] +**sessionTtlDays** | **number** | Session TTL in days | [optional] [default to undefined] +**allowedChannels** | **Array<string>** | Slack channel IDs the bot may respond in | [optional] [default to undefined] +**keywordsEnabled** | **boolean** | Whether keyword triggers are enabled | [optional] [default to undefined] +**keywords** | **Array<string>** | Keywords that trigger the bot | [optional] [default to undefined] +**slashCommands** | **Array<string>** | Slash commands the bot responds to | [optional] [default to undefined] + +## Example + +```typescript +import { UpdateSlackBotRequest } from '@quantcdn/quant-client'; + +const instance: UpdateSlackBotRequest = { + agentId, + status, + sessionTtlDays, + allowedChannels, + keywordsEnabled, + keywords, + slashCommands, +}; +``` + +[[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/UploadVectorDocumentsRequestDocumentsInner.md b/docs/UploadVectorDocumentsRequestDocumentsInner.md deleted file mode 100644 index b1517de..0000000 --- a/docs/UploadVectorDocumentsRequestDocumentsInner.md +++ /dev/null @@ -1,22 +0,0 @@ -# UploadVectorDocumentsRequestDocumentsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | **string** | Document text content | [default to undefined] -**metadata** | [**UploadVectorDocumentsRequestDocumentsInnerMetadata**](UploadVectorDocumentsRequestDocumentsInnerMetadata.md) | | [optional] [default to undefined] - -## Example - -```typescript -import { UploadVectorDocumentsRequestDocumentsInner } from '@quantcdn/quant-client'; - -const instance: UploadVectorDocumentsRequestDocumentsInner = { - content, - 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/UploadVectorDocumentsRequestDocumentsInnerMetadata.md b/docs/UploadVectorDocumentsRequestDocumentsInnerMetadata.md deleted file mode 100644 index f72c204..0000000 --- a/docs/UploadVectorDocumentsRequestDocumentsInnerMetadata.md +++ /dev/null @@ -1,26 +0,0 @@ -# UploadVectorDocumentsRequestDocumentsInnerMetadata - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **string** | | [optional] [default to undefined] -**source_url** | **string** | | [optional] [default to undefined] -**section** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] - -## Example - -```typescript -import { UploadVectorDocumentsRequestDocumentsInnerMetadata } from '@quantcdn/quant-client'; - -const instance: UploadVectorDocumentsRequestDocumentsInnerMetadata = { - title, - source_url, - section, - tags, -}; -``` - -[[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/UpsertAgentOverlay200Response.md b/docs/UpsertAgentOverlay200Response.md new file mode 100644 index 0000000..02ca204 --- /dev/null +++ b/docs/UpsertAgentOverlay200Response.md @@ -0,0 +1,20 @@ +# UpsertAgentOverlay200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**overlay** | **object** | | [optional] [default to undefined] + +## Example + +```typescript +import { UpsertAgentOverlay200Response } from '@quantcdn/quant-client'; + +const instance: UpsertAgentOverlay200Response = { + overlay, +}; +``` + +[[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/UpsertAgentOverlayRequest.md b/docs/UpsertAgentOverlayRequest.md new file mode 100644 index 0000000..41f7f9a --- /dev/null +++ b/docs/UpsertAgentOverlayRequest.md @@ -0,0 +1,40 @@ +# UpsertAgentOverlayRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**modelId** | **string** | Override the base agent\'s model | [optional] [default to undefined] +**temperature** | **number** | Override temperature | [optional] [default to undefined] +**maxTokens** | **number** | Override max tokens | [optional] [default to undefined] +**disabledSkills** | **Array<string>** | Global skill IDs to exclude | [optional] [default to undefined] +**additionalSkills** | **Array<string>** | Org-owned skill IDs to add | [optional] [default to undefined] +**additionalTools** | **Array<string>** | Tool names to add | [optional] [default to undefined] +**disabledTools** | **Array<string>** | Tool names to remove | [optional] [default to undefined] +**systemPromptAppend** | **string** | Text appended to base system prompt | [optional] [default to undefined] +**allowedCollections** | **Array<string>** | Vector DB collections | [optional] [default to undefined] +**guardrailPreset** | **string** | Guardrail preset | [optional] [default to undefined] +**version** | **number** | Current version for optimistic concurrency | [optional] [default to undefined] + +## Example + +```typescript +import { UpsertAgentOverlayRequest } from '@quantcdn/quant-client'; + +const instance: UpsertAgentOverlayRequest = { + modelId, + temperature, + maxTokens, + disabledSkills, + additionalSkills, + additionalTools, + disabledTools, + systemPromptAppend, + allowedCollections, + guardrailPreset, + version, +}; +``` + +[[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/V2Rule.md b/docs/V2Rule.md index e72e5f2..e861394 100644 --- a/docs/V2Rule.md +++ b/docs/V2Rule.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -44,6 +47,9 @@ const instance: V2Rule = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleAuth.md b/docs/V2RuleAuth.md index 771ecf0..e35e9d0 100644 --- a/docs/V2RuleAuth.md +++ b/docs/V2RuleAuth.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleAuth = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleAuthRequest.md b/docs/V2RuleAuthRequest.md index 25c3860..adc8928 100644 --- a/docs/V2RuleAuthRequest.md +++ b/docs/V2RuleAuthRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **auth_user** | **string** | Authentication username | [default to undefined] **auth_pass** | **string** | Authentication password | [default to undefined] @@ -44,6 +47,9 @@ const instance: V2RuleAuthRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, auth_user, auth_pass, }; diff --git a/docs/V2RuleBotChallenge.md b/docs/V2RuleBotChallenge.md index 124ba5b..613fe7d 100644 --- a/docs/V2RuleBotChallenge.md +++ b/docs/V2RuleBotChallenge.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleBotChallenge = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleBotChallengeRequest.md b/docs/V2RuleBotChallengeRequest.md index fd17baa..8931dee 100644 --- a/docs/V2RuleBotChallengeRequest.md +++ b/docs/V2RuleBotChallengeRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **robot_challenge_type** | **string** | Challenge type (invisible or checkbox) | [default to undefined] **robot_challenge_verification_ttl** | **number** | Verification TTL in seconds | [optional] [default to 10800] **robot_challenge_challenge_ttl** | **number** | Challenge TTL in seconds | [optional] [default to 30] @@ -45,6 +48,9 @@ const instance: V2RuleBotChallengeRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, robot_challenge_type, robot_challenge_verification_ttl, robot_challenge_challenge_ttl, diff --git a/docs/V2RuleContentFilter.md b/docs/V2RuleContentFilter.md index 5602ce5..f37f7c8 100644 --- a/docs/V2RuleContentFilter.md +++ b/docs/V2RuleContentFilter.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleContentFilter = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleContentFilterRequest.md b/docs/V2RuleContentFilterRequest.md index 4e3ed5d..9f69c24 100644 --- a/docs/V2RuleContentFilterRequest.md +++ b/docs/V2RuleContentFilterRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **fn_uuid** | **string** | Function UUID | [default to undefined] ## Example @@ -43,6 +46,9 @@ const instance: V2RuleContentFilterRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, fn_uuid, }; ``` diff --git a/docs/V2RuleCustomResponse.md b/docs/V2RuleCustomResponse.md index 676ff71..5cc6fa5 100644 --- a/docs/V2RuleCustomResponse.md +++ b/docs/V2RuleCustomResponse.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleCustomResponse = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleCustomResponseRequest.md b/docs/V2RuleCustomResponseRequest.md index 726c516..19a0b9b 100644 --- a/docs/V2RuleCustomResponseRequest.md +++ b/docs/V2RuleCustomResponseRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **custom_response_body** | **string** | Custom response body content | [default to undefined] **custom_response_status_code** | **number** | HTTP status code for custom response | [optional] [default to 200] **status_code** | **number** | Legacy field for status code (deprecated) | [optional] [default to undefined] @@ -46,6 +49,9 @@ const instance: V2RuleCustomResponseRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, custom_response_body, custom_response_status_code, status_code, diff --git a/docs/V2RuleFunction.md b/docs/V2RuleFunction.md index 2329bc1..c5e30f6 100644 --- a/docs/V2RuleFunction.md +++ b/docs/V2RuleFunction.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleFunction = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleFunctionRequest.md b/docs/V2RuleFunctionRequest.md index aa3f4ab..ec212d4 100644 --- a/docs/V2RuleFunctionRequest.md +++ b/docs/V2RuleFunctionRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **fn_uuid** | **string** | Function UUID | [default to undefined] ## Example @@ -43,6 +46,9 @@ const instance: V2RuleFunctionRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, fn_uuid, }; ``` diff --git a/docs/V2RuleHeader.md b/docs/V2RuleHeader.md index 7e189c8..87f4728 100644 --- a/docs/V2RuleHeader.md +++ b/docs/V2RuleHeader.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleHeader = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleHeaderRequest.md b/docs/V2RuleHeaderRequest.md index eb04ed6..1d4a4c1 100644 --- a/docs/V2RuleHeaderRequest.md +++ b/docs/V2RuleHeaderRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **headers** | **{ [key: string]: string; }** | Headers to set | [default to undefined] ## Example @@ -43,6 +46,9 @@ const instance: V2RuleHeaderRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, headers, }; ``` diff --git a/docs/V2RuleProxy.md b/docs/V2RuleProxy.md index 89b4d3f..7c59303 100644 --- a/docs/V2RuleProxy.md +++ b/docs/V2RuleProxy.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleProxy = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleProxyRequest.md b/docs/V2RuleProxyRequest.md index 03a1998..8914ba6 100644 --- a/docs/V2RuleProxyRequest.md +++ b/docs/V2RuleProxyRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **to** | **string** | Target URL to proxy to | [default to undefined] **host** | **string** | Host header override | [optional] [default to undefined] **auth_user** | **string** | Basic auth username | [optional] [default to ''] @@ -67,6 +70,9 @@ const instance: V2RuleProxyRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, to, host, auth_user, diff --git a/docs/V2RuleRedirect.md b/docs/V2RuleRedirect.md index 0d8d5cb..66b2c6e 100644 --- a/docs/V2RuleRedirect.md +++ b/docs/V2RuleRedirect.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleRedirect = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleRedirectRequest.md b/docs/V2RuleRedirectRequest.md index 916ef50..f9590ba 100644 --- a/docs/V2RuleRedirectRequest.md +++ b/docs/V2RuleRedirectRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **redirect_to** | **string** | Redirect destination URL | [default to undefined] **redirect_code** | **string** | HTTP status code for redirect | [optional] [default to '301'] @@ -44,6 +47,9 @@ const instance: V2RuleRedirectRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, redirect_to, redirect_code, }; diff --git a/docs/V2RuleRequest.md b/docs/V2RuleRequest.md index 006df26..db16492 100644 --- a/docs/V2RuleRequest.md +++ b/docs/V2RuleRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] ## Example @@ -42,6 +45,9 @@ const instance: V2RuleRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, }; ``` diff --git a/docs/V2RuleServeStatic.md b/docs/V2RuleServeStatic.md index 594564b..2537de9 100644 --- a/docs/V2RuleServeStatic.md +++ b/docs/V2RuleServeStatic.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **country** | **string** | Country code | [optional] [default to undefined] **country_is** | **Array<string>** | Allowed countries | [optional] [default to undefined] **country_is_not** | **Array<string>** | Excluded countries | [optional] [default to undefined] @@ -45,6 +48,9 @@ const instance: V2RuleServeStatic = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, country, country_is, country_is_not, diff --git a/docs/V2RuleServeStaticRequest.md b/docs/V2RuleServeStaticRequest.md index 20058a5..7ceb5b3 100644 --- a/docs/V2RuleServeStaticRequest.md +++ b/docs/V2RuleServeStaticRequest.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] [default to undefined] **ip_is** | **Array<string>** | Allowed IP addresses | [optional] [default to undefined] **ip_is_not** | **Array<string>** | Excluded IP addresses | [optional] [default to undefined] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] [default to undefined] +**asn_is** | **Array<string>** | Allowed AS numbers | [optional] [default to undefined] +**asn_is_not** | **Array<string>** | Excluded AS numbers | [optional] [default to undefined] **static_file_path** | **string** | Path to the static file to serve | [default to undefined] ## Example @@ -43,6 +46,9 @@ const instance: V2RuleServeStaticRequest = { ip, ip_is, ip_is_not, + asn, + asn_is, + asn_is_not, static_file_path, }; ``` diff --git a/docs/VectorDatabaseApi.md b/docs/VectorDatabaseApi.md new file mode 100644 index 0000000..037aea1 --- /dev/null +++ b/docs/VectorDatabaseApi.md @@ -0,0 +1,74 @@ +# VectorDatabaseApi + +All URIs are relative to *https://dashboard.quantcdn.io* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**listVectorDocuments**](#listvectordocuments) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection| + +# **listVectorDocuments** +> listVectorDocuments() + +Lists documents in a collection with pagination. Supports filtering by document key. + +### Example + +```typescript +import { + VectorDatabaseApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new VectorDatabaseApi(configuration); + +let organisation: string; // (default to undefined) +let collectionId: string; // (default to undefined) +let key: string; //Filter by document key (optional) (default to undefined) +let limit: number; // (optional) (default to 50) +let offset: number; // (optional) (default to 0) + +const { status, data } = await apiInstance.listVectorDocuments( + organisation, + collectionId, + key, + limit, + offset +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **collectionId** | [**string**] | | defaults to undefined| +| **key** | [**string**] | Filter by document key | (optional) defaults to undefined| +| **limit** | [**number**] | | (optional) defaults to 50| +| **offset** | [**number**] | | (optional) defaults to 0| + + +### 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 | +|-------------|-------------|------------------| +|**200** | Documents retrieved successfully | - | +|**403** | Access denied | - | +|**404** | Collection not found | - | +|**500** | Failed to list 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) + diff --git a/index.ts b/index.ts index 9466acb..0afe35d 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.12.0 + * The version of the OpenAPI document: 4.15.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 caea287..d3735c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quantcdn/quant-client", - "version": "4.12.2", + "version": "4.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@quantcdn/quant-client", - "version": "4.12.2", + "version": "4.15.0", "license": "MIT", "dependencies": { "axios": "^1.6.1" diff --git a/package.json b/package.json index 5dff90a..8c6576f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quantcdn/quant-client", - "version": "4.12.2", + "version": "4.15.0", "description": "OpenAPI client for @quantcdn/quant-client", "author": "QuantCDN", "repository": { From 9583192b5c01873850b1e1cd6e28da0ee886b3cc Mon Sep 17 00:00:00 2001 From: "quantcloud[bot]" Date: Tue, 31 Mar 2026 11:42:37 +0000 Subject: [PATCH 2/2] feat(sdk): v4.15.0 - Auto-generated from unified API spec Generated from unified API spec v4.15.0 Changes: - Auto-generated SDK updates This PR was automatically created by the API generation pipeline. --- .openapi-generator/FILES | 1 - api.ts | 247 +++++++++++++++--------------------- docs/AIVectorDatabaseApi.md | 67 ++++++++++ docs/VectorDatabaseApi.md | 74 ----------- 4 files changed, 171 insertions(+), 218 deletions(-) delete mode 100644 docs/VectorDatabaseApi.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 47f7c07..0e8a10c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -411,7 +411,6 @@ docs/ValidateCompose422Response.md docs/ValidateComposeRequest.md docs/Variable.md docs/VariablesApi.md -docs/VectorDatabaseApi.md docs/Volume.md docs/VolumesApi.md docs/WafConfig.md diff --git a/api.ts b/api.ts index 5aa7704..67e8aa9 100644 --- a/api.ts +++ b/api.ts @@ -22872,6 +22872,63 @@ export const AIVectorDatabaseApiAxiosParamCreator = function (configuration?: Co + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listVectorDocuments: async (organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organisation' is not null or undefined + assertParamExists('listVectorDocuments', 'organisation', organisation) + // verify required parameter 'collectionId' is not null or undefined + assertParamExists('listVectorDocuments', 'collectionId', collectionId) + 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -23009,6 +23066,23 @@ export const AIVectorDatabaseApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.listVectorCollections']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listVectorDocuments(organisation, collectionId, key, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AIVectorDatabaseApi.listVectorDocuments']?.[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 @@ -23089,6 +23163,20 @@ export const AIVectorDatabaseApiFactory = function (configuration?: Configuratio listVectorCollections(organisation: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listVectorCollections(organisation, options).then((request) => request(axios, basePath)); }, + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listVectorDocuments(organisation, collectionId, key, limit, offset, 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 @@ -23176,6 +23264,22 @@ export class AIVectorDatabaseApi extends BaseAPI { return AIVectorDatabaseApiFp(this.configuration).listVectorCollections(organisation, options).then((request) => request(this.axios, this.basePath)); } + /** + * Lists documents in a collection with pagination. Supports filtering by document key. + * @summary List Documents in Collection + * @param {string} organisation + * @param {string} collectionId + * @param {string} [key] Filter by document key + * @param {number} [limit] + * @param {number} [offset] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AIVectorDatabaseApi + */ + public listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AIVectorDatabaseApiFp(this.configuration).listVectorDocuments(organisation, collectionId, key, limit, offset, 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 @@ -36199,149 +36303,6 @@ export class VariablesApi extends BaseAPI { -/** - * VectorDatabaseApi - axios parameter creator - * @export - */ -export const VectorDatabaseApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Lists documents in a collection with pagination. Supports filtering by document key. - * @summary List Documents in Collection - * @param {string} organisation - * @param {string} collectionId - * @param {string} [key] Filter by document key - * @param {number} [limit] - * @param {number} [offset] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listVectorDocuments: async (organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'organisation' is not null or undefined - assertParamExists('listVectorDocuments', 'organisation', organisation) - // verify required parameter 'collectionId' is not null or undefined - assertParamExists('listVectorDocuments', 'collectionId', collectionId) - 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: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication BearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (key !== undefined) { - localVarQueryParameter['key'] = key; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * VectorDatabaseApi - functional programming interface - * @export - */ -export const VectorDatabaseApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = VectorDatabaseApiAxiosParamCreator(configuration) - return { - /** - * Lists documents in a collection with pagination. Supports filtering by document key. - * @summary List Documents in Collection - * @param {string} organisation - * @param {string} collectionId - * @param {string} [key] Filter by document key - * @param {number} [limit] - * @param {number} [offset] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listVectorDocuments(organisation, collectionId, key, limit, offset, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['VectorDatabaseApi.listVectorDocuments']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * VectorDatabaseApi - factory interface - * @export - */ -export const VectorDatabaseApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = VectorDatabaseApiFp(configuration) - return { - /** - * Lists documents in a collection with pagination. Supports filtering by document key. - * @summary List Documents in Collection - * @param {string} organisation - * @param {string} collectionId - * @param {string} [key] Filter by document key - * @param {number} [limit] - * @param {number} [offset] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listVectorDocuments(organisation, collectionId, key, limit, offset, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * VectorDatabaseApi - object-oriented interface - * @export - * @class VectorDatabaseApi - * @extends {BaseAPI} - */ -export class VectorDatabaseApi extends BaseAPI { - /** - * Lists documents in a collection with pagination. Supports filtering by document key. - * @summary List Documents in Collection - * @param {string} organisation - * @param {string} collectionId - * @param {string} [key] Filter by document key - * @param {number} [limit] - * @param {number} [offset] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VectorDatabaseApi - */ - public listVectorDocuments(organisation: string, collectionId: string, key?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return VectorDatabaseApiFp(this.configuration).listVectorDocuments(organisation, collectionId, key, limit, offset, options).then((request) => request(this.axios, this.basePath)); - } -} - - - /** * VolumesApi - axios parameter creator * @export diff --git a/docs/AIVectorDatabaseApi.md b/docs/AIVectorDatabaseApi.md index 464ecc3..445f876 100644 --- a/docs/AIVectorDatabaseApi.md +++ b/docs/AIVectorDatabaseApi.md @@ -9,6 +9,7 @@ All URIs are relative to *https://dashboard.quantcdn.io* |[**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| +|[**listVectorDocuments**](#listvectordocuments) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection| |[**queryVectorCollection**](#queryvectorcollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query| # **createVectorCollection** @@ -299,6 +300,72 @@ const { status, data } = await apiInstance.listVectorCollections( [[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) +# **listVectorDocuments** +> listVectorDocuments() + +Lists documents in a collection with pagination. Supports filtering by document key. + +### Example + +```typescript +import { + AIVectorDatabaseApi, + Configuration +} from '@quantcdn/quant-client'; + +const configuration = new Configuration(); +const apiInstance = new AIVectorDatabaseApi(configuration); + +let organisation: string; // (default to undefined) +let collectionId: string; // (default to undefined) +let key: string; //Filter by document key (optional) (default to undefined) +let limit: number; // (optional) (default to 50) +let offset: number; // (optional) (default to 0) + +const { status, data } = await apiInstance.listVectorDocuments( + organisation, + collectionId, + key, + limit, + offset +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **organisation** | [**string**] | | defaults to undefined| +| **collectionId** | [**string**] | | defaults to undefined| +| **key** | [**string**] | Filter by document key | (optional) defaults to undefined| +| **limit** | [**number**] | | (optional) defaults to 50| +| **offset** | [**number**] | | (optional) defaults to 0| + + +### 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 | +|-------------|-------------|------------------| +|**200** | Documents retrieved successfully | - | +|**403** | Access denied | - | +|**404** | Collection not found | - | +|**500** | Failed to list 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) + # **queryVectorCollection** > QueryVectorCollection200Response queryVectorCollection(queryVectorCollectionRequest) diff --git a/docs/VectorDatabaseApi.md b/docs/VectorDatabaseApi.md deleted file mode 100644 index 037aea1..0000000 --- a/docs/VectorDatabaseApi.md +++ /dev/null @@ -1,74 +0,0 @@ -# VectorDatabaseApi - -All URIs are relative to *https://dashboard.quantcdn.io* - -|Method | HTTP request | Description| -|------------- | ------------- | -------------| -|[**listVectorDocuments**](#listvectordocuments) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection| - -# **listVectorDocuments** -> listVectorDocuments() - -Lists documents in a collection with pagination. Supports filtering by document key. - -### Example - -```typescript -import { - VectorDatabaseApi, - Configuration -} from '@quantcdn/quant-client'; - -const configuration = new Configuration(); -const apiInstance = new VectorDatabaseApi(configuration); - -let organisation: string; // (default to undefined) -let collectionId: string; // (default to undefined) -let key: string; //Filter by document key (optional) (default to undefined) -let limit: number; // (optional) (default to 50) -let offset: number; // (optional) (default to 0) - -const { status, data } = await apiInstance.listVectorDocuments( - organisation, - collectionId, - key, - limit, - offset -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **organisation** | [**string**] | | defaults to undefined| -| **collectionId** | [**string**] | | defaults to undefined| -| **key** | [**string**] | Filter by document key | (optional) defaults to undefined| -| **limit** | [**number**] | | (optional) defaults to 50| -| **offset** | [**number**] | | (optional) defaults to 0| - - -### 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 | -|-------------|-------------|------------------| -|**200** | Documents retrieved successfully | - | -|**403** | Access denied | - | -|**404** | Collection not found | - | -|**500** | Failed to list 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) -