// Generated by dts-bundle-generator v6.12.0 import { IToolDescriptor } from '@cognigy/extension-tools'; import { AxiosResponseHeaders } from 'axios'; export declare type Options = { [key: string]: unknown; }; export declare type ApiExtension = { [key: string]: any; }; export declare type TestPlugin = (instance: Base, options: Options) => ApiExtension | undefined; export declare type Constructor = new (...args: any[]) => T; /** * @author https://stackoverflow.com/users/2887218/jcalz * @see https://stackoverflow.com/a/50375286/10325032 */ export declare type UnionToIntersection = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never; export declare type AnyFunction = (...args: any) => any; export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection> : never; declare class Base { static plugins: TestPlugin[]; static plugin & { plugins: any[]; }, T extends TestPlugin | TestPlugin[]>(this: S, plugin: T): { new (...args: any[]): { [x: string]: any; }; plugins: any[]; } & S & Constructor>; static defaults>(this: S, defaults: Options): { new (...args: any[]): { [x: string]: any; }; } & S; constructor(options?: Options); options: Options; } export interface IApiKeyAuthentication { type: "ApiKey"; apiKey: string; } export interface IBasicAuthentication { type: "Basic"; username: string; password: string; } export interface IOAuth2Authentication { type: "OAuth2"; /** * The clientId of the client * * @see https://tools.ietf.org/html/rfc6749#section-2.2 */ clientId: string; /** * The clientId of the client * * @see https://tools.ietf.org/html/rfc6749#section-2.2 */ clientSecret: string; } export interface IJwtTokenAuthentication { type: "JWT"; token: string; } export declare type TAuthenticationCredentials = IApiKeyAuthentication | IBasicAuthentication | IOAuth2Authentication | IJwtTokenAuthentication; export interface ILoginByPasswordParameters { type: "password"; /** * The username for the Password Grant * * @see https://tools.ietf.org/html/rfc6749#section-1.3.3 */ username: string; /** * The password for the Password Grant * * @see https://tools.ietf.org/html/rfc6749#section-1.3.3 */ password: string; /** * If rememberMe is set to true, you get a long lived refreshToken, default * 30 days. If rememberMe is set to false, you get a short lived refreshToken. * * @default false */ rememberMe: boolean; /** * Organisation ID of the login user * Required if the user is part of multiple organisation * This is passed in the request header */ organisationId?: string; } export interface ILoginByRefreshTokenParameters { type: "refreshToken"; /** * The refreshToken is used for the Refresh Token Grant * * @see https://tools.ietf.org/html/rfc6749#section-1.5 */ refreshToken?: string; } export interface IAuthenticationAdapter { getAuthenticationHeaders: () => Promise<{ [key: string]: string; }>; login?: ({ username, password }: { username: any; password: any; }) => Promise; logout?: () => Promise; } export interface IHttpProgressEvent { loaded: number; total: number; } export declare type TMethod = "get" | "GET" | "delete" | "DELETE" | "head" | "HEAD" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH"; export interface IHttpRequest extends IHttpRequestOptions { /** * The server URL that will be used for the request. */ url: string; /** * The request method to be used when making the request */ method: TMethod; /** * baseURL will be prepended to url unless url is absolute. */ baseUrl?: string; /** * The body of the request. */ data?: any; } export interface IHttpRequestOptions { /** * Custom headers to be sent. */ headers?: { [key: string]: string; }; /** * Should add Authentication-information to the request. * @default true */ withAuthentication?: boolean; /** * Should send credentials to the request. * @default false */ withCredentials?: boolean; /** * Specifies the number of milliseconds before the request times out. */ timeout?: number; /** * Defines if the timeout should be reset between retries * @default false */ shouldResetTimeout?: boolean; /** * The number of times to retry the before failing. * @default 3 */ maxRetries?: number; /** * A callback to further control if a request should be retried. * @default isNetworkOrIdempotentRequestError */ retryCondition?: (error: Error) => boolean; /** * A callback to further control the delay between retried requests. By * default there is no delay between retries. Another option is * exponentialDelay. The function is passed retryCount and error. * @default exponentialDelay */ retryDelay?: (retryNumber?: number, error?: Error) => number; /** * A progress-Handler. */ onProgress?: (progressEvent: IHttpProgressEvent) => void; } export declare type TRestAPIOperation = Data extends void ? (options?: IHttpRequestOptions) => Promise : Data extends TRestAPIOptionalParameter ? (args?: T, options?: IHttpRequestOptions) => Promise : (args: Data, options?: IHttpRequestOptions) => Promise; export declare type TRestAPIOptionalParameter = { optional: Data; }; /** * @openapi * components: * parameters: * webfingerResourceQueryParam: * in: query * name: resource * required: true * schema: * type: string * format: uri * webfingerRelQueryParam: * in: query * name: rel * schema: * type: array * items: * $ref: '#/components/schemas/TRelType' */ export interface IWebfingerRestDataQuery { resource: string; rel?: TRelType[]; } /** * @openapi * components: * schemas: * TRelType: * type: array * items: * type: string * enum: * - idp */ export declare type TRelType = "idp"; export interface IWebfingerRestData extends IWebfingerRestDataQuery { } /** * @openapi * components: * schemas: * IWebfingerRestReturnValue: * type: object * properties: * subject: * type: string * example: org:5ce7c2d833ea1e04d7e6c432 * links: * type: array * items: * $ref: '#/components/schemas/TRel' */ export interface IWebfingerRestReturnValue { subject: string; links: TRel[]; } /** * @openapi * components: * schemas: * TRel: * type: object * allOf: * - $ref: '#/components/schemas/IIdpRel' */ export declare type TRel = IIdpRel; /** * @openapi * components: * schemas: * IIdpRel: * type: object * properties: * rel: * type: string * enum: * - idp * properties: * $ref: '#/components/schemas/TIdpWebfingerProperties' */ export interface IIdpRel { rel: "idp"; properties: TIdpWebfingerProperties; } /** * @openapi * components: * schemas: * TIdpWebfingerProperties: * type: object * oneOf: * - $ref: '#/components/schemas/INoneIdpWebfingerProperties' * - $ref: '#/components/schemas/IOidcIdpWebfingerProperties' * - $ref: '#/components/schemas/ISamlIdpWebfingerProperties' */ export declare type TIdpWebfingerProperties = INoneIdpWebfingerProperties | IOidcIdpWebfingerProperties | ISamlIdpWebfingerProperties; /** * @openapi * components: * schemas: * INoneIdpWebfingerProperties: * type: object * properties: * idp:type: * type: string * enum: * - none */ export interface INoneIdpWebfingerProperties { "idp:type": "none"; } /** * @openapi * components: * schemas: * IOidcIdpWebfingerProperties: * type: object * properties: * idp:type: * type: string * enum: * - oidc * idp:callback: * type: string * format: url * idp:login: * type: string * format: url * idp:logout: * type: string * format: url * idp:logout:fc: * type: string * format: url */ export interface IOidcIdpWebfingerProperties { "idp:type": "oidc"; "idp:callback": string; "idp:login": string; "idp:logout": string; "idp:logout:fc": string; } /** * @openapi * components: * schemas: * ISamlIdpWebfingerProperties: * type: object * properties: * idp:type: * type: string * enum: * - oidc * idp:login: * type: string * format: url * idp:logout: * type: string * format: url */ export interface ISamlIdpWebfingerProperties { "idp:type": "saml"; "idp:login": string; "idp:logout": string; } export interface IGetRealtimeTokenRestReturnValue { token: string; } export interface ILoginByAuthorizationCodeParameters { type: "authorizationCode"; /** * The authorization code to exchange for a token * * @see https://tools.ietf.org/html/rfc6749#section-1.3.1 */ code: string; /** * The redirect URI that was used when the code was generated * * @see https://tools.ietf.org/html/rfc6749#section-1.3.1 */ redirectUri: string; /** * Optional state value to pass around in the requests. * * @see https://tools.ietf.org/html/rfc6749#section-10.12 */ state?: string; /** * Required for client "cognigy-live-agent". * The code verifier for authentication using authorization code with PKCE */ codeVerifier?: string; /** * If rememberMe is set to true, you get a long lived refreshToken, default * 7 days. If rememberMe is set to false, you get a short lived refreshToken valid only for 24 hours. * * @default false */ rememberMe: boolean; } export interface IGetAuthorizationCodeParameters { /** * The username for the Authorization Code Grant */ username: string; /** * The password for the Authorization Code Grant */ password: string; /** * The URI to redirect to with the generated authorization code * * @see https://tools.ietf.org/html/rfc6749#section-1.3.1 */ redirectUri?: string; /** * Optional state value to pass around in the requests. * * @see https://tools.ietf.org/html/rfc6749#section-10.12 */ state?: string; /** * Organisation ID of the login user * Required if the user is part of multiple organisation * This is passed in the request header */ organisationId?: string; /** * Required for client "cognigy-live-agent". * The code challenge for authentication using * authorization code with PKCE */ codeChallenge?: string; /** * Required for client "cognigy-live-agent". * The code challenge method to be used for authentication using * authorization code with PKCE */ codeChallengeMethod?: string; } declare const organisationWidePermissions: readonly [ "analyticsOdata", "apiKeys", "auditEvents", "assignProject", "liveAgentAccount", "projects", "userDetails", "users", "voiceGatewayAccount", "opsCenter" ]; export declare type TOrganisationWidePermissions = typeof organisationWidePermissions[number]; declare const projectWidePermissions: readonly [ "agentAssistConfigs", "aiAgents", "analytics", "connections", "contactProfiles", "conversationHistory", "endpoints", "extensions", "flowNodeComments", "flowNodeDescription", "flowNodes", "functions", "flows", "followUser", "intents", "largeLanguageModels", "knowledgeStores", "lexicons", "liveAgentInbox", "locales", "logs", "marketplace", "memberDetails", "members", "goals", "handoverProviders", "copilotConfigs", "nluConnectors", "packages", "playbooks", "proactive", "project", "projectSettings", "snapshotDownloads", "snapshots", "states", "tasks", "tokens", "yesNoIntents", "dataPrivacySettings", "simulator" ]; export declare type TProjectWidePermissions = typeof projectWidePermissions[number]; export declare type TMongoId = string; /** * @openapi * components: * schemas: * TTimestamp: * type: integer * description: Unix-timestamp * example: 1694518620 * minimum: 0 * maximum: 2147483647 */ export declare type TTimestamp = number; /** * @openapi * components: * schemas: * IEntityMeta: * description: > * The IEntityMeta defines meta information every entity within the system * has. These are dates when a resource was created and modified as well as information * about the user who initially created a resource and who modified it the last time. * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * createdAt: * $ref: '#/components/schemas/TTimestamp' * lastChanged: * $ref: '#/components/schemas/TTimestamp' * createdBy: * $ref: '#/components/schemas/TMongoId' * lastChangedBy: * $ref: '#/components/schemas/TMongoId' */ export interface IEntityMeta { /** The Mongo id of the entity */ _id: TMongoId; /** Unix-timestamp when the entity was created initially */ createdAt: TTimestamp; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; /** The mongoId of the user who created the entity initially */ createdBy: TMongoId; /** The mongoId of the user who did the last modification */ lastChangedBy: TMongoId; } declare const entityMetaKeys: ReadonlyArray; export declare type TEntityMetaKeys = typeof entityMetaKeys[number]; export declare enum ErrorCode { BAD_REQUEST = 400, UNAUTHORIZED_ERROR = 401, PAYMENT_REQUIRED_ERROR = 402, FORBIDDEN_ERROR = 403, NOT_FOUND = 404, PAYLOAD_TOO_LARGE_ERROR = 413, TOO_MANY_REQUESTS_ERROR = 429, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE_ERROR = 503, GATEWAY_TIMEOUT_ERROR = 504, NETWORK_ERROR = 666, MISSING_ARGUMENT_ERROR = 1000, DATABASE_WRITE_ERROR = 1001, RESOURCE_NOT_FOUND_ERROR = 1002, DATABASE_READ_ERROR = 1003, CONFLICT_ERROR = 1004, INVALID_ARGUMENT_ERROR = 1005, IMPORT_ERROR = 1006, EXPORT_ERROR = 1007, INTERNAL_SERVER_ERROR = 1008, NOT_IMPLEMENTED_ERROR = 1009, PROCESS_ERROR = 1010, FILE_READ_ERROR = 1011, FILE_WRITE_ERROR = 1012, METHOD_NOT_ALLOWED_ERROR = 1013, SMTP_CONNECT_ERROR = 1999, DATABASE_CONNECT_ERROR = 2000, DATABASE_QUERY_ERROR = 2001, INPUT_OUTPUT_ERROR = 3000, UNSUPPORTED_TOOL_FLOW_API_ERROR = 3100, TOOL_FLOW_INTERRUPTED_ERROR = 3101, TIMEOUT_ERROR = 8001 } export interface ISuggestedMetaInfo { organisationId?: string; userId?: string; projectId?: string; flowId?: string; /** Name of the file */ module?: string; /** Name of the function */ function?: string; /** Originally thrown error to capture the stacktrace and other info*/ originalError?: { [key: string]: any; }; /** Database query used */ query?: { [key: string]: any; }; /** For other keys */ [key: string]: any; } declare const logLevels: readonly [ "fatal", "error", "warn", "info", "debug", "trace" ]; export declare type TLogLevel = typeof logLevels[number]; export interface ILoggerStack { /** A traceId represents one particular trace for one request. */ traceId?: string; disableSensitiveLogging?: boolean; } /** * RFC 7807 conform ErrorResponse * * @see https://tools.ietf.org/html/rfc7807 */ export interface IErrorResponse { /** * A URI reference [RFC3986] that identifies the * problem type. This specification encourages that, when * dereferenced, it provide human-readable documentation for the * problem type (e.g., using HTML [W3C.REC-html5-20141028]). When * this member is not present, its value is assumed to be * "about:blank". */ type?: string; /** * A short, human-readable summary of the problem * type. It SHOULD NOT change from occurrence to occurrence of the * problem, except for purposes of localization (e.g., using * proactive content negotiation; see [RFC7231], Section 3.4). */ title?: string; /** * The HTTP status code ([RFC7231], Section 6) * generated by the origin server for this occurrence of the problem. */ status?: number; /** * A human-readable explanation specific to this * occurrence of the problem. */ detail?: string; /** * A URI reference that identifies the specific * occurrence of the problem. It may or may not yield further * information if dereferenced. */ instance?: string; code: number; traceId?: ILoggerStack["traceId"]; [key: string]: any; } export interface IBaseErrorConstructorOptions { name: string; message: string; code: ErrorCode; httpStatusCode: number; httpStatusText: string; stack: ILoggerStack; meta?: ISuggestedMetaInfo; /** `logLevel` parameter indicates the overriding log level for the errors. * For eg: `ResourceNotFound` scenario is not actually an error in the * system, so this parameter will allow us to log them as info/debug level, * but do not change the actual error respose in any way. */ logLevel?: TLogLevel; details: { [key: string]: any; }; } export interface IOriginalErrorDetails { message: string; stack?: string; name: string; code?: any; data?: any; path?: any; } export interface IErrorLogDetails { name: string; code: string | number; httpStatusCode: number; httpStatusText: string; loggerstack: ILoggerStack; details: { [key: string]: any; }; meta: { [key: string]: any; }; originalError: IOriginalErrorDetails; stack: string; } declare class BaseError extends Error { code: ErrorCode; readonly httpStatusCode: number; readonly httpStatusText: string; readonly loggerstack: ILoggerStack; readonly meta: { [key: string]: any; }; readonly details: { [key: string]: any; }; /** RFC 9457 problem type: a URI naming the kind of problem, stable across occurrences. * Unset means "about:blank" (no specific type). Set by whoever knows the specific problem. */ type?: string; readonly originalErrorDetails: IOriginalErrorDetails; private readonly logLevel; constructor({ name, message, code, httpStatusCode, httpStatusText, stack, meta, details, logLevel }: IBaseErrorConstructorOptions); private parseOriginalError; toErrorLogDetails(): IErrorLogDetails; toResponse(): IErrorHandler; toRFC7807Response(data?: { path?: string; traceId?: string; }): IErrorResponse; } declare class BadGatewayError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class BadRequestError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ConflictError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class DatabaseConnectError extends BadGatewayError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class InternalServerError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class DatabaseQueryError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class DatabaseReadError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class DatabaseWriteError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ExportError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class FileReadError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class FileWriteError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ForbiddenError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class GatewayTimeoutError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } export interface IImportErrorDetails { duplicateSynonyms?: string[][]; duplicateKeyphrases?: string[][]; invalidEntries?: string[][]; reservedTags?: string[][]; } declare class ImportError extends InternalServerError { readonly details: IImportErrorDetails; constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: IImportErrorDetails, logLevel?: TLogLevel); } declare class InputOutputError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class InvalidArgumentError extends BadRequestError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); toRFC7807Response(data?: { path?: string; traceId?: string; }): IErrorResponse; } declare class MethodNotAllowedError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class MissingArgumentError extends BadRequestError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); toRFC7807Response(data?: { path?: string; traceId?: string; }): IErrorResponse; } declare class NetworkError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class NotImplementedError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class PayloadTooLargeError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class PaymentRequiredError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ProcessError extends InternalServerError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ResourceNotFoundError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class SMTPConnectError extends BadGatewayError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class TimeoutError extends GatewayTimeoutError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class TooManyRequestsError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class UnauthorizedError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } declare class ServiceUnavailableError extends BaseError { constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: { [key: string]: any; }, logLevel?: TLogLevel); } export interface IErrorCollection { [ErrorCode.UNAUTHORIZED_ERROR]: typeof UnauthorizedError; [ErrorCode.BAD_GATEWAY]: typeof BadGatewayError; [ErrorCode.BAD_REQUEST]: typeof BadRequestError; [ErrorCode.CONFLICT_ERROR]: typeof ConflictError; [ErrorCode.DATABASE_CONNECT_ERROR]: typeof DatabaseConnectError; [ErrorCode.DATABASE_QUERY_ERROR]: typeof DatabaseQueryError; [ErrorCode.DATABASE_READ_ERROR]: typeof DatabaseReadError; [ErrorCode.DATABASE_WRITE_ERROR]: typeof DatabaseWriteError; [ErrorCode.EXPORT_ERROR]: typeof ExportError; [ErrorCode.FILE_READ_ERROR]: typeof FileReadError; [ErrorCode.FILE_WRITE_ERROR]: typeof FileWriteError; [ErrorCode.FORBIDDEN_ERROR]: typeof ForbiddenError; [ErrorCode.GATEWAY_TIMEOUT_ERROR]: typeof GatewayTimeoutError; [ErrorCode.IMPORT_ERROR]: typeof ImportError; [ErrorCode.INPUT_OUTPUT_ERROR]: typeof InputOutputError; [ErrorCode.INTERNAL_SERVER_ERROR]: typeof InternalServerError; [ErrorCode.INVALID_ARGUMENT_ERROR]: typeof InvalidArgumentError; [ErrorCode.METHOD_NOT_ALLOWED_ERROR]: typeof MethodNotAllowedError; [ErrorCode.MISSING_ARGUMENT_ERROR]: typeof MissingArgumentError; [ErrorCode.NOT_FOUND]: typeof ResourceNotFoundError; [ErrorCode.NETWORK_ERROR]: typeof NetworkError; [ErrorCode.NOT_IMPLEMENTED_ERROR]: typeof NotImplementedError; [ErrorCode.PAYLOAD_TOO_LARGE_ERROR]: typeof PayloadTooLargeError; [ErrorCode.PROCESS_ERROR]: typeof ProcessError; [ErrorCode.RESOURCE_NOT_FOUND_ERROR]: typeof ResourceNotFoundError; [ErrorCode.SERVICE_UNAVAILABLE_ERROR]: typeof ServiceUnavailableError; [ErrorCode.SMTP_CONNECT_ERROR]: typeof SMTPConnectError; [ErrorCode.TIMEOUT_ERROR]: typeof TimeoutError; [ErrorCode.TOO_MANY_REQUESTS_ERROR]: typeof TooManyRequestsError; [ErrorCode.PAYMENT_REQUIRED_ERROR]: typeof PaymentRequiredError; } export declare const ErrorCollection: IErrorCollection; export interface IErrorHandler { error?: { code: number; message: string; loggerstack?: ILoggerStack; meta?: ISuggestedMetaInfo; details?: { [key: string]: any; }; logLevel?: TLogLevel; }; } declare const arrayTResourceType: readonly [ "agentassistconfig", "agentSettings", "chart", "connection", "connectionSchema", "endpoint", "endpointApiKey", "extension", "file", "flow", "flowSettings", "flowState", "function", "handoverProvider", "intent", "intentDefaultReply", "intentLearningSentence", "intentRelation", "intentSentence", "intentTrainGroup", "largeLanguageModel", "knowledgeStore", "knowledgeSource", "knowledgeChunk", "knowledgeConnector", "lexicon", "lexiconEntry", "lexiconKeyphrase", "lexiconSlot", "locale", "goal", "nluconnector", "nodeData", "nodeDescriptorSet", "package", "playbook", "playbookRun", "slotFiller", "snapshot", "snippet", "aiAgent", "simulation", "evalProfile", "scheduler", "personaGeneration", "aiAgentV2", "aiAgentV2Persona", "aiAgentV2Tool", "aiAgentV2Skill", "aiAgentV2McpServer", "vgSpeechCredential", "vgRecordingBucket", "vgCarrier", "vgOutboundRoute", "vgEndpointVoiceSettings", "vgProjectSpeechSettings" ]; export declare type TResourceType = (typeof arrayTResourceType)[number]; declare const arrayTChartableResourceType: readonly [ "flow" ]; export declare type TChartableResourceType = (typeof arrayTChartableResourceType)[number]; declare const searchableResourceTypes: readonly [ "endpoint", "extension", "flow", "function", "largeLanguageModel", "lexicon", "goal", "nluconnector", "playbook", "project", "snapshot", "simulation", "evalProfile" ]; export declare type TSearchableResourceType = (typeof searchableResourceTypes)[number]; declare const pinnableResourceTypes: readonly [ "project" ]; /** * @openapi * components: * schemas: * TPinnableResourceType: * type: string * description: The type of a pinnable resource * example: project * enum: * - project */ export declare type TPinnableResourceType = (typeof pinnableResourceTypes)[number]; declare const auditEventTypes: readonly [ "action", "create", "replace", "patch", "delete", "authentication", "authorization" ]; /** * @openapi * components: * schemas: * TAuditEventType: * type: string * description: The type of operation that was performed * example: create * enum: * - action * - create * - replace * - patch * - delete * - authentication * - authorization */ export declare type TAuditEventType = typeof auditEventTypes[number]; declare const actionTypes: readonly [ "acceptTermsOfService", "addFlowLocalization", "addIntentLocalization", "addIntentToFlowState", "addKeyphraseToLexiconEntry", "addNodeLocalization", "addProjectMember", "addRoleToUser", "addSlotToLexiconEntry", "batchConnections", "batchEndpoints", "batchFlows", "batchFlowStates", "batchIntents", "batchLexicons", "batchLexiconEntries", "batchLexiconSlots", "batchNLUConnectors", "batchPlaybooks", "batchSentences", "batchSlotFillers", "batchTrainerRecords", "cancelTask", "changePlaybookStepOrder", "cloneFlow", "cloneGoal", "cloneLargeLanguageModel", "configureIdentityProvider", "createKnowledgeSearchIndex", "createPackage", "createProjectByTemplate", "createSnapshot", "cutChartNode", "deleteKnowledgeSearchIndex", "deprecatePassword", "exportLexicons", "followSession", "hireAiAgent", "importIntents", "importIntoLexicon", "ingestKnowledgeStore", "logoutUser", "mergePackage", "moveChartNode", "packageSnapshot", "packageTrainerRecords", "prepareCall", "redoChart", "removeContactIdFromProfile", "removeFlowLocalization", "removeIntentFromFlowState", "removeIntentLocalization", "removeKeyphraseFromLexiconEntry", "removeNodeLocalization", "removeProfileData", "removeProjectMember", "removeRoleFromUser", "removeSlotFromLexiconEntry", "requestOrganisationDeletion", "requestPasswordReset", "resetFailedLoginAttempts", "lockUser", "unlockUser", "resetIdentityProvider", "restoreSnapshot", "stopFunctionInstance", "setupCognigyLiveAgent", "setupCognigyLiveAgentInbox", "setupCognigyGenerativeAI", "setupProactive", "setupVoiceGatewayAccount", "updateCognigyLiveAgentInbox", "testA2AAgentConnection", "trainAllProjectFlows", "trainIntents", "trainYesNoIntents", "triggerFunction", "undoChart", "updateExtensionPackage", "updateProjectMember", "uploadExtension", "uploadFile", "uploadPackage", "uploadSnapshotPackage", "uploadTrainerRecordsPackage", "createAuthenticatedAmazonUser", "deleteAmazonAccount", "deployAlexaEndpoint", "deleteOrganisation", "enforcePasswordPolicy", "createApiKey", "updateOrganisation", "enableInPlatformLlm", "updateInPlatformLlmAssignment", "disableInPlatformLlm", "createUser", "deleteUser", "updateUser", "changePassword", "resetPassword", "exportProfileData", "mergeProfiles", "unmergeProfiles", "updateFlowSettings", "optionsResolver", "processKnowledgeSourceUrl", "processKnowledgeSourceFile", "setupObservationConfig", "updateObservationConfig", "resolveAiOpsCenterError", "odataRequest", "loginSucceeded", "loginFailed", "loginError", "unauthorized", "disableCreditCardRedaction", "runKnowledgeConnector", "createSimulation", "updateSimulation", "deleteSimulation", "scheduleSimulation", "cloneSimulation", "createEvalProfile", "updateEvalProfile", "deleteEvalProfile", "createScheduler", "updateScheduler", "deleteScheduler", "generatePersonaPackages", "regeneratePersonaField", "bulkGeneratePersonaPackages", "createScenarioFromTranscript", "userSync", "tenantSync", "roleSync", "generateScenarioFromAIAgent", "updateAnalyzerConfiguration", "triggerManualTranscriptAnalysis", "triggerScheduledTranscriptAnalysis", "promoteSuggestedTopic" ]; export declare type TActionType = typeof actionTypes[number]; /** * @openapi * components: * schemas: * TResourceTypeAdditional: * type: string * description: Additional resource types for audit purposes * example: node * enum: * - aicopilotconfig * - apiKey * - analytics * - connectionField * - conversation * - examplesentence * - flowState * - functionInstance * - intent * - keyphrase * - learningsentence * - lexiconEntry * - lexiconKeyphrase * - lexiconSlot * - node * - playbookStep * - playbookStepAssert * - profile * - profileSchema * - project * - projectsettings * - slotFiller * - snippet * - synonym * - tag * - task * - trainerRecord * - user * - yesNoIntent * - aiAgent * - runtimeFile */ export declare type TResourceTypeAdditional = "aicopilotconfig" | "apiKey" | "analytics" | "connectionField" | "conversation" | "examplesentence" | "flowState" | "functionInstance" | "intent" | "keyphrase" | "learningsentence" | "lexiconEntry" | "lexiconKeyphrase" | "lexiconSlot" | "mergePackage" | "node" | "playbookStep" | "playbookStepAssert" | "profile" | "profileSchema" | "project" | "projectsettings" | "snippet" | "synonym" | "slotFiller" | "tag" | "task" | "trainerRecord" | "yesNoIntent" | "user" | "aiAgent" | "runtimeFile"; /** * @openapi * components: * schemas: * TAuditEventChainElementType: * allOf: * - $ref: '#/components/schemas/TResourceType' * - $ref: '#/components/schemas/TResourceTypeAdditional' */ export declare type TAuditEventChainElementType = TResourceType | TResourceTypeAdditional | "AiOpsCenterError"; /*** * @openapi * components: * schemas: * IAuditEventModificationChainElement: * allOf: * - type: object * properties: * elementId: * $ref: '#/components/schemas/TMongoId' * elementType: * $ref: '#/components/schemas/TAuditEventChainElementType' */ export interface IAuditEventModificationChainElement { /** The Mongo id of the resource if applicable */ elementId?: TMongoId; /** Contains a 'fragment' information for the (sub-)resoure, e.g. 'flow' or 'intent' */ elementType: TAuditEventChainElementType; } declare const auditActors: readonly [ "human", "ai-assist", "system", "agent-plugin", "api-key" ]; export declare type TAuditActor = (typeof auditActors)[number]; /** * Context about who/what performed an action. * Flat shape: for agent actions the agent details sit directly on this object. */ export interface IActorContext { /** * Who/what performed the action. * For agent actions this holds the agent identifier directly (e.g. 'ai-assist'). * 'system' also covers a service principal with no owning user/org (e.g. a * service API key), identified by `principalId`. */ actor: TAuditActor; /** Correlation id of the agent's task/turn */ taskId?: string; /** Agent session id */ sessionId?: string; /** * CSA-100834 / SANO-AU12-001: stable, human-readable name of the calling * service credential (e.g. 'odata-super-api-key') - never the secret itself. * Required when `actor` is 'system' and the event has no user/org. */ principalId?: string; } /** * One changed field of an audit event (previous value tracking). * * Values are stored as JSON text (not as raw objects) for the same reason as the * event `payload`: MongoDB rejects keys that start with a `$`. */ export interface IAuditEventChange { /** Name (or path) of the field that was changed */ field: string; /** The value before the change, as JSON text. Not set if the field did not exist before. */ oldValue?: string; /** The value after the change, as JSON text. Not set if the field was removed. */ newValue?: string; /** True if the values were too large to be recorded */ valuesOmitted?: boolean; } export interface IAuditEventData { type: TAuditEventType; actionType?: TActionType; /** * Some resources contain sub-resource (and they might have sub-sub-resources) * on which operations get executed. We actually want to track the whole path * in order to understand which resource was modified. Let me give you an example: * * 'A user modified an example sentence within an intent within some flow' - so * in this case we have to track: * - "flow" * - "intent" * - "exampleSentence" */ chain: IAuditEventModificationChainElement[]; projectId?: TMongoId; } export interface IAuditEvent extends Omit { /** The Mongo id of this audit event */ _id: TMongoId; /** The exact timestamp of the event/operation */ timestamp: Date; /** * The email of the user who did the operation, e.g. 'b.mayr@cognigy.com'. * Absent only for a system event identified by `performedBy.principalId` * (see `auditEventSchema`); the same applies to the two references below. */ user?: string; /** A referece to the user who did the operation */ userReference?: TMongoId; /** A reference to the organisation the user belogns to */ organisationReference?: TMongoId; /** * Date on which this object will expire within the database and will * get dropped by MongoDBs cleanup routine. This is extremely important * as we will collect a lot of data within the 'audit trail'. */ expiresAt: Date; /** * The payload of the operation, e.g. of the 'patch' operation. This is optional * as it will contain a lot of data potentially. By default, collecting the payload * is not activated, but can be activated using an env variable. * * We store the stringified payload in order to avoid issues where $-signs are * used as keys in e.g. an object. */ payload: string; /** * The fields that were changed by the operation, with their previous and new value. * Optional: only recorded for operations that support previous value tracking. */ changes?: IAuditEventChange[]; /** An optional reference to the project the event occurred in - can be undefined */ projectReference: TMongoId; /** * Who/what actually performed the action. * If absent, assume human user performed it directly. * NEW FIELD - Added for Platform Agent integration */ performedBy?: IActorContext; } export interface IBasicPayload { type: string; data: any; } export interface IPayloadBaseMetaData { traceId: string; disableSensitiveLogging: boolean; } export declare type RecursivePartial = { [P in keyof T]?: RecursivePartial; }; export interface IPayloadBasePropertiesData { properties: Partial, OmittedKeys>>; } export declare type IFilterQuery = Partial<{ [P in keyof T]: T[P] extends boolean ? T[P] : T[P] | T[P][]; }>; declare const referenceKeys: readonly [ "analyticsStepReference", "chartReference", "dataReference", "extensionReference", "fallbackLocaleReference", "flowReference", "functionReference", "handoverRequestReference", "intentReference", "intentTrainGroupReference", "lexiconEntryReference", "lexiconReference", "localeReference", "nodeDescriptorReference", "nodeDescriptorSetReference", "nodeReference", "organisationReference", "primaryLocaleReference", "projectReference", "resourceReference", "snapshotReference", "subResourceReference", "connectorReference", "storeReference", "sourceReference" ]; export declare type TReferenceKeys = (typeof referenceKeys)[number]; export declare type TReferenceAndEntityMetaKeys = TReferenceKeys | TEntityMetaKeys | "referenceId"; export declare type TNonQueriableKeys = TReferenceKeys; declare const organisationWideRoles: readonly [ "admin", "apiKeys", "base_role", "basicSupportUser", "fullSupportUser", "liveAgentAdmin", "liveAgentAgent", "liveAgentSupervisor", "livechat", "odata", "projectAssigner", "projectManager", "userManager", "userDetailsViewer", "voiceGatewayUser", "autoDialerUser", "opsCenterUser" ]; export declare type TOrganisationWideRole = typeof organisationWideRoles[number]; declare const projectWideRoles: readonly [ "agentAssistConfigAdmin", "agentAssistConfigViewer", "analytics", "basic", "connection_admin", "contact_profile_admin", "contact_profile_editor", "contact_profile_viewer", "conversationHistory", "developer", "endpoint_admin", "extension_admin", "extension_editor", "flowEditor", "flowNodeComments", "flowNodeDescriptions", "followUser", "function_admin", "function_editor", "handoverProviderAdmin", "intents", "knowledgeAdmin", "large_language_model_admin", "lexicon_admin", "lexicon_editor", "localesAdmin", "logs", "memberManager", "nlu_connector_admin", "packages_admin", "playbook_admin", "playbook_editor", "projectAdmin", "snapshot_admin", "tokenAdmin", "tokenEditor", "data_privacy_admin", "data_privacy_editor", "data_privacy_viewer", "simulator_admin" ]; export declare type TProjectWideRole = typeof projectWideRoles[number]; /** * @openapi * * components: * schemas: * ICrudPermissions: * type: object * properties: * create: * type: boolean * read: * type: boolean * update: * type: boolean * delete: * type: boolean */ export interface ICrudPermissions { create: boolean; read: boolean; update: boolean; delete: boolean; } /** * @openapi * * components: * schemas: * IOrganisationWideAcl: * type: object * properties: * rights: * type: object * properties: * analyticsOdata: * $ref: '#/components/schemas/ICrudPermissions' * apiKeys: * $ref: '#/components/schemas/ICrudPermissions' * auditEvents: * $ref: '#/components/schemas/ICrudPermissions' * liveAgentAccount: * $ref: '#/components/schemas/ICrudPermissions' * projects: * $ref: '#/components/schemas/ICrudPermissions' * userDetails: * $ref: '#/components/schemas/ICrudPermissions' * users: * $ref: '#/components/schemas/ICrudPermissions' * connections: * $ref: '#/components/schemas/ICrudPermissions' * contactProfiles: * $ref: '#/components/schemas/ICrudPermissions' * conversationHistory: * $ref: '#/components/schemas/ICrudPermissions' * endpoints: * $ref: '#/components/schemas/ICrudPermissions' * extensions: * $ref: '#/components/schemas/ICrudPermissions' * flowNodeComments: * $ref: '#/components/schemas/ICrudPermissions' * flowNodeDescription: * $ref: '#/components/schemas/ICrudPermissions' * flowNodes: * $ref: '#/components/schemas/ICrudPermissions' * flows: * $ref: '#/components/schemas/ICrudPermissions' * intents: * $ref: '#/components/schemas/ICrudPermissions' * knowledgeStores: * $ref: '#/components/schemas/ICrudPermissions' * lexicons: * $ref: '#/components/schemas/ICrudPermissions' * liveAgentInbox: * $ref: '#/components/schemas/ICrudPermissions' * locales: * $ref: '#/components/schemas/ICrudPermissions' * logs: * $ref: '#/components/schemas/ICrudPermissions' * memberDetails: * $ref: '#/components/schemas/ICrudPermissions' * members: * $ref: '#/components/schemas/ICrudPermissions' * goals: * $ref: '#/components/schemas/ICrudPermissions' * nluConnectors: * $ref: '#/components/schemas/ICrudPermissions' * playbooks: * $ref: '#/components/schemas/ICrudPermissions' * project: * $ref: '#/components/schemas/ICrudPermissions' * projectSettings: * $ref: '#/components/schemas/ICrudPermissions' * snapshots: * $ref: '#/components/schemas/ICrudPermissions' * states: * $ref: '#/components/schemas/ICrudPermissions' * tasks: * $ref: '#/components/schemas/ICrudPermissions' * tokens: * $ref: '#/components/schemas/ICrudPermissions' * voiceGatewayAccount: * $ref: '#/components/schemas/ICrudPermissions' * roles: * type: array * items: * $ref: '#/components/schemas/TOrganisationWideRole' */ /** ACL properties organisation-wide */ export interface IOrganisationWideAcl { rights: { [P in TOrganisationWidePermissions]: ICrudPermissions; }; roles: TOrganisationWideRole[]; } /** * @openapi * * components: * schemas: * IProjectWideAcl: * type: object * properties: * rights: * type: object * properties: * agentAssistConfigs: * $ref: '#/components/schemas/ICrudPermissions' * analytics: * $ref: '#/components/schemas/ICrudPermissions' * connections: * $ref: '#/components/schemas/ICrudPermissions' * contactProfiles: * $ref: '#/components/schemas/ICrudPermissions' * conversationHistory: * $ref: '#/components/schemas/ICrudPermissions' * endpoints: * $ref: '#/components/schemas/ICrudPermissions' * extensions: * $ref: '#/components/schemas/ICrudPermissions' * flowNodeComments: * $ref: '#/components/schemas/ICrudPermissions' * flowNodeDescription: * $ref: '#/components/schemas/ICrudPermissions' * flowNodes: * $ref: '#/components/schemas/ICrudPermissions' * flows: * $ref: '#/components/schemas/ICrudPermissions' * handoverProviders: * $ref: '#/components/schemas/ICrudPermissions' * copilotConfigs: * $ref: '#/components/schemas/ICrudPermissions' * intents: * $ref: '#/components/schemas/ICrudPermissions' * largeLanguageModels: * $ref: '#/components/schemas/ICrudPermissions' * knowledgeStores: * $ref: '#/components/schemas/ICrudPermissions' * lexicons: * $ref: '#/components/schemas/ICrudPermissions' * liveAgentInbox: * $ref: '#/components/schemas/ICrudPermissions' * locales: * $ref: '#/components/schemas/ICrudPermissions' * logs: * $ref: '#/components/schemas/ICrudPermissions' * marketplace: * $ref: '#/components/schemas/ICrudPermissions' * memberDetails: * $ref: '#/components/schemas/ICrudPermissions' * members: * $ref: '#/components/schemas/ICrudPermissions' * goals: * $ref: '#/components/schemas/ICrudPermissions' * nluConnectors: * $ref: '#/components/schemas/ICrudPermissions' * playbooks: * $ref: '#/components/schemas/ICrudPermissions' * project: * $ref: '#/components/schemas/ICrudPermissions' * projectSettings: * $ref: '#/components/schemas/ICrudPermissions' * snapshotDownloads: * $ref: '#/components/schemas/ICrudPermissions' * snapshots: * $ref: '#/components/schemas/ICrudPermissions' * states: * $ref: '#/components/schemas/ICrudPermissions' * tasks: * $ref: '#/components/schemas/ICrudPermissions' * tokens: * $ref: '#/components/schemas/ICrudPermissions' * analyticsOdata: * $ref: '#/components/schemas/ICrudPermissions' * apiKeys: * $ref: '#/components/schemas/ICrudPermissions' * projects: * $ref: '#/components/schemas/ICrudPermissions' * userDetails: * $ref: '#/components/schemas/ICrudPermissions' * users: * $ref: '#/components/schemas/ICrudPermissions' * simulator: * $ref: '#/components/schemas/ICrudPermissions' * additionalProperties: * $ref: '#/components/schemas/ICrudPermissions' * roles: * type: array * items: * $ref: '#/components/schemas/TProjectWideRole' * allowedLocales: * type: array * items: * $ref: '#/components/schemas/IAllowedLocale' */ /** ACL properties project-wide */ export interface IProjectWideAcl { rights: { [P in TProjectWidePermissions | TOrganisationWidePermissions]: ICrudPermissions; }; roles: TProjectWideRole[]; allowedLocales: IAllowedLocale[]; } /** * @openapi * * components: * schemas: * IAllowedLocale: * type: object * properties: * localeId: * $ref: '#/components/schemas/TMongoId' * primary: * type: boolean */ export interface IAllowedLocale { localeId: TMongoId; primary?: boolean; } /** * @openapi * * components: * schemas: * ISamlIdentityProviderData: * type: object * properties: * idpType: * type: string * enum: * - saml * idpIssuer: * type: string * description: The value that will be in the issuer field in the SAML request. * format: url * idpLoginEndpoint: * type: string * description: The URL to use to login in the IDP. Used in the SP initiated Flow. * format: url * idpLogoutEndpoint: * type: string * description: The URL to send SLO requests against. Not all identity providers support this. * format: url * idpCertificate: * type: string * description: The certificate from the ID used to sign the SAML requests. It is base64 encoded. * wantAuthnResponseSigned: * type: boolean * description: If the SAML authentification response should be signed, not all providers support this. * decryptionPrivateKey: * type: string * description: An optional decryption key. This is necessary if the SAML request is encoded. * idpDisableRequestedAuthnContext: * type: boolean * description: For some providers, e.g. Azure on-prem, it might be necessary to disable the authn context field in the SAML request. * default: false */ export interface ISamlIdentityProvider { _id: TMongoId; idpType: "saml"; /** * The value that will be in the issuer field in the SAML request. * E.g. https://cognigy.okta.com/home/cognigy_cognigy_1/0oa7t4vrgbbBV6ujF356/aln7t9avrJOKuoj9l356 */ idpIssuer: string; /** * The URL to use to login in the IDP. Used in the SP initiated Flow. */ idpLoginEndpoint: string; /** * The URL to send SLO requests against. Not all identity providers support * this. */ idpLogoutEndpoint: string; /** * The certificate from the ID used to sign the SAML requests. * * Base64 encoded **/ idpCertificate: string; /** * An optional decryption key. This is necessary if the SAML request is * encoded. * * Base64 encoded **/ decryptionPrivateKey: string; /** * For some providers, e.g. Azure on-prem, it might be necessary to disable * the authn context field in the SAML request. */ idpDisableRequestedAuthnContext: boolean; /** * Reference the organisation this identity provider belongs to. */ organisationReference: TMongoId; /** * If the SAML authentification response should be signed, * not all providers support this. */ wantAuthnResponseSigned?: boolean; } declare const idpTokenEndpointAuthMethods: readonly [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "tls_client_auth", "self_signed_tls_client_auth", "none" ]; export declare type TIdpTokenEndpointAuthMethod = typeof idpTokenEndpointAuthMethods[number]; declare const idpIdTokenSignedResponseAlgs: readonly [ "RS256", "RS384", "RS512", "HS256", "HS384", "HS512" ]; export declare type TIdpIdTokenSignedResponseAlg = typeof idpIdTokenSignedResponseAlgs[number]; /** * @openapi * * components: * schemas: * IOidcIdentityProviderData: * type: object * properties: * idpType: * type: string * enum: * - oidc * idpIssuer: * type: string * description: The URL of the OIDC identity provider. Must include `https://` to ensure a secure connection. Example `https://accounts.google.com`. * format: url * idpClientId: * type: string * description: | * The client identifier issued to the client during * the registration process. * * The authorization server issues the registered client a client * identifier -- a unique string representing the registration * information provided by the client. The client identifier is not * a secret; it is exposed to the resource owner and MUST NOT be * used alone for client authentication. * * The client identifier is unique to the authorization server. * * https://tools.ietf.org/html/rfc6749#section-2.3.1 * idpClientSecret: * type: string * description: | * This value is used by Confidential Clients to authenticate to the * Token Endpoint, as described in Section 2.3.1 of OAuth 2.0, and * for the derivation of symmetric encryption key values, as * described in Section 10.2 of OpenID Connect Core 1.0 * [OpenID.Core]. * * https://tools.ietf.org/html/rfc6749#section-2.3.1 * https://openid.net/specs/openid-connect-core-1_0.html#Encryption * idpAdditionalScope: * type: string * default: openid profile email offline_access * description: | * The scopes associated with Access Tokens determine what resources * will be available when they are used to access OAuth 2.0 * protected endpoints. * For OpenID Connect, scopes can be used to request that specific * sets of information be made available as Claim Values. * The scopes openid, profile, email and offline_access are always * requested. * idpFrontChannelLogoutUrl: * type: string * format: url * idpIdTokenSignedResponseAlg: * $ref: '#/components/schemas/TIdpIdTokenSignedResponseAlg' * idpTokenEndpointAuthMethod: * $ref: '#/components/schemas/TIdpTokenEndpointAuthMethod' */ export interface IOidcIdentityProvider { _id: TMongoId; idpType: "oidc"; /** * The openId-Connect baseUrl */ idpIssuer: string; /** * The client identifier issued to the client during the registration * process. * * The authorization server issues the registered client a client identifier * -- a unique string representing the registration information provided by * the client. The client identifier is not a secret; it is exposed to the * resource owner and MUST NOT be used alone for client authentication. * * The client identifier is unique to the authorization server. * * @see https://tools.ietf.org/html/rfc6749#section-2.3.1 */ idpClientId: string; /** * This value is used by Confidential Clients to authenticate to the Token * Endpoint, as described in Section 2.3.1 of OAuth 2.0, and for the * derivation of symmetric encryption key values, as described in Section * 10.2 of OpenID Connect Core 1.0 [OpenID.Core]. * * @see https://tools.ietf.org/html/rfc6749#section-2.3.1 * @see https://openid.net/specs/openid-connect-core-1_0.html#Encryption */ idpClientSecret: string; /** * The Algorithm used to sign the ID Token issued to this Client. */ idpIdTokenSignedResponseAlg: TIdpIdTokenSignedResponseAlg; /** * Requested Client Authentication method for the Token Endpoint. * * @see https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication */ idpTokenEndpointAuthMethod: TIdpTokenEndpointAuthMethod; /** * The scopes associated with Access Tokens determine what resources will be * available when they are used to access OAuth 2.0 protected endpoints. For * OpenID Connect, scopes can be used to request that specific sets of * information be made available as Claim Values. * * The scopes openid profile email offline_access are always requested. */ idpAdditionalScope: string; /** * The url to the FrontChannel Logout */ idpFrontChannelLogoutUrl: string; /** * Reference the organisation this identity provider belongs to. */ organisationReference: TMongoId; } /** * @openapi * * components: * schemas: * IIdentityProviderData: * type: object * oneOf: * - $ref: '#/components/schemas/ISamlIdentityProviderData' * - $ref: '#/components/schemas/IOidcIdentityProviderData' */ export declare type IIdentityProvider = IOidcIdentityProvider | ISamlIdentityProvider; export interface IOrganisationScope { organisationId: TMongoId; } /** * @openapi * components: * parameters: * projectQueryParam: * in: query * name: projectId * description: The unique identifier for the Project. * required: false * schema: * $ref: '#/components/schemas/TMongoId' * schemas: * IProjectScope: * type: object * properties: * projectId: * $ref: '#/components/schemas/TMongoId' * description: The unique identifier for the Project. */ export interface IProjectScope { projectId: TMongoId; } export interface IGetAuthorizationCodeResponse { code: string; redirect_uri: string; expires_in: number; expires_at?: string; } export interface ILoginByClientCredentialsParameters { type: "clientCredentials"; /** * The scope of the token * * @see https://tools.ietf.org/html/rfc6749#section-3.3 */ scope: string; } export interface IExchangeOneTimeTokenForRefreshTokenRestDataQuery_2_0 { loginToken: string; } export interface IExchangeOneTimeTokenForRefreshTokenRestData_2_0 extends IExchangeOneTimeTokenForRefreshTokenRestDataQuery_2_0 { } /** * @openapi * * components: * schemas: * IExchangeOneTimeTokenForRefreshTokenRestReturnValue_2_0: * type: object * properties: * refreshToken: * type: string */ export interface IExchangeOneTimeTokenForRefreshTokenRestReturnValue_2_0 { refreshToken: string; } /** * @openapi * * components: * schemas: * IExchangeCXoneTokenRestReturnValue_2_0: * type: object * properties: * refreshToken: * type: string */ export interface IExchangeCXoneTokenRestReturnValue_2_0 { refreshToken: string; } export interface AuthenticationAPI { authenticationHandler?: IAuthenticationAdapter; setCredentials: (credentials: TAuthenticationCredentials) => void; login?: (data: ILoginByPasswordParameters | ILoginByRefreshTokenParameters | ILoginByAuthorizationCodeParameters | ILoginByClientCredentialsParameters) => Promise; logout?: () => Promise; isLoggedIn?: () => Promise; getAccessToken: () => Promise; getRefreshToken?: () => string; getRealtimeToken: TRestAPIOperation; webfinger: TRestAPIOperation; getAuthorizationCode?: (data: IGetAuthorizationCodeParameters) => Promise; exchangeOneTimeTokenForRefreshToken: TRestAPIOperation; exchangeCXoneToken: TRestAPIOperation<{}, IExchangeCXoneTokenRestReturnValue_2_0>; generateManagementUIAuthToken: TRestAPIOperation; } declare function AuthenticationAPI(instance: Base): AuthenticationAPI; export interface IHttpResponse { data: any; status: number; statusText: string; headers: any; } export interface IRestAPIClientVersionConfiguration { resources: "2.0"; metrics: "2.0" | "2.1"; sessions: "2.0"; external: "2.0"; administration: "2.0" | "2.1"; management: "2.0"; insights: "2.0"; analytics: "2.0"; jwt: "2.0"; /** "2.1" selects the project-scoped Ops Center API; "2.0" is the legacy organisation-wide surface. */ opsCenter: "2.0" | "2.1"; simulation: "2.0"; serviceToolkit: "2.0"; } export declare type THttpLib = "axios"; /** * Exponential backoff is the process of a client periodically retrying a * failed request over an increasing amount of time. It is a standard error * handling strategy for network applications. The Core Reporting API is * designed with the expectation that clients which choose to retry failed * requests do so using exponential backoff. Besides being "required", using * exponential backoff increases the efficiency of bandwidth usage, reduces * the number of requests required to get a successful response, and * maximizes the throughput of requests in concurrent environments. * * @see https://developers.google.com/analytics/devguides/reporting/core/v3/errors#backoff */ export declare function exponentialDelay(retryNumber?: number): number; export declare function isRetryAllowed(errorCode: string): boolean; export declare function isRetryableStatus(status: number): boolean; /** * The Retry-After response HTTP header indicates how long the user agent * should wait before making a follow-up request. There are three main cases * this header is used: * * - When sent with a 503 (Service Unavailable) response, this indicates how * long the service is expected to be unavailable. * - When sent with a 429 (Too Many Requests) response, this indicates how * long to wait before making a new request. * - When sent with a redirect response, such as 301 (Moved Permanently), this * indicates the minimum time that the user agent is asked to wait before * issuing the redirected request. * * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After */ export declare function retryAfterDelay(headers: AxiosResponseHeaders, lastRequestTime: number): number; export interface IRestAPIClientConfig { baseUrl?: string; /** * maxRetries * @default: 3 */ maxRetries?: number; httpAdapter?: THttpLib | IHttpAdapter; versions?: Partial; logger?: Console; onUnauthorized?: () => void; } export interface IHttpAdapter { get(request: IHttpRequest, client: any): PromiseLike; post(request: IHttpRequest, client: any): PromiseLike; put(request: IHttpRequest, client: any): PromiseLike; patch(request: IHttpRequest, client: any): PromiseLike; head(request: IHttpRequest, client: any): PromiseLike; request(request: IHttpRequest, client: any): PromiseLike; setConfig(config: IRestAPIClientConfig): void; } export declare type TTusAPIOperation = (args: Data) => ReturnValue; declare const arrayNLUConnectorType: readonly [ "alexa", "dialogflow", "dialogflowBuiltIn", "amazonLexBuiltIn", "luis", "watson", "noNlu", "cognigy", "code", "lex", "generativeAI" ]; export declare type TNLUConnectorType = typeof arrayNLUConnectorType[number]; export interface INLUTransformerFunction { /** * If true, then we will * abort the message processing * if the transformer throws an * error. Otherwise, we will * continue with normal message * processing in the event of an error */ abortOnError: boolean; /** * If true, then we will * write the transformer stack * in the input object, * when the channel is adminconsole */ transformerStackEnabled: boolean; /** * The transformer object * as written by the user. * This will be displayed in the UI * since it includes typings. */ transformer: string; /** * The transformer object * written by the user, but * without typings. This will * be executed. */ transpiledTransformer?: string; preNluTransformerEnabled?: boolean; postNluTransformerEnabled?: boolean; nluCodeTransformerEnabled?: boolean; } /** * The different kinds of NLUConnector settings. */ export declare type AnyNLUConnectorSettings = IAlexaSettings | IDialogFlowSettings | ILuisSettings | IWatsonSettings | ILexSettings; /** * Settings used by DialogFlow NLUConnectors. */ export interface IDialogFlowSettings { /** * The version of the dialogflow * API to use. */ dialogflowApiVersion: 1 | 2; /** * The projectId of the Dialogflow * Agent. */ dialogflowProjectId: string; /** * The access token used to authenticate requests. * Used by DialogFlow. */ accessToken?: string; /** * The private key of a Google * Service Account that has the access * right to use the Dialogflow API. * * We store the private-key as string in order to avoid that specific * characters bring-in certain issues with the database. */ privateKey?: string; } /** * Settings used by LUIS NLUConnectors. */ export interface ILuisSettings { /** * The URL Used to authenticate requests by LUIS. */ authenticationURL: string; } export interface IWatsonSettings { /** * Apikey for accessing the Watson NLU Api */ apikey: string; /** * Skill ID for accessing the Assistant skill */ workspaceId: string; /** * The URL used to authenticate requests by Watson */ serviceURL: string; } export interface ILexSettings { /** * Access Key for accessing the Amazon Lex API */ accessKeyId: string; /** * Secret Access Key for accessing the Amazon Lex API */ secretAccessKey: string; /** * AWS Region of the Lex bot is deployed */ awsRegion: string; /** * Id of the target Lex bot */ botId: string; /** * Id of the Lex bot alias */ botAliasId: string; /** * Flag if Cognigy NLU should be applied after after Lex NLU */ reparseSlots: boolean; } /** * Settings used by Alexa NLUConnectors. */ export interface IAlexaSettings { /** * The invocation name of the Alexa skill. * Necessary to start Alexa simulations. */ invocationName: string; /** * Whether to reparse slots from Alexa with our own keyphrase mapper. * Used by Alexa. */ reparseAlexaSlots: boolean; /** * Information about the skill the NLUConnector connects to. */ skill: ISkill; } export interface INLUConnector extends IEntityMeta { /** * The referenceId for the NLUConnector, * which is used during execution. * This ID does not change when the * NLUConnector is snapshotted. */ referenceId: string; /** * The name of the new NLUConnector resource */ name: string; /** * The type of the NLUConnector (e.g. DialogFlow) */ type: TNLUConnectorType; /** * The NLUConnector specific settings. * Different for the various NLUConnector types. */ settings: AnyNLUConnectorSettings; transformer: INLUTransformerFunction; projectReference: TMongoId; organisationReference: TMongoId; } export interface IGraphNLUConnector { type: "nluconnector"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } export interface ISkill { apis?: string[]; /** * When the skill was last updated */ lastUpdated: string; /** * Gives the name of the skill for different locaels in the format: * "en-US": "cognigy", * "de-DE": "german cognigy" */ nameByLocale: { "en-US"?: string; "de-DE"?: string; "ja-JP"?: string; "en-GB"?: string; "en-IN"?: string; }; publicationStatus?: string; /** * The unique id of the skill */ skillId: string; /** * The current stage of the skills life cycle (e.g. is it in development, production..) */ stage: string; } declare const webhookChannelTypes: readonly [ "facebook", "workplace", "slack", "generic", "webhook", "microsoftBotFramework", "sunshineConversations", "ringCentralEngage", "intercom", "whatsapp", "eightByEight", "agentAssistVoice", "zoomContactCenter", "cxoneDx", "niceCXOneWebhook" ]; export declare type TWebhookChannelType = typeof webhookChannelTypes[number]; declare const restChannelTypes: readonly [ "alexa", "audioCodes", "avaya", "bandwidth", "dialogflow", "line", "microsoftTeams", "rest", "twilio-sms", "twilio", "userlike", "nonConversational", "amazonLex", "genesysBotConnector", "niceCXOne", "niceCXOneAAH", "zoomContactCenter", "mcpServer", "a2aServer" ]; export declare type TRestChannelType = typeof restChannelTypes[number]; declare const socketChannelTypes: readonly [ "realtime", "webchat2", "admin-webchat", "socket", "voiceGateway2", "liveAgentAssist", "webchat3" ]; export declare type TSocketChannelType = typeof socketChannelTypes[number]; export interface IBaseTransformerFunction { /** * If true, then we will * abort the message processing * if the transformer throws an * error. Otherwise, we will * continue with normal message * processing in the event of an error */ abortOnError: boolean; /** * The transformer object * as written by the user. * This will be displayed in the UI * since it includes typings. */ transformer: string; /** * The transformer object * written by the user, but * without typings. This will * be executed. */ transpiledTransformer?: string; } export interface ITransformerFunction extends IBaseTransformerFunction { inputTransformerEnabled: boolean; outputTransformerEnabled: boolean; finalPingTransformerEnabled: boolean; notifyTransformerEnabled: boolean; injectTransformerEnabled: boolean; } export interface IAnalyticsDataGoals { entityReferenceId: string; flowName: string; flowReferenceId: string; label: string; timestamp: number; } export interface IBaseAnalyticsData { projectId: string; projectName: string; contactId: string; sessionId: string; inputId: string; analyticsEventId?: string; mode: "TextOnly" | "DataOnly" | "TextData" | "Empty"; state: string; organisation: string; userType: string; channel: string; endpointType: TEndpointType; flowLanguage: string; flowReferenceId: string; flowName: string; entrypoint: string; localeReferenceId: string; intent: string; ip: string; slots: any; timestamp: Date; executionTime: number; execution?: number; nodesVisited: Array; completedGoals: Array; } declare const analyticsType: readonly [ "input", "output" ]; export declare type TAnalyticsType = typeof analyticsType[number]; export declare type TAnalyticsSource = typeof analyticsSourceTypes[number]; declare const analyticsSourceTypes: readonly [ "user", "bot", "agent", "suggestion" ]; export interface IBaseAnalyticsSourceData extends IBaseAnalyticsData { intentScore: number; intentFlow: string; understood: boolean | null; type: TAnalyticsType; source: TAnalyticsSource; schemaVersion: number; rating?: number; ratingComment?: string; inHandoverRequest?: boolean; inHandoverConversation?: boolean; chatbase?: string; dashbot?: string; dashbotPlatform?: TDashbotPlatform; } export interface IAnalyticsUserInputData { inputText: string; inputData: any; inputAttachments: TAttachments[]; userLanguageText: string; outputId?: string; } export interface IAnalyticsFlowMeta { flowName: string; flowReferenceId: string; } export interface IAnalyticsSnapshotMeta { snapshotName: string; snapshotId: TMongoId | any; } export interface IAnalyticsEndpointMeta { endpointUrlToken: string; endpointName: string; endpointType: TEndpointType; /** We can't use the TEndpointType as the channel can be overwritten by customer */ channel: string; } export interface IAnalyticsLocaleMeta { localeName: string; localeReferenceId: string; } export interface IStepEvent extends IAnalyticsFlowMeta, IAnalyticsEndpointMeta, IAnalyticsLocaleMeta, Partial { _id: TMongoId; userId: string; sessionId: string; inputId: string; timestamp: Date; stepLabel: string; /** * The entityReferenceId * of the step that came before this step */ parentStep: string; type: "intent" | "node"; entityReferenceId: string; projectName: string; projectId: TMongoId; organisationId: TMongoId; } export interface IAnalyticsStepData { steps: (Pick)[]; trackedSteps: Pick[]; } declare const entrypointType: readonly [ "project", "snapshot" ]; export declare type TEntrypointType = typeof entrypointType[number]; export interface IAnalyticsFlowHistoryData extends IAnalyticsFlowMeta { } /** * CXOne data that gets forwarded to analytics. * This data is sent by CXOne endpoints (Virtual Agent Hub) and should remain immutable * throughout flow execution. * * The data is extracted from input.data._cognigy._cxone and deep-copied before * flow execution to prevent manipulation. When not provided by the endpoint, * a minimal fallback is built from the organisation's tenantId and businessUnitId. */ export interface ICXOneData { /** Unique identifier for the interaction/conversation on CXOne side */ interaction_Id?: string; /** Contact identifier in CXOne system */ contact_Id?: string; /** Tenant identifier */ tenant_Id: string; /** Contact number (internal reference) */ contact_No?: string; /** Business unit number */ bus_No: string; /** Customer's contact identifier */ customer_Contact_Id?: string; /** Timestamp when contact started (Unix timestamp as string) */ contact_start_timestamp?: string; /** Division number */ division_No?: string; /** Channel number identifier */ channel_No?: string; /** * Indicates where the CXone data was sourced from. * - "cxone_endpoint": CXone platform provided the data via a CXone-integrated * endpoint (niceCXOne, niceCXOneAAH, voiceGateway2). Raw CXone-shaped data * arriving through any other endpoint type does NOT get tagged as * "cxone_endpoint" — the session is treated as organisation-sourced instead. * - "cognigy_organisation": Cognigy self-populated from organisation settings * (fallback — either no usable CXone data in input, or the endpoint is not * CXone-integrated so the payload-provided data is not trusted). */ source?: "cxone_endpoint" | "cognigy_organisation"; /** * Numeric indicator for downstream data warehouse consumers (DATA_CONTENT_SOURCE_INDICATOR_NO). * 1 = CXone in front — requires BOTH of: * (a) usable CXone payload present in the input, AND * (b) the session arrived through a CXone-integrated endpoint * (niceCXOne, niceCXOneAAH, voiceGateway2). * A REST/webchat3/slack/etc. caller with a crafted CXone-shaped payload * does NOT qualify for indicator 1. * 2 = Cognigy Stand-Alone — either no usable CXone data in input, or the * endpoint is not CXone-integrated; falls back to organisation * tenantId/businessUnitId when those are configured. * 3 = (Future) Cognigy in front */ dataContentSourceIndicatorNo?: number; } export interface IAnalyticsSourceData extends IBaseAnalyticsSourceData, IAnalyticsUserInputData, IAnalyticsStepData { entrypointType: TEntrypointType; trackedGoals: IAnalyticsDataGoals[]; localeName: string; endpointName: string; endpointUrlToken: string; handoverEscalations: number; snapshotName?: string; flowHistory?: IAnalyticsFlowHistoryData[]; allowDataOnly: boolean; custom1?: string; custom2?: string; custom3?: string; custom4?: string; custom5?: string; custom6?: string; custom7?: string; custom8?: string; custom9?: string; custom10?: string; previousInputText: string; previousInputData: {}; previousInputAttachments: TAttachments[]; previousSource: TAnalyticsSource; /** CXOne data preserved from input for analytics (deep copied, immutable) */ cxOneData?: ICXOneData; } /** * Customer-editable analytics fields. * Note: cxOneData is intentionally excluded — CXOne identifiers must remain * immutable and cannot be modified via analytics update APIs. */ export interface IEditableAnalyticsData extends Pick { } export interface ISayNodeSettings { liveAgentSettings: ILiveAgentSettings; } export interface ILiveAgentSettings { forwardable: boolean; outputDestination?: "userOnly" | "agentOnly" | "userAndAgent"; } declare const handoverProviders: readonly [ "cognigy", "none", "rce", "chatwoot", "salesforce", "salesforceMIAW", "liveAgent", "genesysCloud", "genesysCloudOM", "eightByEight", "salesforceMIAW" ]; export declare type THandoverProvider = typeof handoverProviders[number]; export interface IHandoverSettings { provider: THandoverProvider; providerSettings?: TProviderSettings; agentAssistSettings?: IAgentAssistSettings; } declare const whisperAssistConfigurations: readonly [ "none", "basic", "template" ]; export declare type TWhisperAssistConfiguration = typeof whisperAssistConfigurations[number]; declare const copilotType: readonly [ "none", "workspace", "whisper" ]; export declare type TCopilotType = typeof copilotType[number]; declare const copilotAuthenticationMethod: readonly [ "default", "tokenSecret", "publicKey", "keyStore" ]; export declare type TCopilotAuthenticationMethod = typeof copilotAuthenticationMethod[number]; export declare type TProviderSettings = IRCEHandoverSettings | IChatwootHandoverSettings | ICognigyHandoverSettings | ISalesForceHandoverSettings | ISalesforceMIAWHandoverSettings | ILiveAgentHandoverSettings | IEightByEightHandoverSettings | IGenesysCloudHandoverSettings | IGenesysCloudOMHandoverSettings; export interface IRCEHandoverSettings { /** * Whether to forward all conversations * to the provider, or only the conversations * that trigger a handover. If this setting is true, * then we will only forward conversations were handover * was triggered. */ forwardOnlyHandoverConversations?: boolean; /** * Indicates if queue updates should be enabled * to receive events about the estimated wait time */ getQueueUpdates?: boolean; /** * The API access token * you can create within RCE * * @deprecated It will be removed in the future, used if rceConnection is not set */ apiAccessToken: string; /** * The API URL to your * RCE installation */ baseApiUrl: string; /** * The access token for your * rce source sdk source * * @deprecated It will be removed in the future, used if rceConnection is not set */ realtimeAccessToken: string; /** * The endpoint URL of your * rce source sdk source */ realtimeEndpointUrl: string; /** * The secret used to secure * webhooks in RCE * * @deprecated It will be removed in the future, used if rceConnection is not set */ webhookSecret: string; /** * The ID of the category you use * as the 'bot category' within RCE */ botCategoryId: string; /** * The ID of the category you use * as the 'bot category' within RCE */ agentCategoryId: string; /** * The connection id of the RCE connection to retrieve webhook secret from */ rceConnection: string; } export interface IEightByEightHandoverSettings { /** * The API access token * you can create within 8x8 */ /** * The API URL to the 8x8 environment */ baseUrl: string; /** * The API access token * you can create within 8x8 * * @deprecated It will be removed in the future, used if eightByEightConnection is not set */ apiKey: string; /** * It is a key which has * to be included in the header */ apiTenant: string; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * The connection id of the 8x8 connection to retrieve apiKey from */ eightByEightConnection: string; } export interface IChatwootHandoverSettings { baseUrl: string; accountId: string; /** * @deprecated It will be removed in the future, used if chatwootConnection is not set */ apiKey: string; chatwootInboxId: string; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * The connection id of the Chatwoot connection to retrieve apiKey secret from */ chatwootConnection: string; } export interface ILiveAgentHandoverSettings { baseUrl: string; accountId: string; /** * Used for legacy and platform settings */ apiKey: string; liveAgentInboxId: string; /** if this is set to "true", the apiKey and baseUrl will be automatically picked from the system configuration as overrides */ usePlatformToken: boolean; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * The connection id of the Live Agent connection to retrieve apiKey secret from */ liveAgentConnection: string; } export interface ICognigyHandoverSettings { /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface ISalesForceHandoverSettings { apiVersion: string; baseUrl: string; organizationId: string; deploymentId: string; buttonId: string; /** * Same as other clients, this setting cannot be changed, * and is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * Whether to forward any unknown event to the flow as an * agentInject message */ forwardUnknownEventsToFlow: boolean; } export interface ISalesforceMIAWHandoverSettings { baseUrl: string; capabilitiesVersion: string; organizationId: string; esDeveloperName: string; /** * Same as other clients, this setting cannot be changed, * and is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * Whether to forward any unknown event to the flow as an * agentInject message */ forwardUnknownEventsToFlow: boolean; } export interface IAgentAssistSettings { copilotType: TCopilotType; agentAssistFlowId: string; agentAssistConfigId: string; enableTranscriptTile?: boolean; enableTranscriptTileChatInput?: boolean; redactTranscriptTileMessages?: boolean; /** * Whether the Copilot Workspace shows Cognigy branding (the "Powered by Cognigy.AI" * footer). Absent means branding is shown, so endpoints saved before this setting * existed keep their current appearance. */ enableBranding?: boolean; enableAgentCopilotAuthentication?: boolean; blockNonJWTRequests?: boolean; agentCopilotAuthentication?: string; /** * The authentication method used to verify the JWT sent in the Copilot URL. * - "default": Cognigy's built-in fallback authentication (no customer-provided * key/secret verification). * - "tokenSecret": symmetric — verified against the shared secret stored in the * `agentCopilotAuthentication` connection (its `jwtSecret` field). * - "publicKey": asymmetric — verified against one of the PEM-encoded public keys * in `copilotAuthenticationPublicKeys`. * - "keyStore": asymmetric — verified against the JWKS served at * `copilotAuthenticationKeyStoreUrl`, selecting the key by the token's `kid` header. * * When absent, the method is derived from the legacy `enableAgentCopilotAuthentication` * flag (`true` → "tokenSecret", otherwise → "default"). */ copilotAuthenticationMethod?: TCopilotAuthenticationMethod; /** * PEM-encoded public keys used to verify the Copilot JWT when * `copilotAuthenticationMethod` is "publicKey". Multiple keys are supported to allow * key rotation — a token is accepted if it verifies against any of the keys. */ copilotAuthenticationPublicKeys?: string[]; /** * URL of the customer's JWKS key store, used to verify the Copilot JWT when * `copilotAuthenticationMethod` is "keyStore". The verifying key is selected by the * token's `kid` header. */ copilotAuthenticationKeyStoreUrl?: string; /** * Optional OAuth2 connection id for providers that require it (e.g., Genesys) */ oAuth2Connection?: string; /** * Whether the agentAssist session state is deleted when the handover closes. * Defaults to `true`. */ endSessionOnHandoverClose?: boolean; /** * How long, in minutes, the agentAssist session state is kept after the handover * closes before it is cleaned up. Only relevant when `endSessionOnHandoverClose` * is `false` (the session is kept for this long instead of being deleted immediately * on handover close). Defaults to `120`. */ sessionTTLOnHandoverClose?: number; } export interface IGenesysCloudHandoverSettings { host: string; organizationId: string; deploymentId: string; queue: string; queueId: string; sessionDuration: number; sendProfile: boolean; /** * The connection id of the Genesys Cloud connection to retrieve clientId and clientSecret from * * @deprecated It will be removed in the future, used if genesysCloudConnection is not set */ oAuth2Connection?: string; /** * The connection id of the Genesys Cloud connection to retrieve clientId and clientSecret from */ genesysCloudConnection: string; /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface IGenesysCloudOMHandoverSettings { host: string; deploymentName: string; queue: string; webhookSecret: string; sendProfile: boolean; clientId?: string; clientSecret?: string; /** * The connection id of the Genesys Cloud OM connection to retrieve clientId and clientSecret from */ genesysCloudOMConnection: string; /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface IHandoverStatusInputObject { status: THandoverStatus; eventType?: "queueUpdate" | "handoverInactivity" | "genericHandoverUpdate" | "handoverAlreadyInProgress"; inactivityCount?: number; error?: { reason: "unsupported" | "error"; message: string; }; data?: any; } /** * Result of the "Handover to DX" node (CGY-34338). The node signals NiCE CXOne DFO to take * the contact over with a human agent, then steps out — there is no agent-reply relay back * through Cognigy, so the conversation simply completes/idles on our side. * * Written to `input.handoverToDx` so a Flow can branch on it. On `success` the node stops * execution and clears the queued successor, so nodes wired after it never run (neither in this * turn nor on a later input); on `error` execution continues to those nodes in the same turn and * the Flow keeps ownership so the designer can react (retry, apologise, fall back to a normal * handover). */ export interface IHandoverToDxResult { status: "success" | "error"; /** The DFO contactNumber the handover was signalled for. */ contactNumber?: string; error?: { reason: "missing_contact_number" | "cxone_client_unavailable" | "handover_signal_failed"; message?: string; }; } export declare type THandoverStatus = "queue" | "active" | "completed" | "cancelled" | "error" | "agentInject" | "handoverAlreadyInProgress" | "genericHandoverUpdate"; export interface IEndpointTranslationSettings { translationEnabled: boolean; flowLanguage: string; inputLanguage: "auto" | string; noTranslateMarker: string; glossaryId?: string; glossaryIdInput?: string; formality?: "default" | "more" | "less" | "prefer_more" | "prefer_less"; padPayloads: boolean; alwaysRemoveNoTranslateMarker: boolean; setInputLanguageOnExecutionCount: number; } export interface ISipConnectivityInfo { realm: string; username: string; password: string; applicationSid: string; wsUri?: string; clientSid: string; } declare const webrtcWidgetThemeTypes: readonly [ "CLEAN_WHITE", "DARK_MODE", "AI_PURPLE" ]; export declare type TWebrtcWidgetTheme = (typeof webrtcWidgetThemeTypes)[number]; export declare type TTranscriptionBackgroundMode = "transparent" | "custom"; export interface IWebrtcTranscriptionConfig { enabled?: boolean; backgroundMode?: TTranscriptionBackgroundMode; backgroundColor?: string; } export declare type TWebrtcWidgetPosition = "centered" | "bottomRight"; export declare type TDemoPageBackgroundMode = "color" | "imageUrl"; export interface IWebrtcDemoPageBackground { mode?: TDemoPageBackgroundMode; color?: string; imageUrl?: string; } export interface IWebrtcDemoPage { background?: IWebrtcDemoPageBackground; position?: TWebrtcWidgetPosition; } export interface IWebrtcWidgetConfig { label: string; active: boolean; theme?: TWebrtcWidgetTheme; avatarLogoUrl?: string; tagline?: string; transcription?: IWebrtcTranscriptionConfig; demoPage?: IWebrtcDemoPage; } /** Whether an endpoint/voice-call targets a Flow or an AI Agent. */ export declare type TEndpointTargetType = "flow" | "agent"; export interface IEndpoint extends IEntityMeta { channel: TChannelType; /** * Stores the 'referenceId' of the flow you want to talk to * when connecting to this endpoint. */ flowId: string; /** * Stores the 'referenceId' of the agent you want to talk to when connecting to this endpoint. */ agentId?: string; /** * Determines whether this endpoint targets a flow or an AI agent. */ targetType?: TEndpointTargetType; /** * The ID of the Snapshot or Project to target */ entrypoint: TMongoId; /** * The custom icon for the endpoint. */ customIcon: string; /** The URL Token we publish on the endpoints and use to retrieve the correct endpoint configurations */ URLToken: string; /** The name of the endpoint resource */ name: string; /** Toggle whether the endpoint is active or not */ active: boolean; /** The id of the NLUConnector to use for this endpoint. Can be empty string */ nluConnectorId: string; /** The referenceId of the locale set to use for this Endpoint. Can be empty string */ localeId: string; /** * Whether to collect conversations history for this endpoint */ useConversations: boolean; /** * Whether to mask sensitive IP address in input object and analytics data for this endpoint */ maskIPAddress: boolean; /** * Whether to mask sensitive data in analytics for this endpoint */ maskAnalytics: boolean; /** * Whether to mask sensitive data in logs for this endpoint */ maskLogging: boolean; /** Whether to use contact profiles for this endpoint */ useContactProfiles: boolean; /** Whether we should store analytics for this endpoint */ useAnalytics: boolean; /** Whether we should store data payloads into analytics for this endpoint */ storeDataPayload: boolean; /** Whether we should use Dashbot to collect analytics */ useDashbotAnalytics: boolean; /** The apikey for the dashbot bot */ dashbotApikey: string; /** * The selected platform of the Dashbot * bot to collect analytics for. * Only matters if the useDashbotAnalytics * is true. */ dashbotPlatform: TDashbotPlatform; /** * If set to `true`, disables input sanitization */ disableInputSanitization: boolean; /** * If set to `true`, disables skipping of html tags with uri prop */ disableSkipUriTags: boolean; /** * Optional endpoint specific settings e.g. Facebook Page token */ settings: AnyEndpointSettings; transformer: ITransformerFunction; handoverSettings: IHandoverSettings; translationSettings: IEndpointTranslationSettings; /** * Optional identifier which can be used to create a corelation between * this endpoint and an object in a third-party system. We e.g. use it for * the Workplace by Facebook endpoint in order to store the 'communityId' * of the Facebook community which is using the endpoint. */ foreignId: string; projectReference: TMongoId; organisationReference: TMongoId; /** Whether to override the connections in the Snapshot * with those of the Agent */ overrideSnapshotConnections: boolean; fileStorageSettings: IFileStorageSettings; /** Whether to use the webrtc application exists for this endpoint */ webrtcClient?: boolean; sipConnectivityInfo?: ISipConnectivityInfo; /** The label of the webrtc widget */ webrtcWidgetConfig?: IWebrtcWidgetConfig; /** * Whether to enable mocking code for the node execution */ enableMocking?: boolean; /** Set only on Interaction Panel test-call endpoints; not settable via the API. */ ephemeralExpiresAt?: Date; } export interface IGraphEndpoint { type: "endpoint"; _id: TMongoId; name: string; properties: Pick; dependencies?: IGraphEndpointDependency[]; } export interface IGraphEndpointDependency { _id: string; type: "endpointFlow" | "endpointNluConnector" | "endpointConnection" | "endpointVgSpeechCredential" | "endpointVgRecordingBucket"; } export interface ISystemSlots { DATE: IDateSlot[] | null; NUMBER: INumberSlot[] | null; DURATION: IDurationSlot[] | null; TEMPERATURE: ITemperatureSlot[] | null; AGE: IAgeSlot[] | null; PERCENTAGE: IPercentageSlot[] | null; EMAIL: IEmailSlot[] | null; URL: IUrlSlot[] | null; MONEY: IMoneySlot[] | null; DISTANCE: IDistanceSlot[] | null; } export interface IBaseSlot { text: string; data: any; offset: { start: number; end: number; }; } export interface IPercentageSlot extends IBaseSlot { data: { value: number; }; } export interface IAgeSlot extends IBaseSlot { data: { value: number; unit: TTimeGrain; }; } export interface INumberSlot extends IBaseSlot { data: { value: number; }; } export interface IEmailSlot extends IBaseSlot { data: { value: string; }; } export declare type ITemperatureUnit = "celsius" | "fahrenheit" | "degree" | "kelvin"; export interface ITemperatureSlot extends IBaseSlot { data: { value: number; unit: ITemperatureUnit; }; } export declare type TTimeGrain = "second" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"; export interface IDateObject { day: number; hour: number; minute: number; month: number; second: number; milliseconds: number; weekday: number; dayOfWeek: string; year: number; ISODate: string; grain: TTimeGrain | null; plain: string; timezoneOffset?: string; } export interface IDateSlot extends IBaseSlot { data: { start?: IDateObject; end?: IDateObject; }; } export interface IDurationSlot extends IBaseSlot { data: { unit?: TTimeGrain; value?: number; inSeconds?: number; years?: number; quarters?: number; months?: number; weeks?: number; days?: number; hours?: number; minutes?: number; seconds?: number; }; } export interface IMoneySlot extends IBaseSlot { data: { value: number; unit: string; }; } export interface IUrlSlot extends IBaseSlot { data: { domain: string; value: string; }; } export interface IDistanceSlot extends IBaseSlot { data: { unit: string; value: number; }; } declare const arrayTDebugEventTypes: readonly [ "inputChanged", "contextChanged", "profileChanged", "activeEntrypointsChanged", "nodeExecuted", "nodeError", "finalPing", "input", "output", "switchedFlow", "nluWarning", "debugMessage", "debugError", "goalCompleted", "streamingChunk", "streamingChunkReset", "agentToolCall", "agentToolResult", "agentSkillLoaded", "agentLlmCall", "runtimeHandoff", "flowLlmGatewayCall" ]; export declare type TDebugEventType = typeof arrayTDebugEventTypes[number]; export interface IErrorEventPayload extends ILoggerStack { message: string; flowId: string; nodeId?: string; } export interface IFinalPingEventPayload { type: "regular" | "preventFinalPingToEndpoint" | "cognigyStopFlow" | "error"; analyticsData?: IAnalyticsSourceData; error?: IErrorEventPayload; sessionId?: string; agentReferenceId?: string; timestamp?: number; /** Server-side turn duration (ms) set by service-endpoint on the Agent v2 path. */ durationMs?: number; /** * True when the turn ended with a Question / Optional Question node still waiting for the * user's answer. Consumed by the A2A server endpoint to report `input-required`. */ waitingForInput?: boolean; /** * True when the turn ended with nodes left to execute, so the next input resumes the Flow * instead of starting it at its Start node: a Question, a Wait for Input node or a Go To with * "wait for input". False when the Flow ran to its end. Consumed by the webchat3 User * Inactivity "Execute Flow" action to tell when the executed Flow has ended. */ flowInProgress?: boolean; } export interface IGenericIntentFeedbackFinding { type: IGenericIntentFeedbackFindingType; } export interface IOverlapIntentFeedbackFinding { type: IOverlapIntentFeedbackFindingType; overlappingIntentReferenceId: string; overlappingIntentName: string; overlappingIntentId: TMongoId; overlappingFlowName: string; overlappingFlowId: TMongoId; } export interface ILowDataIntentFeedbackFinding { type: "lowDataIntents"; intents: { intentReferenceId: string; intentName: string; intentId: string; flowId: string; flowName: string; }[]; } declare const overlapIntentFeedbackFindingArrayType: readonly [ "strongOverlap", "someOverlap" ]; export declare type IOverlapIntentFeedbackFindingType = typeof overlapIntentFeedbackFindingArrayType[number]; declare const genericIntentFeedbackFindingArrayType: readonly [ "poorFScore", "fairFScore", "goodFScore", "fewSentences", "unclearIntent", "noSiblings" ]; export declare type IGenericIntentFeedbackFindingType = typeof genericIntentFeedbackFindingArrayType[number]; export declare type IntentFeedbackFinding = IGenericIntentFeedbackFinding | IOverlapIntentFeedbackFinding | ILowDataIntentFeedbackFinding; export interface IIntentFeedbackInDBReport { findings: IntentFeedbackFinding[]; info: { fScore: number; }; } declare const biasTowardsParentOrChildIntentsTypes: readonly [ "parents", "children" ]; export declare type TBiasTowardsParentOrChildIntentsTypes = typeof biasTowardsParentOrChildIntentsTypes[number]; declare const intentTypes: readonly [ "yesNoIntent", "default" ]; export declare type TIntentTypes = typeof intentTypes[number]; export interface ILocalizedIntentData { rules: string[]; condition: string; confirmationSentences: string[]; disambiguationSentence: string; localeReference: TMongoId; } export interface IIntentInDB extends Omit { localizedData: ILocalizedIntentData[]; /** * A list of all of the locales * that are not disabled. Used to return * the correct isDisabled value for the * given locale */ enabledLocaleReferences: TMongoId[]; } export interface IIntent extends IEntityMeta, ILocalizedIntentData { name: string; description?: string; referenceId: string; isRejectIntent: boolean; isDisabled: boolean; tags: string[]; data: any; nodeReferenceId: string; childFeatures?: boolean | string[]; biasTowardsParentOrChildIntents: TBiasTowardsParentOrChildIntentsTypes; parentIntentId?: string; feedbackReport: IIntentFeedbackInDBReport; intentRelationReferences: TMongoId[]; flowReference?: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; flowReferenceId?: string; /** * A label we use in analytics * to track when an intent was triggered */ analyticsLabel?: string; /** * Enable the usage of default replies as example sentences */ overrideIntentDefaultRepliesAsExamples?: string; intentType: TIntentTypes; } export interface IYesNoData { _id: string; rules: string[]; name: string; isDisabled: boolean; } export interface IYesNoItem { yesIntent: IYesNoData | IIntentInDB; noIntent: IYesNoData | IIntentInDB; rejectIntent: IYesNoData | IIntentInDB; } declare const generativeAIModels: readonly [ "gpt-3.5-turbo", "gpt-3.5-turbo-instruct", "gpt-4", "gpt-4o", "gpt-4o-mini", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-5", "gpt-5-nano", "gpt-5-mini", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5-chat-latest", "gpt-5.1", "gpt-5.2", "gpt-5.4", "gpt-5.5", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-live-1", "gpt-6-sol", "gpt-6-luna", "gpt-6.1-sol", "luminous-extended-control", "claude-v1-100k", "claude-instant-v1", "claude-3-opus-20240229", "claude-3-haiku-20240307", "claude-3-sonnet-20240229", "claude-3-5-sonnet-20241022", "claude-3-7-sonnet-20250219", "claude-3-5-sonnet-latest", "claude-3-7-sonnet-latest", "claude-opus-4-0", "claude-sonnet-4-0", "claude-opus-4-6", "claude-sonnet-4-5", "claude-sonnet-4-6", "claude-haiku-4-5", "claude-sonnet-5", "claude-opus-4-7", "claude-opus-4-8", "claude-opus-5", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "text-bison@001", "custom-model", "custom-embedding-model", "gemini-1.0-pro", "gemini-1.5-pro", "gemini-1.5-flash", "gemini-2.0-flash", "gemini-2.0-flash-lite", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.5-flash", "gemini-3.6-flash", "gemini-3.7-flash", "gemini-3.8-flash", "gemini-3.1-flash-lite-preview", "gemini-3.1-flash-lite", "gemini-3.5-flash-lite", "amazon.nova-lite-v1:0", "amazon.nova-pro-v1:0", "amazon.nova-micro-v1:0", "amazon.nova-premier-v1:0", "amazon.nova-2-lite-v1:0", "anthropic.claude-3-5-sonnet-20240620-v1:0", "mistral-large-2411", "mistral-small-2503", "pixtral-large-2411", "pixtral-12b-2409", "mistral-large-latest", "pixtral-large-latest", "mistral-medium-latest", "mistral-small-latest", "ministral-14b-latest", "ministral-8b-latest", "ministral-3b-latest", "text-davinci-003", "text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002", "luminous-embedding-128", "amazon.titan-embed-text-v2:0", "Pharia-1-Embedding-4608", "gemini-embedding-001", "gemini-embedding-2" ]; /** * @openapi * * components: * schemas: * TGenerativeAIModels: * type: string * enum: * - gpt-3.5-turbo * - gpt-3.5-turbo-instruct * - gpt-4 * - gpt-4o * - gpt-4o-mini * - gpt-4.1 * - gpt-4.1-mini * - gpt-4.1-nano * - gpt-5 * - gpt-5-nano * - gpt-5-mini * - gpt-5.4-mini * - gpt-5.4-nano * - gpt-5.1 * - gpt-5.2 * - gpt-5.4 * - gpt-5.5 * - gpt-5.6-sol * - gpt-5.6-terra * - gpt-5.6-luna * - gpt-6-sol * - gpt-6-luna * - gpt-6.1-sol * - text-embedding-ada-002 * - luminous-extended-control * - luminous-embedding-128 * - Pharia-1-Embedding-4608 * - gemini-embedding-001 * - gemini-embedding-2 * - claude-3-opus-20240229 * - claude-sonnet-4-6 * - claude-sonnet-5 * - claude-opus-4-7 * - claude-opus-4-8 * - claude-opus-5 * - claude-opus-5-5 * - claude-sonnet-5-5 * - claude-haiku-5-5 * - custom-model * - custom-embedding-model * - gemini-2.5-pro * - gemini-2.5-flash * - gemini-2.5-flash-lite * - gemini-3.1-pro-preview * - gemini-3-flash-preview * - gemini-3.5-flash * - gemini-3.6-flash * - gemini-3.7-flash * - gemini-3.8-flash * - gemini-3.1-flash-lite-preview * - gemini-3.1-flash-lite * - gemini-3.5-flash-lite * - mistral-large-2411 * - mistral-small-2503 * - pixtral-large-2411 * - pixtral-12b-2409 */ export declare type TGenerativeAIModels = (typeof generativeAIModels)[number]; declare const generativeAIProviders: readonly [ "azureOpenAI", "openAI", "openAICompatible", "alephAlpha", "anthropic", "googleVertexAI", "googleGemini", "googleGenAI", "awsBedrock", "mistral" ]; /** * @openapi * * components: * schemas: * TGenerativeAIProviders: * type: string * enum: * - azureOpenAI * - openAI * - anthropic * - googleVertexAI * - googleGemini * - googleGenAI * - alephAlpha * - awsBedrock * - mistral */ export declare type TGenerativeAIProviders = (typeof generativeAIProviders)[number]; declare const generativeAIUseCases: readonly [ "nlu", "knowledgeSearch", "aiAgent", "gptPromptNode", "aiEnhancedOutputs", "sentimentAnalysis", "designTimeGeneration", "intentSentenceGeneration", "flowGeneration", "generateNodeOutput", "lexiconGeneration", "answerExtraction", "gptConversation", "conversationAnalyzer", "simulator", "voiceToVoice", "askAi" ]; export declare type TGenerativeAIUseCases = typeof generativeAIUseCases[number]; declare const modeType: readonly [ "chat", "completion", "embedding", "voiceToVoice" ]; export declare type TModeType = typeof modeType[number]; declare const apiTypes: readonly [ "chatCompletion", "responses" ]; export declare type TApiType = typeof apiTypes[number]; export declare type TBASIC_EXTENSION = "@cognigy/basic-nodes"; export declare type TMONGO_DB_EXTENSION = "@cognigy/mongodb"; export declare type TSQL_EXTENSION = "@cognigy/mssql"; export declare type TSMTP_EXTENSION = "@cognigy/smtp"; export declare type TVOICE_GATEWAY_EXTENSION = "@cognigy/voicegateway"; export declare type TMICROSOFT_EXTENSION = "@cognigy/microsoft"; export declare type TVOICE_GATEWAY_2_EXTENSION = "@cognigy/voicegateway2"; declare const CXONE_EXTENSION = "@cognigy/cxone"; export declare type TCXONE_EXTENSION = "@cognigy/cxone"; export interface IGenerativeAIUseCaseSettings { largeLanguageModelId: string | null; temperature: number; } declare const audioPreviewProviders: readonly [ "microsoft", "google", "aws", "deepgram", "elevenlabs", "speechmatics", "ibm", "openai", "wellsaid", "whisper", "deepgramflux", "soniox", "verbio" ]; export declare type TAudioPreviewProvider = typeof audioPreviewProviders[number]; export declare type TProactiveProvisioningState = "pending" | "complete" | "error" | "failed"; export interface IProactiveProjectSettings { journeyId?: number; journeyName?: string; journeyStatus?: string; flowId?: string; flowReferenceId?: string; endpointId?: string; contactAction: { id: number; name: string; } | null; integrationPoint: { id: number; name: string; } | null; provisioningState: TProactiveProvisioningState; taskId?: string; } /** * @openapi * components: * schemas: * IGenerativeAIUseCase: * type: object * properties: * useCase: * enum: * - designTimeGeneration * - intentSentenceGeneration * - aiEnhancedOutputs * - lexiconGeneration * - flowGeneration * - gptConversation * - gptPromptNode * - generateNodeOutput * - knowledgeSearch * - sentimentAnalysis */ export interface IGenerativeAIUseCase { useCase: TGenerativeAIUseCases; } export declare const nluLanguages: readonly [ "ar-AE", "bn-IN", "da-DK", "en-AU", "en-CA", "en-GB", "en-IN", "en-US", "es-ES", "fi-FI", "fr-FR", "de-DE", "hi-IN", "it-IT", "ja-JP", "ko-KR", "nn-NO", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ru-RU", "sv-SE", "ta-IN", "th-TH", "tr-TR", "vi-VN", "zh-CN", "ge-GE" ]; export declare type TNluLanguage = typeof nluLanguages[number]; export interface INluEmbeddingCredentials { apiType: TGenerativeAIProviders; apiKey: string; apiModel: TGenerativeAIModels; apiCustomBaseUrl?: string; apiResourceName?: string; apiDeploymentName?: string; apiVersion?: string; } export interface ISetAppStateOverlaySettings { autoOpen: boolean; closeOnSubmit: boolean; feedbackMessage: string; screenTitle: string; sendEventOnCloseIconClick: boolean; showCloseIcon: boolean; } export interface ISetAppStateOverlaySettingsMetaData { overlaySettings: ISetAppStateOverlaySettings; endpointType: TEndpointType; url: string; URLToken: string; } export interface IVoiceGateway2VadParams { enable?: boolean; voiceMs?: number; mode?: number; } export interface IVoiceGateway2SynthesizerParams { vendor?: string; language?: string; voice?: string; label?: string; fallbackVendor?: string; fallbackLabel?: string; fallbackLanguage?: string; fallbackVoice?: string; engine?: "standard" | "neural" | "generative"; gender?: "MALE" | "FEMALE" | "NEUTRAL"; azureServiceEndpoint?: string; options?: object; disableCache?: boolean; model?: string; } export interface IVoiceGateway2RecognizerParams { vendor?: string; language?: string; label?: string; fallbackVendor?: string; fallbackLabel?: string; fallbackLanguage?: string; vad?: IVoiceGateway2VadParams; hints?: string[]; hintsBoost?: number; altLanguages?: string[]; profanityFilter?: boolean; interim?: boolean; singleUtterance?: boolean; dualChannel?: boolean; separateRecognitionPerChannel?: boolean; punctuation?: boolean; enhancedModel?: boolean; words?: boolean; diarization?: boolean; diarizationMinSpeakers?: number; diarizationMaxSpeakers?: number; interactionType?: "unspecified" | "discussion" | "presentation" | "phone_call" | "voicemail" | "voice_search" | "voice_command" | "dictation"; naicsCod?: number; identifyChannels?: boolean; vocabularyName?: string; vocabularyFilterName?: string; filterMethod?: "remove" | "mask" | "tag"; outputFormat?: "simple" | "detailed"; profanityOption?: "masked" | "removed" | "raw"; requestSnr?: boolean; initialSpeechTimeoutMs?: number; azureSttEndpointId?: string; audioLogging?: boolean; asrDtmfTerminationDigit?: string; asrTimeout?: number; deepgramOptions?: TVoiceGateway2DeepgramOptions; deepgramfluxOptions?: TVoiceGateway2DeepgramfluxOptions; ibmOptions?: TVoiceGateway2IbmOptions; nvidiaOptions?: TVoiceGateway2NvidiaOptions; sonioxOptions?: TVoiceGateway2SonioxOptions; speechmaticsOptions?: TVoiceGateway2SpeechmaticsOptions; openaiOptions?: TVoiceGateway2OpenaiOptions; niceOptions?: TVoiceGateway2NiceOptions; model?: string; } export declare type TVoiceGateway2DeepgramOptions = { deepgramSttUri?: string; deepgramSttUseTls?: boolean; apiKey?: string; tier?: string; model?: string; customModel?: string; version?: string; punctuate?: boolean; smartFormatting?: boolean; profanityFilter?: boolean; redact?: string; diarize?: boolean; diarizeVersion?: string; ner?: boolean; multichannel?: boolean; alternatives?: number; numerals?: boolean; search?: string[]; replace?: string[]; keywords?: string[]; endpointing?: number | boolean; utteranceEndMs?: number; shortUtterance?: boolean; vadTurnoff?: number; tag?: string; }; export declare type TVoiceGateway2DeepgramfluxOptions = { apiKey?: string; keywords?: string[]; endpointing?: number | boolean; endOfTurnThreshold?: number; endOfTurnTimeoutMs?: number; }; export declare type TVoiceGateway2SpeechmaticsOptions = { transcription_config?: { language?: string; additional_vocab?: string[]; diarization?: string; speaker_diarization_config?: { speaker_sensitivity?: number; max_speakers?: number; }; enable_partials?: boolean; max_delay?: number; max_delay_mode?: "fixed" | "flexible"; output_locale?: string; punctuation_overrides?: { permitted_marks?: string[]; sensitivity?: number; }; operating_point?: string; enable_entities?: boolean; audio_filtering_config?: { volume_threshold: number; }; transcript_filtering_config?: { remove_disfluencies: boolean; }; }; translation_config?: { target_languages: string[]; enable_partials?: boolean; }; audio_events_config?: { types?: string[]; }; endpointing?: number; }; export declare type TVoiceGateway2OpenaiOptions = { model?: string; apiKey?: string; endpointing?: number; }; export declare type TVoiceGateway2NiceOptions = { endpointing?: number; }; export declare type TVoiceGateway2NvidiaOptions = { rivaUri?: string; maxAlternatives?: number; profanityFilter?: boolean; punctuation?: boolean; wordTimeOffsets?: boolean; verbatimTranscripts?: boolean; customConfiguration?: object; }; export declare type TVoiceGateway2SonioxOptions = { id?: string; title?: string; disableStoreAudio?: boolean; disableStoreTranscript?: boolean; disableSearch?: boolean; metadata?: object; storage?: object; }; export declare type TVoiceGateway2IbmOptions = { sttApiKey?: string; sttRegion?: string; ttsApiKey?: string; ttsRegion?: string; instanceId?: string; model?: string; languageCustomizationId?: string; acousticCustomizationId?: string; baseModelVersion?: string; watsonMetadata?: string; watsonLearningOptOut?: boolean; }; export declare type TVoiceGateway2InputType = "digits" | "speech"; export declare type TVoiceGateway2UserNoInputMode = "event" | "speech" | "play"; export declare type TVoiceGateway2FlowNoInputMode = "speech" | "play"; export interface IVoiceGateway2BargeInParams { enable?: boolean; sticky?: boolean; dtmfBargein?: boolean; actionHook?: object | string; input?: TVoiceGateway2InputType[]; finishOnKey?: string; numDigits?: number; minDigits?: number; maxDigits?: number; interDigitTimeout?: number; minBargeinWordCount?: number; } export interface IVoiceGateway2ActivityParams { synthesizer?: IVoiceGateway2SynthesizerParams; recognizer?: IVoiceGateway2RecognizerParams; bargeIn?: IVoiceGateway2BargeInParams; user?: IVoiceGateway2CognigyUserInputConfigParams; dtmf?: boolean; sessionParams?: IVoiceGateway2ActivityParams; fillerNoise?: IVoiceGateway2FillerNoiseParams; flow?: IVoiceGateway2CognigyFlowInputConfigParams; } export interface IVoiceGateway2FillerNoiseParams { enable: boolean; url?: string; startDelaySecs?: number; } export declare type TVoiceGateway2DubActionType = "addTrack" | "removeTrack" | "silenceTrack" | "playOnTrack" | "sayOnTrack"; export declare type TVoiceGateway2MediaPath = "fullMedia" | "partialMedia" | "noMedia"; export interface IVoiceGateway2CognigyUserInputConfigParams { noInputMode?: TVoiceGateway2UserNoInputMode; noInputTimeout?: number; noInputRetries?: number; noInputSpeech?: string; noInputUrl?: string; userNoInputAutoHangup?: boolean; } export interface IVoiceGateway2CognigyFlowInputConfigParams { flowNoInputEnable?: boolean; flowNoInputMode?: TVoiceGateway2FlowNoInputMode; flowNoInputTimeout?: number; flowNoInputRetries?: number; flowNoInputSpeech?: string; flowNoInputUrl?: string; flowNoInputFail?: boolean; } export interface IGetNluPipelineParams { parseIntents?: boolean; parseSlots?: boolean; parseSystemSlots?: boolean; findType?: boolean; } /** * The supported endpoint channels * * @openapi * * components: * schemas: * TChannelType: * type: string * example: webchat3 * enum: * - facebook * - alexa * - slack * - generic * - inject * - rest * - realtime * - socket * - adminconsole * - webchat2 * - dialogflow * - twilio * - twilio-sms * - line * - intercom * - microsoftBotFramework * - microsoftTeams * - sunshineConversations * - admin-webchat * - avaya * - nonConversational * - voiceGateway2 * - amazonLex * - workplace * - webhook * - abstractRest * - userlike * - ringCentralEngage * - audioCodes * - bandwidth * - whatsapp * - eightByEight * - genesysBotConnector * - niceCXOne * - agentAssistVoice * - webchat3 * - niceCXOneAAH * - zoomContactCenter * - mcpServer * - niceCXOneWebhook */ export declare type TChannelType = TWebhookChannelType | TRestChannelType | TSocketChannelType | "inject" | "abstract-rest" | "adminconsole" | "voiceGateway2"; declare const endpointTypes: readonly [ "facebook", "workplace", "alexa", "slack", "webhook", "rest", "abstractRest", "socket", "adminconsole", "webchat2", "dialogflow", "twilio", "twilioSms", "line", "intercom", "microsoftBotFramework", "microsoftTeams", "sunshineConversations", "userlike", "ringCentralEngage", "audioCodes", "avaya", "nonConversational", "voiceGateway2", "whatsapp", "amazonLex", "eightByEight", "bandwidth", "genesysBotConnector", "niceCXOne", "niceCXOneAAH", "agentAssistVoice", "webchat3", "zoomContactCenter", "mcpServer", "a2aServer", "cxoneDx", "niceCXOneWebhook" ]; export declare type TEndpointType = typeof endpointTypes[number]; declare const transferTypes: readonly [ "dial", "sip:refer" ]; export declare type TTransferType = typeof transferTypes[number]; export interface IWebchatPersistentMenu { /** * The title of the persistent menu */ title: string; /** * The menu items for the persistent menu. * The webchat currently only supports * one "layer" of menu items. */ menuItems: { /** * The title of the menu item */ title: string; /** * The payload to send to AI * when clicking the menu item */ payload: string; }[]; } export interface ICallEventSettings { enabled: boolean; action: "inject" | "executeFlow" | "transfer" | "none"; flowId: string; entrypoint?: string; injectText?: string; injectData?: string; failover?: ICallEventFailoverSettings; } export interface ICallEventFailoverSettings { enabled?: boolean; enabledForSpeech?: boolean; type?: TTransferType; headers?: string; to?: string; reason?: string; dialCallerId?: string; dialMusic?: string; dialTimeout?: number; enableTimeLimit?: boolean; timeLimit?: number; dialTranscribeEnabled?: boolean; dialTranscribeVendor?: string; dialTranscribeLanguage?: string; dialTranscribeWebhook?: string; dialTranscribeRecognitionChannel?: number; dialTranscribeRecognitionGoogleModel?: string; dialTranscribeRecognitionGoogleCustomModel?: string; dialTranscribeLabel?: string; dialTranscribeDeepgramModel?: string; referredBy?: string; deepgramSmartFormatting?: boolean; deepgramEndpointing?: boolean; deepgramEndpointingValue?: number; dialTranscribeDeepgramTier?: string; deepgramfluxEndpointing?: boolean; deepgramfluxEndOfTurnThreshold?: number; deepgramfluxEndOfTurnTimeoutMs?: number; niceEndpointing?: boolean; niceEndpointingValue?: number; mediaPath?: TVoiceGateway2MediaPath; anchorMedia?: boolean; } export interface ICallEvents { amd?: ICallEventSettings; callCreated?: ICallEventSettings; callCompleted?: ICallEventSettings; callFailed?: ICallEventSettings; callInProgress?: ICallEventSettings; callReconnected?: ICallEventSettings; userInputTimeout?: ICallEventSettings; recognizedSpeech?: ICallEventSettings; recognizedDtmf?: ICallEventSettings; transferReferSuccess?: ICallEventSettings; transferReferError?: ICallEventSettings; transferDialSuccess?: ICallEventSettings; transferDialError?: ICallEventSettings; userBusy?: ICallEventSettings; noAnswer?: ICallEventSettings; } export interface IVGProsodySettings { outputSpeed?: number; outputPitch?: number; outputVolume?: number; } export interface IVGGenericSettings { prosodySettings?: IVGProsodySettings; enableVad?: boolean; showBestTranscriptOnly?: boolean; enableCallInProgress?: boolean; } export interface IVoiceGatewayEndpointSettings extends IEndpointSessionSettings { callEvents: ICallEvents; failover?: ICallEventFailoverSettings; genericSettings?: IVGGenericSettings; isFeatureAccmEnabled?: boolean; /** * Control the privacy notice of the Webrtc Widget */ privacyNotice: Omit & { cancelButtonText: string; }; } export declare type AnyEndpointSettings = IFacebookEndpointSettings | IWorkplaceEndpointSettings | ISlackEndpointSettings | IGenericEndpointSettings | IAlexaEndpointSettings | IWebchat2EndpointSettings | IWebchat3EndpointSettings | ILineEndpointSettings | ITwilioEndpointSettings | ITwilioSmsEndpointSettings | IIntercomEndpointSettings | IRealtimeEndpointSettings | ISunshineConversationsEndpointSettings | IAvayaEndpointSettings | IUserlikeEndpointSettings | IBandwidthEndpointSettings | IAudioCodesEndpointSettings | IWhatsAppEndpointSettings | IAmazonLexEndpointSettings | IEightByEightEndpointSettings | IMicrosoftBotFrameworkEndpointSettings | IVoiceGatewayEndpointSettings | IGenesysBotConnectorEndpointSettings | INiceCXOneEndpointSettings | INiceCXOneAAHEndpointSettings | INiceCXOneWebhookEndpointSettings | ICxoneDxEndpointSettings | IAgentAssistVoiceEndpointSettings | IZoomContactCenterEndpointSettings | IMcpServerEndpointSettings | IRestEndpointSettings | IA2AServerEndpointSettings | {}; export declare type TAvayaVoice = "man" | "woman" | string; declare const avayaSttTtsLanguages: readonly [ "cy-GB", "da-DK", "de-DE", "en-AU", "en-GB", "en-GB-WLS", "en-IN", "en-US", "es-ES", "es-US", "fr-CA", "fr-FR", "is-IS", "it-IT", "ja-JP", "nb-NO", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sv-SE", "tr-TR" ]; export declare type TAvayaSttTtsLanguages = typeof avayaSttTtsLanguages[number]; declare const avayaGatherLanguages: readonly [ "af-ZA", "am-ET", "hy-AM", "az-AZ", "id-ID", "ms-MY", "bn-BD", "bn-IN", "ca-ES", "cs-CZ", "da-DK", "de-DE", "en-AU", "en-CA", "en-GH", "en-GB", "en-IN", "en-IE", "en-KE", "en-NZ", "en-NG", "en-PH", "en-ZA", "en-TZ", "en-US", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-EC", "es-SV", "es-ES", "es-US", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PY", "es-PE", "es-PR", "es-DO", "es-UY", "es-VE", "eu-ES", "il-PH", "fr-CA", "fr-FR", "gl-ES", "ka-GE", "gu-IN", "hr-HR", "zu-ZA", "is-IS", "it-IT", "jv-ID", "kn-IN", "km-KH", "lo-LA", "lv-LV", "lt-LT", "hu-HU", "ml-IN", "mr-IN", "nl-NL", "ne-NP", "nb-NO", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "si-LK", "sk-SK", "sl-SI", "su-ID", "sw-TZ", "sw-KE", "fi-FI", "sv-SE", "ta-IN", "ta-SG", "ta-LK", "ta-MY", "te-IN", "vi-VN", "tr-TR", "ur-PK", "ur-IN", "el-GR", "bg-BG", "ru-RU", "sr-RS", "uk-UA", "he-IL", "ar-IL", "ar-JO", "ar-AE", "ar-BH", "ar-DZ", "ar-SA", "ar-IQ", "ar-KW", "ar-MA", "ar-TN", "ar-OM", "ar-PS", "ar-QA", "ar-LB", "ar-EG", "fa-IR", "hi-IN", "th-TH", "ko-KR", "cmn-Hant-TW", "yue-Hant-HK", "ja-JP", "cmn-Hans-HK", "cmn-Hans-CN" ]; export declare type TAvayaGatherLanguages = typeof avayaGatherLanguages[number]; declare const dashbotPlatform: readonly [ "facebook", "whatsapp", "alexa", "google", "slack", "microsoftBotFramework", "webchat", "universal", "eightByEight" ]; export declare type TDashbotPlatform = typeof dashbotPlatform[number]; export interface IFacebookEndpointSettings extends IEndpointSessionSettings { facebookPageToken: string; /** The id of the Facebook app */ appId: string; /** The secret which we use to validate that the request was from facebook */ appSecret: string; updateContactProfileWithFacebookProfile: boolean; /** * Whether we should merge all known PSIDs of a Facebook user into one profile. * This requires that a Business owns the Facebook page. **/ mergeContactProfiles: boolean; requestFacebookProfileData: boolean; /** * Whether to enable typing indicators * when the bot is replying */ enableTypingIndicator: boolean; /** * The amount of delay there should be between * messages. Used to make the conversation seem * more human */ messageDelay: number; } export interface IWorkplaceEndpointSettings extends IEndpointSessionSettings { enableTypingIndicator: boolean; mergeContactProfiles: boolean; messageDelay: number; requestWorkplaceProfileData: boolean; workplaceToken: string; updateContactProfileWithWorkplaceProfile: boolean; } export interface ILineEndpointSettings extends IEndpointSessionSettings { lineChannelAccessToken: string; lineChannelSecret: string; } export interface ISlackEndpointSettings extends IEndpointSessionSettings { slackVerifyToken: string; slackOAuthAccessToken: string; } export interface ITwilioSmsEndpointSettings extends IEndpointSessionSettings { } export interface IEndpointSessionSettings { /** * The amount time the user has * to be inactive before the session * is expired. Measured in minutes. * * If the expiration is set to 0, then the * session never expires. */ sessionExpiration: number; } export interface IGenericEndpointSettings { basicAuthUser: string; /** Basic auth password used by the generic webhook to authenticate our request */ basicAuthPassword: string; webhookUrl: string; /** * Authentication enforced on inbound webhook requests. When * `authenticationType` is `'apiKey'`, requests must carry a valid * `x-cognigy-endpoint-key` header that matches one of the keys generated via the * `/v2.0/endpoints/:endpointId/apikeys` routes. Default `'no-auth'` * preserves backward compatibility for existing endpoints. * * Nested object (rather than a flat field) mirrors the shape used by * `IMcpServerEndpointSettings.mcpServerEndpointAuthentication`, so a * single mental model covers inbound auth across both endpoint types. */ webhookEndpointAuthentication?: IWebhookEndpointAuthentication; } export interface IWebhookEndpointAuthentication { authenticationType: "no-auth" | "apiKey"; } export interface IRestEndpointAuthentication { authenticationType: "no-auth" | "apiKey"; } export interface IRestEndpointSettings { /** * Authentication enforced on inbound REST endpoint requests. When * `authenticationType` is `'apiKey'`, requests must carry a valid * `x-cognigy-endpoint-key` header matching a key from * `/v2.0/endpoints/:endpointId/apikeys`. Default `'no-auth'` preserves * backward compatibility for existing REST endpoints. */ restEndpointAuthentication?: IRestEndpointAuthentication; } export interface IAgentAssistVoiceEndpointSettings { } export interface IMcpServerEndpointSettings { /** * The target flow and node (aiAgentJob or llmPromptV2) * to expose tools from */ flowNode: { flow: string; node: string; }; mcpServerEndpointAuthentication?: IMcpServerEndpointAuthentication; } export interface IA2AServerEndpointAuthentication { authenticationType: "no-auth" | "apiKey"; } export interface IA2AServerEndpointSettings { /** Agent name shown in the Agent Card */ agentName: string; /** Agent description shown in the Agent Card */ agentDescription: string; /** Skills metadata for the Agent Card */ skills: Array<{ id: string; name: string; description: string; }>; /** * Whether this agent advertises and serves `message/stream` (SSE). Undefined/missing is * treated as enabled, so existing endpoints keep streaming without a migration. */ enableStreaming?: boolean; /** * Authentication enforced on inbound A2A endpoint requests (in addition to the URL * token). When `authenticationType` is `'apiKey'`, POST requests must carry a valid * `x-a2a-endpoint-key` header matching a key from `/v2.0/endpoints/:endpointId/apikeys`. * Default `'no-auth'` preserves backward compatibility for existing A2A endpoints. * `GET .well-known/agent-card.json` discovery is never gated by this setting. */ a2aServerEndpointAuthentication?: IA2AServerEndpointAuthentication; } export interface ISunshineConversationsEndpointSettings extends IEndpointSessionSettings { sunshineConversationsChannelKeyId: string; sunshineConversationsChannelSecret: string; sunshineConversationsChannelUri: string; sunshineConversationsApiVersion?: "v1.1" | "v2"; } export interface IAlexaEndpointSettings { /** * The skill that a user has assigned * to this endpoint. */ skill: ISkill; /** * Whether to reparse slots * found by Alexa with COGNIGY.AI NLU */ reparseAlexaSlots: boolean; } export declare type TTwilioVoice = "alice" | string; export declare type TTwilioSttTtsLanguages = "da-DK" | "de-DE" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-US" | "ca-ES" | "es-ES" | "es-MX" | "fi-FI" | "fr-CA" | "fr-FR" | "it-IT" | "ja-JP" | "ko-KR" | "nb-NO" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sv-SE"; export interface ITwilioEndpointSettings { voice: TTwilioVoice; /** * STT / TTS language to be used. Since the number of supported * STT and TTS languages differs, this is a subset of the individual * languages. * * Gather languages (STT): * https://www.twilio.com/docs/voice/twiml/gather#languagetags * * TTS languages: * https://www.twilio.com/docs/voice/twiml/say#attributes-language */ language: TTwilioSttTtsLanguages; } export interface IAvayaEndpointSettings { voice: TAvayaVoice; /** * STT / TTS language to be used. Since the number of supported * STT and TTS languages differs, this is a subset of the individual * languages. */ language: TAvayaSttTtsLanguages; cpaasToken: string; input: string; hints: string; gatherLanguage: TAvayaGatherLanguages; action: string; method: string; timeout: number; finishOnKey: string; numDigits: number; } export interface IMicrosoftBotFrameworkEndpointSettings extends IEndpointSessionSettings { accessScope: string; restrictToAAD?: boolean; appId: string; appPassword: string; connectionName: string; tenantId: string; } /** * Settings that are shared by both * Webchat and Webchat2 */ export interface IWebchatEndpointSharedSettings extends ITypingIndicatorSettings { /** * The text to display on * the get started button */ getStartedButtonText: string; /** * The text to display in the chat * when clicking the getStartedButton */ getStartedText: string; /** * The data that will be sent to the chat * when clicking the getStartedButton * or injecting it */ getStartedData?: string; /** * The payload to send * when clicking the getStartedButton */ getStartedPayload: string; /** * The placeholder text * we display in the input field */ inputPlaceholder: string; /** * The URL that links to the logo * we display as the chatbot avatar */ messageLogoUrl: string; /** * The URL that lings to the logo * we display in the header. */ headerLogoUrl: string; /** * The image to display in the * background */ backgroundImageUrl: string; /** * Which design template to use. * * Design template 1 puts the Webchat * in the lower right corner. * * Design template 2 centers the Webchat. */ designTemplate: 1 | 2; /** * The color scheme of the webchat. */ colorScheme: string; /** * Whether the webchat should use * STT. */ enableSTT: boolean; /** * Whether the webchat should use * TTS and thereby display * a record button. */ enableTTS: boolean; /** * Whether we should display * the "fileUpload" button */ enableFileUpload: boolean; /** * Whether to display a persistent * menu in the Webchat. */ enablePersistentMenu: boolean; /** * The persistent menu for the webchat */ persistentMenu: IWebchatPersistentMenu; /** * This setting is used to overwrite all options with a JSON */ customJSON?: string; /** * Whether to overwrite the webchat bundle URL for demo webchat */ shouldOverwriteWebchatBundleUrl: boolean; /** * The overwrite the webchat bundle URL for demo webchat */ overwriteWebchatBundleUrl: string; } export interface IWebchat2EndpointSettings extends IWebchatEndpointSharedSettings { /** * List of plugin urls that should be * loaded for the auto-deployed webchat */ pluginUrls: string[]; /** * The title that will show up on top of * the webchat's Header */ title: string; /** * The start behavior of the * webchat, e.g. whether a start button * should be rendered. */ startBehavior: TWebchat2StartBehavior; /** * If this is true, the webchat will apply * generic styling to HTML message content. * * This is e.g. useful if we are using HTML generated by Markdown. */ enableGenericHTMLStyling: boolean; /** * Setting that decides the display of the rating button in the webchat */ enableRating: TWebchatEnableRating; /** * The title displayed in the rating dialog prompt */ ratingTitleText: string; /** * The text displayed above the comment field in the rating dialog prompt */ ratingCommentText: string; /** * The text displayed in the message history after giving a rating * (text is followed by the icon representing the rating) */ ratingMessageHistoryRatingText: string; /** * The text displayed in the message history after giving a rating, if there was a comment sent * (text is followed by the actual comment) */ ratingMessageHistoryCommentText: string; /** * This setting is used to decide whether to sanitize HTML content in the Webchat or not */ disableHtmlContentSanitization: boolean; /** * This setting is used to decide whether to sanitize JavaScript from URL buttons / Default Actions * in the Webchat or not */ disableUrlButtonSanitization: boolean; /** * This setting is used to decide whether a connectivity indicator should be displayed */ enableConnectionStatusIndicator: boolean; /** * This setting activates the automatic collation of input messages with a delay for the webchat */ enableInputCollation: boolean; /** * This setting configures the delay for the automatic input collation in miliseconds. Defaults to 1000 */ inputCollationTimeout: number; /** * This setting is used to decide whether unread messages should be indicated in the title of a minimized webchat widget */ enableUnreadMessageTitleIndicator: boolean; /** * This setting is used to decide whether engagement messages should be displayed in the chat history */ showEngagementMessagesInChat: boolean; /** * The text that should be sent to engage the customer */ engagementMessageText: string; /** * This setting is used to decide whether a badge with the number of unread messages should be displayed in the minimized webchat widget */ enableUnreadMessageBadge: boolean; /** * This setting is used to decide whether to show a message preview for incoming messages if the webchat widget is minimized */ enableUnreadMessagePreview: boolean; /** * This setting is used to decide whether a sound should be triggered for incoming messages if the webchat widget is minimized */ enableUnreadMessageSound: boolean; /** * This setting is used to decide whether images should be resized dynamically */ dynamicImageAspectRatio: boolean; /** * This setting is used to decide whether the input should be focused right after a postback button is pressed */ focusInputAfterPostback: boolean; /** * If this is "true", the webchat will use a regular one-line text input instead of an automatically growing text field */ disableInputAutogrow: boolean; /** * Defines the number of line rows the text input will grow to before showing a vertical scrollbar */ inputAutogrowMaxRows: number; /** * This setting is used to disable autocomplete for the input as on Samsung smartphones the autosuggestion overlaps the virtual keyboard */ disableInputAutocomplete: boolean; /** * This setting is used to enable or disable the "integrated demo webchat" for this endpoint. If this is "off", the Demo Webchat will not be publically accessible. */ enableDemoWebchat: boolean; /** * This setting is used to enable or disable branding in webchat.If true, hides "Powered by Cognigy" link. */ disableBranding?: boolean; /** * Whether to display the file attachment button */ enableFileAttachment: boolean; /** * The maximum allowed size of the attachment */ fileAttachmentMaxSize: number; /** * Maintenance mode foncifuration for the Webchat Widget */ maintenance: { /** * Whether the Maintenance mode is enabled */ enabled: boolean; /** * The maintenance mode. Possible values are: * "hide" - The chat window will be hidden during maintenance * "disable" - The message bubble will be disabled with a mouse over text during maintenance * "inform" - The Webchat Widget will start normally, but show a maintenance mode message */ mode: string; /** * The text that is displayed in the mouse over text of the bubble or the maintenance mode message */ text: string; /** * The title that is displayed to the user in the information when opening the bot during maintenance */ title: string; }; /** * Office Hours configuration for the Webchat Widget */ businessHours: { /** * Specified hours during which the Webchat Widget should be available */ businessHours: { /** * Start time of the business hours, e.g. 09:00 */ startTime: string; /** * End time of the business hours, e.g. 17:00 */ endTime: string; /** * Week day of the business hours in lower case, e.g. "monday" */ weekDay: string; }[]; /** * Whether the Office Hours are enabled */ enabled: boolean; /** * The business hours mode. Possible values are: * "hide" - The chat window will be hidden out of business hours * "disable" - The message bubble will be disabled with a mouse over text out of business hours * "inform" - The Webchat Widget will start normally, but show an out of business hours message */ mode: string; /** * The text that is displayed in the mouse over text of the bubble or the out of business hours message */ text: string; /** * The timezone that is used to calculate of the user is calling out of business hours */ timeZone: string; /** * The title that is displayed to the user in the information when opening the bot out of business hours */ title: string; }; } export interface IWebchat3EndpointLayoutSettings { /** * The title that will show up on top of * the webchat's Header */ title: string; /** * The URL that links to the logo * we display in the header. */ logoUrl: string; /** * Check for using the logo of the other agent. */ useOtherAgentLogo: boolean; /** * bot avatar name */ botAvatarName: string; /** * The URL that links to the logo * we display as the chatbot avatar */ botLogoUrl: string; /** * Agemt avatar name. */ agentAvatarName: string; /** * The URL that links to the logo * we display as the agent avatar */ agentLogoUrl: string; /** * Defines the number of line rows the text input * will grow to before showing a vertical scrollbar */ inputAutogrowMaxRows: number; /** * This setting activates the automatic collation * of input messages with a delay for the webchat */ enableInputCollation: boolean; /** * Whether to display a persistent * menu in the Webchat. */ enablePersistentMenu: boolean; /** * The persistent menu for the webchat */ persistentMenu: IWebchatPersistentMenu; /** * This setting configures the delay for the automatic * input collation in miliseconds. Defaults to 1000 */ inputCollationTimeout: number; /** * This setting is used to decide whether images * should be resized dynamically */ dynamicImageAspectRatio: boolean; /** * This setting is used to disable autocomplete * for the input as on Samsung smartphones the * autosuggestion overlaps the virtual keyboard */ disableInputAutocomplete: boolean; /** * If this is true, the webchat will apply * generic styling to HTML message content. * This is e.g. useful if we are using HTML generated by Markdown. */ enableGenericHTMLStyling: boolean; /** * This setting is used to decide whether to * sanitize HTML content in the Webchat or not */ disableHtmlContentSanitization: boolean; /** * This setting is used to decide whether to * sanitize JavaScript from URL buttons / * Default Actions in the Webchat or not */ disableUrlButtonSanitization: boolean; /** * Advanced watermark settings for the webchat */ watermark: TWebchat3LayoutWatermark; /** * Advanced watermark text settings for the webchat */ watermarkText: string; /** * Advanced watermark URL settings for the webchat */ watermarkUrl: string; /** * Setting to hide the chat bubble around AI Agent Messages */ disableBotOutputBorder: boolean; /** * Set a number that will be used as a percentage value for the max-width of AI Agent Messages */ botOutputMaxWidthPercentage: number; /** * Configure the width of the Webchat in px */ chatWindowWidth: number; /** * The URL that links to the logo * we display as the chatbot icon when using bottom right position */ iconUrl: string; /** * The animation to apply to the chatbot icon */ iconAnimation: string; /** * The interval to apply to the chatbot icon animation when using bottom right position */ iconAnimationInterval: number; /** * The speed to apply to the chatbot icon animation when using bottom right position */ iconAnimationSpeed: number; } export interface IWebchat3EndpointColorsSettings { /** * The primary color of the webchat. */ primaryColor: string; /** * The secondary color of the webchat. */ secondaryColor: string; /** * The background color of the webchat. */ chatInterfaceColor: string; /** * Bot message color */ botMessageColor: string; /** * User message color */ userMessageColor: string; /** * Text link color */ textLinkColor: string; } export interface IWebchat3EndpointBehaviorSettings { /** * If enabled, shows 'You are now talking to an AI * agent.' notification in the chat. * * Default: true */ enableAIAgentNotice: boolean; /** * Text shown as a notice regarding non-human agent * in the chat. * * Default: `You're now chatting with an AI Agent.` */ AIAgentNoticeText: string; /** * Whether to enable collecting * addtional meatadata from customers */ enableCollectMetadata: boolean; /** * Whether to enable typing indicators * when the bot is replying */ enableTypingIndicator: boolean; /** * The amount of ms per letter * typed in a message */ messageDelay: number; /** * The placeholder text * we display in the input field */ inputPlaceholder: string; /** * Whether the webchat should use STT. */ enableSTT: boolean; /** * Whether the webchat should use * TTS and thereby display * a record button. */ enableTTS: boolean; /** * This setting is used to decide whether * the input should be focused right * after a postback button is pressed */ focusInputAfterPostback: boolean; /** * This setting is used to decide whether * a connectivity indicator should be displayed */ enableConnectionStatusIndicator: boolean; /** * This setting enables collation of streamed * messages into one message bubble. */ collateStreamedOutputs: boolean; /** * This setting enables output messages to appear progressively. */ progressiveMessageRendering: boolean; /** * This setting enables scroll-to-bottom button. * * Default: true */ enableScrollButton: boolean; /** * Whether the webchat renders Text messages as markdown */ renderMarkdown: boolean; /** * This setting determines how scrolling behaves if chat is scrolled to bottom and a new message comes in. */ scrollingBehavior: string; /** * The customer-supplied HTTPS webhook URL that background notifications * are POSTed to while the chat session is inactive. Absent ⇒ background * notifications are inert for this endpoint. */ notificationWebhookUrl?: string; /** * The maximum delay, in seconds, before a background notification is * dispatched after the session becomes inactive. */ maxNotificationDelay?: number; /** * Master switch for background notifications on this endpoint. Absent or false * ⇒ notifications are inert even if notificationWebhookUrl is configured. Only * an explicit `true` (with the deployment FF on and a webhook URL present) arms * a notification window. Lets a customer pause delivery without discarding the * webhook URL / delay. */ notificationEnabled?: boolean; /** * Master switch for User Inactivity Detection on this endpoint. Absent or false ⇒ the * Enable/Disable User Inactivity flow nodes have no effect: no window is armed and nothing * is injected into the Flow. Only an explicit `true` (with the deployment FF on) lets an * Enable User Inactivity node arm a window. */ inactivityEnabled?: boolean; /** * Text injected into the current Flow as `input.text` when an inactivity window fires with * the `"inject"` action, like a REST /inject call. Absent or empty ⇒ the injected input * carries data only. */ inactivityInjectText?: string; /** * JSON object string merged into the injected input's `data` when an inactivity window * fires with the `"inject"` action. Absent or empty ⇒ no custom data. * Stored as a string, matching how the Voice Gateway Call Events tab stores injectData. */ inactivityInjectData?: string; /** * What happens when an inactivity window fires. Absent ⇒ `"inject"`. * - `"inject"`: the injected text/data is processed by the Flow the session is currently in. * - `"executeFlow"`: the session is switched to `inactivityFlowId` (started at its Start * node) and the injected text/data becomes that Flow's first input. Like the Voice Gateway * Call Events "Execute Flow" action, the switch is sticky for the rest of the session. */ inactivityAction?: TWebchat3InactivityAction; /** * Reference id of the Flow the session is switched to when `inactivityAction` is * `"executeFlow"`. Ignored for `"inject"`. */ inactivityFlowId?: string; /** * Text injected as `input.text` — the selected Flow's first input — when an inactivity * window fires with the `"executeFlow"` action. Kept apart from `inactivityInjectText` so * each action has its own input. Absent or empty ⇒ the injected input carries data only. */ inactivityFlowInjectText?: string; /** * JSON object string merged into the injected input's `data` when an inactivity window fires * with the `"executeFlow"` action; the counterpart of `inactivityInjectData`. Absent or * empty ⇒ no custom data. */ inactivityFlowInjectData?: string; } export declare type TWebchat3InactivityAction = "inject" | "executeFlow"; export interface IWebchat3EndpointStartBehaviorSettings { /** * The start behavior of the * webchat, e.g. whether a start button * should be rendered. */ startBehavior: TWebchat2StartBehavior; /** * The payload to send * when clicking the getStartedButton */ getStartedPayload: string; /** * The data that will be sent to the chat * when clicking the getStartedButton * or injecting it */ getStartedData: {}; /** * The text to display in the chat * when clicking the getStartedButton */ getStartedText: string; /** * The text to display on * the get started button */ getStartedButtonText: string; } export interface IWebchat3EndpointBusinessHoursTimeSettings { /** * Start time of the business hours, e.g. 09:00 */ startTime: string; /** * End time of the business hours, e.g. 17:00 */ endTime: string; /** * Week day of the business hours in lower case, e.g. "monday" */ weekDay: string; } export interface IWebchat3EndpointBusinessHoursSettings { /** * Whether the Office Hours are enabled */ enabled: boolean; /** * The business hours mode. Possible values are: * "hide" - The chat window will be hidden out of business hours * "disable" - The message bubble will be disabled with a mouse over text out of business hours * "inform" - The Webchat Widget will start normally, but show an out of business hours message */ mode: TWebchat3Mode; /** * The text that is displayed in the mouse over * text of the bubble or the out of business hours message */ text: string; /** * The title that is displayed to the user in the * information when opening the bot out of business hours */ title: string; /** * The timezone that is used to calculate of the user is * calling out of business hours */ timeZone: string; times: IWebchat3EndpointBusinessHoursTimeSettings[]; } export interface IWebchat3EndpointUnreadMessagesSettings { /** * This setting is used to decide whether unread messages * should be indicated in the title of a minimized webchat widget */ enableIndicator: boolean; /** * This setting is used to decide whether a badge with the number * of unread messages should be displayed in the minimized webchat widget */ enableBadge: boolean; /** * This setting is used to decide whether to show a message preview * for incoming messages if the webchat widget is minimized */ enablePreview: boolean; /** * This setting is used to decide whether a sound should be triggered * for incoming messages if the webchat widget is minimized */ enableSound: boolean; } export interface IWebchat3EndpointHomeScreenSettings { /** * Whether the Home Screen is enabled */ enabled: boolean; /** * The welcome text that is displayed in the Home Screen */ welcomeText: string; background: { /** * The background image url of the Home Screen */ imageUrl: string; /** * The background color of the Home Screen */ color: string; }; /** * The text of the start conversation button */ startConversationButtonText: string; previousConversations: { /** * Enable the delete all conversations button */ enableDeleteAllConversations: boolean; /** * The text of the start new conversation button */ startNewConversationButtonText: string; /** * Whether the previous conversations are enabled */ enabled: boolean; /** * The text of the previous conversations button */ buttonText: string; /** * The title of the previous conversations title */ title: string; }; conversationStarters: IWebchat3EndpointConversationStartersSettings; } export interface IWebchat3EndpointTeaserMessageSettings { /** * teaser message text */ text: string; /** * teaser message button text */ showInChat: boolean; conversationStarters: IWebchat3EndpointConversationStartersSettings; } export interface IWebchat3EndpointConversationStartersSettings { /** * Whether the conversation starters are enabled */ enabled: boolean; starters: { /** * The type of the conversation starter */ type: string; /** * The title of the conversation starter */ title: string; /** * The url of the conversation starter */ url: string; /** * The payload of the conversation starter */ payload: string; }[]; } export interface IWebchat3EndpointChatOptionsSettings { /** * Whether the chat options are enabled */ enabled: boolean; /** * The title of the chat options */ title: string; /** * The quick reply of the chat options */ quickReplyOptions: { /** * Whether the quick reply is enabled */ enabled: boolean; /** * The title of the quick reply */ sectionTitle: string; /** * The configuration of the quick reply */ quickReplies: { type: string; title: string; url: string; payload: string; }[]; }; /** * Whether show the tts toggle */ showTTSToggle: boolean; /** * Whether activate the tts toggle */ activateTTSToggle: boolean; /** * The label of the tts toggle */ labelTTSToggle: string; /** * Rating configuration */ rating: { enabled: string; title: string; commentPlaceholder: string; submitButtonText: string; eventBannerText: string; }; /** * Enable to delete conversation */ enableDeleteConversation: boolean; /** * The configuration of the chat options footer */ footer: { enabled: boolean; items: { title: string; url: string; }[]; }; } export interface IWebchat3EndpointPrivacyNoticeSettings { /** * Whether the privacy notice is enabled */ enabled: boolean; /** * The title of the privacy notice */ title: string; /** * The text of the privacy notice */ text: string; /** * the submit button text of the privacy notice */ submitButtonText: string; /** * the url text of the privacy notice */ urlText: string; /** * the url of the privacy notice */ url: string; } export interface IWebchat3EndpointMaintenanceSettings { /** * Whether the Maintenance mode is enabled */ enabled: boolean; /** * The maintenance mode. Possible values are: * "hide" - The chat window will be hidden during maintenance * "disable" - The message bubble will be disabled with a mouse over text during maintenance * "inform" - The Webchat Widget will start normally, but show a maintenance mode message */ mode: TWebchat3Mode; /** * The text that is displayed in the mouse over text of the bubble or the maintenance mode message */ text: string; /** * The title that is displayed to the user in the information when opening the bot during maintenance */ title: string; } export interface IWebchat3EndpointDemoWebchatSettings { /** * Whether the Demo Webchat is enabled */ enabled: boolean; /** * Background image url of the Demo Webchat */ backgroundImageUrl: string; /** * Position of the Demo Webchat */ position: TWebchat3DemoWebchatPosition; /** * Whether the Demo Webchat is draggable */ shouldOverwriteWebchatBundleUrl: boolean; /** * The webchat bundle URL for demo webchat */ webchatBundleUrl: string; } export interface IWebchat3EndpointSettings { /** * control the layout of the Webchat Widget */ layout: IWebchat3EndpointLayoutSettings; /** * control the colors of the Webchat Widget */ colors: IWebchat3EndpointColorsSettings; /** * control the behavior of the Webchat Widget */ behavior: IWebchat3EndpointBehaviorSettings; /** * control the start behavior of the Webchat Widget */ startBehavior: IWebchat3EndpointStartBehaviorSettings; /** * Settings to store attachments at a cloud provider */ fileStorageSettings?: IFileStorageSettings; /** * Office Hours configuration for the Webchat Widget */ businessHours: IWebchat3EndpointBusinessHoursSettings; /** * Control the unread messages of the Webchat Widget */ unreadMessages: IWebchat3EndpointUnreadMessagesSettings; /** * Control the home screen of the Webchat Widget */ homeScreen: IWebchat3EndpointHomeScreenSettings; /** * Control the teaser message of the Webchat Widget */ teaserMessage: IWebchat3EndpointTeaserMessageSettings; /** * Control the conversation starters of the Webchat Widget */ conversationStarters: IWebchat3EndpointConversationStartersSettings; /** * Control the chat options of the Webchat Widget */ chatOptions: IWebchat3EndpointChatOptionsSettings; /** * Control the privacy notice of the Webchat Widget */ privacyNotice: IWebchat3EndpointPrivacyNoticeSettings; /** * Webchat Widget custom settings */ customJSON?: string; /** * Wwbchat Plugins */ pluginUrls?: string[]; /** * The maximum allowed size of the attachment */ fileAttachmentMaxSize: number; /** * Maintenance mode configuration for the Webchat Widget */ maintenance: IWebchat3EndpointMaintenanceSettings; /** * Control the demo webchat of the Webchat Widget */ demoWebchat: IWebchat3EndpointDemoWebchatSettings; /** * control the authentication of the outbound background-notification webhook * requests of the Webchat Widget */ notificationAuthentication?: IWebchat3NotificationAuthentication; /** * System Use Notification (AC-8 / FedRAMP). When enabled, the webchat widget * displays a mandatory acceptance banner before every new conversation session. * Activated automatically by FEATURE_SYSTEM_USE_NOTIFICATION_ENABLED on the * platform. Not exposed in the Endpoint Editor UI -- this text is compliance- * audited and is not meant to be user-editable. */ systemUseNotification?: { enabled: boolean; title?: string; text?: string; submitButtonText?: string; }; } /** * Setting to enable rating for the Webchat. * Valid types are: * - onRequest: Rating can be given after a request was sent from the flow * - once: Rating can be given at any time, once per session * - always: Rating can be given at any time */ export declare type TWebchatEnableRating = "always" | "once" | "onRequest"; /** * The start behavior of the Webchat. * Valid types are: * - none: A text input is rendered * - button: A button is rendered that will send * a message to the Flow when clicked. * - injection: A predefined message is sent to the * Flow when the Webchat connects */ export declare type TWebchat2StartBehavior = "none" | "button" | "injection"; export declare type TWebchat3Mode = "inform" | "hide" | "disable"; export declare type TWebchat3LayoutWatermark = "default" | "custom" | "none"; export declare type TWebchat3DemoWebchatPosition = "centered" | "bottomRight"; export interface IAmazonLexEndpointSettings { /** * Whether to reparse slots found * by Amazon Lex with COGNIGY.AI NLU */ reparseAmazonLexSlots: boolean; } export interface IIntercomEndpointSettings { /** * The access token used to authenticate * API requests made to Intercom */ accessToken: string; /** * The adminId of the Intercom team member * used as the bot. */ botUserId: string; /** * Secret used to sign the request from Intercom. */ hubSecret: string; /** * The amount of ms per letter * typed in a message */ messageDelay: number; } export interface IRealtimeEndpointSettings extends ITypingIndicatorSettings { } export interface ITypingIndicatorSettings { /** * The amount of ms per letter * typed in a message */ messageDelay: number; /** * Whether to enable typing indicators * when the bot is replying */ enableTypingIndicator: boolean; } export interface IUserlikeRestEndpointSettings { version: "liveChat"; } export interface IUserlikeUnifiedMessagingEndpointSettings { version: "unifiedMessaging"; webhookUrl: string; securityToken: string; } export declare type IUserlikeEndpointSettings = IUserlikeRestEndpointSettings | IUserlikeUnifiedMessagingEndpointSettings; export interface IBandwidthEndpointSettings { /** * If true the BandwidthWebsocketClient is used. * Default: false */ enableAsyncCommunication: boolean; } export interface IAudioCodesEndpointSettings { /** * If true the AudioCodesWebsocketClient is used. * Default: false */ enableAsyncCommunication: boolean; } export interface IWhatsAppEndpointSettings extends IEndpointSessionSettings { bearerToken: string; phoneNumberId: string; /** The application id of the WhatsApp business account which we use to identify the associated account of the configured endpoint */ appId: string; /** The secret which we use to validate that the request was from whatsapp */ appSecret?: string; /** * The verify-token which is used to verify that a certain request is * from WhatsApp and not from some other source. */ verifyToken: string; /** * The amount of delay there should be between * messages. Used to make the conversation seem * more human */ messageDelay: number; /** Settings to store attachments at a cloud provider */ fileStorageSettings?: IFileStorageSettings; } export interface IFileStorageSettings { enabled?: boolean; dropzoneText?: string; storageProvider: "none" | "aws" | "azure" | "googleCloud"; awsConnection?: string; azureConnection?: string; googleCloudConnection?: string; /** Lifetime of generated download links in days, default 30 */ downloadLinkTtlInDays?: number; } /** * @openapi * * components: * schemas: * IMediaAttachment: * type: object * properties: * name: * type: string * caption: * type: string * url: * type: string * type: * type: string * mimeType: * type: string * downloadUrl: * type: string * privateLinkUrl: * type: string * required: * - name * - url * - type */ export interface IMediaAttachment { name: string; caption?: string; url: string; type: string; mimeType?: string; /** Capability JWT download link for external consumers (e.g., WhatsApp, 8x8), expires with token */ downloadUrl?: string; /** Authenticated route that mints fresh download links for Live Agent/Insights */ privateLinkUrl?: string; } /** * @openapi * * components: * schemas: * IFileAttachment: * allOf: * - $ref: '#/components/schemas/IMediaAttachment' * - type: object * properties: * type: * type: string * enum: [file, document] * required: * - type */ export interface IFileAttachment extends IMediaAttachment { type: "file" | "document"; } /** * @openapi * * components: * schemas: * IImageAttachment: * allOf: * - $ref: '#/components/schemas/IMediaAttachment' * - type: object * properties: * type: * type: string * enum: [image] * required: * - type */ export interface IImageAttachment extends IMediaAttachment { type: "image"; } /** * @openapi * * components: * schemas: * IStickerAttachment: * allOf: * - $ref: '#/components/schemas/IMediaAttachment' * - type: object * properties: * type: * type: string * enum: [sticker] * required: * - type */ export interface IStickerAttachment extends IMediaAttachment { type: "sticker"; } /** * @openapi * * components: * schemas: * IVideoAttachment: * allOf: * - $ref: '#/components/schemas/IMediaAttachment' * - type: object * properties: * type: * type: string * enum: [video] * required: * - type */ export interface IVideoAttachment extends IMediaAttachment { type: "video"; } /** * @openapi * * components: * schemas: * IAudioAttachment: * allOf: * - $ref: '#/components/schemas/IMediaAttachment' * - type: object * properties: * type: * type: string * enum: [audio] * required: * - type */ export interface IAudioAttachment extends IMediaAttachment { type: "audio"; } /** * @openapi * * components: * schemas: * IContactAttachment: * type: object * properties: * type: * type: string * enum: [contact] * addresses: * type: array * items: * type: object * properties: * city: * type: string * country: * type: string * countryCode: * type: string * state: * type: string * street: * type: string * type: * type: string * enum: [HOME, WORK] * zip: * type: string * postOfficeBox: * type: string * extendedAddress: * type: string * latitude: * type: number * longitude: * type: number * birthday: * type: string * emails: * type: array * items: * type: object * properties: * email: * type: string * type: * type: string * enum: [HOME, WORK] * urls: * type: array * items: * type: object * properties: * url: * type: string * type: * type: string * enum: [HOME, WORK] * photos: * type: array * items: * type: string * gender: * type: string * languages: * type: array * items: * type: string * timeZone: * type: string * notes: * type: array * items: * type: string * required: * - type */ export interface IContactAttachment { type: "contact"; addresses?: { city?: string; country?: string; countryCode?: string; state?: string; street?: string; type?: "HOME" | "WORK"; zip?: string; postOfficeBox?: string; extendedAddress?: string; latitude?: number; longitude?: number; }[]; birthday?: string; emails?: { email?: string; type?: "HOME" | "WORK"; }[]; name?: { formattedName?: string; firstName?: string; lastName?: string; middleName?: string; suffix?: string; prefix?: string; nickName?: string[]; }; org?: { company?: string; department?: string; subDepartment?: string; title?: string; roles?: string[]; }; phones?: { phone?: string; type?: "HOME" | "WORK"; }[]; urls?: { url?: string; type?: "HOME" | "WORK"; }[]; photos?: string[]; gender?: string; languages?: string[]; timeZone?: string; notes?: string[]; } /** * @openapi * * components: * schemas: * ILocationAttachment: * type: object * properties: * type: * type: string * enum: [location] * latitude: * type: number * longitude: * type: number * name: * type: string * title: * type: string * address: * type: string * required: * - type * - latitude * - longitude */ export interface ILocationAttachment { type: "location"; latitude: number; longitude: number; name?: string; title?: string; address?: string; } export declare type TGenericAttachments = IFileAttachment | IImageAttachment | IVideoAttachment | IAudioAttachment; /** * @openapi * * components: * schemas: * TAttachments: * oneOf: * - $ref: '#/components/schemas/IFileAttachment' * - $ref: '#/components/schemas/IImageAttachment' * - $ref: '#/components/schemas/IVideoAttachment' * - $ref: '#/components/schemas/IAudioAttachment' * - $ref: '#/components/schemas/IStickerAttachment' * - $ref: '#/components/schemas/IContactAttachment' * - $ref: '#/components/schemas/ILocationAttachment' */ export declare type TAttachments = TGenericAttachments | IStickerAttachment | IContactAttachment | ILocationAttachment; export interface IEightByEightEndpointSettings extends IEndpointSessionSettings { /** The base 8x8 server url */ baseUrl: string; /** The API Key which we use to access/authorize the 8x8 API calls */ apiKey: string; /** * The API Tenant Id which we use as a 8x8 tenant header for the 8x8 API calls. * Tenant ID, it is going to be mandatory if customer has more than one CC tenant in his organisation. */ apiTenant: string; /** * If activated, CONVERSATION UPDATE EVENTS of state ACTIVE will be accepted & sent to the Flow. Users will be able to access the event payload via the Input data object. * If deactivated, CONVERSATION UPDATE EVENTS of state ACTIVE will not be accepted & will not be sent to the Flow. */ acceptConversationActiveEvent?: boolean; /** Settings to store attachments at a cloud provider */ fileStorageSettings?: IFileStorageSettings; } export interface IGenesysBotConnectorEndpointSettings { verifyToken: string; } export interface INiceCXOneEndpointSettings { verifyToken: string; } /** * Deliberately near-empty: there is no admin configuration for this endpoint. * Inbound auth is CXone JWT/JWKS (auto-discovered via `CXONE_BASE_URL`), and * the outbound destination is the per-request `callbackUrl`, not a stored * `webhookUrl` — see `niceCXOneWebhookClient.ts` / `niceCXOneWebhookUtils.ts`. */ export interface INiceCXOneWebhookEndpointSettings { } export interface ICxoneDxEndpointAuthentication { authenticationType: "no-auth" | "apiKey"; } export interface ICxoneDxPersistentMenu { /** * The title of the persistent menu */ title: string; /** * The menu items for the persistent menu. */ menuItems: { /** * The title of the menu item */ title: string; /** * The payload to send to AI * when clicking the menu item */ payload: string; }[]; } /** * Settings for the CXone DX endpoint. Optional inbound apiKey authentication * is configured via `cxoneDxEndpointAuthentication` (enforced on POST only; * see below). The `x-nice-tenant-id` header required on inbound requests is a * tenant identifier, not an authentication mechanism. Outbound-facing settings * (e.g. the persistent menu) are also configured here. */ export interface ICxoneDxEndpointSettings { /** Toggle for the persistent menu. */ enablePersistentMenu?: boolean; /** Persistent menu configuration. */ persistentMenu?: ICxoneDxPersistentMenu; /** * This setting enables collation of streamed * messages into one message bubble. * * Unlike the webchat3 setting of the same name, which the widget acts on, * this one is applied server-side: the endpoint client withholds each * streamed chunk until it knows whether another follows, and tags the POSTs * with `partition.*` parameters so DX can append them into one message. * Absent or false means every output is posted individually, as before. */ collateStreamedOutputs?: boolean; /** * Authentication enforced on inbound (POST) DX endpoint requests. When * `authenticationType` is `'apiKey'`, requests must carry a valid * `x-cognigy-endpoint-key` header matching a key from * `/v2.0/endpoints/:endpointId/apikeys`. Default `'no-auth'` preserves * backward compatibility. The GET config route is not affected. */ cxoneDxEndpointAuthentication?: ICxoneDxEndpointAuthentication; } export interface INiceCXOneAAHEndpointSettings { niceCXOneAAHConnection: string; } export interface IZoomContactCenterEndpointSettings { verifyToken: string; } export interface IMcpServerEndpointAuthentication { authenticationType: "no-auth" | "oauth2"; oauth2Config?: IMcpServerEndpointOauth2Config; } export interface IMcpServerEndpointOauth2Config { jwksUrl: string; issuer: string; audience: string; scopes: string[]; allowedSubjectIds?: string[]; keyRefreshIntervalMinutes?: number; } export interface IWebchat3NotificationAuthentication { authenticationType: "no-auth" | "oauth2"; /** * referenceId of the Connection (extension "@cognigy/basic-nodes", type * "webchatNotificationOAuth2") holding clientId / clientSecret. The token URL and * scope stay on the endpoint itself (`oauth2Config.tokenUrl` / `.scope`, below) — * only the client credentials are shared/reusable across endpoints, so only they * moved out. A non-blank value here supersedes `oauth2Config.clientId` / * `.clientSecret` at runtime; `oauth2Config.tokenUrl` / `.scope` are always used * regardless. An empty string means "not set". */ oauth2Connection?: string; /** * The endpoint's own oauth2 fields: `tokenUrl` (always required when * authenticationType is "oauth2") and `scope`. `clientId` / `clientSecret` inside * it are @deprecated — superseded by `oauth2Connection`, and only consulted when * `oauth2Connection` is not set (an endpoint that predates the Connection, or one * that hasn't been migrated yet). Explicit `null` clears the stored config (the * PATCH is leaf-wise, so an omitted key keeps the stored value). */ oauth2Config?: IWebchat3NotificationOauth2Config | null; } export interface IWebchat3NotificationOauth2Config { /** * The customer's OAuth2 token endpoint as a FULL URL, e.g. * "https://idp.example.com/oauth2/token". It is POSTed as-is with * grant_type=client_credentials — it is not a base URL that we append * "/token" to. Always required when authenticationType is "oauth2", whether the * client credentials come from `oauth2Connection` or the fields below. */ tokenUrl: string; /** * @deprecated superseded by `oauth2Connection`; only consulted when it is not set. */ clientId?: string; /** * @deprecated superseded by `oauth2Connection`; only consulted when it is not set. * Round-trips to the authenticated Admin API like tokenUrl (the dashboard fetches * and displays the stored value, same convention as microsoftBotFramework's * appPassword). Still optional on PATCH: omitted means "keep the stored secret". */ clientSecret?: string; /** * Forwarded to the token endpoint verbatim — the value is passed through * exactly as entered (e.g. comma-separated), it is not parsed or space-joined. * Optional: omitted means "leave the stored scope unchanged"; `null` explicitly * clears it (a blank string is rejected — see the JSON schema and save-time * validation, both of which treat "" as a client bug, not a clear request). */ scope?: string | null; } declare const arrayNLUConnectorType_2_0: readonly [ "alexa", "dialogflow", "dialogflowBuiltIn", "amazonLexBuiltIn", "luis", "watson", "noNlu", "cognigy", "code", "lex", "generativeAI" ]; export declare type TNLUConnectorType_2_0 = typeof arrayNLUConnectorType_2_0[number]; /** * @openapi * * components: * schemas: * IYesNoIntentData_2_0: * type: object * properties: * isDisabled: * type: boolean * name: * type: string * example: pizza * _id: * $ref: '#/components/schemas/TMongoId' * rules: * type: array * items: * type: string * * IYesNoIntentItem_2_0: * type: object * properties: * yesIntent: * $ref: '#/components/schemas/IYesNoIntentData_2_0' * noIntent: * $ref: '#/components/schemas/IYesNoIntentData_2_0' * rejectIntent: * $ref: '#/components/schemas/IYesNoIntentData_2_0' */ export interface IYesNoIntentItem_2_0 extends IYesNoItem { } export interface IReadYesNoIntentsRestDataParams_2_0 { localeId: string; } export interface IReadYesNoIntentsRestReturnValue_2_0 extends IYesNoIntentItem_2_0 { } declare const arrayYesNoLogic: readonly [ "yesNoIntents", "yesNoIntentsWithRules", "confirmationWords" ]; export declare type TYesNoLogic_2_0 = typeof arrayYesNoLogic[number]; declare const overlapIntentFeedbackFindingArrayType_2_0: readonly [ "strongOverlap", "someOverlap" ]; declare const genericIntentFeedbackFindingArrayType_2_0: readonly [ "poorFScore", "fairFScore", "goodFScore", "fewSentences", "unclearIntent", "noSiblings" ]; export declare type IOverlapIntentFeedbackFindingType_2_0 = typeof overlapIntentFeedbackFindingArrayType_2_0[number]; export declare type IGenericIntentFeedbackFindingType_2_0 = typeof genericIntentFeedbackFindingArrayType_2_0[number]; /** * @openapi * * components: * schemas: * IGenericIntentFeedbackFinding_2_0: * type: object * properties: * type: * type: string * enum: * - poorFScore * - fairFScore * - goodFScore * - fewSentences * - unclearIntent * - noSiblings */ export interface IGenericIntentFeedbackFinding_2_0 { type: IGenericIntentFeedbackFindingType_2_0; } /** * @openapi * * components: * schemas: * ILowDataIntentFeedbackFinding_2_0: * type: object * properties: * type: * type: string * enum: * - lowDataIntents * intents: * type: array * items: * properties: * intentReferenceId: * type: string * intentName: * type: string * intentId: * $ref: '#/components/schemas/TMongoId' * flowName: * type: string * flowId: * $ref: '#/components/schemas/TMongoId' */ export interface ILowDataIntentFeedbackFinding_2_0 { type: "lowDataIntents"; intents: { intentReferenceId: string; intentName: string; intentId: string; flowId: string; flowName: string; }[]; } /** * @openapi * * components: * schemas: * IOverlapIntentFeedbackFinding_2_0: * type: object * properties: * type: * type: string * enum: * - someOverlap * - strongOverlap * overlappingIntentReferenceId: * type: string * overlappingIntentName: * type: string * overlappingIntentId: * $ref: '#/components/schemas/TMongoId' * overlappingFlowName: * type: string * overlappingFlowId: * $ref: '#/components/schemas/TMongoId' */ export interface IOverlapIntentFeedbackFinding_2_0 { type: IOverlapIntentFeedbackFindingType_2_0; overlappingIntentReferenceId: string; overlappingIntentName: string; overlappingIntentId: TMongoId; overlappingFlowName: string; overlappingFlowId: TMongoId; } export declare type IntentFeedbackFinding_2_0 = IGenericIntentFeedbackFinding_2_0 | IOverlapIntentFeedbackFinding_2_0 | ILowDataIntentFeedbackFinding_2_0; /** * @openapi * * components: * schemas: * IIntentFeedbackReport_2_0: * type: object * properties: * findings: * type: array * items: * oneOf: * - $ref: '#/components/schemas/IGenericIntentFeedbackFinding_2_0' * - $ref: '#/components/schemas/IOverlapIntentFeedbackFinding_2_0' * - $ref: '#/components/schemas/ILowDataIntentFeedbackFinding_2_0' * info: * type: object * properties: * fScore: * type: number */ export interface IIntentFeedbackReport_2_0 { findings: IntentFeedbackFinding_2_0[]; info: { fScore: number; }; } /** * @openapi * * components: * schemas: * IIntentData_2_0: * type: object * properties: * name: * type: string * example: OrderFood * description: * type: string * example: Intent to order food * condition: * type: string * rules: * type: array * items: * type: string * isRejectIntent: * type: boolean * isDisabled: * type: boolean * tags: * type: array * items: * type: string * confirmationSentences: * type: array * items: * type: string * disambiguationSentence: * type: string * data: * type: object * localeReference: * $ref: '#/components/schemas/TMongoId' * childFeatures: * oneOf: * - type: boolean * - type: array * items: * $ref: '#/components/schemas/TMongoId' * example: false * biasTowardsParentOrChildIntents: * type: string * enum: * - parents * - children * parentIntentId: * $ref: '#/components/schemas/TMongoId' * analyticsLabel: * type: string * overrideIntentDefaultRepliesAsExamples: * type: string * description: 'Toggle overriding the flow setting for using default replies as training examples' * enum: ["on", "off", "useFlowSettings"] * * IIntentGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * feedbackReport: * $ref: '#/components/schemas/IIntentFeedbackReport_2_0' * * IIntent_2_0: * allOf: * - $ref: '#/components/schemas/IIntentData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IIntent_2_0 { _id: string; referenceId: string; name: string; description?: string; condition: string; isRejectIntent: boolean; isDisabled: boolean; tags: string[]; confirmationSentences: string[]; disambiguationSentence: string; data: any; rules: string[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; nodeReferenceId: string; childFeatures?: boolean | TMongoId[]; biasTowardsParentOrChildIntents?: TBiasTowardsParentOrChildIntentsTypes; parentIntentId?: TMongoId; localeReference: TMongoId; feedbackReport: IIntentFeedbackReport_2_0; analyticsLabel?: string; overrideIntentDefaultRepliesAsExamples?: string; } export interface IUpdateYesNoIntentsRestDataParams_2_0 { localeId: string; intentId: string; } export interface IUpdateYesNoIntentRestBody_2_0 extends Pick { } export interface IUpdateYesNoIntentRestData_2_0 extends IUpdateYesNoIntentRestBody_2_0, IUpdateYesNoIntentsRestDataParams_2_0 { } export interface IUpdateNoIntentsRestReturnValue_2_0 extends IYesNoIntentItem_2_0 { } export interface IDeleteYesNoIntentRestDataParams_2_0 { localeId: string; intentId: string; } export interface IDeleteYesNoIntentRestData_2_0 extends IDeleteYesNoIntentRestDataParams_2_0 { } export interface IDeleteYesNoIntentRestReturnValue_2_0 { } export declare type TAbstractTaskData_2_0 = T extends unknown ? { name: T["type"]; data: T["data"]; } : never; /** * @openapi * * components: * schemas: * ITaskData_2_0: * type: object * properties: * name: * type: string * description: The name of the task * data: * type: object * description: The parameters of the task * status: * $ref: '#/components/schemas/TTaskStatus_2_0' * currentStep: * type: integer * totalStep: * type: integer * failReason: * type: string * lastRunAt: * type: string * format: date-time * lastFinishedAt: * type: string * format: date-time * * ITask_2_0: * allOf: * - $ref: '#/components/schemas/ITaskData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export declare type ITask_2_0 = TAbstractTaskData_2_0 & { /** The object id of the task */ _id: TMongoId; currentStep: number; totalStep: number; failReason: string; lastRunAt: Date | string | null; lastFinishedAt: Date | string | null; /** * The status of the task */ status: TTaskStatus_2_0; /** Unix-timestamp when the entity was created initially */ createdAt: number; /** Unix-timestamp when the entity was changed last time */ lastChanged: number; /** Id of the user who created the entity initially */ createdBy: TMongoId; /** Id of the user who did the last modification */ lastChangedBy: TMongoId; }; /** * @openapi * components: * schemas: * TTaskStatus_2_0: * type: string * description: The status of the task * example: queued * enum: * - queued * - active * - done * - cancelling * - cancelled * - error */ export declare type TTaskStatus_2_0 = "queued" | "active" | "done" | "cancelling" | "cancelled" | "error"; /** * @openapi * * components: * schemas: * ICreatedTask_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * status: * $ref: '#/components/schemas/TTaskStatus_2_0' * type: * type: string * example: trainIntents * parameters: * type: object * lastChangedAt: * type: number * example: 1594243850 * lastCreatedAt: * type: number * example: 1594243850 * currentStep: * type: integer * example: 0 * totalStep: * type: integer * example: 100 */ export interface ICreatedTask_2_0 extends ILoggerStack { _id: TMongoId; status: ITask_2_0["status"]; type: string; parameters: { [key: string]: any; }; lastChangedAt: number; createdAt: number; } export interface ITrainYesNoIntentsRestDataParams_2_0 extends Partial { localeId?: string; } export interface ITrainYesNoIntentsRestDataBody_2_0 extends Partial { } export interface ITrainYesNoIntentsRestData_2_0 extends ITrainYesNoIntentsRestDataParams_2_0, ITrainYesNoIntentsRestDataBody_2_0 { } export interface ITrainYesNoIntentsRestReturnValue_2_0 { tasks: ICreatedTask_2_0[]; } /** * @openapi * * components: * schemas: * ISharedSettings_2_0: * type: object * properties: * intentThreshold: * type: object * properties: * lower: * type: number * example: 0.4 * upper: * type: number * example: 0.5 * learnNewExampleSentences: * type: boolean * learnNewExampleSentencesThreshold: * type: integer * negativeConfirmationWords: * type: array * items: * type: string * positiveConfirmationWords: * type: array * items: * type: string * systemSlots: * type: object * properties: * useAgeSlots: * type: boolean * useDateSlots: * type: boolean * useDistanceSlots: * type: boolean * useDurationSlots: * type: boolean * useEmailSlots: * type: boolean * useMoneySlots: * type: boolean * useNumberSlots: * type: boolean * usePercentageSlots: * type: boolean * useTemperatureSlots: * type: boolean * useURLSlots: * type: boolean * yesNoLogic: * type: string * enum: [yesNoIntents, yesNoIntentsWithRules, confirmationWords] * yesNoIntentThreshold: * type: integer */ export interface ISharedSettings_2_0 { positiveConfirmationWords: string[]; negativeConfirmationWords: string[]; /** * The thresholds define whether an intent is recognized, whether it needs a confirmation * or whether the intent was not found. */ intentThreshold: { lower: number; upper: number; }; systemSlots: { useDateSlots: boolean; useNumberSlots: boolean; useDurationSlots: boolean; useTemperatureSlots: boolean; useAgeSlots: boolean; usePercentageSlots: boolean; useEmailSlots: boolean; useURLSlots: boolean; useMoneySlots: boolean; useDistanceSlots: boolean; }; /** Whether the system should learn new example sentences for intents */ learnNewExampleSentences: boolean; /** The threshold after which a 'learning sentence' is a learned sentence */ learnNewExampleSentencesThreshold: number; yesNoLogic: TYesNoLogic_2_0; yesNoIntentThreshold: number; } /** * @openapi * * components: * schemas: * IAgentSettingsData_2_0: * type: object * properties: * timezone: * $ref: '#/components/schemas/TTimezone' * useCaseSensitiveIntentMapping: * type: boolean * collectAnalytics: * type: boolean * trackDataOnlyInputs: * type: boolean * translationSettings: * $ref: '#/components/schemas/IAgentTranslationSettings_2_0' * audioPreviewSettings: * $ref: '#/components/schemas/IAudioPreviewSettings_2_0' * generativeAISettings: * $ref: '#/components/schemas/IGenerativeAIModelSettings_2_0' * currencySettings: * type: object * properties: * currency: * type: string * example: "USD" * knowledgeAISettings: * $ref: '#/components/schemas/IKnowledgeAISettings_2_0' * piiDataRedactionSettings: * $ref: '#/components/schemas/IPiiDataRedactionSettings_2_0' * proactiveSettings: * $ref: '#/components/schemas/IProactiveProjectSettings' * aiAgentSettings: * $ref: '#/components/schemas/IAiAgentSettings_2_0' * * IAgentSettings_2_0: * allOf: * - $ref: '#/components/schemas/IAgentSettingsData_2_0' * - $ref: '#/components/schemas/ISharedSettings_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IAgentSettings_2_0 extends ISharedSettings_2_0 { _id: string; /** Timezone to support multiple timezones within the same flow / bot */ timezone: string; /** If true take casing and special characters into account for intent mapping */ useCaseSensitiveIntentMapping: boolean; /** Flag whether to collect analytics information at all - overwrites the info from the endpoint */ collectAnalytics: boolean; /** Flag whether we track 'data only' inputs in analytics */ trackDataOnlyInputs: boolean; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; translationSettings: IAgentTranslationSettings_2_0; audioPreviewSettings: IAudioPreviewSettings_2_0; generativeAISettings: IGenerativeAISettings_2_0; currencySettings: { currency: string; }; knowledgeAISettings: IKnowledgeAISettings_2_0; piiDataRedactionSettings?: IPiiDataRedactionSettings_2_0; proactiveSettings?: IProactiveProjectSettings; aiAgentSettings?: IAiAgentSettings_2_0; } /** * @openapi * * components: * schemas: * IAiAgentSettings_2_0: * type: object * additionalProperties: false * description: Project-level switches for handing a conversation over between Agents and Flows. They only control what the "add" menus offer; existing tools and nodes keep working. A missing key means off. * properties: * routeToFlowToolEnabled: * type: boolean * description: Lists the Route to Flow system tool (Agent to Flow) in the Agent tool menu * agentsNodeEnabled: * type: boolean * description: Lists the Agents node (Flow to Agent) in the Flow editor node menu */ export interface IAiAgentSettings_2_0 { routeToFlowToolEnabled?: boolean; agentsNodeEnabled?: boolean; } /** * @openapi * * components: * schemas: * TTranslationProvider_2_0: * type: string * description: Supported Translation Providers * enum: * - none * - microsoft * - google * - deepl */ export declare type TTranslationProvider_2_0 = "microsoft" | "google" | "deepl" | "none"; /** * @openapi * * components: * schemas: * TranslationConnection: * type: object * properties: * connecionId: * type: string * description: ReferenceId to the connection provider * retries: * type: string * description: Number of retries * default: 1 * timeout: * type: string * description: Timeout in milliseconds * default: 3000 * cacheExpiry: * type: string * description: Cache expiry in milliseconds * default: 0 * customBaseUrl: * type: string * description: Custom base url * default: "" * IAgentTranslationSettings_2_0: * type: object * properties: * provider: * $ref: '#/components/schemas/TTranslationProvider_2_0' * connections: * type: object * properties: * microsoft: * $ref: '#/components/schemas/TranslationConnection' * deepl: * $ref: '#/components/schemas/TranslationConnection' * google: * $ref: '#/components/schemas/TranslationConnection' */ export interface ITranslationProviderFieldNames_2_0 { connectionId: string | null; retries: number; timeout: number; cacheExpiry: number; customBaseUrl?: string; } export interface IAgentTranslationSettings_2_0 { provider: TTranslationProvider_2_0; connections: { microsoft: ITranslationProviderFieldNames_2_0; google: ITranslationProviderFieldNames_2_0; deepl: ITranslationProviderFieldNames_2_0; }; } /** * @openapi * * components: * schemas: * TAudioPreviewProvider_2_0: * type: string * description: Supported AudioPreview Providers * enum: * - null * - microsoft * - google * - aws * - deepgram * - speechmatics */ export declare type TAudioPreviewProvider_2_0 = "microsoft" | "google" | "aws" | "deepgram" | "speechmatics" | null; /** * @openapi * * components: * schemas: * AudioPreviewConnection: * type: object * properties: * connecionId: * type: string * description: ReferenceId to the connection provider * * IAudioPreviewSettings_2_0: * type: object * properties: * provider: * $ref: '#/components/schemas/TAudioPreviewProvider_2_0' * connections: * type: object * properties: * microsoft: * $ref: '#/components/schemas/AudioPreviewConnection' * aws: * $ref: '#/components/schemas/AudioPreviewConnection' * google: * $ref: '#/components/schemas/AudioPreviewConnection' */ /** * The supporting optional fields are not shown in Open API documentation * as those are just place holders and not supported in iteration 1 */ export interface IAudioPreviewSettings_2_0 { provider: TAudioPreviewProvider_2_0; connections: { microsoft: { connectionId: string; }; google: { connectionId: string; }; aws: { connectionId: string; }; deepgram: { connectionId: string; }; speechmatics: { connectionId: string; }; }; /** When true, the selected provider uses nice-provided shared speech credentials. */ isNiceProvided?: boolean; } /** * @openapi * * components: * schemas: * TGenerativeAIProviders_2_0: * type: string * description: Supported Generative AI Providers * enum: * - openAI * - openAICompatible * - azureOpenAI * - anthropic * - googleVertexAI * - googleGemini * - googleGenAI * - alephAlpha * - awsBedrock * - mistral */ export declare type TGenerativeAIProviders_2_0 = TGenerativeAIProviders; export declare type TConfigurableGenerativeAIUseCases = Exclude; /** * @openapi * * components: * schemas: * IGenerativeAIModelSettings_2_0: * type: object * properties: * enabled: * type: boolean * useCasesSettings: * type: object * properties: * designTimeGeneration: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' * aiEnhancedOutputs: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' * gptConversation: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' * gptPromptNode: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' * knowledgeSearch: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' * conversationAnalyzer: * $ref: '#/components/schemas/IGenerativeAIMeta_2_0' */ export interface IGenerativeAISettings_2_0 { enabled: boolean; useCasesSettings: { [key in TConfigurableGenerativeAIUseCases]: IGenerativeAIUseCaseSettings; }; } /** * @openapi * * components: * schemas: * TFileExtractorOptions_2_0: * type: string * description: Options for the Knowledge AI File Extractor * enum: * - default * - legacy * - azure */ export declare type TFileExtractorOptions_2_0 = "default" | "legacy" | "azure"; /** * @openapi * * components: * schemas: * IKnowledgeAISettings_2_0: * type: object * properties: * fileExtractor: * $ref: '#/components/schemas/TFileExtractorOptions_2_0' * azureDIConnectionId: * type: string * description: ReferenceId of the Azure AI Document Intelligence Connection * example: "f66e99eb-db8f-433c-977f-69160d9a6bdb" * */ export interface IKnowledgeAISettings_2_0 { fileExtractor: TFileExtractorOptions_2_0; azureDIConnectionId?: string; } declare enum EPiiBehaviorType { PREDEFINED_ALIAS = "predefined-alias", CUSTOM_ALIAS = "custom-alias" } export declare type IRedactionBehavior = { type: EPiiBehaviorType.PREDEFINED_ALIAS; customAlias: null; } | { type: EPiiBehaviorType.CUSTOM_ALIAS; customAlias: string; }; export declare type IRedactionScope = { logs: boolean; analytics: boolean; }; export interface IPiiFieldSettings { enabled: boolean; behavior: IRedactionBehavior; scope: IRedactionScope; name: string; } export interface ICustomPatternSettings extends Omit { regex: string; } export interface IPiiDataRedactionSettings_2_0 { emailAddress: IPiiFieldSettings; phoneNumber: IPiiFieldSettings; creditCard: IPiiFieldSettings; ssn: IPiiFieldSettings; ipAddressV4: IPiiFieldSettings; ipAddressV6: IPiiFieldSettings; customTypes?: Record; } /** * @openapi * * components: * schemas: * ISearchResultIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Resource * example: pizza-endpoint * type: * $ref: '#/components/schemas/TSearchableResourceType' * subType: * oneOf: * - $ref: '#/components/schemas/TNLUConnectorType_2_0' * - $ref: '#/components/schemas/TChannelType' * - $ref: '#/components/schemas/TGenerativeAIProviders_2_0' * * projectId: * $ref: '#/components/schemas/TMongoId' * lastChanged: * $ref: '#/components/schemas/TTimestamp' */ export declare type ISearchResultIndexItem_2_0 = { /** The object id of the Resource */ _id: TMongoId; /** * The name of the resource. */ name: string; /** * The type of the resource. */ type: Exclude; /** * The projectId of the project, which contains the resource. */ projectId: TMongoId; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; } | { /** The object id of the Resource */ _id: TMongoId; /** * The name of the resource. */ name: string; /** * The type of the resource. */ type: Extract; /** * The projectId of the project, which contains the resource. */ projectId: TMongoId; /** * The subtype of the Endpoint */ subType: TChannelType; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; } | { /** The object id of the Resource */ _id: TMongoId; /** * The name of the resource. */ name: string; /** * The type of the resource. */ type: Extract; /** * The subtype of the NLUConnector */ subType: TNLUConnectorType_2_0; /** * The projectId of the project, which contains the resource. */ projectId: TMongoId; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; } | { /** The object id of the Resource */ _id: TMongoId; /** * The name of the resource. */ name: string; /** * The type of the resource. */ type: Extract; /** * The subtype of the Large Language Model */ subType: TGenerativeAIProviders_2_0; /** * The projectId of the project, which contains the resource. */ projectId: TMongoId; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; }; export interface IMongoosePaginationPluginReturnValue { items: T[]; total: number; nextCursor: string; previousCursor: string; } /** * @openapi * * components: * schemas: * ICursorBasedPaginationReturnValue: * type: object * properties: * items: * type: array * items: * type: object * total: * type: integer * example: 1 * nextCursor: * allOf: * - $ref: '#/components/schemas/TMongoId' * nullable: true * example: 5ce7c2d833ea1e04d7e6c432 * previousCursor: * allOf: * - $ref: '#/components/schemas/TMongoId' * nullable: true * example: 5ce7c2d833ea1e04d7e6c432 */ export interface ICursorBasedPaginationReturnValue extends IMongoosePaginationPluginReturnValue { } export interface IRestPagination { filter?: string; query?: IFilterQuery>>; next?: string; previous?: string; limit?: number; skip?: number; sort?: { [key in keyof T]?: "asc" | "desc"; }; } export interface ISearchResourcesRestData_2_0 extends IRestPagination>, Partial { } export interface ISearchResourcesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } declare const activityResourceTypes: readonly [ "flow", "node", "endpoint", "aiAgent", "knowledgeStore", "lexicon", "largeLanguageModel", "playbook", "connection", "function", "extension", "nluconnector", "locale", "snippet", "aicopilotconfig", "goal", "project", "snapshot", "package" ]; /** * @openapi * components: * schemas: * TActivityResourceType: * type: string * description: The type of the resource an activity item refers to. * example: endpoint * enum: * - flow * - node * - endpoint * - aiAgent * - knowledgeStore * - lexicon * - largeLanguageModel * - playbook * - connection * - function * - extension * - nluconnector * - locale * - snippet * - aicopilotconfig * - goal * - project * - snapshot * - package */ export declare type TActivityResourceType = (typeof activityResourceTypes)[number]; declare const activityVerbs: readonly [ "created", "updated", "deleted", "restored", "packaged", "uploaded", "merged" ]; /** * @openapi * components: * schemas: * TActivityVerb: * type: string * description: > * The machine-readable action that was performed on the resource. The API * deliberately does not return a rendered sentence - clients own the * sentence templates and their translations. * * `created` and `deleted` always describe the resource itself. An * operation on a sub-resource the feed does not track (adding an Intent, * removing a Lexicon entry) is reported as `updated` on the tracked * parent, because the parent was neither created nor deleted. * example: updated * enum: * - created * - updated * - deleted * - restored * - packaged * - uploaded * - merged */ export declare type TActivityVerb = (typeof activityVerbs)[number]; declare const activityActorTypes: readonly [ "user", "aiAssist", "agentPlugin", "system" ]; /** * @openapi * components: * schemas: * TActivityActorType: * type: string * description: Who or what performed the action. * example: user * enum: * - user * - aiAssist * - agentPlugin * - system */ export declare type TActivityActorType = (typeof activityActorTypes)[number]; /** * @openapi * components: * schemas: * IActivityActor_2_0: * type: object * properties: * type: * $ref: '#/components/schemas/TActivityActorType' * displayName: * type: string * nullable: true * description: > * The display name of the human who performed the action - including * when `type` is `aiAssist` or `agentPlugin`, since those still act on a * human's behalf rather than replacing one. `null` when there is no * associated human (e.g. a `system`-initiated row), the user has since * been deleted, or the name could not be resolved. Never an email * address. * example: Maria Lopez */ export interface IActivityActor_2_0 { /** Who or what performed the action. */ type: TActivityActorType; /** * The display name of the human actor, or `null`. This is never an email * address - the feed is readable by basic project members, who are not * allowed to see other users' emails. */ displayName: string | null; } /** * @openapi * components: * schemas: * IActivityResource_2_0: * type: object * properties: * type: * $ref: '#/components/schemas/TActivityResourceType' * id: * allOf: * - $ref: '#/components/schemas/TMongoId' * nullable: true * description: > * The id of the resource, or `null` when the underlying audit event * carries no id. A `null` id means the row cannot be named or linked * and should be rendered as plain, non-clickable text. * parent: * type: object * nullable: true * description: Only present for `node` rows, where the deep link needs the owning Flow. * properties: * type: * type: string * enum: [ flow ] * id: * $ref: '#/components/schemas/TMongoId' */ export interface IActivityResource_2_0 { /** The type of the resource this activity item refers to. */ type: TActivityResourceType; /** * The id of the resource, or `null` when the audit event carries no id. * A `null` id means the row is not nameable and not clickable. */ id: TMongoId | null; /** Only set for `node` rows - the deep link into the Flow Editor needs the Flow. */ parent?: { type: "flow"; id: TMongoId; }; } /** * @openapi * components: * schemas: * IActivityItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * description: ISO-8601 UTC timestamp of the (most recent) change in this row. * example: '2026-08-25T13:19:50.000Z' * verb: * $ref: '#/components/schemas/TActivityVerb' * actor: * $ref: '#/components/schemas/IActivityActor_2_0' * resource: * $ref: '#/components/schemas/IActivityResource_2_0' * projectId: * $ref: '#/components/schemas/TMongoId' */ export interface IActivityItem_2_0 { /** The id of the underlying audit event. Doubles as the pagination cursor unit. */ _id: TMongoId; /** ISO-8601 UTC timestamp. Clients render this as relative time. */ timestamp: string; /** What was done to the resource. */ verb: TActivityVerb; /** Who did it. */ actor: IActivityActor_2_0; /** What it was done to. */ resource: IActivityResource_2_0; /** The project the activity happened in. */ projectId: TMongoId; } export interface IIndexActivityRestData_2_0 extends Partial { /** The maximum number of rows to return. Defaults to 10, capped at 25. */ limit?: number; /** The `nextCursor` of a previous response. */ next?: string; } export interface IIndexActivityRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ISnippet extends Omit { _id?: TMongoId; /** * The label (name) of the snippet. */ label: string; /** * The type of the snippet * based on what the snippet accesses * (profile, input or context) */ type: TSnippetType; /** * The script the snippet executes */ script: string; /** * Reference id of this snippet which we will use in * the future to resolve the 'script' during execution. */ referenceId?: string; projectReference: TMongoId; organisationReference: TMongoId; } declare const snippetTypes: readonly [ "profile", "input", "context", "custom", "answer", "flow-output", "flow-input", "tool-args" ]; export declare type TSnippetType = typeof snippetTypes[number]; export interface IGraphSnippet { type: "snippet"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } declare const FLOW_KINDS: readonly [ "conversation", "tool", "flowExecutionTool", "preTurnFlow" ]; export declare type TFlowKind = typeof FLOW_KINDS[number]; /** * @openapi * * components: * schemas: * IFlowIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: * type: string * referenceId: * type: string * format: uuid * isTrainingOutOfDate: * type: boolean * - $ref: '#/components/schemas/IEntityMeta' */ export interface IFlowIndexItem_2_0 { _id: TMongoId; referenceId: string; name: string; description?: string; isTrainingOutOfDate: boolean; kind: TFlowKind; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexFlowsRestData_2_0 extends IRestPagination, Partial { includeFeedbackReport?: boolean; preferredLocaleId?: string; /** Top-level so REST-client consumers can pass the filter without burying it under `query`. IRestPagination only exposes filterable fields nested. Several kinds return a Flow of any of them (CGY-43949). */ kind?: TFlowKind | TFlowKind[]; } export interface IIndexFlowsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } declare const trainGroupFeedbackFindingArrayType_2_0: readonly [ "poorAccuracy", "fairAccuracy", "goodAccuracy" ]; /** * @openapi * * components: * schemas: * TTrainGroupFeedbackFindingType_2_0: * type: string * enum: * - poorAccuracy * - fairAccuracy * - goodAccuracy * - lowDataIntents */ export declare type TTrainGroupFeedbackFindingType_2_0 = typeof trainGroupFeedbackFindingArrayType_2_0[number]; /** * @openapi * * components: * schemas: * ITrainGroupGenericFinding_2_0: * type: object * properties: * type: * type: string * $ref: '#/components/schemas/TTrainGroupFeedbackFindingType_2_0' */ export interface ITrainGroupGenericFinding_2_0 { type: TTrainGroupFeedbackFindingType_2_0; } /** * @openapi * * components: * schemas: * ITrainGroupLowDataFinding_2_0: * type: object * properties: * type: * type: string * enum: * - lowDataIntents * intents: * type: array * items: * properties: * intentReferenceId: * type: string * intentName: * type: string * intentId: * $ref: '#/components/schemas/TMongoId' * flowName: * type: string * flowId: * $ref: '#/components/schemas/TMongoId' */ export interface ITrainGroupLowDataFinding_2_0 { type: "lowDataIntents"; intents: { intentReferenceId: string; intentName: string; intentId: string; flowId: string; flowName: string; }[]; } export declare type TrainGroupFinding_2_0 = ITrainGroupGenericFinding_2_0 | ITrainGroupLowDataFinding_2_0; /** * @openapi * * components: * schemas: * ITrainGroupFeedbackReport_2_0: * type: object * properties: * findings: * type: array * items: * oneOf: * - $ref: '#/components/schemas/ITrainGroupGenericFinding_2_0' * - $ref: '#/components/schemas/ITrainGroupLowDataFinding_2_0' * info: * type: object * properties: * fScore: * type: number */ export interface ITrainGroupFeedbackReport_2_0 { findings: TrainGroupFinding_2_0[]; info: { accuracy: number; fScore: number; }; } /** * @openapi * * components: * schemas: * IFlowData_2_0: * type: object * properties: * name: * type: string * description: * type: string * context: * type: object * attachedFlows: * type: array * items: * $ref: '#/components/schemas/TMongoId' * attachedLexicons: * type: array * items: * $ref: '#/components/schemas/TMongoId' * img: * type: string * * IFlowGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * intentTrainGroupReference: * $ref: '#/components/schemas/TMongoId' * feedbackReport: * $ref: '#/components/schemas/ITrainGroupFeedbackReport_2_0' * isTrainingOutOfDate: * type: boolean * * IFlow_2_0: * allOf: * - $ref: '#/components/schemas/IFlowGeneratedData_2_0' * - $ref: '#/components/schemas/IFlowData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * * IUpdateFlowData_2_0: * allOf: * - $ref: '#/components/schemas/IFlowData_2_0' * - type: object * properties: * localeId: * $ref: '#/components/schemas/TMongoId' */ export interface IFlow_2_0 { _id: TMongoId; referenceId: string; name: string; description?: string; context: any; attachedFlows: TMongoId[]; attachedLexicons: TMongoId[]; localeReference: TMongoId; intentTrainGroupReference: TMongoId; feedbackReport: ITrainGroupFeedbackReport_2_0; isTrainingOutOfDate: boolean; kind?: TFlowKind; img: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * components: * schemas: * IBatchCreateOperation: * type: object * properties: * op: * type: string * enum: * - create */ /** * @openapi * components: * schemas: * IBatchUpdateOperation: * type: object * properties: * op: * type: string * enum: * - update * id: * $ref: '#/components/schemas/TMongoId' * value: * type: object */ /** * @openapi * components: * schemas: * IBatchActionOperation: * type: object * properties: * op: * type: string * id: * $ref: '#/components/schemas/TMongoId' * value: * type: object */ /** * @openapi * components: * schemas: * IBatchDeleteOperation: * type: object * properties: * op: * type: string * enum: * - delete * id: * $ref: '#/components/schemas/TMongoId' */ export declare type IBatchActionOperation = [ T ] extends [ never ] ? { op: k; id: TMongoId; } : k extends "create" ? { op: k; value: T; } : { op: k; id: TMongoId; value: T; }; export declare type IBatchFlowsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchFlowsRestDataBody_2_0 { operations: IBatchFlowsRestOperationSet; } export interface IBatchFlowsRestDataQuery_2_0 extends IProjectScope { } export interface IBatchFlowsRestData_2_0 extends IBatchFlowsRestDataBody_2_0, IBatchFlowsRestDataQuery_2_0 { } export interface IBatchFlowsRestReturnValue_2_0 { } export interface ICreateFlowRestDataBody_2_0 extends IProjectScope, Partial> { transcript?: string; flowGenerationInput?: string; } export interface ICreateFlowRestData_2_0 extends ICreateFlowRestDataBody_2_0 { } export interface ICreateFlowRestReturnValue_2_0 extends IFlow_2_0 { } export interface IReadFlowRestDataParams_2_0 { flowId: string; } export interface IReadFlowRestData_2_0 extends IReadFlowRestDataParams_2_0 { preferredLocaleId?: string; includeFeedbackReport?: boolean; } export interface IReadFlowRestReturnValue_2_0 extends IFlow_2_0 { } export interface IUpdateFlowRestDataParams_2_0 { flowId: string; } export interface IUpdateFlowRestDataBody_2_0 extends Partial> { localeId?: string; } export interface IUpdateFlowRestData_2_0 extends IUpdateFlowRestDataBody_2_0, IUpdateFlowRestDataParams_2_0 { } export interface IUpdateFlowRestReturnValue_2_0 { } export interface IDeleteFlowRestData_2_0 { flowId: string; } export interface IDeleteFlowRestReturnValue_2_0 { } export interface IAddFlowLocalizationRestDataParams_2_0 { flowId: string; } export interface IAddFlowLocalizationRestDataBody_2_0 { localeId: string; inheritFromLocaleId?: string; } export interface IAddFlowLocalizationRestData_2_0 extends IAddFlowLocalizationRestDataParams_2_0, IAddFlowLocalizationRestDataBody_2_0 { } export interface IAddFlowLocalizationRestReturnValue_2_0 { } export interface IRemoveFlowLocalizationRestDataParams_2_0 { flowId: string; } export interface IRemoveFlowLocalizationRestDataBody_2_0 extends IRemoveFlowLocalizationRestDataParams_2_0 { localeId: string; } export interface IRemoveFlowLocalizationRestData_2_0 extends IRemoveFlowLocalizationRestDataParams_2_0, IRemoveFlowLocalizationRestDataBody_2_0 { } export interface IRemoveFlowLocalizationRestReturnValue_2_0 { } export interface ITrainGroupGenericFinding { type: TTrainGroupFeedbackFindingType; } export interface ITrainGroupLowDataFinding { type: "lowDataIntents"; intents: { intentReferenceId: string; intentName: string; intentId: string; flowId: string; flowName: string; }[]; } export declare type TrainGroupFinding = ITrainGroupGenericFinding | ITrainGroupLowDataFinding; export interface ITrainGroupFeedbackReport { findings: TrainGroupFinding[]; info: { accuracy: number; fScore: number; }; intentTrainGroupReferenceId: string; projectReference: TMongoId; organisationReference: TMongoId; } declare const trainGroupFeedbackFindingArrayType: readonly [ "poorAccuracy", "fairAccuracy", "goodAccuracy" ]; export declare type TTrainGroupFeedbackFindingType = typeof trainGroupFeedbackFindingArrayType[number]; export interface IIntentTrainGroupInDB { _id: TMongoId; referenceId: string; lastRelevantChangeAt: number; lastRelevantChangeBy: TMongoId; lastTrainedAt: number; lastTrainedBy: TMongoId; lastChanged: number; lastChangedBy: TMongoId; flowReference: TMongoId; localeReference: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; lexiconsInServiceMatcher: boolean; nluOptions: { intentModelVersion?: TIntentModelVersion; }; } export declare type TIntentModelVersion = "1" | "2"; export interface IIntentTrainGroup extends IIntentTrainGroupInDB { feedbackReport: Pick; isTrainingOutOfDate: boolean; } export interface ILocalizedFlowData { attachedLexiconReferences: TMongoId[]; localeReference: TMongoId; } export interface IFlowInDB extends IEntityMeta { _id: TMongoId; localizedData: ILocalizedFlowData[]; /** * The referenceId for the Flow, * which is used during execution. * This ID does not change when the * Flow is snapshotted. */ referenceId: string; name: string; description?: string; context: any; attachedFlows: TMongoId[]; img: string; chartReference: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; /** * What this Flow is authored for. Set at creation, immutable. * Optional and absent on EVERY Conversation Flow — never persisted for them, * and there is no Mongoose default. Read via flowKindOf, never directly. */ kind?: TFlowKind; } export interface IFlow extends Omit, Omit { attachedLexicons: TMongoId[]; intentTrainGroupReference: TMongoId; intentTrainGroupReferenceId: string; feedbackReport: Pick; isTrainingOutOfDate: boolean; lastTrainedAt: number; nluOptions: IIntentTrainGroup["nluOptions"]; } export interface IGraphFlow { type: "flow"; _id: TMongoId; referenceId: string; name: string; /** * Optional for the same reason `IFlow.kind` is (see the comment above `IFlow`): * requiring it would oblige every producer of the graph shape to supply it. * `graphFlows` always populates it via `flowKindOf`, so consumers reading a * node this service produced never see `undefined` — but they must still treat * absence as "conversation" rather than assuming the field is there. */ kind?: TFlowKind; properties: Omit; dependencies?: (IGraphFlowDependencyAttachment | IGraphFlowDependencyFlowNode)[]; } export interface IGraphFlowDependencyAttachment { _id: string; type: "attachedFlow" | "attachedLexicon"; } export interface IGraphFlowDependencyFlowNode { _id: string; type: "flowNode"; properties: { nodeType: string; nodeId: string; extension: string; }; } export declare type ICreateFlowFromChildrenRestDataParams_2_0 = { flowId: string; }; export interface ICreateFlowFromChildrenRestDataBody_2_0 extends Partial> { newFlowName: string; nodeId: string; } export interface ICreateFlowFromChildrenRestData_2_0 extends ICreateFlowFromChildrenRestDataBody_2_0, ICreateFlowFromChildrenRestDataParams_2_0 { } export interface ICreateFlowFromChildrenRestReturnValue_2_0 extends IFlow_2_0 { } export interface ICloneFlowRestDataParams_2_0 { flowId: string; } export interface ICloneFlowRestData_2_0 extends ICloneFlowRestDataParams_2_0 { } export interface ICloneFlowRestReturnValue_2_0 extends IFlow_2_0 { } /** * @openapi * * components: * schemas: * ILexiconIndexItemData_2_0: * type: object * properties: * name: * type: string * description: The name of the lexicon * example: New Lexicon * description: * type: string * description: A meaningful description of the lexicon * example: Countries members of the European Union, e.g. Spain * referenceId: * type: string * format: uuid * * ILexiconIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/ILexiconIndexItemData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILexiconIndexItem_2_0 { _id: TMongoId; name: string; description?: string; referenceId: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexLexiconsRestDataParams_2_0 { } export interface IIndexLexiconsRestData_2_0 extends IRestPagination, IIndexLexiconsRestDataParams_2_0, Partial { } export interface IIndexLexiconsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILexiconData_2_0: * type: object * properties: * name: * type: string * description: The name of the lexicon * example: EU countries * description: * type: string * description: A meaningful description of the lexicon * example: Countries members of the European Union, e.g. Spain * * ILexiconGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * values: * deprecated: true * * ILexicon_2_0: * allOf: * - $ref: '#/components/schemas/ILexiconData_2_0' * - $ref: '#/components/schemas/ILexiconGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILexicon_2_0 { _id: TMongoId; name: string; description?: string; referenceId: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export declare type IBatchLexiconsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchLexiconsRestDataBody_2_0 { operations: IBatchLexiconsRestOperationSet; } export interface IBatchLexiconsRestDataQuery_2_0 extends IProjectScope { } export interface IBatchLexiconsRestData_2_0 extends IBatchLexiconsRestDataBody_2_0, IBatchLexiconsRestDataQuery_2_0 { } export interface IBatchLexiconsRestReturnValue_2_0 { } export interface ICreateLexiconRestDataBody_2_0 extends IProjectScope, Partial> { } /** * @openapi * components: * parameters: * shouldGenerateLexiconEntriesParams: * in: query * name: shouldGenerateLexiconEntries * description: Flag to allow the Lexicon creation to use the generative AI to generate entries. * example: true * required: false * schema: * type: boolean * shouldGenerateSynonymsParams: * in: query * name: shouldGenerateSynonyms * description: Flag to allow the Lexicon creation to use the generative AI to generate synonyms. * example: false * required: false * schema: * type: boolean * generateLexiconEntriesLimitParam: * in: query * name: generateLexiconEntriesLimit * description: Number of entries to be generated by the Generative AI. * example: 8 * required: false * schema: * type: integer * defaultSlotParam: * in: query * name: defaultSlot * description: Default Slot where to associate the generated Lexicon entries. * example: testSlot * required: false * schema: * type: string * languageCode: * in: query * name: languageCode * description: Language code. * required: false * schema: * type: string * example: en-US * */ export interface ICreateLexiconRestDataQuery_2_0 { resourceId?: string; shouldGenerateLexiconEntries?: boolean; generateLexiconEntriesLimit?: number; shouldGenerateSynonyms?: boolean; defaultSlot?: string; languageCode?: string; } export interface ICreateLexiconRestData_2_0 extends ICreateLexiconRestDataBody_2_0, ICreateLexiconRestDataQuery_2_0 { } export interface ICreateLexiconRestReturnValue_2_0 extends ILexicon_2_0 { } export interface IReadLexiconRestDataParams_2_0 { lexiconId: string; } export interface IReadLexiconRestData_2_0 extends IReadLexiconRestDataParams_2_0 { metaOnly?: boolean; } export interface IReadLexiconRestReturnValue_2_0 extends ILexicon_2_0 { isPackedForDownload: boolean; } export interface IUpdateLexiconRestDataParams_2_0 { lexiconId: string; } export interface IUpdateLexiconRestDataBody_2_0 extends Partial> { } export interface IUpdateLexiconRestData_2_0 extends IUpdateLexiconRestDataBody_2_0, IUpdateLexiconRestDataParams_2_0 { } export interface IUpdateLexiconRestReturnValue_2_0 { } export interface IDeleteLexiconRestDataParams_2_0 { lexiconId: string; } export interface IDeleteLexiconRestData_2_0 extends IDeleteLexiconRestDataParams_2_0 { } export interface IDeleteLexiconRestReturnValue_2_0 { } export interface IImportIntoLexiconRestDataParams_2_0 { lexiconId: string; } export interface IImportIntoLexiconRestDataBody_2_0 { file: File | Buffer; mode: TImportLexiconMode_2_0; } export interface IImportIntoLexiconRestData_2_0 extends IImportIntoLexiconRestDataParams_2_0, IImportIntoLexiconRestDataBody_2_0 { } export interface IImportIntoLexiconRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * components: * schemas: * TImportLexiconMode_2_0: * type: string * example: skip * enum: * - skip * - overwrite * - merge */ export declare type TImportLexiconMode_2_0 = "skip" | "overwrite" | "merge"; export interface IExportFromLexiconRestDataParams_2_0 extends IProjectScope { lexiconId: string; } export interface IExportFromLexiconRestData_2_0 extends IExportFromLexiconRestDataParams_2_0 { } export interface IExportFromLexiconRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * ILexiconKeyphraseData_2_0: * type: object * properties: * name: * type: string * description: The name of the slot * example: food * isMainKeyphrase: * type: boolean * description: Indicates if it is main * example: true * * ILexiconKeyphrase_2_0: * allOf: * - $ref: '#/components/schemas/ILexiconKeyphraseData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILexiconKeyphrase_2_0 { /** The MongoDB ObjectId */ _id: TMongoId; value: string; isMainKeyphrase: boolean; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * ILexiconEntryIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * mainKeyphrase: * description: the keyphrase value * example: pizza * data: * type: string * description: Additional JSON-data of the lexicon entry * example: {} * keyphrases: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * value: * type: string * description: the keyphrase value * example: pizza * isMainKeyphrase: * type: boolean * description: Indicator if the Keyphrase is the mainKeyphrase * example: true * slotReferences: * type: array * description: The used slots by the lexicon entry * items: * $ref: '#/components/schemas/TMongoId' */ export interface ILexiconEntryIndexItem_2_0 { /** The MongoDB ObjectId */ _id: TMongoId; slotReferences: TMongoId[]; data: string; mainKeyphrase: string; keyphrases: Omit>[]; } export interface IIndexLexiconEntriesRestDataParams_2_0 { lexiconId: TMongoId; } export interface IIndexLexiconEntriesRestData_2_0 extends IRestPagination, IIndexLexiconEntriesRestDataParams_2_0 { } export interface IIndexLexiconEntriesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILexiconEntryData_2_0: * type: object * required: * - mainKeyphrase * properties: * data: * type: string * description: Additional JSON-data of the lexicon entry * example: "{\"key1\": \"value1\" }" * slotReferences: * type: array * description: The used slots by the lexicon entry * items: * $ref: '#/components/schemas/TMongoId' * mainKeyphrase: * type: string * description: the keyphrase value * example: pizza * * ILexiconEntryGeneratedData_2_0: * type: object * properties: * mainKeyphrase: * type: string * description: the keyphrase value * example: pizza * keyphrases: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * value: * type: string * description: the keyphrase value * example: pizza * isMainKeyphrase: * type: boolean * description: Indicator if the Keyphrase is the mainKeyphrase * example: true * * ILexiconEntry_2_0: * allOf: * - $ref: '#/components/schemas/ILexiconEntryData_2_0' * - $ref: '#/components/schemas/ILexiconEntryGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILexiconEntry_2_0 { mainKeyphrase: string; slotReferences: TMongoId[]; data: string; keyphrases: Omit>[]; /** The Mongo id of the entity */ _id: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export declare type IBatchLexiconEntriesRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete"> | IBatchActionOperation<"addKeyphrase", { value: string; }> | IBatchActionOperation<"removeKeyphrase", { keyphraseId: string; }>)[]; export interface IBatchLexiconEntriesRestDataBody_2_0 { operations: IBatchLexiconEntriesRestOperationSet; } export interface IBatchLexiconEntriesRestDataParams_2_0 { lexiconId: string; } export interface IBatchLexiconEntriesRestData_2_0 extends IBatchLexiconEntriesRestDataBody_2_0, IBatchLexiconEntriesRestDataParams_2_0 { } export interface IBatchLexiconEntriesRestReturnValue_2_0 { created: string[]; updated: string[]; deleted: string[]; } export interface ICreateLexiconEntryRestDataParams_2_0 { lexiconId: TMongoId; } export interface ICreateLexiconEntryRestDataBody_2_0 extends Partial> { } export interface ICreateLexiconEntryRestData_2_0 extends ICreateLexiconEntryRestDataBody_2_0, ICreateLexiconEntryRestDataParams_2_0 { } export interface ICreateLexiconEntryRestReturnValue_2_0 extends ILexiconEntry_2_0 { } export interface IUpdateLexiconEntryRestDataParams_2_0 { lexiconId: TMongoId; entryId: TMongoId; } export interface IUpdateLexiconEntryRestDataBody_2_0 extends Partial> { } export interface IUpdateLexiconEntryRestData_2_0 extends IUpdateLexiconEntryRestDataBody_2_0, IUpdateLexiconEntryRestDataParams_2_0 { } export interface IUpdateLexiconEntryRestReturnValue_2_0 { } export interface IDeleteLexiconEntryRestDataParams_2_0 { lexiconId: TMongoId; entryId: TMongoId; } export interface IDeleteLexiconEntryRestData_2_0 extends IDeleteLexiconEntryRestDataParams_2_0 { } export interface IDeleteLexiconEntryRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ILexiconKeyphraseIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the slot * example: food * isMainKeyphrase: * type: boolean * description: Indicates if it is main * example: true * lexiconEntryReference: * $ref: '#/components/schemas/TMongoId' */ export interface ILexiconKeyphraseIndexItem_2_0 { /** The MongoDB ObjectId */ _id: TMongoId; value: string; isMainKeyphrase: boolean; lexiconEntryReference: TMongoId; } export interface IIndexLexiconEntryKeyphrasesRestDataParams_2_0 { lexiconId: TMongoId; entryId: TMongoId; } export interface IIndexLexiconEntryKeyphrasesRestData_2_0 extends IRestPagination, IIndexLexiconEntryKeyphrasesRestDataParams_2_0 { entryId: TMongoId; } export interface IIndexLexiconEntryKeyphrasesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IIndexLexiconKeyphrasesRestDataParams_2_0 { lexiconId: TMongoId; } export interface IIndexLexiconKeyphrasesRestData_2_0 extends IRestPagination, IIndexLexiconKeyphrasesRestDataParams_2_0 { entryId?: TMongoId; } export interface IIndexLexiconKeyphrasesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IUpdateLexiconKeyphraseRestDataParams_2_0 { lexiconId: TMongoId; keyphraseId: TMongoId; } export interface IUpdateLexiconKeyphraseRestDataBody_2_0 extends Partial> { } export interface IUpdateLexiconKeyphraseRestData_2_0 extends IUpdateLexiconKeyphraseRestDataBody_2_0, IUpdateLexiconKeyphraseRestDataParams_2_0 { } export interface IUpdateLexiconKeyphraseRestReturnValue_2_0 { } export interface IAddKeyphraseToLexiconEntryRestDataParams_2_0 { lexiconId: string; entryId: string; } export interface IAddKeyphraseToLexiconEntryRestDataBody_2_0 { value: string; } export interface IAddKeyphraseToLexiconEntryRestData_2_0 extends IAddKeyphraseToLexiconEntryRestDataBody_2_0, IAddKeyphraseToLexiconEntryRestDataParams_2_0 { } export interface IAddKeyphraseToLexiconEntryRestReturnValue_2_0 { } export interface IRemoveKeyphraseFromLexiconEntryRestDataParams_2_0 { lexiconId: string; entryId: string; keyphraseId: string; } export interface IRemoveKeyphraseFromLexiconEntryRestData_2_0 extends IRemoveKeyphraseFromLexiconEntryRestDataParams_2_0 { } export interface IRemoveKeyphraseFromLexiconEntryRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ILexiconSlotIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the slot * example: food */ export interface ILexiconSlotIndexItem_2_0 { /** The MongoDB ObjectId */ _id: TMongoId; name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexLexiconSlotsRestDataParams_2_0 { lexiconId: TMongoId; } export interface IIndexLexiconSlotsRestData_2_0 extends IRestPagination, IIndexLexiconSlotsRestDataParams_2_0 { } export interface IIndexLexiconSlotsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILexiconSlotData_2_0: * type: object * properties: * name: * type: string * description: The name of the Slot. * example: food * * ILexiconSlot_2_0: * allOf: * - $ref: '#/components/schemas/ILexiconSlotData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILexiconSlot_2_0 { /** The MongoDB ObjectId */ _id: TMongoId; name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export declare type IBatchLexiconSlotsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchLexiconSlotsRestDataBody_2_0 { operations: IBatchLexiconSlotsRestOperationSet; } export interface IBatchLexiconSlotsRestDataParams_2_0 { lexiconId: string; } export interface IBatchLexiconSlotsRestData_2_0 extends IBatchLexiconSlotsRestDataBody_2_0, IBatchLexiconSlotsRestDataParams_2_0 { } export interface IBatchLexiconSlotsRestReturnValue_2_0 { created: string[]; updated: string[]; deleted: string[]; } export interface ICreateLexiconSlotRestDataBody_2_0 extends Partial> { lexiconId: TMongoId; } export interface ICreateLexiconSlotRestData_2_0 extends ICreateLexiconSlotRestDataBody_2_0 { } export interface ICreateLexiconSlotRestReturnValue_2_0 extends ILexiconSlot_2_0 { } export interface IUpdateLexiconSlotRestDataParams_2_0 { lexiconId: TMongoId; slotId: TMongoId; } export interface IUpdateLexiconSlotRestDataBody_2_0 extends Partial> { } export interface IUpdateLexiconSlotRestData_2_0 extends IUpdateLexiconSlotRestDataBody_2_0, IUpdateLexiconSlotRestDataParams_2_0 { } export interface IUpdateLexiconSlotRestReturnValue_2_0 { } export interface IDeleteLexiconSlotRestDataParams_2_0 { lexiconId: TMongoId; slotId: TMongoId; } export interface IDeleteLexiconSlotRestData_2_0 extends IDeleteLexiconSlotRestDataParams_2_0 { } export interface IDeleteLexiconSlotRestReturnValue_2_0 { } export interface IAddSlotToLexiconEntryRestDataParams_2_0 { lexiconId: string; entryId: string; } export interface IAddSlotToLexiconEntryRestDataBody_2_0 { value: string; } export interface IAddSlotToLexiconEntryRestData_2_0 extends IAddSlotToLexiconEntryRestDataBody_2_0, IAddSlotToLexiconEntryRestDataParams_2_0 { } export interface IAddSlotToLexiconEntryRestReturnValue_2_0 { } export interface IRemoveSlotFromLexiconEntryRestDataParams_2_0 { lexiconId: string; entryId: string; slotId: string; } export interface IRemoveSlotFromLexiconEntryRestData_2_0 extends IRemoveSlotFromLexiconEntryRestDataParams_2_0 { } export interface IRemoveSlotFromLexiconEntryRestReturnValue_2_0 { } export interface IComposeLexiconDownloadLinkRestDataParams_2_0 { lexiconId: string; } export interface IComposeLexiconDownloadLinkRestData_2_0 extends IComposeLexiconDownloadLinkRestDataParams_2_0 { } export interface IComposeLexiconDownloadLinkRestReturnValue_2_0 { downloadLink: string; } /** * @openapi * * components: * schemas: * IEndpointIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the endpoint * example: New Endpoint * flowId: * type: string * localeId: * type: string * URLToken: * type: string * description: The URLToken of the endpoint * example: f65b289912c929c2a09523dd48eedb1249bb74384f6561f84b4ffc5e84d2f15f * channel: * $ref: '#/components/schemas/TChannelType' * overrideSnapshotConnections: * type: boolean * - $ref: '#/components/schemas/IEntityMeta' */ export interface IEndpointIndexItem_2_0 { _id: TMongoId; channel: TChannelType; /** The URL Token we publish on the endpoints and use to retrieve the correct endpoint configurations */ URLToken: string; /** The flow id. Used to find the correct flow. Can be empty string */ flowId: string; /** The referenceId of the AI Agent assigned to this endpoint */ agentId?: string; /** Determines whether this endpoint targets a flow or an AI agent */ targetType?: "flow" | "agent"; /** The locale Id assigned to the endpoint */ localeId: string; /** The name of the endpoint resource */ name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; /** Whether to override the connections in the Snapshot * with those of the Agent */ overrideSnapshotConnections: boolean; } export interface IIndexEndpointsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexEndpointsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IEndpointData_2_0: * type: object * properties: * foreignId: * type: string * channel: * $ref: '#/components/schemas/TChannelType' * flowId: * type: string * localeId: * type: string * URLToken: * type: string * description: The URLToken of the endpoint * example: f65b289912c929c2a09523dd48eedb1249bb74384f6561f84b4ffc5e84d2f15f * name: * type: string * description: The name of the endpoint * example: New Endpoint * entrypoint: * type: string * description: The ID can be either a Snapshot ID or a Project ID. The Endpoint will refer to the chosen one. * example: 667ed4ae16d66f47dc2a9400 * active: * type: boolean * description: Toggle whether the endpoint is active or not * nluConnectorId: * oneOf: * - $ref: '#/components/schemas/TNLUConnectorType_2_0' * - type: string * useConversations: * type: boolean * description: Whether to collect conversations history for this endpoint * maskIPAddress: * type: boolean * description: Whether to mask sensitive IP address in input object and analytics data for this endpoint * maskAnalytics: * type: boolean * description: Whether to mask sensitive data in analytics for this endpoint * maskLogging: * type: boolean * description: Whether to mask sensitive data in logs for this endpoint * useContactProfiles: * type: boolean * description: Whether to use contact profiles for this endpoint * useAnalytics: * type: boolean * description: Whether we should store analytics for this endpoint * useDashbotAnalytics: * type: boolean * description: Whether we should use Dashbot to collect analytics * dashbotApikey: * type: string * description: The apikey for the dashbot bot * dashbotPlatform: * type: string * disableInputSanitization: * type: string * description: If true, disables input text sanitization after Input Transformer * disableSkipUriTags: * type: string * description: If true, disables skipping of uri tags * overrideSnapshotConnections: * type: boolean * settings: * type: object * properties: * accessScope: * type: string * accessToken: * type: string * appId: * type: string * appSecret: * type: string * backgroundImageUrl: * type: string * basicAuthPassword: * type: string * basicAuthUser: * type: string * botUserId: * type: string * businessHours: * type: object * properties: * businessHours: * type: array * items: * type: object * properties: * startTime: * type: string * endTime: * type: string * weekDay: * type: string * enabled: * type: boolean * text: * type: string * mode: * type: string * timeZone: * type: string * title: * type: string * colorScheme: * type: string * connectionName: * type: string * customJSON: * type: string * designTemplate: * type: integer * disableHtmlContentSanitization: * type: boolean * disableInputAutocomplete: * type: boolean * disableInputAutogrow: * type: boolean * disableUrlButtonSanitization: * type: boolean * enableGenericHTMLStyling: * type: boolean * enableAsyncCommunication: * type: boolean * engagementMessageText: * type: string * displayGetStartedButton: * type: boolean * dynamicImageAspectRatio: * type: boolean * enableCollectMetadata: * type: boolean * enableConnectionStatusIndicator: * type: boolean * enableDemoWebchat: * type: boolean * enableFileUpload: * type: boolean * enablePersistentMenu: * type: boolean * enableRating: * type: string * enum: * - onRequest * - always * - once * enableSTT: * type: boolean * enableTTS: * type: boolean * enableUnreadMessageBadge: * type: boolean * enableUnreadMessagePreview: * type: boolean * enableUnreadMessageSound: * type: boolean * enableUnreadMessageTitleIndicator: * type: boolean * enableTypingIndicator: * type: boolean * facebookPageToken: * type: string * focusInputAfterPostback: * type: boolean * getStartedButtonText: * type: string * getStartedPayload: * type: string * getStartedText: * type: string * getStartedData: * type: string * headerLogoUrl: * type: string * hubSecret: * type: string * inputAutogrowMaxRows: * type: number * inputPlaceholder: * type: string * language: * type: string * lineChannelAccessToken: * type: string * lineChannelSecret: * type: string * maintenance: * type: object * properties: * enabled: * type: boolean * mode: * type: string * text: * type: string * title: * type: string * mergeContactProfiles: * type: boolean * messageDelay: * type: integer * messageLogoUrl: * type: string * overwriteWebchatBundleUrl: * type: string * ratingTitleText: * type: string * ratingCommentText: * type: string * ratingMessageHistoryRatingText: * type: string * ratingMessageHistoryCommentText: * type: string * reparseAlexaSlots: * type: boolean * requestFacebookProfileData: * type: boolean * restEndpointAuthentication: * type: object * description: > * Authentication enforced on inbound requests for REST * endpoints. `POST /v2.0/endpoints/{endpointId}/apikeys`. Defaults to * `no-auth` for backward compatibility. * properties: * authenticationType: * type: string * enum: * - no-auth * - apiKey * sessionExpiration: * type: integer * shouldOverwriteWebchatBundleUrl: * type: boolean * showEngagementMessagesInChat: * type: boolean * slackOAuthAccessToken: * type: string * slackVerifyToken: * type: string * sunshineConversationsChannelKeyId: * type: string * sunshineConversationsChannelSecret: * type: string * sunshineConversationsChannelUri: * type: string * format: uri * tenantId: * type: string * updateContactProfileWithFacebookProfile: * type: boolean * voice: * type: string * webhookEndpointAuthentication: * type: object * description: > * Authentication enforced on inbound webhook requests for * Webhook/Generic endpoints. Mirrors the nested shape used * by `mcpServerEndpointAuthentication` on MCP Server endpoints. * When `authenticationType` is `apiKey`, requests must carry * a valid `x-cognigy-endpoint-key` header that matches a key generated * via `POST /v2.0/endpoints/{endpointId}/apikeys`. Defaults to * `no-auth` for backward compatibility. * properties: * authenticationType: * type: string * enum: * - no-auth * - apiKey * webhookUrl: * type: string * format: uri * skill: * type: object * persistentMenu: * type: object * transformer: * type: object * properties: * abortOnError: * type: boolean * description: > * If true, then we will abort the message processing if the transformer throws an error. * Otherwise, we will continue with normal message processing in the event of an error. * transformer: * type: string * description: > * The transformer object as written by the user. * This will be displayed in the UI since it includes typings. * transpiledTransformer: * type: string * description: > * The transformer object written by the user, but without typings. * This will be executed. * inputTransformerEnabled: * type: boolean * outputTransformerEnabled: * type: boolean * finalPingTransformerEnabled: * type: boolean * notifyTransformerEnabled: * type: boolean * injectTransformerEnabled: * type: boolean * handoverSettings: * type: object * properties: * provider: * type: string * enum: * - cognigy * - none * - rce * providerSettings: * type: object * properties: * forwardOnlyHandoverConversations: * type: boolean * description: > * (rce) Whether to forward all conversations * to the provider, or only the conversations * that trigger a handover. If this setting is true, * then we will only forward conversations were handover * was triggered. * getQueueUpdates: * type: boolean * description: > * (rce) Indicates if queue updates should be enabled * to receive events about the estimated wait time * apiVersion: * type: string * description: (salesforce) Salesforce LiveAgent API Version * baseUrl: * type: string * description: Base URL of the LiveAgent API Deployment * apiAccessToken: * type: string * description: (rce) The API access token you can create within RCE * baseApiUrl: * type: string * description: (rce) The API URL to your RCE installation * realtimeAccessToken: * type: string * description: (rce) The access token for your rce source sdk source * realtimeEndpointUrl: * type: string * description: (rce) The endpoint URL of your rce source sdk source * webhookSecret: * type: string * description: (rce) The secret used to secure webhooks in RCE * botCategoryId: * type: string * description: (rce) The ID of the category you use as the 'bot category' within RCE * agentCategoryId: * type: string * description: (rce) The ID of the category you use as the 'bot category' within RCE * organizationId: * type: string * description: (salesforce) Salesforce Organization ID * deploymentId: * type: string * description: (salesforce) Salesforce LiveAgent Deployment ID * buttonId: * type: string * description: (salesforce) Salesforce LiveAgent Chat Button ID * agentAssistSettings: * type: object * properties: * copilotType: * type: string * enum: * - none * - workspace * - whisper * description: Copilot Type * agentAssistFlowId: * type: string * description: Copilot flow ID * agentAssistConfigId: * type: string * description: Selected Copilot Config ReferenceId * enableTranscriptTile: * type: boolean * description: Enable the transcript tile * enableTranscriptTileChatInput: * type: boolean * description: Enable the chat input for transcript tile * redactTranscriptTileMessages: * type: boolean * description: Enable redaction of messages in transcript tile * enableBranding: * type: boolean * default: true * description: Show Cognigy branding in the Copilot Workspace. Absent means shown, so endpoints saved before this setting existed keep their branding. * enableAgentCopilotAuthentication: * type: boolean * description: Enable authentication for agent copilot * blockNonJWTRequests: * type: boolean * description: Block requests made to the endpoint without a JWT token * agentCopilotAuthentication: * type: string * description: Authentication connection reference Id for agent copilot (used when copilotAuthenticationMethod is "tokenSecret") * copilotAuthenticationMethod: * type: string * enum: * - default * - tokenSecret * - publicKey * - keyStore * description: Method used to verify the JWT sent in the Copilot URL * copilotAuthenticationPublicKeys: * type: array * items: * type: string * description: PEM-encoded public keys used to verify the Copilot JWT when copilotAuthenticationMethod is "publicKey" (multiple keys allow rotation) * copilotAuthenticationKeyStoreUrl: * type: string * description: JWKS key store URL used to verify the Copilot JWT (by kid) when copilotAuthenticationMethod is "keyStore" * oAuth2Connection: * type: string * description: OAuth2 Connection for Genesys Cloud * endSessionOnHandoverClose: * type: boolean * description: Whether the agentAssist session state is deleted when the handover closes (default true) * sessionTTLOnHandoverClose: * type: number * description: How long, in minutes, the agentAssist session state is kept after the handover closes when endSessionOnHandoverClose is false, instead of being deleted immediately (default 120) * orgDataPrivacySettings: * $ref: '#/components/schemas/IEndpoitOrgDataPrivacySettings_2_0' * IEndpoint_2_0: * allOf: * - $ref: '#/components/schemas/IEndpointData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IEndpoint_2_0 { _id: TMongoId; channel: TChannelType; /** The flow id. Used to find the correct flow. Can be empty string */ flowId: string; /** The referenceId of the AI Agent assigned to this endpoint */ agentId?: string; /** Determines whether this endpoint targets a flow or an AI agent */ targetType?: "flow" | "agent"; /** The referenceId of the locale to use */ localeId: string; /** The URL Token we publish on the endpoints and use to retrieve the correct endpoint configurations */ URLToken: string; /** The name of the endpoint resource */ name: string; /** The Id of the projectId or the snapshotId */ entrypoint: TMongoId; /** Toggle whether the endpoint is active or not */ active: boolean; /** The referenceid of the NLUConnector to use for this endpoint. Can be an empty string. */ nluConnectorId: string; /** * Whether to collect conversations history for this endpoint */ useConversations: boolean; /** * Whether to mask sensitive IP address in input object and analytics data for this endpoint */ maskIPAddress?: boolean; /** * Whether to mask sensitive data in analytics for this endpoint */ maskAnalytics: boolean; /** * Whether to mask sensitive data in logs for this endpoint */ maskLogging: boolean; /** Whether to use contact profiles for this endpoint */ useContactProfiles: boolean; /** Whether we should store analytics for this endpoint */ useAnalytics: boolean; /** Whether we should use Dashbot to collect analytics */ useDashbotAnalytics: boolean; /** The apikey for the dashbot bot */ dashbotApikey: string; /** * The selected platform of the Dashbot * bot to collect analytics for. * Only matters if the useDashbotAnalytics * is true. */ dashbotPlatform: TDashbotPlatform; /** * If set to `true`, disables input sanitization */ disableInputSanitization: boolean; /** * If set to `true`, disables skipping of uri tags */ disableSkipUriTags: boolean; /** * Optional endpoint specific settings e.g. Facebook Page token */ settings: AnyEndpointSettings; transformer: ITransformerFunction_2_0; handoverSettings: IHandoverSettings_2_0; foreignId: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; translationSettings: IEndpointTranslationSettings_2_0; /** Whether to override the connections in the Snapshot * with those of the Agent */ overrideSnapshotConnections: boolean; fileStorageSettings: IEndpointFileStorageSettings_2_0; orgDataPrivacySettings?: IEndpoitOrgDataPrivacySettings_2_0; /** Whether to use the webrtc application exists for this endpoint */ webrtcClient?: boolean; sipConnectivityInfo?: ISipConnectivityInfo; /** The label of the webrtc widget */ webrtcWidgetConfig?: IWebrtcWidgetConfig; /** Whether to enable mocking code for the node execution */ enableMocking: boolean; } export interface ITransformerFunction_2_0 { /** * If true, then we will * abort the message processing * if the transformer throws an * error. Otherwise, we will * continue with normal message * processing in the event of an error */ abortOnError: boolean; /** * The transformer object * as written by the user. * This will be displayed in the UI * since it includes typings. */ transformer: string; /** * The transformer object * written by the user, but * without typings. This will * be executed. */ transpiledTransformer?: string; inputTransformerEnabled: boolean; outputTransformerEnabled: boolean; finalPingTransformerEnabled: boolean; notifyTransformerEnabled: boolean; injectTransformerEnabled: boolean; } export interface IHandoverSettings_2_0 { provider: THandoverProvider; providerSettings?: TProviderSettings; agentAssistSettings?: IAgentAssistSettings; } /** * @openapi * * components: * schemas: * IEndpointTranslationSettings_2_0: * type: object * properties: * translationEnabled: * type: boolean * description: Whether or not Translation is enabled for the Endpoint * flowLanguage: * type: string * description: The language of the Flow outputs * inputLanguage: * type: string * description: The language of the user inputs ('auto' for auto-detection) * noTranslateMarker: * type: string * description: Don't translate inputs and outputs which are prefixed with this prefix * glossaryId: * type: string * description: The glossary to use for the bot output translation * glossaryIdInput: * type: string * description: The glossary to use for the user input translation * formality: * type: string * description: Sets whether the translated text should lean towards formal or informal language * padPayloads: * type: boolean * description: If true, prevents all user inputs based on payloads to be translated * alwaysRemoveNoTranslateMarker: * type: boolean * description: Wether we remove No Translation Markers, even if translation is not enabled * setInputLanguageOnExecutionCount: * type: boolean * description: If the input language is set to 'auto', it will be fixed to its current value on this execution count */ export interface IEndpointTranslationSettings_2_0 { translationEnabled: boolean; flowLanguage: string; inputLanguage: "auto" | string; noTranslateMarker: string; glossaryId?: string; glossaryIdInput?: string; formality?: "default" | "more" | "less" | "prefer_more" | "prefer_less"; padPayloads: boolean; alwaysRemoveNoTranslateMarker: boolean; setInputLanguageOnExecutionCount: number; } export interface IEndpointFileStorageSettings_2_0 { storageProvider: "aws" | "azure" | "googleCloud" | "none"; awsConnection?: string; azureConnection?: string; googleCloudConnection?: string; /** Lifetime of generated download links in days, default 30 */ downloadLinkTtlInDays?: number; } /** * @openapi * * components: * schemas: * IEndpoitOrgDataPrivacySettings_2_0: * description: Organisation data privacy settings overwrite the ones defined on endpoint-level * type: object * properties: * enabled: * type: boolean * description: Whether or not organisation data privacy settings are enabled * useAnalytics: * type: boolean * storeDataPayload: * type: boolean * useContactProfiles: * type: boolean * useConversations: * type: boolean * maskIPAddress: * type: boolean * maskAnalytics: * type: boolean * maskLogging: * type: boolean */ export interface IEndpoitOrgDataPrivacySettings_2_0 { enabled: boolean; useAnalytics: boolean; storeDataPayload?: boolean; useContactProfiles: boolean; useConversations: boolean; maskIPAddress?: boolean; maskAnalytics: boolean; maskLogging: boolean; } export declare type IBatchEndpointsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchEndpointsRestDataBody_2_0 { operations: IBatchEndpointsRestOperationSet; } export interface IBatchEndpointsRestDataQuery_2_0 extends IProjectScope { } export interface IBatchEndpointsRestData_2_0 extends IBatchEndpointsRestDataBody_2_0, IBatchEndpointsRestDataQuery_2_0 { } export interface IBatchEndpointsRestReturnValue_2_0 { } export interface ICreateEndpointRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateEndpointRestDataQuery_2_0 { resourceId?: string; } export interface ICreateEndpointRestData_2_0 extends ICreateEndpointRestDataBody_2_0, ICreateEndpointRestDataQuery_2_0 { } export interface ICreateEndpointRestReturnValue_2_0 extends IEndpoint_2_0 { } /** The endpoint's call-recording bucket. `enabled: true` with a null ref means off. */ export interface IEndpointVoiceSettingsRecording { enabled: boolean; recordingRef: string | null; } export interface IEndpointVoiceSettings { speechOptions?: Record | null; fallbackSpeechOptions?: Record | null; recognizerOptions?: Record | null; createdAt?: string | null; updatedAt?: string | null; updatedBy?: { id: string; name: string; } | null; phoneNumbers: { assigned: Record[]; } | null; recording?: IEndpointVoiceSettingsRecording | null; [key: string]: unknown; } export interface IEndpointVoiceSettingsPatch { speechOptions?: Record | null; fallbackSpeechOptions?: Record | null; recognizerOptions?: Record | null; phoneNumbers?: { assigned: string[]; }; recording?: IEndpointVoiceSettingsRecording | null; expectedUpdatedAt?: string; } export interface IReadEndpointRestDataParams_2_0 { endpointId: string; } export interface IReadEndpointRestData_2_0 extends IReadEndpointRestDataParams_2_0 { } export interface IReadEndpointRestReturnValue_2_0 extends IEndpoint_2_0 { voiceSettings?: IEndpointVoiceSettings | null; } export interface IUpdateEndpointRestDataBody_2_0 extends Partial> { createWebrtcClient?: boolean; voiceSettings?: IEndpointVoiceSettingsPatch; } export interface IUpdateEndpointRestDataParams_2_0 { endpointId: string; } export interface IUpdateEndpointRestData_2_0 extends IUpdateEndpointRestDataBody_2_0, IUpdateEndpointRestDataParams_2_0 { } export interface IUpdateEndpointRestReturnValue_2_0 { } export interface IDeleteEndpointRestDataParams_2_0 { endpointId: string; channelType?: TChannelType; } export interface IDeleteEndpointRestData_2_0 extends IDeleteEndpointRestDataParams_2_0 { } export interface IDeleteEndpointRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IEndpointApiKey_2_0: * description: > * Public view of an Endpoint API Key. Never contains the SHA-256 * hash or the plaintext key. * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: Customer-provided display name for the key. * example: My CRM webhook * keyPreview: * type: string * description: > * Masked preview of the plaintext key (first 4 chars + masked * middle + last 4 chars). Captured at generation time. * example: 8a4f••••••••7c2e * createdAt: * $ref: '#/components/schemas/TTimestamp' * ICreateEndpointApiKeyRestDataBody_2_0: * description: Request body for creating a new Endpoint API Key. * type: object * required: * - name * properties: * name: * type: string * description: Customer-provided display name for the key. * example: My CRM webhook * ICreateEndpointApiKeyRestReturnValue_2_0: * description: > * Response body returned exactly once at creation time. The plaintext * `key` is never persisted and never returned by any other route. * allOf: * - $ref: '#/components/schemas/IEndpointApiKey_2_0' * - type: object * required: * - key * properties: * key: * type: string * description: > * The plaintext API key. Returned exactly once. The caller * must persist it client-side — the server will not show it * again. * example: 8a4fcd9b2e5f17b03f9c4a6d7c2e5f17b03f9c4a6d7c2e5f17b03f9c4a6d7c2e * IListEndpointApiKeysRestReturnValue_2_0: * description: Array of Endpoint API Keys for the given endpoint. * type: array * items: * $ref: '#/components/schemas/IEndpointApiKey_2_0' */ /** * Public view of an Endpoint API Key — the shape returned by the list route * and the metadata portion of the create response. Never carries `keyHash` * or the plaintext `key`. */ export interface IEndpointApiKey_2_0 { _id: TMongoId; name: string; keyPreview: string; createdAt: TTimestamp; } export interface ICreateEndpointApiKeyRestDataParams_2_0 { endpointId: string; } export interface ICreateEndpointApiKeyRestDataBody_2_0 { name: string; } export interface ICreateEndpointApiKeyRestData_2_0 extends ICreateEndpointApiKeyRestDataParams_2_0, ICreateEndpointApiKeyRestDataBody_2_0 { } /** * Response body for POST. Includes the plaintext `key`, returned exactly * once at generation time and never persisted. */ export interface ICreateEndpointApiKeyRestReturnValue_2_0 extends IEndpointApiKey_2_0 { key: string; } export interface IListEndpointApiKeysRestDataParams_2_0 { endpointId: string; } export interface IListEndpointApiKeysRestData_2_0 extends IListEndpointApiKeysRestDataParams_2_0 { } export declare type IListEndpointApiKeysRestReturnValue_2_0 = IEndpointApiKey_2_0[]; export interface IDeleteEndpointApiKeyRestDataParams_2_0 { endpointId: string; keyId: string; } export interface IDeleteEndpointApiKeyRestData_2_0 extends IDeleteEndpointApiKeyRestDataParams_2_0 { } export interface IDeleteEndpointApiKeyRestReturnValue_2_0 { } export interface IReadEndpointVoiceSettingsRestData_2_0 { endpointId: string; } export interface IReadEndpointVoiceSettingsRestReturnValue_2_0 { voiceSettings: IEndpointVoiceSettings | null; } export interface IListVoicePhoneNumbersRestData_2_0 { projectId: string; /** Omit both to receive every row; vg-resources-api owns the default page size. */ page?: number; pageSize?: number; } export interface IListVoicePhoneNumbersRestReturnValue_2_0 { data: Record[]; total: number; } export declare type TVoiceSpeechCredentialType = "primary" | "fallback"; export interface IListVoiceSpeechCredentialsRestData_2_0 { projectId: string; /** Omit both to receive every row; vg-resources-api owns the default page size. */ page?: number; pageSize?: number; /** * Omit to receive both kinds (Project Resources). `primary` also returns legacy * rows whose type was never set. Credential pickers (Endpoints, AI Agents) pass `primary`. */ type?: TVoiceSpeechCredentialType; } export interface IListVoiceSpeechCredentialsRestReturnValue_2_0 { data: Record[]; total: number; } export interface IListVoiceSpeechCredentialVoicesRestData_2_0 { projectId: string; credentialId: string; capability: "tts" | "stt"; } export interface IListVoiceSpeechCredentialVoicesRestReturnValue_2_0 { data: Record[]; } /** * @openapi * * components: * schemas: * IPlaybookStepAssertData_2_0: * type: object * properties: * type: * type: string * description: The type of the Assert * enum: * - assertText * - assertData * - assertState * - assertContext * - assertIntent * - assertSlot * params: * type: object * * IPlaybookStepAssert_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookStepAssertData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' */ export interface IPlaybookStepAssert_2_0 { _id: TMongoId; type: TAssertType_2_0; params: any; } export declare type TAssertType_2_0 = "assertText" | "assertData" | "assertState" | "assertContext" | "assertIntent" | "assertSlot"; /** * @openapi * * components: * schemas: * IPlaybookStepData_2_0: * type: object * properties: * text: * type: string * description: The text of the playbook step * example: hello world! * data: * type: object * description: The data of this playbook step * * IPlaybookStep_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookStepData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * asserts: * type: array * items: * $ref: '#/components/schemas/IPlaybookStepAssert_2_0' */ export interface IPlaybookStep_2_0 { _id: TMongoId; text?: string; data?: any; asserts: IPlaybookStepAssert_2_0[]; } /** * @openapi * * components: * schemas: * IPlaybookData_2_0: * type: object * properties: * name: * type: string * description: The name of the Playbook * example: New Playbook * abortOnError: * type: boolean * description: Flag whether to stop Playbook execution when an assert-error occurred * timeout: * type: integer * description: A time (in ms) after which a playbook step is 'invalid/failed' * example: 2000 * minimum: 1 * * IPlaybook_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * - type: object * properties: * steps: * type: array * items: * $ref: '#/components/schemas/IPlaybookStep_2_0' * */ export interface IPlaybook_2_0 { _id: TMongoId; name: string; abortOnError: boolean; timeout: number; steps: IPlaybookStep_2_0[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export declare type IBatchPlaybooksRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchPlaybooksRestDataBody_2_0 { operations: IBatchPlaybooksRestOperationSet; } export interface IBatchPlaybooksRestDataQuery_2_0 extends IProjectScope { } export interface IBatchPlaybooksRestData_2_0 extends IBatchPlaybooksRestDataBody_2_0, IBatchPlaybooksRestDataQuery_2_0 { } export interface IBatchPlaybooksRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IPlaybookIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the playbook * example: New Playbook * - $ref: '#/components/schemas/IEntityMeta' */ export interface IPlaybookIndexItem_2_0 { _id: TMongoId; name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexPlaybooksRestData_2_0 extends IRestPagination, Partial { } export interface IIndexPlaybooksRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreatePlaybookRestDataQuery_2_0 { resourceId?: string; } export interface ICreatePlaybookRestDataBody_2_0 extends IProjectScope, Partial> { resourceType?: TResourceType; } export interface ICreatePlaybookRestData_2_0 extends ICreatePlaybookRestDataBody_2_0, ICreatePlaybookRestDataQuery_2_0 { } export interface ICreatePlaybookRestReturnValue_2_0 extends IPlaybook_2_0 { } export interface IReadPlaybookRestDataParams_2_0 { playbookId: string; } export interface IReadPlaybookRestData_2_0 extends IReadPlaybookRestDataParams_2_0 { } export interface IReadPlaybookRestReturnValue_2_0 extends IPlaybook_2_0 { } export interface IUpdatePlaybookRestDataParams_2_0 { playbookId: string; } export interface IUpdatePlaybookRestDataBody_2_0 extends Partial> { } export interface IUpdatePlaybookRestData_2_0 extends IUpdatePlaybookRestDataBody_2_0, IUpdatePlaybookRestDataParams_2_0 { } export interface IUpdatePlaybookRestReturnValue_2_0 { } export interface IDeletePlaybookRestDataParams_2_0 { playbookId: string; } export interface IDeletePlaybookRestData_2_0 extends IDeletePlaybookRestDataParams_2_0 { } export interface IDeletePlaybookRestReturnValue_2_0 { } export interface ICreatePlaybookStepRestDataParams_2_0 { playbookId: TMongoId; } export interface ICreatePlaybookStepRestDataBody_2_0 extends Partial> { } export interface ICreatePlaybookStepRestData_2_0 extends ICreatePlaybookStepRestDataBody_2_0, ICreatePlaybookStepRestDataParams_2_0 { } export interface ICreatePlaybookStepRestReturnValue_2_0 extends IPlaybookStep_2_0 { } export interface IUpdatePlaybookStepRestDataParams_2_0 { playbookId: TMongoId; stepId: TMongoId; } export interface IUpdatePlaybookStepRestDataBody_2_0 extends Partial> { } export interface IUpdatePlaybookStepRestData_2_0 extends IUpdatePlaybookStepRestDataBody_2_0, IUpdatePlaybookStepRestDataParams_2_0 { } export interface IUpdatePlaybookStepRestReturnValue_2_0 { } export interface IDeletePlaybookStepRestDataParams_2_0 { playbookId: TMongoId; stepId: TMongoId; } export interface IDeletePlaybookStepRestData_2_0 extends IDeletePlaybookStepRestDataParams_2_0 { } export interface IDeletePlaybookStepRestReturnValue_2_0 { } export interface ICreatePlaybookStepAssertRestDataParams_2_0 { playbookId: TMongoId; stepId: TMongoId; } export interface ICreatePlaybookStepAssertRestDataBody_2_0 extends Partial> { } export interface ICreatePlaybookStepAssertRestData_2_0 extends ICreatePlaybookStepAssertRestDataBody_2_0, ICreatePlaybookStepAssertRestDataParams_2_0 { } export interface ICreatePlaybookStepAssertRestReturnValue_2_0 extends IPlaybookStepAssert_2_0 { } export interface IUpdatePlaybookStepAssertRestDataParams_2_0 { playbookId: TMongoId; stepId: TMongoId; assertId: TMongoId; } export interface IUpdatePlaybookStepAssertRestDataBody_2_0 extends Partial> { } export interface IUpdatePlaybookStepAssertRestData_2_0 extends IUpdatePlaybookStepAssertRestDataBody_2_0, IUpdatePlaybookStepAssertRestDataParams_2_0 { } export interface IUpdatePlaybookStepAssertRestReturnValue_2_0 { } export interface IDeletePlaybookStepAssertRestDataParams_2_0 { playbookId: TMongoId; stepId: TMongoId; assertId: TMongoId; } export interface IDeletePlaybookStepAssertRestData_2_0 extends IDeletePlaybookStepAssertRestDataParams_2_0 { } export interface IDeletePlaybookStepAssertRestReturnValue_2_0 { } export interface IChangePlaybookStepOrderRestDataParams_2_0 { playbookId: TMongoId; } export interface IChangePlaybookStepOrderRestDataBody_2_0 { stepIds: TMongoId[]; } export interface IChangePlaybookStepOrderRestData_2_0 extends IChangePlaybookStepOrderRestDataBody_2_0, IChangePlaybookStepOrderRestDataParams_2_0 { } export interface IChangePlaybookStepOrderRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IPlaybookRunIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/IEntityMeta' * - type: object * properties: * status: * type: string * enum: * - successful * - failed * description: Status of the whole Playbook Run * example: successful */ export interface IPlaybookRunIndexItem_2_0 { _id: TMongoId; status: "successful" | "failed"; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexPlaybookRunsRestDataParams_2_0 { playbookId: TMongoId; } export interface IIndexPlaybookRunsRestData_2_0 extends IRestPagination, IIndexPlaybookRunsRestDataParams_2_0, Partial { } export interface IIndexPlaybookRunsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } declare const playbookRunStatus: readonly [ "successful", "failed" ]; export declare type TPlaybookRunStatus = typeof playbookRunStatus[number]; export declare type TPlaybookAssertStatus = typeof playbookRunStatus[number]; /** * @openapi * * components: * schemas: * IPlaybookRunStepResultAssertData_2_0: * type: object * properties: * type: * type: string * description: Type of the assert * example: assertText * status: * type: string * enum: * - successful * - failed * description: Whether this playbook step was successful or failed * example: failed * params: * type: object * description: Parameters for the assert * negate: * type: boolean * description: Whether the assert was negated * example: false * actual: * type: object * description: Actual output * * IPlaybookRunStepResultAssert_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookRunStepResultAssertData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' */ export interface IPlaybookRunStepResultAssert_2_0 { _id: TMongoId; type: string; status: TPlaybookAssertStatus; params: { [key: string]: any; }; actual: { [key: string]: any; }; } /** * @openapi * * components: * schemas: * IPlaybookRunStepResultData_2_0: * type: object * properties: * status: * type: string * enum: * - successful * - failed * description: Whether this playbook step was successful or failed * example: failed * text: * type: string * description: Text which we shoot into the system * example: Hello, how are you? * data: * type: object * description: Data which we shoot into the system * * IPlaybookRunStepResult_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookRunStepResultData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * asserts: * type: array * items: * $ref: '#/components/schemas/IPlaybookRunStepResultAssert_2_0' * timeout: * type: boolean * description: Whether the step timed out * */ export interface IPlaybookRunStepResult_2_0 { _id: TMongoId; status: TPlaybookRunStatus; text: string; data: any; asserts: IPlaybookRunStepResultAssert_2_0[]; timeout: boolean; } /** * @openapi * * components: * schemas: * IPlaybookRunData_2_0: * type: object * properties: * status: * type: string * enum: * - successful * - failed * description: Whether the playbook run was successful or failed * example: successful * * IPlaybookRun_2_0: * allOf: * - $ref: '#/components/schemas/IPlaybookRunData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * - type: object * properties: * stepResults: * type: array * items: * $ref: '#/components/schemas/IPlaybookRunStepResult_2_0' * flowId: * type: string * description: Reference Id of the flow * example: uuid * localeId: * type: string * description: Reference Id of the locale * example: uuid * entrypoint: * type: string * description: snapshot or project ID * example: ^[a-z0-9]{24}$ */ export interface IPlaybookRun_2_0 { _id: TMongoId; status: TPlaybookRunStatus; stepResults: IPlaybookRunStepResult_2_0[]; createdAt: number; lastChanged: number; createdBy: TMongoId; flowId: TMongoId; localeId: TMongoId; entrypoint: TMongoId; } export interface IReadPlaybookRunRestDataParams_2_0 { playbookId: string; playbookRunId: string; } export interface IReadPlaybookRunRestData_2_0 extends IReadPlaybookRunRestDataParams_2_0 { } export interface IReadPlaybookRunRestReturnValue_2_0 extends IPlaybookRun_2_0 { } export interface IDeletePlaybookRunRestDataParams_2_0 { playbookId: string; playbookRunId: string; } export interface IDeletePlaybookRunRestData_2_0 extends IDeletePlaybookRunRestDataParams_2_0 { } export interface IDeletePlaybookRunRestReturnValue_2_0 { } declare const taskStatus: readonly [ "queued", "active", "done", "cancelling", "cancelled", "error" ]; export declare type TTaskStatus = typeof taskStatus[number]; /** * @openapi * * components: * schemas: * TTaskProgress: * type: integer * minimum: 0 * maximum: 100 */ export declare type TTaskProgress = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100; export interface ITaskReturnValue { /** * The mongo Id */ _id: string; /** * The name of the task */ type: string; /** * The parameters of the task */ parameters: { [key: string]: any; }; /** * The status of the task */ status: TTaskStatus; lastChangedAt: number; createdAt: number; progress: TTaskProgress; /** * Kubernetes job specific information. If the task is not running in a kubernetes job, * this will be undefined. */ job?: { name: string; namespace: string; timeoutInMs: number; }; } export interface ISchedulePlaybookRunRestDataParams_2_0 { playbookId: string; } export interface ISchedulePlaybookRunRestData_2_0 extends ISchedulePlaybookRunRestDataParams_2_0, ISchedulePlaybookRunRestDataBody_2_0 { } export declare type ISchedulePlaybookRunRestReturnValue_2_0 = ITaskReturnValue; /** * @openapi * * components: * schemas: * ISchedulePlaybookRunRestReturnValue_2_0: * type: object * description: Created task metadata (same shape as ITaskReturnValue). * properties: * _id: * $ref: '#/components/schemas/TMongoId' * status: * type: string * description: Task status (e.g. queued, active, done) * example: queued * type: * type: string * description: Task type (e.g. runPlaybook) * example: runPlaybook * parameters: * type: object * description: Task payload (playbookId, projectId, entrypoint, flowId, localeId, etc.) * createdAt: * type: number * description: Unix timestamp in seconds when the task was created * lastChangedAt: * type: number * description: Unix timestamp in seconds when the task was last updated * progress: * type: integer * minimum: 0 * maximum: 100 * description: Task progress (0-100) * job: * type: object * description: Present only when the task runs as a Kubernetes job * properties: * name: { type: string } * namespace: { type: string } * timeoutInMs: { type: number } * * ISchedulePlaybookRunRestDataBody_2_0: * allOf: * - type: object * properties: * entrypoint: * type: string * description: The unique identifier for the Snapshot or Project used for the Playbook run. * example: 61f25579055c2f43c249a181 * flowId: * type: string * description: The Flow ID for the Playbook run. * example: 010d1970-89b9-4012-892b-53c78ef6c117 * localeId: * type: string * description: The Locale ID for the Playbook run. * example: 8b3b45e2-48f9-446d-a4c5-35d8284a01b2 */ export interface ISchedulePlaybookRunRestDataBody_2_0 { entrypoint: string; flowId: string; localeId: string; } export interface ISnippetIndexItem_2_0 { _id: string; /** * The label (name) of the snippet. */ label: string; /** * The type of the snippet * based on what the snippet accesses * (profile, input or context) */ type: TSnippetType; /** * The script the snippet executes */ script: string; /** * The reference id of the token used during execution. */ referenceId: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexSnippetsRestDataParams_2_0 extends IProjectScope { } export interface IIndexSnippetsRestData_2_0 extends IIndexSnippetsRestDataParams_2_0, IRestPagination { } export interface IIndexSnippetsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ISnippet_2_0: * type: object * properties: * label: * type: string * description: The name of the Token. * example: New snippet */ export interface ISnippet_2_0 { _id?: string; /** * The label (name) of the snippet. */ label: string; /** * The type of the snippet * based on what the snippet accesses * (profile, input or context) */ type: TSnippetType; /** * The script the snippet executes */ script: string; /** * The reference id of the token used during execution. */ referenceId?: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface ICreateSnippetRestDataParams_2_0 extends IProjectScope { } export interface ICreateSnippetRestDataBody_2_0 extends Partial> { } export interface ICreateSnippetRestData_2_0 extends ICreateSnippetRestDataParams_2_0, ICreateSnippetRestDataBody_2_0 { } export interface ICreateSnippetRestReturnValue_2_0 extends ISnippet_2_0 { } export interface IDeleteSnippetRestDataParams_2_0 extends IProjectScope { snippetId: string; } export interface IDeleteSnippetRestData_2_0 extends IDeleteSnippetRestDataParams_2_0 { } export interface IDeleteSnippetRestReturnValue_2_0 { } declare const cssColorName: readonly [ "aliceBlue", "antiqueWhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedAlmond", "blue", "blueViolet", "brown", "burlyWood", "cadetBlue", "chartreuse", "chocolate", "coral", "cornflowerBlue", "cornsilk", "crimson", "cyan", "darkBlue", "darkCyan", "darkGoldenRod", "darkGray", "darkGrey", "darkGreen", "darkKhaki", "darkMagenta", "darkOliveGreen", "darkOrange", "darkOrchid", "darkRed", "darkSalmon", "darkSeaGreen", "darkSlateBlue", "darkSlateGray", "darkSlateGrey", "darkTurquoise", "darkViolet", "deepPink", "deepSkyBlue", "dimGray", "dimGrey", "dodgerBlue", "fireBrick", "floralWhite", "forestGreen", "fuchsia", "gainsboro", "ghostWhite", "gold", "goldenRod", "gray", "grey", "green", "greenYellow", "honeyDew", "hotPink", "indianRed", "indigo", "ivory", "khaki", "lavender", "lavenderBlush", "lawnGreen", "lemonChiffon", "lightBlue", "lightCoral", "lightCyan", "lightGoldenRodYellow", "lightGray", "lightGrey", "lightGreen", "lightPink", "lightSalmon", "lightSeaGreen", "lightSkyBlue", "lightSlateGray", "lightSlateGrey", "lightSteelBlue", "lightYellow", "lime", "limeGreen", "linen", "magenta", "maroon", "mediumAquaMarine", "mediumBlue", "mediumOrchid", "mediumPurple", "mediumSeaGreen", "mediumSlateBlue", "mediumSpringGreen", "mediumTurquoise", "mediumVioletRed", "midnightBlue", "mintCream", "mistyRose", "moccasin", "navajoWhite", "navy", "oldLace", "olive", "oliveDrab", "orange", "orangeRed", "orchid", "paleGoldenRod", "paleGreen", "paleTurquoise", "paleVioletRed", "papayaWhip", "peachPuff", "peru", "pink", "plum", "powderBlue", "purple", "rebeccaPurple", "red", "rosyBrown", "royalBlue", "saddleBrown", "salmon", "sandyBrown", "seaGreen", "seaShell", "sienna", "silver", "skyBlue", "slateBlue", "slateGray", "slateGrey", "snow", "springGreen", "steelBlue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whiteSmoke", "yellow", "yellowGreen", "none", "transparent" ]; export declare type TCSSColorName = typeof cssColorName[number]; declare const cognigyColorName: readonly [ "amber", "blueGrey", "cognigyBlue", "cognigyGrey", "deepOrange", "deepPurple", "lightBlue", "lightGreen" ]; export declare type TCognigyColorName = typeof cognigyColorName[number]; /** * @openapi * * components: * schemas: * IProjectData_2_0: * type: object * properties: * name: * type: string * description: The name of the Project * example: New Project * color: * type: string * example: blue * oneOf: * - $ref: '#/components/schemas/TCSSColorName' * - $ref: '#/components/schemas/TCognigyColorName' * handoverConfiguration: * $ref: '#/components/schemas/IHandoverConfiguration_2_0' * * IProjectGeneratedData_2_0: * type: object * properties: * primaryLocaleReference: * $ref: '#/components/schemas/TMongoId' * * IHandoverConfiguration_2_0: * type: object * properties: * setupLiveAgentInbox: * type: boolean * whisperAssistConfiguration: * type: string * enum: [none, basic, template] * * IProjectCreateData_2_0: * allOf: * - $ref: '#/components/schemas/IProjectData_2_0' * - type: object * properties: * locale: * $ref: '#/components/schemas/TNLULanguage_2_0' * handoverConfiguration: * $ref: '#/components/schemas/IHandoverConfiguration_2_0' * * IProject_2_0: * allOf: * - $ref: '#/components/schemas/IProjectData_2_0' * - type: object * properties: * liveAgentDefaultInbox: * type: number * description: Live agent default inbox Id for the project * handoverConfiguration: * $ref: '#/components/schemas/IHandoverConfiguration_2_0' * - $ref: '#/components/schemas/IProjectGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IProject_2_0 { /** The Mongo id of the entity */ _id: TMongoId; color: TCognigyColorName | TCSSColorName; name: string; primaryLocaleReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; liveAgentDefaultInbox: number; handoverConfiguration?: IHandoverConfiguration_2_0; } declare const nluLanguages_2_0: readonly [ "ge-GE", "da-DK", "en-AU", "en-CA", "en-IN", "en-GB", "en-US", "de-DE", "ja-JP", "ko-KR", "es-ES", "nl-NL", "ar-AE", "fi-FI", "fr-FR", "it-IT", "nn-NO", "pl-PL", "sv-SE", "th-TH", "zh-CN", "vi-VN", "pt-BR", "ru-RU", "pt-PT", "tr-TR", "hi-IN", "bn-IN", "ta-IN" ]; export declare type TNLULanguage_2_0 = typeof nluLanguages_2_0[number]; /** * @openapi * * components: * schemas: * ILocaleIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the Locale * example: English * nluLanguage: * $ref: '#/components/schemas/TNLULanguage_2_0' * primary: * type: boolean * fallbackLocaleReference: * $ref: '#/components/schemas/TMongoId' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILocaleIndexItem_2_0 { /** The Mongo id of the entity */ _id: TMongoId; /** The referenceId of the locale */ referenceId: string; /** The name of the locale */ name: string; /** Whether the locale is the primary locale for the Agent */ primary: boolean; /** The NLU Language of the agent */ nluLanguage: TNLULanguage_2_0; fallbackLocaleReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexLocalesRestData_2_0 extends IRestPagination, Partial { } export interface IIndexLocalesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * * ILocaleData_2_0: * description: The payload for creating or updating a Locale. * type: object * properties: * name: * type: string * description: The name of the Locale. * example: English * nluLanguage: * allOf: * - $ref: '#/components/schemas/TNLULanguage_2_0' * description: The BCP 47 language tag used for NLU for this Locale. * fallbackLocaleReference: * allOf: * - $ref: '#/components/schemas/TMongoId' * description: The unique identifier for the fallback Locale. * * ILocale_2_0: * allOf: * - $ref: '#/components/schemas/ILocaleData_2_0' * - type: object * properties: * primary: * type: boolean * description: If `true`, the Locale is the primary Locale for the Agent. * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILocale_2_0 { /** The Mongo id of the entity */ _id: TMongoId; /** The referenceId of the locale */ referenceId: string; /** The name of the locale */ name: string; /** Whether the locale is the primary locale for the Agent */ primary: boolean; /** The NLU Language of the agent */ nluLanguage: TNLULanguage_2_0; fallbackLocaleReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface ICreateLocaleRestDataBody_2_0 extends IProjectScope, Partial> { fallbackLocaleReference?: string; } export interface ICreateLocaleRestData_2_0 extends ICreateLocaleRestDataBody_2_0 { } export interface ICreateLocaleRestReturnValue_2_0 extends ILocale_2_0 { } export interface IReadLocaleRestDataParams_2_0 { localeId: string; } export interface IReadLocaleRestData_2_0 extends IReadLocaleRestDataParams_2_0 { } export interface IReadLocaleRestReturnValue_2_0 extends ILocale_2_0 { } export interface IUpdateLocaleRestDataBody_2_0 extends Partial> { fallbackLocaleReference: string; } export interface IUpdateLocaleRestDataParams_2_0 { localeId: string; } export interface IUpdateLocaleRestData_2_0 extends IUpdateLocaleRestDataBody_2_0, IUpdateLocaleRestDataParams_2_0 { } export interface IUpdateLocaleRestReturnValue_2_0 { } export interface IDeleteLocaleRestDataParams_2_0 { localeId: string; } export interface IDeleteLocaleRestData_2_0 extends IDeleteLocaleRestDataParams_2_0 { } export interface IDeleteLocaleRestReturnValue_2_0 { } export interface IHandoverConfiguration_2_0 { setupLiveAgentInbox: boolean; whisperAssistConfiguration: TWhisperAssistConfiguration; } export interface ICreateProjectRestDataBody_2_0 extends Partial> { locale: TNLULanguage_2_0; handoverConfiguration?: IHandoverConfiguration_2_0; } export interface ICreateProjectRestData_2_0 extends ICreateProjectRestDataBody_2_0 { } export interface ICreateProjectRestReturnValue_2_0 extends IProject_2_0 { } /** * @openapi * * components: * schemas: * IProjectIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/IProjectData_2_0' * - type: object * properties: * liveAgentDefaultInbox: * type: number * description: Live agent default inbox Id for the project * lastChangedByDisplayName: * type: string * nullable: true * description: > * The display name of the user in `lastChangedBy`, or `null` * when the user has since been deleted or the name could not * be resolved. Never an email address - this list is readable * by basic project members, who are not allowed to see other * users' emails. * example: Maria Lopez * - $ref: '#/components/schemas/IEntityMeta' */ export interface IProjectIndexItem_2_0 { /** The Mongo id of the entity */ _id: string; color: TCSSColorName | TCognigyColorName; name: string; primaryLocaleReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; /** * The display name of the user in `lastChangedBy`, or `null` when the * user has since been deleted or the name could not be resolved. This is * never an email address - the list is readable by basic project * members, who are not allowed to see other users' emails. */ lastChangedByDisplayName: string | null; liveAgentDefaultInbox: number; handoverConfiguration?: IHandoverConfiguration_2_0; } export interface IIndexProjectsRestData_2_0 extends IRestPagination { ignoreOwnership?: boolean; } export interface IIndexProjectsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ICreateProjectByTemplateRestDataBody_2_0: * allOf: * - $ref: '#/components/schemas/IProjectData_2_0' * - type: object * properties: * locale: * $ref: '#/components/schemas/TNLULanguage_2_0' * templateConfiguration: * type: object * properties: * endpoints: * type: array * items: * type: object * properties: * channel: * type: string * skills: * type: array * items: * type: string * template: * type: string * handoverConfiguration: * type: object * properties: * setupLiveAgentInbox: * type: boolean * whisperAssistConfiguration: * type: string * enum: * - none * - basic * - template */ export interface ICreateProjectByTemplateRestDataBody_2_0 extends Partial> { locale: TNluLanguage; templateConfiguration: { endpoints: { channel: TChannelType; }[]; skills: string[]; template: string | null; }; handoverConfiguration?: { setupLiveAgentInbox: boolean; whisperAssistConfiguration: TWhisperAssistConfiguration; }; } export interface ICreateProjectByTemplateRestData_2_0 extends ICreateProjectByTemplateRestDataBody_2_0 { } export interface ICreateProjectByTemplateRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IReadProjectRestDataParams_2_0 extends IProjectScope { } export interface IReadProjectRestData_2_0 extends IReadProjectRestDataParams_2_0 { } export interface IReadProjectRestReturnValue_2_0 extends IProject_2_0 { } export interface IUpdateProjectRestDataParams_2_0 extends IProjectScope { } export interface IUpdateProjectRestDataBody_2_0 extends Partial> { } export interface IUpdateProjectRestData_2_0 extends IUpdateProjectRestDataBody_2_0, IUpdateProjectRestDataParams_2_0 { } export interface IUpdateProjectRestReturnValue_2_0 { } export interface IDeleteProjectRestDataParams_2_0 extends IProjectScope { } export interface IDeleteProjectRestData_2_0 extends IDeleteProjectRestDataParams_2_0 { } export interface IDeleteProjectRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IAgentAssistConfig extends IEntityMeta { referenceId: string; name: string; description: string; config: IAgentAssistGridConfig; projectReference: TMongoId; organisationReference: TMongoId; } export interface IAgentAssistGridConfig { grid: { columns: number; rows: number; gap: number; }; tiles: Record; } export interface IGraphAgentAssistConfig { type: "agentAssistConfig"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } /** * @openapi * components: * parameters: * globalResourceQueryParam: * in: query * name: resourceLevel * description: Scope of the resource (global "organisation" or project). * required: false * schema: * $ref: '#/components/schemas/ResourceLevel' * schemas: * ResourceLevel: * type: string * enum: * - organisation * - project * description: General scope of the resource. * default: project * * ProjectScopedResource: * type: object * properties: * resourceLevel: * type: string * enum: * - project * description: Scope for project-level resources. * * GlobalScopedResource: * type: object * properties: * resourceLevel: * type: string * enum: * - organisation * description: Scope for globally scoped resources. * required: * - resourceLevel * * AssignedToProjects: * type: object * properties: * assignedToProjects: * type: array * items: * type: string * description: MongoDB ObjectId representing a project * example: * - "68edf5dd4c931f68d31111" * - "690b02fc100e454245adde111" * - "68e6eda61ff68d2111" * * IGlobalResourceFields_2_0: * allOf: * - $ref: '#/components/schemas/GlobalScopedResource' * - $ref: '#/components/schemas/AssignedToProjects' * * IProjectResourceFields_2_0: * $ref: '#/components/schemas/ProjectScopedResource' * * IGlobalResourceData: * allOf: * - $ref: '#/components/schemas/IGlobalResourceFields_2_0' * - type: object * properties: * id: * type: string * description: The unique identifier for the resource. * example: 507f191e810c19729de860eb * * IGlobalResource: * allOf: * - $ref: '#/components/schemas/IGlobalResourceData' */ export interface IGlobalResource { resourceLevel?: "organisation" | "project"; assignedToProjects?: TMongoId[]; } export interface IConnectionFields { [key: string]: string; } export interface IConnection extends IEntityMeta, Pick { _id: TMongoId; referenceId: string; name: string; /** * Object storing the key-value pairs - the actual * fields of this connection object. */ fields: IConnectionFields; /** * Connection schema information to be used for this connection. */ extension: string; type: string; projectReference: TMongoId; organisationReference: TMongoId; isDeprecated: boolean; } export interface IGraphConnection { type: "connection"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } export interface IOpenAIMeta { customModel?: string; baseCustomUrl?: string | null; } export interface IOpenAICompatibleMeta { customModel: string; baseCustomUrl: string; customAuthHeader?: string; embeddingVectorSize?: number; } export interface IAlephAlphaMeta { customModel?: string; baseCustomUrl?: string | null; } export interface IAnthropicMeta { customModel?: string; } export interface IMistralMeta { customModel?: string; baseCustomUrl?: string | null; } export interface IAwsBedrockMeta { region: string; customModel?: string; location?: "region" | "geo" | "global"; geo?: string; } export interface IAzureOpenAIMeta { resourceName?: string; deploymentName?: string; baseCustomUrl?: string | null; apiVersion?: string; customModel?: string; /** * Responses API migration toggle (CGY-34908). When `true`, the deployment name is sent as * the request-body `model` (the fix); when `false`/unset, the legacy model-family value is * used. Defaults to `undefined` (legacy) for existing connections. */ useDeploymentNameAsModel?: boolean; } export interface IGoogleVertexAIMeta { location: string; apiEndPoint: string; publisher?: string; customModel?: string; } export interface IGoogleGeminiMeta { location: string; customModel?: string; } export interface IGoogleGenAIMeta { location: string; customModel?: string; } export declare type TLLMFallback = { order: number; isFallbackEnabled: boolean; fallbackLLMReferenceId: string; immediateFallBack: { failedRequests: number; durationInMinutes: number; emailNotificationList: string[]; }; }; export interface IInPlatformLlmSettings { isInternal?: boolean; isCrossRegion: boolean; modelTier?: "included" | "resell"; orgEnablement?: { enabled: boolean; changedBy: TMongoId; changedAt: number; }; crossRegionApproval?: { approvedBy: TMongoId; approvedAt: number; }; } export interface ILargeLanguageModel extends IEntityMeta, IGlobalResource { _id: TMongoId; referenceId: string; name: string; description: string; modelType: TGenerativeAIModels; modelGroup?: TModeType; apiType?: TApiType; isCustomModel?: boolean; areFallbacksEnabled?: boolean; provider: TGenerativeAIProviders; connectionId: string; isDefault: boolean; projectReference?: TMongoId; organisationReference: TMongoId; azureOpenAI?: IAzureOpenAIMeta; googleVertexAI?: IGoogleVertexAIMeta; googleGemini?: IGoogleGeminiMeta; googleGenAI?: IGoogleGenAIMeta; openAI?: IOpenAIMeta; openAICompatible?: IOpenAICompatibleMeta; alephAlpha?: IAlephAlphaMeta; anthropic?: IAnthropicMeta; mistral?: IMistralMeta; awsBedrock?: IAwsBedrockMeta; fallbacks?: TLLMFallback[]; configSetId?: string; configSetSyncedAt?: number; /** * Set whenever this LLM — or the Connection it references — changed in a way that * affects the Gateway Config Set. Cleared on a successful push. The reconciler queries * on this field, so it carries a partial index and is absent, not 0, when clean. */ configSetDirtyAt?: number; /** Consecutive failed push attempts. Reset to 0 on success. Used to back off and to alert. */ configSetSyncAttempts?: number; /** * Last push error: redacted and truncated to 500 chars. * MUST NOT contain credential values — see redactSyncError() (a later change set). */ configSetSyncError?: string; /** * Unix seconds of the most recent push attempt, success or failure — written on EVERY * attempt (unlike configSetSyncedAt, which is success-only). Needed because seconds * granularity alone cannot distinguish attempt 2 from attempt 8 across retries. */ configSetSyncLastAttemptAt?: number; /** * Unix seconds until which the reconciler should not re-fetch this LLM, set when a push * is skipped for a REVERSIBLE ineligibility (`noConnection`, `rolloutDisabled`) or when a * push succeeded with fallback entries omitted. * * Distinct from configSetSyncAttempts/configSetSyncLastAttemptAt on purpose: those two * mean "we tried and failed" and drive the exhaustion alert, whereas this means "not * applicable yet" -- a rollout-disabled LLM is healthy, and must not trip that alert. * `configSetDirtyAt` deliberately stays SET alongside this, because the reversible * conditions can clear with no Mongo write at all (a rollout ramp is a hot-reloaded YAML * edit), so clearing dirty would strand the LLM forever. */ configSetSyncDeferredUntil?: number; isInPlatformLlm?: boolean; inPlatformLlm?: IInPlatformLlmSettings; useCases?: TGenerativeAIUseCases[]; isDisabled?: boolean; displayName?: string; } export declare type TServerManagedLLMKeys = "configSetId" | "configSetSyncedAt" | "configSetDirtyAt" | "configSetSyncAttempts" | "configSetSyncError" | "configSetSyncLastAttemptAt" | "configSetSyncDeferredUntil" | "isInPlatformLlm" | "inPlatformLlm" | "useCases" | "isDisabled" | "displayName"; export interface IGraphLargeLanguageModelDependencyAttachment { _id: string; type: "attachedConnection"; } export interface IGraphLargeLanguageModel { type: "largeLanguageModel"; _id: TMongoId; name: string; referenceId: string; properties: Pick; dependencies?: IGraphLargeLanguageModelDependencyAttachment[]; } export interface IHandoverNodeParams extends INodeFunctionBaseParams { config: { text: string; cancelIntent: string; unavailable: string; unsupportedChannel: string; quickReply: string; chatwootInboxId: string; liveAgentInboxId: string; handoverProviderConfig: object; handoverProvider: string; }; } export interface IParams { [key: string]: any; } export interface IConnectionSchemaField { _id?: TMongoId; /** The field name, e.g. 'client_id' */ fieldName: string; required?: boolean; label?: string; description?: string; params?: IParams; } export interface IConnectionSchema extends IEntityMeta { _id: TMongoId; extension: string; isCognigy: boolean; /** The type of the connection, e.g. 'oauth' */ type: string; /** An additional label for the connection schema - by default we will pick the 'type' */ label: string; /** The actual fields */ fields: IConnectionSchemaField[]; projectReference: TMongoId; organisationReference: TMongoId; } export interface IHttpBasicAuthConnectionFields { username: string; password: string; } export interface IHttpApiKeyAuthKeyAuthConnectionFields { authApiKey: string; } export interface IHttpApiKeyXKeyAuthConnectionFields { authApiKey: string; } export interface IHttpOAuthConnectionFields { oAuth2Url: string; oAuth2ClientId: string; oAuth2ClientSecret: string; oAuth2Scope?: string; } export interface IHttpRequestNodeSharedConfig { type: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; url: string; headers: JSON; payload: any; payloadText: string; payloadJSON: any; payloadFormData: any; payloadIsJSON: boolean; payloadIsFormData: boolean; payloadType: "json" | "text" | "form-data"; storeLocation: "input" | "context"; contextKey: string; inputKey: string; async: boolean; cache: boolean; cacheExpiry: number; timeout: number; retryAttempts: number; storeResponseHeaders: boolean; allowSelfSigned: boolean; abortOnError: boolean; errorLogging: "none" | "basic" | "full"; debugLogging: "none" | "request" | "response" | "full"; logWarning: string; } export interface IHttpRequestNodeOAuthConfig extends IHttpRequestNodeSharedConfig { authType: "oAuth2"; oAuth2Connection: IHttpOAuthConnectionFields; } export interface IHttpRequestNodeBasicAuthConfig extends IHttpRequestNodeSharedConfig { authType: "basic"; basicConnection: IHttpBasicAuthConnectionFields; } export interface IHttpRequestNodeApiKeyAuthKeyConfig extends IHttpRequestNodeSharedConfig { authType: "apiKeyAuthKey"; apiKeyAuthKeyConnection: IHttpApiKeyAuthKeyAuthConnectionFields; } export interface IHttpRequestNodeApiKeyXKeyConfig extends IHttpRequestNodeSharedConfig { authType: "apiKeyXKey"; apiKeyXKeyConnection: IHttpApiKeyXKeyAuthConnectionFields; } export interface IHttpRequestNodeApiKeyNoneAuthConfig extends IHttpRequestNodeSharedConfig { authType: "none"; } export interface IHttpRequestNodeParams extends INodeFunctionBaseParams { config: IHttpRequestNodeApiKeyAuthKeyConfig | IHttpRequestNodeApiKeyNoneAuthConfig | IHttpRequestNodeApiKeyXKeyConfig | IHttpRequestNodeBasicAuthConfig | IHttpRequestNodeOAuthConfig; } export interface ICodeNodeParams extends ICodeNodeBasicParams { config: { code: string; /** * The fields 'hasError' and 'transpiled' can't be directly configured by the * customer - hence they are not part of the 'fields'. They will be computed * when a node is updated/saved. */ hasError?: boolean; transpiled?: string; }; IsMockCodeExecution?: boolean; } export interface ICodeNodeBasicParams extends INodeFunctionBaseParams { config: { code: string; }; } export interface IInputChangedEventPayload { input: { [key: string]: any; }; sessionId?: string; } export interface IContextChangedEventPayload { context: { [key: string]: any; }; sessionId?: string; /** * Set only on an AI Agent v2's state (service-endpoint, CGY-45081); a * Flow's contextChanged never carries it. */ agentReferenceId?: string; } export interface IProfileChangedEventPayload { profile: { [key: string]: any; }; sessionId?: string; } export interface INodeExecutedEventPayload { nodeId: string; flowId: string; sessionId?: string; nodeLabel?: string; nodeType?: string; flowReferenceId?: string; nodeObjectId?: string; } export interface INodeErrorEventPayload { nodeId: string; flowId: string; errorMessage: string; sessionId?: string; } export interface IOutputEventPayload { text?: string; data?: { [key: string]: any; }; source?: string; metadata?: IOutputEventMetadata; sessionId?: string; traceId?: string; disableSensitiveLogging?: boolean; agentReferenceId?: string; timestamp?: number; } export interface IOutputEventMetadata { flowReferenceId?: string; outputType?: "node" | "intent"; nodeLabel?: string; nodeType?: string; nodeId?: string; nodeReferenceId?: string; intentId?: string; intentReferenceId?: string; intent?: string; isMockedCodeExecution?: boolean; } export interface ISwitchedFlowEventPayload { fromFlowId: string; toFlowId: string; sessionId?: string; } export interface IActiveEntrypointsChangedEventPayload { entrypoints: IActiveEntrypoint[]; sessionId?: string; } export interface IActiveEntrypoint { flowId: string; nodeReferenceId: string; primary?: boolean; } export interface INluWarningEventPayload { errorMessage: string; sessionId?: string; } export interface IDebugEventMessagePayloadBase { sessionId?: string; header?: string; metadata?: IOutputEventMetadata; } export interface IDebugEventTextMessagePayload extends IDebugEventMessagePayloadBase { type: "text"; message: string; } export interface IDebugEventJsonMessagePayload extends IDebugEventMessagePayloadBase { type: "json"; message: object; } export declare type TDebugEventMessagePayload = IDebugEventTextMessagePayload | IDebugEventJsonMessagePayload; export interface IGoalDefinitionStepMetric { _id?: string; name: string; description: string; type?: "currency" | "duration" | "revenue"; value?: number; } export interface IGoalDefinitionStepSnapshot { _id: string; name?: string; description?: string; order?: number; type?: "start" | "completion"; metrics?: IGoalDefinitionStepMetric[]; } export interface IGoalDefinitionSnapshot { goalId: string; name: string; description?: string; referenceId: string; version: string; steps: IGoalDefinitionStepSnapshot[]; } export interface IGoalAnalyticsPayload { analyticsdata: IGoalEscalations; data: IPayloadBaseMetaData; } export interface IGoalAnalyticsData { projectId: string; organisationId: string; sessionId: string; referenceId: string; version: string; timestamp: Date; goalCycleId: string; stepId: string; goalId: string; contactId: string; stepType?: string; } export interface IGoalEscalations extends IGoalAnalyticsData, IAnalyticsEndpointMeta, IAnalyticsLocaleMeta, IAnalyticsSnapshotMeta { cxOneData?: ICXOneData; goalDefinition?: IGoalDefinitionSnapshot; } export interface IGoalCompletedEventPayload extends IGoalAnalyticsPayload { } /** * Emitted while an Agent v2 turn streams assistant tokens to a CUI/Interaction * Panel client. Each event carries one delta — the consumer concatenates them * and replaces the accumulator with the final `output.text` on `finalPing`. * * Only emitted when service-endpoint requested `stream_tokens=true` on the * gRPC `ExecuteTurnRequest` (i.e. the endpoint client is CUI direct or has an * active follower). Non-streaming channels never see this event. */ export interface IStreamingChunkEventPayload { text: string; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Server-initiated retraction of any text streamed via prior `streamingChunk` * events in the current Agent v2 turn. Mirrors the gRPC `TokenReset` frame * emitted by service-agents when an LLM iteration produced speculative text * (e.g. "thinking..." tokens before the model decided to call a skill or an * agent tool) that won't be the final user-facing answer. * * Consumers that render incremental text should clear their in-flight * assistant bubble on this event; the next `streamingChunk` events stream * the real answer fresh on top of the cleared canvas. * * Only emitted when service-endpoint requested `stream_tokens=true` on the * gRPC `ExecuteTurnRequest` — non-streaming channels never see token frames * to begin with, so they never need this signal. */ export interface IStreamingChunkResetEventPayload { traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Emitted when an Agent v2 turn issues a business tool call. service-endpoint * filters internal `cognigy-skill-*` tool calls out of the CUI event stream * (the server emits them as raw `function_call` / `function_call_output` * `TurnEvent`s, matching the persisted shape) so they never reach this event. */ export interface IAgentToolCallEventPayload { callId: string; name: string; arguments: Record; /** * Classifies the tool as a Cognigy builtin, a customer-authored * ("custom") resource, or a tool imported from a remote MCP server * ("mcp"). Mirrors the `tool_origin` field on the gRPC `TurnEvent`. * Undefined when origin could not be resolved (e.g. the LLM emitted a * `toolId` not in the agent's available tool set) or when the upstream * service-agents build pre-dates the field/value. */ toolOrigin?: "builtin" | "custom" | "mcp"; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Emitted when an Agent v2 business tool call returns. The `callId` matches * the preceding `agentToolCall` event so consumers can pair them. */ export interface IAgentToolResultEventPayload { callId: string; output: string; /** * Wall-clock tool-dispatch duration in ms, sourced from the gRPC * `function_call_output` frame. `0` when the server didn't stamp one * (e.g. legacy server). Skill-activation outputs are surfaced as * `agentSkillLoaded` instead and intentionally don't carry a duration — * skill loading isn't user-visible tool dispatch. */ durationMs: number; /** * Classifies the tool as a Cognigy builtin, a customer-authored * ("custom") resource, or a tool imported from a remote MCP server * ("mcp"). Mirrors the `tool_origin` field on the gRPC * `function_call_output` `TurnEvent`. Undefined when origin could not * be resolved or when the upstream service-agents build pre-dates the * field/value. */ toolOrigin?: "builtin" | "custom" | "mcp"; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Emitted when an Agent v2 skill activation commits — i.e. when the agent's * `cognigy-skill-activation` tool call's `function_call_output` arrives. * Synthesised on the service-endpoint side from raw `TurnEvent`s: the * service-agents server uses one event vocabulary (`function_call` / * `function_call_output`) for every tool call, including skill plumbing, * and does **not** emit a separate skill-activation event of its own. * service-endpoint pairs the activation's `function_call` (which carries * `arguments.name` = the skill name) with its matching `function_call_output` * and synthesises this event so CUI consumers don't have to re-do the * pairing. * * One event per newly activated skill. Skills loaded in prior turns are * not re-announced here; they appear only on the terminal turn result's * loaded-skills list. */ export interface IAgentSkillLoadedEventPayload { skill: string; /** * Classifies the activated skill as a Cognigy builtin or a * customer-authored ("custom") resource. Mirrors the `tool_origin` field * on the gRPC `function_call_output` `TurnEvent` for the * `cognigy-skill-activation` call — origin follows the *skill* being * activated, not the synthetic verb. Undefined when origin could not be * resolved or when the upstream service-agents build pre-dates the * field/value. * * `"mcp"` is part of the type only because this field shares its type * with the tool-call payloads (`runAgentTurn.ts` assigns the same * `evt.toolOrigin` to all three) — skills have no MCP source * (`skills.SkillSource` is `builtin`/`user` only), so a skill-loaded * event carrying `"mcp"` should never actually occur. */ toolOrigin?: "builtin" | "custom" | "mcp"; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Per-session running totals of LLM token usage. Embedded on every * `agentLlmCall` event as the snapshot taken *after* this call has been * counted, so a consumer can render running totals without walking back * through prior events. `reasoningTokens` is a SUBSET of `completionTokens` — * do not sum the two when displaying. */ export interface IUsageTotals { callCount: number; promptTokens: number; completionTokens: number; reasoningTokens: number; } /** * Emitted once per LLM call inside an Agent v2 turn. Carries the per-call * wall-clock duration and token counts plus a `cumulativeUsage` snapshot of * the running per-session totals (as of and including this call). * * `reasoningTokens === 0` means "non-reasoning model" — the gRPC frame uses * the same convention. Reasoning tokens are a SUBSET of completion tokens * (both per-call and in the cumulative snapshot). * * The gateway-enriched fields (`finishReason`, `totalLatencyMs`, etc.) are * emitted by service-agents on `llm_call` turn events. They are populated only * when the LLM Gateway served the call AND reported the field, so treat every * one as genuinely optional: an ABSENT key means "not reported", which is not * the same as a zero. `retryCount: 0` says the first attempt succeeded; no * `retryCount` at all says we do not know. Never default these when consuming. * * `totalTokens` is `promptTokens + completionTokens` — backend-agnostic like * its three siblings, always present, unlike the gateway-enriched block below. * * `cacheTokens` is a SUBSET of `promptTokens` — do not add any of its fields * to a token total. It replaces a flat `cachedTokens` (read-only) field as a * hard cutover, done before Agent v2 shipped to production, so no migration * was needed. * * `llmName`, `fallback.primaryLlmName`, and `fallback.fallbackLlmName` were * dropped in favour of the `deploymentLabel` / `primaryDeploymentLabel` / * `fallbackDeploymentLabel` fields, which the gateway supplies directly. */ export interface IAgentLlmCallEventPayload { durationMs: number; promptTokens: number; completionTokens: number; reasoningTokens: number; /** * `promptTokens + completionTokens`. Backend-agnostic like its three * siblings above — always present, never omitted, unlike the * gateway-enriched fields below. */ totalTokens: number; cumulativeUsage: IUsageTotals; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; finishReason?: string; rawFinishReason?: string; totalLatencyMs?: number; timeToFirstTokenMs?: number; /** * Average ms per output token, output tokens/sec, and average gap between * consecutive streamed chunks — all gateway-computed, streaming calls * only. * * Deliberately UNROUNDED, unlike `totalLatencyMs`/`timeToFirstTokenMs` * above: they are naturally small fractional numbers (e.g. `21.675`), and * rounding to a whole millisecond would erase most of their significant * digits rather than a negligible tail. */ timePerOutputTokenMs?: number; tokensPerSecond?: number; interTokenLatencyMs?: number; retryCount?: number; /** * The NUMERIC HTTP status on a failed call, e.g. 429 — not the gateway's * string taxonomy, which is `errorReason`. * * **Whose status it is depends on the failure**: the PROVIDER's when the * provider answered, otherwise the GATEWAY's own. This field cannot say * which, and `providerStatusCode` below is what disambiguates it — by its * PRESENCE, not by comparing the two numbers (the gateway maps a provider * failure onto its own 502, so they can be equal and still distinct). * * Absent on a failure that has no status at all: one the gateway never * received (a refused connection), or one it served after a fallback * covered the primary's error. So absence here does NOT mean the call * succeeded — test `errorReason` for that. */ errorCode?: number; /** * The categorical failure kind on a failed call, and the field to test for * "did this LLM call fail": unlike `errorMessage` it is never suppressed, * and unlike `errorCode` it is present even when there was no HTTP status. * * It carries TWO taxonomies on one field: * * - the LLM Gateway's own codes, verbatim. A CLOSED set of five today: * `"provider_timeout"`, `"reasoning_budget_exhausted"`, * `"empty_output_truncation"`, `"no_output"`, `"content_blocked"` * (`GatewayErrorCode` in the gateway's `src/support/errors.ts`). * * **Enumerated here rather than elided because getting this wrong has * already shipped.** These are NOT `fallback.fallbackReason`'s values, * which are a DIFFERENT five — `rate_limit_exceeded`, * `provider_timeout`, `provider_unavailable`, `auth_failed`, * `provider_error` — sharing only `provider_timeout`. Both sets answer * "why did the LLM call not work" and both are declared on this same * interface, so building a translation map for one out of the other is * an easy mistake; it then degrades silently instead of breaking, * because the single overlapping value still resolves while the other * four render as raw wire tokens and four map keys sit dead. * * Three of the five — `content_blocked`, `reasoning_budget_exhausted`, * `empty_output_truncation` — describe MODEL BEHAVIOUR, not an * infrastructure fault. Copy in the register of "the provider was * unavailable" reads wrong for them even when the names are right. * - four values `service-agents` mints for failures the gateway did not name * itself: `"service-agents_gateway_unreachable"` (never reached it), * `"service-agents_gateway_auth_failed"` (it rejected our credentials), * `"service-agents_gateway_response_invalid"` (we could not read its * answer), and `"service-agents_gateway_error_unclassified"` (it reported * an error but named no code for it). * * The `service-agents_` prefix is what tells the two apart, so a consumer * can distinguish "the provider timed out" from "we could not reach the * gateway" — different problems with different owners. Typed as a plain * string so the gateway's set can grow without a release here; degrade * gracefully on an unrecognised value rather than rejecting it. */ errorReason?: string; /** * The human-readable failure description, from the gateway's own error body * where it sent one. Capped at 512 characters by `service-agents` (longer * messages are truncated with an ellipsis). * * ABSENT when the turn set `disableSensitiveLogging`: a provider error body * can echo part of the request, e.g. on a content-policy rejection, so the * free text is withheld while `errorReason` still reports the failure kind. * Treat absence as "not available", never as "no error". */ errorMessage?: string; /** * Cache read/write/uncached breakdown for this call's prompt tokens — each * field a SUBSET of `promptTokens`, never add one to a total. ABSENT means * the gateway reported nothing about caching at all; present with some * fields still absent means a provider that reported some but not all * three numbers — different providers report different subsets. */ cacheTokens?: { readTokens?: number; writeTokens?: number; uncachedTokens?: number; }; deploymentLabel?: string; configSetId?: string; fallback?: { primaryConfigSetId?: string; primaryDeploymentLabel?: string; fallbackConfigSetId?: string; fallbackDeploymentLabel?: string; fallbackReason?: string; }; /** * True whenever this call was served under an active gateway fallback * window — including a call that merely rides an already-active window * without the primary being attempted (no error, so `fallback` above * stays unset). This is the reliable primary-vs-fallback signal: * `fallback` alone under-reports, since it only appears on the call that * first triggered the window. */ fallbackActive?: boolean; /** * The UPSTREAM PROVIDER's HTTP status, present only when the provider * answered with one. * * It disambiguates `errorCode`, which carries whichever status was * available and therefore cannot say whose it is. A 502 the gateway chose * because it could not reach the provider, and a 502 the provider itself * returned, are different problems with different owners, and `errorCode` * alone reads identically for both. * * The rule is PRESENCE, not comparison: present here means `errorCode` is * the provider's; absent means `errorCode` is the gateway's own status. Do * NOT infer this by comparing the two numbers — the gateway maps a provider * failure onto its own 502, so they can be equal and still distinct. */ providerStatusCode?: number; /** * The config-sets that were attempted and FAILED, in attempt order (the * gateway sends the configured primary first, so the first entry is what * the operator meant to use). * * Emitted on two quite different occasions: * - a failed call: every config-set tried, so the whole chain is visible * even though none served the turn; * - a SUCCESSFUL call that a fallback rescued: the primary (and any earlier * fallback) that failed on the way. The turn looks healthy, and this is * the only place the primary's actual status survives — the gateway * otherwise buckets it into `fallback.fallbackReason` and returns 200. * * So a non-empty array does NOT mean the turn failed — test `errorReason` * for that. Absent means no config-set failed, not "we did not look". * * One entry per CONFIG-SET, not per attempt. This is NOT a retry count: * three provider retries against one misconfigured deployment produce ONE * entry while `retryCount` is 3. Never derive retries from the length. */ configSetErrors?: IAgentLlmCallConfigSetError[]; /** * How the system prompt for this LLM call was built (CGY-44465), as a * group of separate facts rather than one summary value, so a consumer can * show each one on its own. See `IAgentLlmCallPromptBuild`. * * ABSENT when the `service-agents` version does not report it (older * versions). Never default it when consuming. */ promptBuild?: IAgentLlmCallPromptBuild; } /** * The system prompt build behind one `agentLlmCall`, carried on * `IAgentLlmCallEventPayload.promptBuild` (CGY-44465). Mirrors the * `prompt_build` group of service-agents' `llm_call` `TurnEvent`. * * Each fact is its own field on purpose: "the custom build failed" and "the * default prompt was sent" are different facts, and a consumer should not have * to decode them from one combined value. More fields are expected (e.g. a * `defaultPromptVersion`); consumers should ignore fields they do not know. */ export interface IAgentLlmCallPromptBuild { /** True when the agent has a custom system prompt configured. */ customPrompt: boolean; /** * How long building the prompt before this LLM call took, in milliseconds. * Deliberately UNROUNDED: a build is often well under one millisecond. */ durationMs: number; /** True when building the custom prompt failed. */ failed: boolean; /** * Why the custom build failed, only when `failed`: `"timeout"`, * `"budget"`, `"slot_wait"`, `"vm4_unavailable"`, `"reply"`, `"crash"`, * `"too_large"` or `"empty"`. Plain string so the set can grow without a * release here; degrade gracefully on an unrecognised value. */ failureCause?: string; /** True when something else was sent because the build failed. */ fellBack: boolean; /** What was sent instead, only when `fellBack`: today always `"default"`. */ fallbackPrompt?: string; /** * The prompt that was actually sent: `"custom"`, `"default"` or * `"builtin"` (a call with its own built-in prompt, the grounding * decline). Plain string so the set can grow. */ sentPrompt: string; /** * The exact system prompt text sent to the LLM for this call. Can be large * (the build caps it at 256 KB). ABSENT when the turn set * `disableSensitiveLogging`: the prompt can carry customer data. */ systemPrompt?: string; /** * Every token of the custom prompt build, in template order. Absent when * the build had no tokens to report. */ evaluations?: IAgentLlmCallPromptEvaluation[]; /** * How long the script service (vm4) took to evaluate the build's * `{{ }}` expressions, in milliseconds, unrounded. ABSENT when no * `{{ }}` expression was due in this build. */ evaluationMs?: number; } /** * One token of a custom system prompt build, carried on * `IAgentLlmCallPromptBuild.evaluations` in template order (CGY-44465). */ export interface IAgentLlmCallPromptEvaluation { /** * The token's identity within the build, `"__"`. It * starts with the lifetime, so it is for correlation only: never show it * to builders. */ key: string; /** * The token as written in the template. * * ABSENT means "not available": a reused record (`evaluated: false`; the * token is in the event of the build that evaluated it), or withheld under * `disableSensitiveLogging`. PRESENT `""` is a real empty value. Never * show `key` in its place: it starts with the lifetime. */ token?: string; /** `"script"` (a `{{ }}` CognigyScript expression) or `"data"` (a `[[ ]]` lookup). */ syntax: string; /** * The token's effective lifetime. Today always `"step"` on text agents. * Lifetimes are hidden from builders: do not show this in a UI. */ lifetime: string; /** * `false` means the value was reused from an earlier build rather than * evaluated for this one (only voice-to-voice agents can still reuse). */ evaluated: boolean; /** * The rendered text. * * ABSENT means "not available": a reused record (`evaluated: false`; the * value is in the event of the build that evaluated it), or withheld under * `disableSensitiveLogging`. PRESENT `""` means the token really rendered * as empty text (including an expression that threw, see `errorCode`). */ value?: string; /** * The script service's error code when the expression threw and rendered * as empty text, e.g. `"ReferenceError"`, `"SyntaxError"`, * `"ERR_VALUE_NOT_CONVERTIBLE"`, `"UNHANDLED_JS_EXCEPTION"`. Plain string; * degrade gracefully on an unrecognised value. */ errorCode?: string; } /** * One config-set that was attempted and FAILED, carried on * `IAgentLlmCallEventPayload.configSetErrors` in attempt order. * * Field names follow the LLM Gateway's own DTO rather than this contract's * vocabulary, so an entry can be traced field-for-field against the gateway's * response and its logs. That deliberately means `errorCode` here is a STRING * (the gateway's stable error class) while the sibling * `IAgentLlmCallEventPayload.errorCode` is a NUMBER (an HTTP status) — two * different concepts that the gateway and `service-agents` happen to have * given the same name. `errorReason` on the payload carries this same string * taxonomy at the top level, so a consumer can reuse whatever label mapping it * already built for that. */ export interface IAgentLlmCallConfigSetError { /** * The config-set that was attempted. On a failed call this is the only * record of which config-set was tried at all: `deploymentLabel` and * `configSetId` describe the deployment that SUCCEEDED, so both are absent. */ configSetId: string; /** The LLM provider of the attempted deployment, e.g. "openai". */ provider: string; /** * The model identifier of the attempted deployment. Together with * `provider` this is a failed attempt's stand-in for `deploymentLabel`. */ modelName: string; /** * The HTTP status the GATEWAY assigned to this attempt's failure (504, 422, * 502, 400, 500). Always present. */ statusCode: number; /** * The provider's own HTTP status for this attempt, when the provider * answered with one. Absent when the failure never reached the provider. */ providerStatusCode?: number; /** * The gateway's stable error class for this attempt, from a small closed * set — "provider_timeout", "reasoning_budget_exhausted", * "empty_output_truncation", "no_output", "content_blocked". * * Frequently ABSENT: the gateway assigns one on only a few branches, so a * generic provider HTTP error, a network failure reaching the provider and * an internal gateway error all carry none. `statusCode` is always there, * so an entry stays self-describing without it. */ errorCode?: string; /** * The human-readable description of this attempt's failure. * * ABSENT when the turn set `disableSensitiveLogging`. This is the gateway's * `errorLabel`, which for a provider failure is the provider's own message * verbatim and can echo request content — it is the SAME string that * reaches `errorMessage` on a total failure, so carrying it here * unsuppressed would defeat that field's suppression. Every other field on * this interface is ids, model names, status codes and a fixed vocabulary, * and none of them are suppressed. * * Capped by `service-agents` at 512 characters, the same bound * `errorMessage` carries — it is the same provider string, a provider error * body has no size contract, and this one is PER ENTRY, so an uncapped * value would be multiplied by the chain length. Safe to render without * your own truncation, but it may end in an ellipsis. */ errorLabel?: string; } /** * Emitted by service-endpoint when a runtime handoff TAKES EFFECT — the * moment an input (or an arrival) is actually routed to the other runtime, * which is the same moment in both directions and the one place that sees * every handoff regardless of which runtime wrote it (design §7.10 in the * ai-agents-v2 repo's runtime-handoff design; invariant I11). * * It marks the boundary for the Interaction Panel and live followers: the * flow half renders nodes and the agent half renders turn events, and * without this event the two halves sit adjacent with nothing to say the * conversation moved or where to. It marks the transition only — how the two * halves are *rendered* stays the Panel's concern. * * At-most-once per `handoffId` is a SHOULD, not a guarantee: applying the * routing document is idempotent, and two racing inputs can both apply it. A * consumer should treat `handoffId` as the identity of the transition; a * duplicate is noise on a debug surface, never a correctness problem. */ export interface IRuntimeHandoffEventPayload { direction: "flowToAgent" | "agentToFlow"; /** The runtime that wrote the handoff. */ initiatedBy: "flow" | "agent"; /** UUID correlating the two halves of the handoff across services and logs. */ handoffId: string; /** How many handoffs this session has made, including this one. */ hopCount?: number; /** Target of the transition — exactly one of the two is set. */ targetFlowId?: string; targetAgentReferenceId?: string; /** Whether handed-over conversation context was delivered with this application. */ contextDelivered: boolean; /** * Whether the receiving runtime was asked to speak first — true only on the * synthetic greet-on-arrival turn, which the flow → agent direction runs on * socket channels when the handoff carried an opening instruction. A * user-initiated arrival answers the user instead, and the agent → flow * direction has no greet at all. */ greetTriggered: boolean; /** * "toolCall" when this transition is one leg of a flow execution tool call * ("Execute tool flow") rather than a plain handoff: agent → flow carries * the call to the flow, flow → agent carries the flow's answer back. Lets a * consumer render the round trip as one tool call instead of two handoffs. * Absent — and so are the tool fields below — on a plain handoff. */ purpose?: "toolCall" | "preTurn"; /** Tool call only: the id of the agent's held tool call, on both legs. */ toolCallId?: string; /** Tool call only, agent → flow leg: the tool's name. */ toolName?: string; /** Tool call only, agent → flow leg: the call's arguments, when delivered with this application. */ toolArgs?: Record; /** Pre-Turn only: the run id (the flow-target document's handoffId); groups the rows of one run across messages. */ preTurnRunId?: string; /** * Pre-Turn only: where the run stands for this message. "waiting": the * Flow ended without handing back to the AI Agent (it asked the user, had * no Continue to AI Agent node, or the hand-back was refused), so the AI * Agent did not run. "failed": the Flow errored. */ preTurnResult?: "started" | "handedBack" | "waiting" | "failed"; /** Pre-Turn only: server time from dispatching the message to the Flow until the Flow's final ping. */ preTurnDurationMs?: number; /** Pre-Turn only: the reference id of the pre-Turn Flow. */ preTurnFlowId?: string; /** Pre-Turn only, handedBack only: the user message before the Flow ran. Debug channel only. */ preTurnOriginalText?: string; /** Pre-Turn only, handedBack only: the user message as handed back to the agent. Debug channel only. */ preTurnFinalText?: string; /** Pre-Turn only, handedBack only: the turn context entries handed back. */ preTurnTurnContext?: { label: string; value: string; }[]; traceId: string; sessionId: string; agentReferenceId: string; timestamp: number; } /** * Emitted once per LLM call inside a classic Flow execution turn. Carries the * per-call wall-clock duration and token counts, mirroring `agentLlmCall` * (Agent v2's equivalent event) but with Flow-appropriate identifiers instead * of an `agentReferenceId` — classic Flow execution has no "agent" concept. * * There is no `cumulativeUsage` snapshot here (unlike `agentLlmCall`): * `updateTokenUsage` persists a per-session running total into session state * but returns `void`, so the merged total is not in scope at the call site * without new session-state plumbing. Omitted rather than invented. * * The gateway-enriched fields (`finishReason`, `totalLatencyMs`, etc.) are * populated only when the LLM Gateway served the call AND reported the * field, so treat every one as genuinely optional: an ABSENT key means "not * reported", which is not the same as a zero. `retryCount: 0` says the first * attempt succeeded; no `retryCount` at all says we do not know. Never * default these when consuming. * * `cacheTokens.readTokens` is a SUBSET of `promptTokens` — do not add it to a * token total. */ export interface IFlowLlmGatewayCallEventPayload { durationMs: number; promptTokens: number; completionTokens: number; totalTokens: number; traceId: string; sessionId: string; timestamp: number; flowReferenceId?: string; nodeReferenceId?: string; finishReason?: string; rawFinishReason?: string; totalLatencyMs?: number; timeToFirstTokenMs?: number; timePerOutputTokenMs?: number; tokensPerSecond?: number; interTokenLatencyMs?: number; retryCount?: number; errorCode?: number; gatewayErrorCode?: string; errorMessage?: string; cacheTokens?: { readTokens?: number; writeTokens?: number; noCacheTokens?: number; }; deploymentLabel?: string; configSetId?: string; fallback?: { primaryConfigSetId?: string; primaryDeploymentLabel?: string; fallbackConfigSetId?: string; fallbackDeploymentLabel?: string; fallbackReason?: string; }; configSetErrors?: Array<{ configSetId: string; provider: string; modelName: string; statusCode: number; errorLabel: string; errorCode?: string; providerStatusCode?: number; }>; providerLabel?: string; } export declare type TDebugEventPayload = IInputChangedEventPayload | IContextChangedEventPayload | IActiveEntrypointsChangedEventPayload | IProfileChangedEventPayload | INodeExecutedEventPayload | INodeErrorEventPayload | IFinalPingEventPayload | IOutputEventPayload | ISwitchedFlowEventPayload | INluWarningEventPayload | TDebugEventMessagePayload | IGoalCompletedEventPayload | IStreamingChunkEventPayload | IStreamingChunkResetEventPayload | IAgentToolCallEventPayload | IAgentToolResultEventPayload | IAgentSkillLoadedEventPayload | IAgentLlmCallEventPayload | IRuntimeHandoffEventPayload | IFlowLlmGatewayCallEventPayload; export interface ITrackAnalyticsStepsArguments { nodeId?: string; flowReferenceId: string; flowName: string; } export declare type TAnyProviderResponse = ISalesforceProviderResponse; export interface ISalesforceProviderResponse { session: { affinityToken: string; key: string; id: string; }; } export interface IHandoverRequestStatus { requested: boolean; activeConversation: boolean; text: string; cancelIntent: string; quickreplyTitle: string; handoverVersion: "v1" | "v2"; sessionId: string; userId: string; provider: THandoverProvider; repeatHandoverMessage: boolean; sendResolveEventToBot: boolean; resolveBehavior: "resetEntrypoint" | "continueEntrypoint"; nodeType: "question" | "handoverToAgent"; agentAssistInitMessage: string; processedInitMessage?: boolean; /** * Indicates whether an "Assist / Copilot Flow" * should be used during the Handover Request */ agentAssistConfigured: boolean; /** * Identifies one handover within a session, so a new handover can tell a * leftover Copilot session (`endSessionOnHandoverClose: false`) apart from its own */ handoverId?: string; providerResponse: TAnyProviderResponse; sendOnQueueEvent?: boolean; sendOnActiveEvent?: boolean; inactivityTimer?: number; inactivityTimerExpiryDate?: number; inactivityCount?: number; } export interface IHandoverNodeV2Params extends INodeFunctionBaseParams { config: { handoverProvider: THandoverProvider | "legacyEndpoint" | null; handoverProviderConfig: Record; text: string; cancelIntent: string; quickReply: string; chatwootInboxId: string; liveAgentInboxId: string; liveAgentSkills: string[]; liveAgentLanguages: string[]; liveAgentPriority: "none" | "urgent" | "high" | "medium" | "low"; additionalCategoryIds: string[]; sendTranscriptAsFirstMessage: boolean; buttonId: string; salesforcePrechatDetails: object[]; salesforcePrechatEntities: object[]; eightByEightChannelId: string; eightByEightQueueId: string; eightByEightJSONProps: object; genesysLanguage: string; genesysSkills: string[]; genesysPriority: string; genesysCustomAttributes: object; customAttributes: object; repeatHandoverMessage: boolean; sendResolveEvent: boolean; resolveBehavior: "resetEntrypoint" | "continueEntrypoint"; allowAgentInject: boolean; sendOnQueueEvent: boolean; sendOnActiveEvent: boolean; getQueuePosition: boolean; getEstimatedWaitTime: boolean; alternativeUpdate: boolean; updateIntervalQueuePosition: number; updateIntervalEstimatedWaitTime: number; maximumQueuePosition: number; maximumEstimatedWaitTime: number; alternativeText: string; enableHandoverDisconnectMessageLiveAgent: boolean; enableHandoverConnectMessageLiveAgent: boolean; enableHandoverDisconnectMessageGenesys: boolean; enableHandoverConnectMessageGenesys: boolean; enableHandoverDisconnectMessageRingCentralEngage: boolean; enableHandoverConnectMessageRingCentralEngage: boolean; }; nodeType?: "question" | "handoverToAgent"; } export interface ICheckAgentAvailabilityNodeParams extends INodeFunctionBaseParams { config: { chatwootInboxId: string; liveAgentInboxId: string; liveAgentSkills: Array; liveAgentLanguages: Array; genesysCloudSkills: Array; genesysCloudProfileSkills: Array; genesysCloudLanguageSkills: Array; storeLocation: "input" | "context"; inputKey: string; contextKey: string; abortOnError: boolean; errorLogging: "none" | "basic" | "full"; logWarning: string; checkAgentAvailabilityProvider: THandoverProvider | "legacyEndpoint" | null; checkAgentAvailabilityConfig: Record; }; } export interface ITriggerFunctionNodeParams extends INodeFunctionBaseParams { config: { functionReferenceId: string; parameters: { [key: string]: any; }; }; } export interface IScheduledNodeParams extends INodeFunctionBaseParams { } export interface ISchedulingErrorNodeParams extends INodeFunctionBaseParams { } export declare type IHandoverToDxNodeParams = INodeFunctionBaseParams; export interface ISpeakingStyle { completeness: string; formality: string; [key: string]: string; } export interface IVoiceConfigParams { ttsVoice: string; ttsLanguage: string; ttsVendor: string; ttsModel: string; ttsLabel: string; ttsDisableCache: boolean; } declare const contactProfileOptions: readonly [ "none", "selectedProfileFields", "completeProfile", "profileMemoriesOnly" ]; export declare type TContactProfileOptions = typeof contactProfileOptions[number]; export interface ISafetySettings { avoidHarmfulContent: boolean; avoidUngroundedContent: boolean; avoidCopyrightInfringements: boolean; preventJailbreakAndManipulation: boolean; } export interface IAiAgent extends IEntityMeta { name: string; referenceId: string; image: string; imageOptimizedFormat: boolean; knowledgeReferenceId: string | null; description: string; speakingStyle: ISpeakingStyle; voiceConfigs: IVoiceConfigParams; enableVoiceConfigs: boolean; safetySettings: ISafetySettings; instructions: string; enableAutoLanguageDetection: boolean; contactProfilesOption: TContactProfileOptions; contactProfilesSelected: string[]; projectReference: TMongoId; organisationReference: TMongoId; } export interface IAiAgentDependencies { type: "attachedKnowledgeStore"; _id: TMongoId; } export interface IGraphAiAgent { type: "aiAgent"; _id: TMongoId; name: string; referenceId: string; properties: Pick; dependencies?: IAiAgentDependencies[]; } /** * Context handed across a runtime handoff (Flows ⇄ AI Agents v2) — the pure * type half of the runtime-handoff contract. * * Kept in its own file with ZERO imports on purpose: these types are consumed * by the future node descriptor (`shared/charts`) and the node-API surface * (`shared/interfaces/ai.ts`), both of which are compiled inside * @cognigy/rest-api-client — and that client receives only a curated allowlist * of `shared/` paths. That allowlist exists in FOUR places, all of which must * list this file: `bin/cognigy-link-shared` (local/CI symlinks) and the * `COPY shared/...` blocks in `build-utils/service-ui.Dockerfile`, * `build-utils/microfrontend.Dockerfile` and * `build-utils/management-ui.Dockerfile`. Miss one of the Dockerfiles and lint * and unit tests still pass — only the image build fails, with TS2307. The rest * of the contract (key generator, schema, guards) lives in `runtimeHandoff.ts`, * whose imports (helper/utils, cache) are NOT in that allowlist — do not merge * these files back together, and do not add imports here. * * It also carries the flow-side action's RESULT type, for the same reason: the * node function returns it and `IActions` declares it, so both compilations need * it and neither may reach `runtimeHandoff.ts`. * * The canonical wire/document shapes are pinned by the shared golden fixtures * published inside @cognigy-internal/service-agents-grpc-client under * `./fixtures/runtime-handoff/*` — the Go implementation in * `Cognigy/ai-agents-v2` (`internal/runtimehandoff`) consumes the same files. */ /** One utterance crossing the runtime boundary. */ export interface IHandoffTranscriptEntry { role: "user" | "assistant"; text: string; } /** One labelled value of a pre-Turn Flow's turn context: reference data for one turn, not instructions. */ export interface ITurnContextEntry { label: string; value: string; } /** * What a pre-Turn Flow hands back to its agent (the "Continue to AI Agent" * node): the user message as the agent should see it, the data to pass on, and * the turn context its prompt shows for this one turn. Set only on a * `purpose: "preTurn"` agent-target document. Turn context is never persisted * by the agent. */ export interface IPreTurnHandBack { /** The `handoffId` of the flow-target document that started the run; tells a stale hand-back from the awaited one. */ runId: string; text: string; data?: Record; turnContext?: ITurnContextEntry[]; } /** * Why a Flow's hand-back to an AI Agent v2 went ahead WITHOUT the Flow context * (flow context sync, CGY-44468). The hand-back itself was written, exactly as * with the flag off, and the agent keeps its previous copy of the context: * * "contextTooLarge" — the context is over MAX_FLOW_CONTEXT_BYTES; * "contextWriteFailed" — it could not be read, serialised (a BigInt, a * circular reference), is not a JSON object, or * Redis refused its write (nothing was written); * "contextWriteUncertain" — the combined write's reply was lost (a timeout), * so the hand-back was written again alone; the * context may or may not have reached the agent. */ export declare type TFlowContextNotSyncedReason = "contextTooLarge" | "contextWriteFailed" | "contextWriteUncertain"; export interface IFlowContextNotSynced { reason: TFlowContextNotSyncedReason; /** Why, in words, for the Interaction Panel and the logs. */ message: string; } /** * One named value a flow designer hands to the agent. The description is what * tells the receiving model how to interpret the value; the visibility decides * whether the value may ever be rendered into a prompt: * * "prompt" (default when absent) — rendered into the agent's system prompt * as clearly-framed reference data. * "internal" — never rendered into any prompt; reachable only by declared * key (the tool-access path is future work on the agent side). */ export interface IHandoffParameter { value: unknown; description?: string; visibility?: "prompt" | "internal"; } /** * Conversation context handed to the AGENT (flow → agent). Delivered once as * the payload of an `agent_handoff_received` inbound signal on the first * post-handoff turn; the agent imports the transcript into its session as * ordinary user/assistant events (at most once per handoffId) and stores the * parameters with their visibility. */ export interface IHandoffContextToAgent { transcript?: IHandoffTranscriptEntry[]; parameters?: Record; /** * Free text the transferring flow wrote about why the conversation moved. * Briefing material for the receiving agent, rendered to it as context and * never shown to the user — it is not an utterance. Counted into the 32 KB * envelope the writing action enforces. */ handoverMessage?: string; /** * The Tool Result (AI Agent v2) node's rendered Answer: the result of the agent's * pending tool call (the document's `toolCallId`). Set only on a * `purpose: "toolCall"` document. In the context rather than on the * document so it is delivered once, with the transcript, and removed by the * same consume-by-rewrite. Counted into the 32 KB envelope. Written by the * Tool Result (AI Agent v2) Flow node. */ answer?: string; /** * The pre-Turn Flow's hand-back. Set only on a `purpose: "preTurn"` * document, which carries nothing else in its context. Written by the * "Continue to AI Agent" Flow node. */ preTurn?: IPreTurnHandBack; } /** * Result of the flow-side handoff writer (`handoffToAiAgentV2`), returned to the * Flow node so a designer can branch on it. Never thrown: a refused handoff is a * designer-visible outcome, not an execution error. * * On any "error" the routing document was NOT written, so the flow still owns the * conversation and must keep executing. */ export interface IHandoffToAiAgentV2Result { status: "success" | "error"; /** UUID of the written runtime handoff (success only). */ handoffId?: string; error?: { reason: "disabled" | "handoverActive" | "invalidConfig" | "hopLimit" | "stateUnreadable" | "writeFailed"; message: string; }; /** * Flow context sync (CGY-44468), success only: the hand-back was written * WITHOUT the Flow context, and why. The node shows it as a debug error. */ flowContextNotSynced?: IFlowContextNotSynced; } /** * Result of the flow-side writer behind the Tool Result (AI Agent v2) * Flow node (`resolveAiAgentV2ToolAction`): it answers the AI Agent's pending * flow execution tool call ("Execute tool flow") by writing a `purpose: * "toolCall"` routing document back to the calling agent. Lives here for the * same reason as `IHandoffToAiAgentV2Result`: the node function and `IActions` * both need it. Never thrown. * * On any "error" the routing document was NOT written, so the conversation * stays with the flow. */ export interface IResolveAiAgentV2ToolActionResult { status: "success" | "error"; /** UUID of the written to-agent document (success only). */ handoffId?: string; /** * Set when the written answer is not the rendered Answer verbatim (success * only): "empty" — it rendered empty and a fixed text was sent instead; * "truncated" — it was cut to fit the 32 KB document cap. The node turns * either into a debug warning; the call is answered regardless. */ answerAdjustment?: "empty" | "truncated"; /** * Flow context sync (CGY-44468), success only: the hand-back was written * WITHOUT the Flow context, and why. The node shows it as a debug error. */ flowContextNotSynced?: IFlowContextNotSynced; error?: { reason: "disabled" | "handoverActive" | "noPendingToolCall" /** The pending call belongs to another Flow run than the one this node runs in (the run's trusted header names the call). */ | "otherRun" | "invalidConfig" | "stateUnreadable" | "writeFailed"; message: string; }; } /** * Result of the flow-side writer behind the "Continue to AI Agent" Flow node * (`resolveAiAgentV2PreTurn`): it hands a pre-Turn Flow's outcome back to the * deferring agent by writing a `purpose: "preTurn"` routing document. Never * thrown. On any "error" no hand-back was written. * * `adjustments` lists what the writer changed so the node can warn a designer: * "turnContextTruncated" (more than 20 entries, or an entry with an empty * label dropped), "turnContextValueCut" (a label or value cut to its length * limit), "aiAgentV2Stripped" (the reserved `aiAgentV2` key removed from * the data) and "systemEventStripped" (`_cognigy.event` removed from the data). */ export interface IResolveAiAgentV2PreTurnResult { status: "success" | "error"; /** UUID of the written to-agent document (success only). */ handoffId?: string; adjustments?: Array<"turnContextTruncated" | "turnContextValueCut" | "aiAgentV2Stripped" | "systemEventStripped">; error?: { reason: "disabled" | "handoverActive" | "invalidConfig" | "stateUnreadable" | "noPendingPreTurn" | "tooLarge" | "writeFailed"; message: string; }; /** * Flow context sync (CGY-44468), success only: the hand-back was written * WITHOUT the Flow context, and why. The node shows it as a debug error. */ flowContextNotSynced?: IFlowContextNotSynced; } export interface ILoadAiAgentNodeParams extends INodeFunctionBaseParams { config: { aiAgent: IAiAgent; storeLocation: string; contextKey: string; inputKey: string; keyWarning: string; }; } export interface ISendTileUpdateParams extends INodeFunctionBaseParams { tile: any; } export interface ISendConfigUpdateParams extends INodeFunctionBaseParams { agentAssistConfig: { grid: { columns: number; rows: number; gap: number; }; tiles: Record; }; } export declare type INodeAiEnhancedRephraseOutputMode = "none" | "userInputs" | "customInputs"; export interface INodeWithAiRephraseConfig { generativeAI_rephraseOutputMode: INodeAiEnhancedRephraseOutputMode; generativeAI_amountOfLastUserInputs: number; generativeAI_customInputs: string[]; generativeAI_temperature: number; promptType: TPromptTypes; questionType?: TRephraseWithAIQuestionType; } export interface ISayNodeConfigParams { text: string | string[]; data: any; loop: boolean; linear: boolean; liveAgentSettings?: ILiveAgentSettings; type: "text" | "quickReplies" | "gallery" | "buttons" | "image" | "list" | "adaptiveCard"; _cognigy: { [key: string]: unknown; }; _data: { [key: string]: any; }; } export interface ISayNodeConfig extends INodeWithAiRephraseConfig { say: ISayNodeConfigParams; handoverOutput: ISayNodeSettings["liveAgentSettings"]["outputDestination"]; preventTranscript: boolean; } export interface ISayParams extends INodeFunctionBaseParams { config: ISayNodeConfig; organisationId: string; } export interface IOptionalQuestionNodeParams extends INodeFunctionBaseParams { config: IOptionalQuestionNodeOtherConfig | IOptionalQuestionNodeKeyphraseConfig | IOptionalQuestionNodeRegexConfig; } export interface IOptionalQuestionNodeSharedConfig extends INodeWithAiRephraseConfig { say: ISayParams["config"]["say"]; retentionTime: number; executeChildrenOnly: boolean; cognigyScript: "answer" | "question"; storeResultInContext: boolean; contextKey: string; storeDetailedResults: boolean; handoverOutput: ISayNodeSettings["liveAgentSettings"]["outputDestination"]; } export interface IOptionalQuestionNodeKeyphraseConfig extends IOptionalQuestionNodeSharedConfig { type: "keyphrase"; keyphraseTag: string; usePositiveOnly: boolean; } export interface IOptionalQuestionNodeRegexConfig extends IOptionalQuestionNodeSharedConfig { type: "regex"; regex: string; } export interface IOptionalQuestionNodeOtherConfig extends IOptionalQuestionNodeSharedConfig { type: "email" | "number" | "temperature" | "age" | "date" | "duration" | "yesNo" | "money" | "percentage" | "intent" | "data" | "url" | "app"; } export interface IQuestionNodeParams extends INodeFunctionBaseParams { config: IQuestionNodeDatepickerConfig | IQuestionNodeKeyphraseConfig | IQuestionNodeRegexConfig | IQuestionNodeOtherConfig; } export interface IQuestionNodeSharedConfig extends INodeWithAiRephraseConfig { validationMessage: string; repromptCondition: string; repromptLLMProvider: string; repromptLLMPrompt: string; repromptLLMTurns: number; repromptLLMStream: boolean; repromptLLMStreamStopTokens: string[]; repromptType: "text" | "say" | "llm" | "execute"; repromptSay: ISayParams["config"]["say"]; repromptFlowNode: { flow: string; node: string; isGoto?: boolean; }; repromptParseIntents?: boolean; repromptParseKeyphrases?: boolean; repromptAbsorbContext?: boolean; validationRepeat: boolean; storeResultInContext: boolean; contextKey: string; skipIfResultInContext: boolean; onlyAcceptEscalationIntents: boolean; storeDetailedResults: boolean; storeInContactProfile: boolean; profileKey: string; say: ISayParams["config"]["say"]; parseResultOnEntry: boolean; additionalValidation: string; maxExecutionDiff: number; resultLocation: string; skipRepromptOnIntent: boolean; preventTranscript: boolean; escalateAnswersAction: "none" | "goto" | "execute" | "skip" | "text" | "handover"; escalateAnswersThreshold: number; escalateAnswersGotoTarget: string; escalateAnswersExecuteTarget: string; escalateAnswersGotoExecutionMode: "continue" | "wait"; escalateAnswersInjectedText: string; escalateAnswersInjectedData: string; escalateAnswersMessage: ISayParams["config"]["say"]; escalateAnswersRepromptPrevention: boolean; escalateAnswersOnce: boolean; escalateAnswersHandoverText: string; escalateAnswersRepeatHandoverMessage: boolean; escalateAnswersHandoverCancelIntent: string; escalateAnswersHandoverQuickReply: string; escalateAnswersHandoverChatwootInboxId: string; escalateAnswersHandoverLiveAgentInboxId: string; escalateAnswersHandoverAdditionalCategoryIds: string[]; escalateAnswersHandoverSendTranscriptAsFirstMessage: boolean; escalateAnswersHandoverSalesforcePrechatEntities: object[]; escalateAnswersHandoverSalesforcePrechatDetails: object[]; escalateAnswersHandoverGenesysLanguage: string; escalateAnswersHandoverGenesysSkills: string[]; escalateAnswersHandoverGenesysPriority: string; escalateAnswersHandoverGenesysCustomAttributes: object; escalateAnswersHandoverEightByEightChannelId: string; escalateAnswersHandoverEightByEightQueueId: string; escalateAnswersHandoverEightByEightJSONProps: object; escalateAnswersHandoverSendResolveEvent: boolean; escalateAnswersHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint"; escalateAnswersAllowAgentInject: boolean; escalateAnswersSendOnQueueEvent: boolean; escalateAnswersSendOnActiveEvent: boolean; escalateIntentsAction: "none" | "goto" | "execute" | "skip" | "text" | "handover"; escalateIntentsHandoverProvider: THandoverProvider | "legacyEndpoint" | null; escalateIntentsHandoverProviderConfig: Record; escalateAnswersHandoverProvider: THandoverProvider | "legacyEndpoint" | null; escalateAnswersHandoverProviderConfig: Record; escalateIntentsValidIntents: string[]; escalateIntentsThreshold: number; escalateIntentsGotoTarget: string; escalateIntentsExecuteTarget: string; escalateIntentsGotoExecutionMode: "continue" | "wait"; escalateIntentsInjectedText: string; escalateIntentsInjectedData: any; escalateIntentsMessage: ISayParams["config"]["say"]; escalateIntentsRepromptPrevention: boolean; escalateIntentsHandoverText: string; escalateIntentsRepeatHandoverMessage: boolean; escalateIntentsHandoverCancelIntent: string; escalateIntentsHandoverQuickReply: string; escalateIntentsHandoverChatwootInboxId: string; escalateIntentsHandoverLiveAgentInboxId: string; escalateIntentsHandoverAdditionalCategoryIds: string[]; escalateIntentHandoverSendTranscriptAsFirstMessage: boolean; escalateIntentsHandoverSalesforcePrechatEntities: object[]; escalateIntentsHandoverSalesforcePrechatDetails: object[]; escalateIntentsHandoverGenesysLanguage: string; escalateIntentsHandoverGenesysSkills: string[]; escalateIntentsHandoverGenesysPriority: string; escalateIntentsHandoverGenesysCustomAttributes: object; escalateIntentsHandoverEightByEightChannelId: string; escalateIntentsHandoverEightByEightQueueId: string; escalateIntentsHandoverEightByEightJSONProps: object; escalateIntentsHandoverSendResolveEvent: boolean; escalateIntentsHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint"; escalateIntentsAgentAssistInitMessage: string; escalateIntentsAllowAgentInject: boolean; escalateIntentsSendOnQueueEvent: boolean; escalateIntentsSendOnActiveEvent: boolean; reconfirmationBehaviour: "none" | "reconfirm"; reconfirmationQuestion: string; reconfirmationQuestionReprompt: string; handoverOutput: ISayNodeSettings["liveAgentSettings"]["outputDestination"]; overwrittenBaseAnswer: string; cleanTextLocale: "infer" | "de" | "en"; cleanDisallowedSymbols: boolean; resolveSpelledOutNumbers: boolean; resolvePhoneticAlphabet: boolean; replaceSpecialWords: boolean; resolveSpelledOutAlphabet: boolean; resolvePhoneticCounters: boolean; contractSingleCharacters: boolean; contractNumberGroups: boolean; trimResult: boolean; runNLUAfterCleaning: boolean; additionalAllowedCharacters: string[]; additionalSpecialPhrases: { [key: string]: string; }; additionalPhoneticAlphabet: { [key: string]: string; }; additionalMappedSymbols: { [key: string]: string; }; llmEntityExtractLLMProviderReferenceId: string; entityName: string; entityDescription: string; examples: JSON; llmEntityExtractDescription: string; llmentityTemperature: number; llmentityTimeout: number; llmEntityExtractOptionsIgnoreDeprecatedParameters: boolean; customModelOptions: JSON; customRequestOptions: JSON; } export interface IQuestionNodeDatepickerConfig extends IQuestionNodeSharedConfig { type: "date"; datepicker_eventName: string; datepicker_locale: string; datepicker_dateFormat: string; datepicker_time24Hours: boolean; datepicker_defaultDate: string; datepicker_minDate: string; datepicker_maxDate: string; datepicker_wantEnableDisable: "none" | "enable" | "disable"; datepicker_disableEnableRange: boolean; datepicker_enabledDates: string[]; datepicker_disabledDates: string[]; datepicker_enableTime: boolean; datepicker_mode: "single" | "multiple" | "range"; datepicker_openPickerButtonText: string; datepicker_cancelButtonText: string; datepicker_submitButtonText: string; datepicker_defaultHour: number; datepicker_defaultMinute: number; datepicker_enableSeconds: boolean; datepicker_hourIncrement: number; datepicker_minuteIncrement: number; datepicker_noCalendar: boolean; datepicker_weekNumbers: boolean; datepicker_hidePicker: boolean; datepicker_functionEnable: string; datepicker_functionDisable: string; } export interface IActiveQuestion { nodeId: string; type: "date" | "keyphrase" | "regex" | "email" | "number" | "temperature" | "age" | "duration" | "yesNo" | "text" | "money" | "percentage" | "intent" | "data" | "url" | "custom" | "de_lp" | "iban" | "us_ssn" | "bic" | "ipv4" | "creditcard" | "phonenumber" | "llm_entity"; lastExecutedAt: number; forgetQuestionThreshold: number; repromptCount?: number; escalationCount?: number; tentativeAnswer?: any; tentativeAnswerShortform?: string; onlyAcceptEscalationIntents?: boolean; escalationIntents?: string[]; } export interface IQuestionNodeKeyphraseConfig extends IQuestionNodeSharedConfig { type: "keyphrase"; keyphraseTag: string; usePositiveOnly: boolean; } export interface IQuestionNodeRegexConfig extends IQuestionNodeSharedConfig { type: "regex"; regex: string; } export interface IQuestionNodeOtherConfig extends IQuestionNodeSharedConfig { type: "email" | "number" | "temperature" | "age" | "duration" | "yesNo" | "text" | "money" | "percentage" | "intent" | "data" | "url" | "custom" | "de_lp" | "iban" | "us_ssn" | "bic" | "ipv4" | "creditcard" | "phonenumber" | "llm_entity"; } export declare type TRephraseWithAIQuestionType = IActiveQuestion["type"] | IOptionalQuestionNodeOtherConfig["type"]; export interface INodeToExecute { nodeId: string; flowExecutionCallerId?: string; flowId: string; cognigyScriptInput?: IExecutionObjects["input"]; inputObjectToRestore?: IExecutionObjects["input"]; nextMainFlowNodeInputObject?: IExecutionObjects["input"]; ignoreSlotScope?: boolean; trackAnalyticsStepOptions?: { entityReferenceId: string; flowName: string; flowReferenceId: string; type: "intent" | "node"; stepLabel: string; }; type?: "stopExecution" | "resetCognigyScriptInput" | "trackAnalyticsStep"; } export interface OpenAIChatMessage { role: "system" | "user" | "assistant"; content: string; } export interface IGenerativeSlot { tag: string; description: string; value: string; optional?: boolean; validation?: { type: string; value: string; invalidReason: string; }; invalid?: boolean; } export declare type TCompletionPrompt = { prompt: string; }; export declare type TChatMessage = { role: "user" | "system" | "assistant" | "tool"; content: string; toolCallId?: string; }; export declare type TChatPrompt = { messages: Array; }; export declare type TALLPrompts = TCompletionPrompt | TChatPrompt | Array; export declare type TPromptParserFun = (originalMsg: TALLPrompts) => TALLPrompts; export declare type TSessionUsageInformation = { [key: string]: { llmDisplayName: string; providerType: string; modelType: string; usage: { inputTokens: number; outputTokens: number; }; }; }; export interface IToolCall { id: string; type: string; index: number; function: IToolFunction; thoughtSignature?: string; } export interface IToolFunction { name: string; arguments: { [key: string]: unknown; }; } export interface ISessionState extends ISessionStateWithoutMeta { /** * The Mongo ObjectId. Typed as any due * to extending the mongoose document below. */ _id: any; /** * The id of the user. */ userId: string; /** * The unique identifier of the * current session (conversation) the * user is having. */ sessionId: string; /** * The 'epoch' is a value which we will increase whenever * we dispatch a change for the session state. We use it * to avoid that we apply outdated updates to the session state */ epoch: number; /** * Date when this object will expire in the database. We utilize a * time-based index in MongoDB. */ expiresAt: Date; } export interface ISessionStateWithoutMeta { /** * The context object that the user * can manipulate in the Flow. * Moves from string at storage to object in memory */ context: { [key: string]: any; }; /** * The system context stores information * like execution number and Flow paths. */ systemContext: { [key: string]: any; }; /** * The current Flow state. * @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ state: string; flowId: string; thinkFlowReferenceIdMarker: string; localeReferenceId: string; /** * The snapshot / project * the user is using */ entrypoint: string; entrypointType: "project" | "snapshot"; projectId: string; timezoneOffset: number | string; /** * Forms/Processes need the any slots of the calling flow to map injected any slots */ injectedAnySlots: { [key: string]: string; }; reconfirmedSentences: { [key: string]: string[]; }; endpointClientInstanceId?: string; endpointId?: string; previousInputId: string | null; previousInputMessageAmount: number; sensitiveLoggingSettings: ISensitiveLoggingSettings; sentWelcomeMessage?: boolean; nodesToExecuteStack?: INodeToExecute[]; trackedSteps?: IAnalyticsStepData["trackedSteps"]; trackedGoals?: IAnalyticsSourceData["trackedGoals"]; handoverEscalations?: IAnalyticsSourceData["handoverEscalations"]; previousInputText?: IAnalyticsSourceData["previousInputText"]; previousInputData?: IAnalyticsSourceData["previousInputData"]; previousInputAttachments?: IAnalyticsSourceData["previousInputAttachments"]; previousSource?: IAnalyticsSourceData["previousSource"]; handoverRequest?: IHandoverRequestStatus; frustration?: number; /** * The list of nodes that were visited in the last * Flow execution */ lastFlowPath?: string; apps?: IAppsSessionState; /** * The last user input and bot output strings. * Only filled & used if Generative AI feature is enabled. */ lastConversationEntries?: ILastConversationEntry[]; analytics: ISessionStateAnalytics; lastToolCall?: { llmProvider: TGenerativeAIProviders; toolCall: IToolCall; aiAgentJobNode: { flow: string; node: string; }; mcpServerUrl?: string; mcpToolNode?: string; mcpHeaders?: Record; kind?: "mcp" | "a2a"; agentBaseUrl?: string; agentCardPath?: string; agentHeaders?: Record; skillId?: string; executionMode?: "blocking" | "nonBlocking"; taskTimeout?: number; maxAutonomousTurns?: number; timeout?: number; authForDiscovery?: boolean; } & TA2AAuthConnectionParams; /** * Tracks remote A2A tasks left in a non-terminal `input-required`/`auth-required` state, * keyed by a stable per-agent key (the agent base URL itself, no hashing). The stored `taskId` is sent * on the next `message/send` to that agent so the remote continues the same task instead of * starting a new one. Entries are cleared once the task reaches a terminal state. */ a2aPendingTasks?: { /** `taskState` mirrors `@a2a-js/sdk`'s `TaskState` enum (a plain number at runtime) — kept as * `number` here rather than importing the SDK type, since this interfaces/ file is compiled * by every service via `shared/`, not just service-ai/service-endpoint. See * `shared/charts/descriptors/service/aiAgent/helpers/a2aPendingTasks.ts`'s `TA2ATaskState` * for the canonical local mirror and named constants. */ [agentKey: string]: { taskId: string; taskState?: number; updatedAt: number; /** The conversation scope (`contextId`) the task was created under. A stored task is only * continued while this still matches the current scope — see * `shared/charts/descriptors/service/aiAgent/helpers/a2aPendingTasks.ts`. */ contextId?: string; }; }; /** * Per-agent count of how many times in a row the AI Agent has called the SAME remote A2A * agent without a real user turn in between (tracked via a stable `traceId`), so a runaway * autonomous loop can be capped. Kept separate from `a2aPendingTasks` because that map's entry * is deleted on every terminal (e.g. `"completed"`) response, which this counter must survive. */ a2aAutonomousTurns?: { [agentKey: string]: { count: number; lastTraceId: string; }; }; tokenUsage?: TSessionUsageInformation; } export interface ISessionStateAnalytics { goalCycleIds: { [goalId: string]: string; }; } export interface ILastConversationEntry { source: "user" | "bot"; text: string; } export interface IAppsSessionState { session: { token: string; }; customization: {}; } export declare type ValueOf = T[keyof T]; /** * Options for reading the transcript * @param limit: the maximum number of entries to read * @param rolesWhiteList: (optional) the roles for which the entries should be included, if not provided or empty all entries will be read * @param excludeDataOnlyMessagesFilter: (optional) the roles for which data only messages (emtpy text field) will be excluded if type is input/output * @param useTextAlternativeForLLM: (optional) if true, graphical outputs will be included in the transcript, either using the value from the graphical description / fallbackText field, or by converting the data where possible * @param includeTextAlternativeInTranscript: (optional) if true, the text alternative for LLM will be included in the transcript * @param excludeUserEventMessages: (optional) if true, user event messages will be excluded from the transcript */ export declare type TReadTranscriptOptions = { limit: number; rolesWhiteList?: TTranscriptRoles[]; excludeDataOnlyMessagesFilter?: (TranscriptRole.USER | TranscriptRole.AGENT | TranscriptRole.ASSISTANT)[]; useTextAlternativeForLLM?: boolean; includeTextAlternativeInTranscript?: boolean; excludeUserEventMessages?: boolean; }; declare enum TranscriptRole { ASSISTANT = "assistant", USER = "user", AGENT = "agent", SYSTEM = "system", TOOL = "tool" } export declare type TTranscriptRoles = ValueOf; declare enum TranscriptEntryType { INPUT = "input", OUTPUT = "output", TOOL_CALL = "toolCall", TOOL_ANSWER = "toolAnswer", DEBUG_LOG = "debugLog" } export declare type TTranscriptEntryContent = TTranscriptUserInput | TTranscriptAssistantOutput | TTranscriptAgentOutput | TTranscriptAssistantToolCall | TTranscriptToolAnswer | TTranscriptDebugLog; export declare type TTranscriptEntry = TTranscriptEntryContent & { id: string; timestamp: number; traceId: string; }; export declare type TTranscriptUserInput = { role: TranscriptRole.USER; type: TranscriptEntryType.INPUT; source: "user" | "system"; payload: { text?: string; data?: any; }; }; export declare type TTranscriptAgentOutput = { role: TranscriptRole.AGENT; type: TranscriptEntryType.OUTPUT; source: "agent" | "system"; payload: { text?: string; data?: any; textAlternative?: string; }; }; export declare type TTranscriptAssistantOutput = { role: TranscriptRole.ASSISTANT; type: TranscriptEntryType.OUTPUT; source: "assistant" | "system"; payload: { text?: string; data?: any; textAlternative?: string; }; }; export declare type TTranscriptAssistantToolCall = { role: TranscriptRole.ASSISTANT; type: TranscriptEntryType.TOOL_CALL; source: "system"; payload: { name: string; id: string; input: Object; thoughtSignature?: string; }; }; export declare type TTranscriptToolAnswer = { role: TranscriptRole.TOOL; type: TranscriptEntryType.TOOL_ANSWER; source: "system"; payload: { toolCallId: string; name?: string; content: string; }; }; export declare type TTranscriptDebugLog = { role: TranscriptRole.SYSTEM; type: TranscriptEntryType.DEBUG_LOG; source: "system"; payload: { header?: string; message: string; metadata?: any; }; }; export interface IToolFunction { /** * The name of the function to be called. */ name: string; /** * A description of what the function does, used by the model to choose when and * how to call the function. */ description: string; /** * strict: true enables structured outputs. */ strict?: boolean; /** * The parameters the functions accepts, ideally described as a JSON Schema object. */ parameters?: IToolParameters; } export interface ITool { function: IToolFunction; /** * The type of the tool. Currently, only `function` is supported. */ type: "function"; } export interface IToolParameters { [key: string]: any; } export interface IRunGenerativeAIPromptOptions { /** * @deprecated should not inject the prompt anymore, use getPrompt() instead */ prompt?: string; /** Text to calculate the embedding vector */ embeddingText?: string; /** * Instead of a prompt, we can also provide messages in OpenAI's chat format */ chat?: OpenAIChatMessage[]; /** * transcript - The transcript to use for the prompt. * If provided, the transcript will be converted to in the prompt runner. * Also, the system message will be expected in the `chat` property. */ transcript?: TTranscriptEntry[]; /** * tools - Function tools to provide to the llm. */ tools?: ITool[]; /** * toolChoice - Determine choice of tool usage. */ toolChoice?: "auto" | "required" | "none"; /** promptFiller - Injected Function to replace the possible prompt variable for the use case data on runtime . */ promptParser?: (rawPrompt: TALLPrompts) => TALLPrompts; /** temperature - (Optional) The temperature range to determine how much the OpenAI should vary its response. Defaults to 0.7 */ temperature?: number; /** model - (Optional) The OpenAI model to use. Defaults to 'gpt-4o' */ model?: TGenerativeAIModels; /** timeoutInMs - (Optional) The timeout for the request in ms. Defaults to 10000 */ timeoutInMs?: number; /** maxTokens - (Optional) Upper bound on how many tokens the API will return. * The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. * If not provided, we calculate the maximum: model_max_tokens - prompt_tokens */ maxTokens?: number; /** * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. * So 0.1 means only the tokens comprising the top 10% probability mass are considered. * It is recommended altering this or temperature but not both. */ topP?: number; /** * Top-k changes how the model selects tokens for output. A top-k of 1 means * the selected token is the most probable among all tokens in the model's * vocabulary (also called greedy decoding), while a top-k of 3 means that * the next token is selected from among the 3 most probable tokens * (using temperature). * values: [1–40] * Default: 40 */ topK?: number; /** * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, * decreasing the model's likelihood to repeat the same line verbatim. */ frequencyPenalty?: number; /** * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, * increasing the model's likelihood to talk about new topics. */ presencePenalty?: number; /** * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. */ stop?: string[]; /** * The useCase of the prompt. */ useCase?: string; /** * Whether to stream the response or not. */ stream?: boolean; /** * Callback function for stream data */ streamOnDataHandler?: Function; /** * Array of tokens which signal the end of a sentence and trigger * flushing of token buffer to the provided handler */ streamStopTokens?: string[]; /** * Array of regular expressions which prevent the stream buffer to be flushed */ streamStopTokenOverrides?: string[]; /** * A string denoting the reference ID of the chosen LLM provider */ llmProviderReferenceId?: string; /** * Response Format (can be json for some providers), text and default means none */ responseFormat?: "json_object" | "text" | "default"; /** * Option to output detailed results, including finish_reason, etc */ detailedResults?: boolean; /** * Developers can now specify seed parameter in the OpenAI Chat Completion request to receive (mostly) consistent outputs */ seed?: number; /** * JSON object with options to pass to the LLM Model */ customModelOptions?: any; /** * JSON object with options to pass to the LLM Request */ customRequestOptions?: any; /** * The user can supply specific instructions for image processing */ imageOptions?: { /** * Whether to process images at all */ processImages?: boolean; /** * Configure how images older than the last turn are handled */ transcriptImageHandling?: "minify" | "drop" | "keep"; /** * Options for resizing images */ resizingOptions?: { /** * Maximum Width for images to be sent to the provider */ maxImageWidth?: number; /** * Maximum Height for images to be sent to the provider */ maxImageHeight?: number; /** * Maximum File Size for images to be sent to the provider */ maxImageFileSizeInBytes?: number; }; }; /** * Option to prevent the replacing of \n with " " in streamed outputs */ preventNewLineRemoval?: boolean; /** * Optional logging configuration */ logging?: { /** Webhook URL to receive request/response payloads */ webhookUrl?: string; /** Custom data to be sent alongside the logging payloads */ customData?: unknown; /** * Optional headers to be sent with the webhook request */ headers?: Record | JSON; /** Any additional fields are forwarded into logging meta */ [key: string]: unknown; }; } export interface IAzureOpenAIProviderFieldsV2 { apiKey: string; } export interface IAzureOpenAIProviderOauth2Fields { clientId: string; clientSecret: string; oauthUrl: string; scope: string; additionalHeaderName?: string; additionalHeaderValue?: string; } export interface IGoogleVertexAIProviderFields { googleCredentialsFileName: string; credentialsStringified: string; fileToken: string; clientEmail: string; privateKey: string; projectId: string; } export interface IAlephAlphaProviderFields { token: string; } export interface IAwsBedrockProviderFields { accessKeyId: string; secretAccessKey: string; } export interface IAwsBedrockIamProviderFields { roleArn: string; } /** Logical operators that can be used when filtering tags for search */ export declare type ISearchTagsFilterOps = "and" | "or"; export interface IProviderOauth2Fields extends IAzureOpenAIProviderOauth2Fields { tokenCacheKey: string; } export interface ILLMProviderMeta extends IAzureOpenAIMeta { customAuthHeader?: string; } export interface ISearchLLMCredentials { provider: TGenerativeAIProviders; connectionFields: IAzureOpenAIProviderFieldsV2 | IProviderOauth2Fields | IAwsBedrockProviderFields | IAwsBedrockIamProviderFields | IAlephAlphaProviderFields | IGoogleVertexAIProviderFields; providerMetaData: ILLMProviderMeta; } export interface ISearchTagsData { tags: string[]; op: ISearchTagsFilterOps; } export interface IKnowledgeSearchData extends IPayloadBaseMetaData { query: string; projectId?: string; organisationId?: string | undefined; topK: number; language: string; knowledgeStoreIds?: string[]; llmCredentials?: ISearchLLMCredentials; configSetIds?: string[]; isInPlatformLlm?: boolean; sessionId?: string; tagsData?: ISearchTagsData; } export interface IKnowledgeSearchReturnValue { status: "success" | "error"; error?: string; data?: { topK: [ { text: string; distance: number; storeReferenceId: string; sourceReferenceId: string; sourceMetaData: { sourceName: string; sourceType: string; title: string; url: string; [key: string]: any; }; chunkMetaData?: { [key: string]: any; }; order: number; } ]; tokenUsage: { inputTokens: number; outputTokens: number; totalTokens: number; }; }; } export interface IAddLexiconKeyphraseNodeParams extends INodeFunctionBaseParams { config: { lexiconId: string; keyphrase: string; slots: string[]; synonyms: string[]; }; } export interface IExecuteCognigyNLUNodeParams extends INodeFunctionBaseParams { config: { text: string; data: any; mode: string; contextKey: string; inputKey: string; parseIntents: boolean; parseSlots: boolean; parseSystemSlots: boolean; findType: boolean; processDefaultReply: boolean; }; } export interface IRegexSlotFillerConfig { regex: string; flags: string; slot: string; } export interface IRegexSlotFillerParams extends INodeFunctionBaseParams { config: IRegexSlotFillerConfig; } export interface IMatchPatternParams extends INodeFunctionBaseParams { config: { patterns: string[]; patternGroupName: string; alternateInput: string; detailedCompoundSlots: boolean; createNewSlots: boolean; tagExistingSlots: boolean; useFullSystemslotText: boolean; }; } export interface IFuzzySearchParams extends INodeFunctionBaseParams { config: { searchPattern: string; items: any; isCaseSensitive: boolean; includeScore: boolean; includeMatches: boolean; minMatchCharLength: number; shouldSort: boolean; findAllMatches: boolean; location: number; threshold: number; distance: number; ignoreLocation: boolean; storeLocation: string; inputKey: string; contextKey: string; }; } export interface IGenerativeSlotFillerParams extends INodeFunctionBaseParams { config: { slotsConfig: IGenerativeSlot[]; amountOfLastUserInputs: number; maxQuestions: number; temperature: number; storeLocation: string; contextKey: string; inputKey: string; timeout: number; }; } export interface IEndpointSettings { isFeatureAccmEnabled?: boolean; /** * Whether to enable mocking code for the node execution */ enableMocking?: boolean; } export interface IChartExecutableNode extends IProjectScope, IOrganisationScope { id: string; _id?: string; type: string; label?: string; extension: string; /** Storage for extension data */ extensionStorage?: IExtensionDataStorage; behavior: { stopping: boolean; }; fields: INodeFieldSet; children: string[]; next: string | null; config: C["config"]; /** * @deprecated Ignored at runtime. Nodes from uploaded extensions always run on * serverless, regardless of this flag. */ trustedCode: boolean; pathToPackageExecutable: string; /** * Whether the node is a standard * Cognigy node, e.g. a sendText node. */ isCognigy: boolean; /** * Whether the node is disabled */ isDisabled: boolean; analyticsLabel?: string; /** * Mock object to replace the node function with a mock function, * when the mock mode is enabled for the node and the endpoint settings allow it. */ mock: { isEnabled: boolean; code: string; transpiled?: string; hasError?: boolean; }; } /** * @param meta.contactNumber DirectQuery views this is as an identifier similar to a session ID */ export interface ICXOneKnowledgehubRequestBody { schemaVersion?: string; timestamp: string; meta: { /** * Mandatory. The API resolves the caller's tenant from the `tenantId` JWT claim * for user tokens, but the service token this node authenticates with carries no * such claim, so the tenant must travel in the request instead. Populated on node * save by service-resources (enrichCxoneKnowledgehubNode). */ tenantId: string; contactNumber: string; /** Mandatory for the same reason as `tenantId` — a service token has no agent `sub`. */ agentUid: string; provider: string; }; query: { uid: string; text: string; persona?: string; language?: string; }; kbFiltering?: { conversationContextRefId?: string; filters?: string; }; config: { kbAnswers: { promptEditorProfileId?: string; answers: { enabled: boolean; maxWords: number; }; images: { enabled: boolean; maxImages: number; }; links: { enabled: boolean; maxLinks: number; }; }; kbProcessSteps: { enabled: boolean; maxSteps: number; maxTitleWords: number; maxStepWords: number; }; awsBedrock: { knowledgeHubId: string; awsBedrockKbId: string; maxKernels: number; shareable: boolean; promptTemplate?: { textPromptTemplate: string; modelArn: string; }; }; }; } export interface ICXOneKnowledgehubResponseBody { timestamp: string; kbAnswers: { uid: string; conversationContextRefId?: string; kbCompletions: Array<{ uid: string; kbCompletion: string; restriction: "Public" | "Private" | "Combine"; citations: Array<{ text: string; start: number; end: number; }>; }>; kbImages: Array<{ uid: string; pageId: number; title: string; link: string; thumbnail: string; restriction: "Public" | "Private"; }>; kbLinks: Array<{ uid: string; pageId: number; title: string; link: string; restriction: "Public" | "Private"; }>; }; } /** Whether the Knowledge Hub node returns a generated answer or raw retrieved chunks. */ export declare type TCXOneKnowledgeHubResponseType = "answer" | "chunks"; /** * Request body for the KH Retrieval Service's `/retrieve` endpoint. * Field names confirmed against the "KH | Retrieval Service API" Confluence contract * (https://nice-ce-cxone-prod.atlassian.net/wiki/spaces/csa/pages/1953595868) and a * working Postman call against the live dev csa-kh-retrieval-ms instance (2026-08-18). * This does NOT match the request shape used by the Direct Query API * (ICXOneKnowledgehubRequestBody) — different casing, different field names, and * `queryConfig.filter` is a JSON object, not a stringified JSON `filters` string. */ export interface ICXOneKnowledgeRetrievalRequestBody { knowledgehubId: string; awsBedrockKbId?: string; khProviderType?: string; meta: { /** * Mandatory. The Retrieval Service reads tenant and agent from `meta` whenever the * caller presents a service token (it can only read them from JWT claims for user * tokens), and returns 400 when either is absent. Populated on node save by * service-resources (enrichCxoneKnowledgehubNode). */ tenantId: string; busNumber?: number; contactNumber?: number; contactUid?: string; interactionUid?: string; agentNumber?: number; /** Mandatory for the same reason as `tenantId` — see above. */ agentUid: string; assistProfileId?: string; agentContactUid?: string; provider: string; customerId?: string; }; query: { queryId?: string; queryText: string; language?: string; }; queryConfig?: { numberOfResults?: number; filter?: Record; }; } /** Response body for the KH Retrieval Service's `/retrieve` endpoint. */ export interface ICXOneKnowledgeRetrievalResponseBody { timestamp: string; chunks: Array<{ uid: string; text: string; sourceUri: string; score: number; citations?: Array<{ text: string; start: number; end: number; }>; }>; } export interface IGetConversationTranscriptParams { turnLimit: number; } export interface ISensitiveLoggingSettings { maskLogging: boolean; maskAnalytics: boolean; maskIPAddress?: boolean; disableConversations: boolean; disableIntentTrainer: boolean; } export interface INLProperties extends ICognigyNLPProperties { timeReference?: any; organisation?: string; result?: any; flowId?: string; URLToken?: string; ngramProcessText?: any; } export interface IIntentScore { id: number; name: string; score: number; negated: boolean; confirmationSentence?: string; sentenceId?: number; sentence?: string; legacyScore?: number; flow?: string; intentId?: string; } export declare type TPromptTypes = "statement" | "question" | "reprompt"; export interface IRephraseSentenceWithAIOptions { useLastUserInputs?: boolean; amountOfUserInputs?: number; customInputs?: string[]; temperature?: number; promptType?: TPromptTypes; questionType?: TRephraseWithAIQuestionType; question?: string; answer?: string; } export declare type TBrainSessionState = Partial>; export declare type TNodeAnalyticsParams = { nodeId: IChartExecutableNode["id"]; nodeLabel: IChartExecutableNode["label"]; nodeType: IChartExecutableNode["type"]; }; export interface IActions { addConditionalEntrypoint?: (actions: IActions, flowId: string) => (addConditionalEntrypointParams: IAddConditionalEntrypointParams) => void; addHandoverInactivityTimer?: (params: { timerInMs: number; }) => Promise; activateProfile?: () => Promise; addLexiconKeyphrase?: (lexicon: string, keyphrase: string, slots: Array, synonyms: Array, data?: Object) => void; addContactMemory?: (memoryText: string) => void; addToContext?: (key: string, value: any, mode: "simple" | "array") => void; cancelHandoverRequest?: (cancelHandoverInProvider?: boolean) => Promise; checkAgentAvailability?: (params: ICheckAgentAvailabilityNodeParams) => void; checkFrustration?: (nodeId: string, input: any) => void; checkThink?: (id: string, maxLoops?: number) => boolean; completeGoal?: (goalData: IAnalyticsDataGoals) => void; countGPTTokens: (prompt: string) => number; deactivateProfile?: (deleteData: boolean, maskAndKeepAnalytics?: boolean) => Promise; deleteContext?: (key: string) => void; deleteProfile?: (maskAndKeepAnalytics?: boolean) => Promise; deleteSystemContext?: (key: string) => void; getCache?: (key: string) => void; getContext?: (key: string) => any; getConversationTranscript?: (mode: "string" | "json", options: IGetConversationTranscriptParams) => ILastConversationEntry[]; getLastTopic?: (type: any, age: number) => void; /** @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ getState?: () => string; getSystemContext?: (key: string) => any; emitEvent?: TEmitter; executeCodeInSecureContext?: (codeParams: ICodeNodeParams) => Promise; executeCognigyNLU?: (params: IExecuteCognigyNLUParams) => Promise; handleIntentDefaultReply?: (params: INLProperties) => Promise; /** * returns the analytics data object - mutable * @deprecated */ getAnalyticsData: () => IAnalyticsSourceData; /** returns a copy of the analytics data object - immutable */ getAnalyticsDataCopy: (key: string, value: any) => void; setAnalyticsData?: (key: keyof IAnalyticsSourceData, value: any) => void; /** returns a copy of the analytics data object - immutable */ getSessionStateCopy: () => ISessionState; /** sets a key value pair in the session state in the brain */ setSessionState: (key: keyof TBrainSessionState, value: any) => void; getInjectedAnySlots?: () => { [key: string]: string; }; getInjectedIntent?: () => IIntentScore; setInjectedIntent?: (injectedIntent: IIntentScore) => void; getReconfirmedIntentSentences?: () => { [key: string]: string[]; }; getSystemContextObject?: () => any; /** * Writes a runtime handoff to the AI Agent v2 runtime for this session, so the * NEXT user input is answered by the named agent instead of this flow * (contract: `architecture/runtime-handoff.md` in the ai-agents-v2 repo). * * Never throws — a refusal comes back as `{status: "error", error: {reason}}` * that the calling node writes to `input.runtimeHandoff` for the designer to * branch on. On an error the routing document was NOT written, so the flow * still owns the conversation and must keep executing. * * Optional because reduced execution contexts (tool charts) do not wire it. */ handoffToAiAgentV2?: (params: { agentReferenceId: string; /** Instruction for the agent to open with; absent means it waits for the user. */ initialMessage?: string; /** True when the Flow turn making this handoff was itself platform-triggered. */ initiatedBySyntheticTurn?: boolean; /** Conversation history and/or named values for the agent, assembled by the caller. */ handoffContext?: IHandoffContextToAgent; }) => Promise; /** * Answers the AI Agent v2's pending flow execution tool call ("Execute tool * flow") — the Tool Result (AI Agent v2) node. Reads the session's * routing document to find the calling agent and the call id, and writes a * `purpose: "toolCall"` document handing the conversation back to that * agent with the answer and, per `shareConversationHistory`, the flow * transcript of this tool call only. * * Never throws; on an error nothing was written and the flow keeps the * conversation. Optional because reduced execution contexts do not wire it. */ resolveAiAgentV2ToolAction?: (params: { /** The node's rendered Answer — the tool call's result. */ answer: string; shareConversationHistory: "lastExchangeOnly" | "fullConversation" | "none"; /** * True when the input executing the node is the platform's synthetic * start of this tool call (`input.data._flowExecutionToolStart`), i.e. no * real user message reached the flow during the call. */ syntheticToolStart: boolean; }) => Promise; /** * Hands a pre-Turn Flow's outcome back to the AI Agent that deferred its * turn — the "Continue to AI Agent" node. Reads the session's routing * document to find the deferring agent and the run, and writes a * `purpose: "preTurn"` document carrying the text, data and turn context. * * Never throws; on an error nothing was written. Optional because reduced * execution contexts do not wire it. */ resolveAiAgentV2PreTurn?: (params: { text: string; data: Record; turnContext: ITurnContextEntry[]; }) => Promise; handover?: (handoverParams: IHandoverNodeParams) => Promise; handoverV2?: (handoverParams: IHandoverNodeV2Params & { nodeType?: "question" | "handoverToAgent"; }) => Promise; handoverToDx?: (params: IHandoverToDxNodeParams) => Promise; isCompatibleRuntimeVersion?: (params: { targetRuntimeVersion: number; }) => boolean; log?: (level: string, text: string) => void; logDebugMessage?: (message: string | object, header?: string) => void; logDebugError?: (message: string | object, header?: string) => void; logDebugMessageWithMeta?: (message: string | object, metadata: IOutputEventMetadata, header?: string) => void; logDebugErrorWithMeta?: (message: string | object, metadata: IOutputEventMetadata, header?: string) => void; mergeProfile?: (contactId: string) => Promise; parseCognigyScriptText?: (executionObjects: IExecutionObjects) => (text: string) => Promise; parseCognigyScriptCondition?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => Promise; parseCognigyScriptResultLocation?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => Promise; output?: (text: string, data: any, settings?: ISayNodeSettings) => Promise; outputWithMeta?: (text: string, data: any, metadata?: IOutputEventMetadata, settings?: ISayNodeSettings) => Promise; reloadBrainFlow?: (flowReferenceId: string) => Promise; removeFromContext?: (key: string, value: string, mode: string) => void; rephraseSentenceWithAI(sentence: string, options: IRephraseSentenceWithAIOptions): Promise; rephraseMultipleSentencesWithAI(sentences: string[], options: IRephraseSentenceWithAIOptions): Promise; requestHandover?: (text: string, cancel: string, userId: string, sessionId: string, requestHandover: string, inputAnalyticsData: IAnalyticsSourceData, handoverVersion?: IHandoverRequestStatus["handoverVersion"], repeatHandoverMessage?: boolean, sendResolveEvent?: boolean, resolveBehavior?: IHandoverRequestStatus["resolveBehavior"], nodeType?: IHandoverRequestStatus["nodeType"], providerResponse?: any, sendOnQueueEvent?: boolean, sendOnActiveEvent?: boolean) => void; runGenerativeAIPromptForUseCase?: (options: IRunGenerativeAIPromptOptions, useCase: TGenerativeAIUseCases, subUseCase?: string, promptParser?: TPromptParserFun, nodeAnalyticsParams?: TNodeAnalyticsParams) => Promise; runGenerativeAIPrompt?: (options: IRunGenerativeAIPromptOptions, useCase: TGenerativeAIUseCases, nodeAnalyticsParams?: TNodeAnalyticsParams) => Promise; resetContext?: () => object; resetFormBrain?: () => Promise; /** @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ resetState?: () => Promise; say?: (text: string, data?: any, settings?: ISayNodeSettings) => Promise; sendHttpRequest?: (httpRequestParams: IHttpRequestNodeParams) => Promise; sendTileUpdateToAgentAssistWorkspace: (params: ISendTileUpdateParams) => Promise; sendConfigUpdateToAgentAssistWorkspace: (params: ISendConfigUpdateParams) => Promise; setCache?: (key: string, val: any) => void; setContext?: (key: string, value: any) => void; setContextAndPersist?: (key: string, value: any) => Promise; setInjectedAnySlots?: (anySlots: { [key: string]: string; }) => void; setKeyphrase?: (keyphrase: string, tags: string[], synoyms: string[]) => void; setRating?: (params: { rating: number; comment: string; }) => void; setLastTopic?: (text: string, type: any, age: number) => void; setLocaleReferenceId?: (localeReferenceID: string) => void; setRegexSlot: (regexSlotFillerParams: IRegexSlotFillerParams) => void; setSensitiveLoggingSettings?: (settings: ISensitiveLoggingSettings, traceId: string) => void; /** @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ setState?: (state: string) => void; setSystemContext?: (key: string, value: any) => void; setThinkMarker?: (flowReferenceId: string) => void; getTimezoneOffset?: () => number | string; setTimezoneOffset?: (offset: number | string) => void; setTranslationSettings?: (translationSettings: IEndpointTranslationSettings) => void; switchFlow?: (id: string, text: string, data: any, version?: number, absorbContext?: boolean) => void; /** * @deprecated since 4.98.0 * Use thinkV2 instead * */ think?: (nodeId: string) => (text: string, data: any) => void; thinkV2?: (nodeId: string) => (text: string, data: any) => void; trackAnalyticsStep?: (stepLabel: string) => (trackArgs?: ITrackAnalyticsStepsArguments) => void; updateProfile?: (profileSchemaField: string, value: any) => Promise; knowledgeSearch: (data: IKnowledgeSearchData, nodeAnalyticsParams?: TNodeAnalyticsParams) => Promise; matchPattern: (patternType: IPatternTypes, phrase: string, locale?: string) => IPatternMatchResult; getAgentAssistConfigId: () => string; getNluEmbeddingCredentials: () => Promise; getMetadata: () => IGetMetaDataActionValue; getEndpointSettings: () => IEndpointSettings; getTranscript: (options: TReadTranscriptOptions) => Promise; addTranscriptStep: (content: TTranscriptEntryContent) => Promise; getCxOneApiClient: (tenantId?: string) => Promise; executeCxOneKnowledgehubApiRequest(requestBody: ICXOneKnowledgehubRequestBody, nodeId: string): Promise; executeCxOneKnowledgeRetrievalApiRequest(requestBody: ICXOneKnowledgeRetrievalRequestBody, nodeId: string): Promise; } export interface IGetMetaDataActionValue { sessionId: string; projectId: string; organisationId: string; traceId: string; endpointUrlToken: string; endpointName: string; channel: string; localeReferenceId: string; localeName: string; endpointType: TEndpointType; snapshotId: string; snapshotName: string; isFollowSessionActive: boolean; contactId: string; enableMocking: boolean; cxOneData?: ICXOneData; } export interface ICognigyNLPProperties { /** The original text of the user */ text?: string; /** The original data of the user */ data?: { [key: string]: any; }; attachments?: any[]; processText?: string; keyphraseText?: string; synonymText?: string; systemSlotText?: string; /** The flow parent id, something like "562fa3970685448ac241fa1f8978e496" */ flowId?: string; /** The type of the sentence */ type?: "Statement" | string; /** The slots matched witin the text of the user */ slots?: ICognigyNLPSlots | ISystemSlots; /** The cognigy system slots matched witin the text of the user, as detailed object with value, offset, ... */ detailedSlots?: ISystemSlots; /** * The current state * @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ state?: string; /** The userId of the user */ userId?: string; /** The current id of this session, something like "2c44d1d3-98a4-469e-91c4-186298e22e5b" */ sessionId?: string; /** Unique id of this input, something like "20ec9ed0-6f8e-4bfa-82fb-28f58be57035" */ inputId?: string; /** Token tree from NLU service */ tokens?: any; /** The name of the intent that was found */ intent?: string; /** The score of the intent in case an intent was found */ intentScore?: number; /** * The name of the intent that was found but that is only allowed within a different state * @deprecated since 2026.7.0 — The "State" feature has been deprecated. See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ intentOutOfState?: string; /** What is the stencen to clarify? */ intentClarification?: string; /** The full results of our intent mapper */ intentMapperResults?: any; /** The parent id of the flow that contains the winning intent, something like "6d200e6e7a6fa4549308b44b20f5217e" */ intentFlow?: string; /** An object containing the current time in a fine-granular fashion */ currentTime?: ICognigyNLPCurrentTime; /** The mode of this input */ mode?: "TextOnly" | "DataOnly" | "TextData" | "Empty"; /** Identified entities */ entities?: any; /** The furstation index of the user, larger than 1 */ frustration?: number; /** Holds an array of noun components */ nounComponents?: any; /** The users channel */ channel?: "adminconsole" | "facebook" | "google" | "twilio" | "line" | "avaya" | string; /** If an attached flow was executed, store the parent id here */ executedAttachedFlow?: string; /** Was an intent or keyphrase found? */ foundKeyphraseOrIntent?: boolean; /** Array of completed goals in this session */ completedGoals?: string[]; /** The number of executions */ execution?: number; /** Was an intent or keyphrase found? */ understood?: boolean; /** the language of the flow */ language?: string; nlu?: { /** The cognigy system slots matched witin the text of the user, as detailed object with value, offset, ... */ detailedSlots?: ISystemSlots; /** The full results of our intent mapper */ intentMapperResults?: any; tokens?: string[]; intentId?: string; intentFlow?: string; yesNoIntentResults?: any; }; entrypoint?: string; /** * @deprecated Use `state` instead. Part of the overall State feature deprecation (since 2026.7.0). * See https://cognigy.visualstudio.com/Aluminium/_workitems/edit/122834 */ currentState?: string; keyphrases?: any; numbers?: any; granularIntention?: string; granularIntentionFlow?: string; granularIntentionFiltered?: boolean; timeReference?: any; parsedTime?: any; } export declare type ICognigyNLPSlots = { /** Dates found in the text of the user */ DATE?: INLPDateSlot[] | null; /** Numbers found in the text of the user */ NUMBER?: number[] | null; /** Durations found in the text of the user */ DURATION?: INLPDurationSlot[] | null; /** Temperate(s) found in the text of the user */ TEMPERATURE?: number[] | null; /** Contains found age */ AGE?: number[] | null; /** Contains found percentage */ PERCENTAGE?: number[] | null; /** Contains all found and valid emails */ EMAIL?: string[] | null; } & ICognigyKeyphrases; export interface ICognigyNLPCurrentTime { day?: number; dayOfWeek?: string; hour?: number; ISODate?: string; milliseconds?: number; minute?: number; month?: number; second?: number; timezoneOffset?: string; weekday?: number; year?: number; } /** * The date slot */ export interface INLPDateSlot { start?: { day: number; hour: number; millisecond: number; minute: number; month: number; second: number; weekday: number; dayOfWeek: string; year: number; } | null; end?: { day: number; hour: number; millisecond: number; minute: number; month: number; second: number; weekday: number; dayOfWeek: string; year: number; } | null; } /** * The duration slot */ export interface INLPDurationSlot { year?: number; month?: number; week?: number; day?: number; hour?: number; minute?: number; second?: number; } /** * Cognigy keyphrases */ export interface ICognigyKeyphrases { [key: string]: IMatchedKeyphrase[]; } export interface IMatchedKeyphrase { keyphrase: string; synonym: string; lower: string; count?: number; neg?: boolean; data?: object; offset?: IOffset; lexiconId?: string; lexiconReferenceId?: string; } export interface IOffset { start: number; end: number; } export interface IPatternMatchResult { count: number; matches: string[]; detailedMatches?: any[]; } export declare type IPatternTypes = "de_lp" | "iban" | "us_ssn" | "bic" | "ipv4" | "creditcard" | "phonenumber"; export interface IExecutionMetadata { sessionId: string; projectId: string; organisationId: string; /** Correlation id for the current request/run. Optional: not every metadata producer has one. */ traceId?: string; } /** * `context` and `input` must be mutated in place, never reassigned. `executeToolChart` * spreads an `IExecutionObjects` into `nodeAPI` once, before its node loop, and * `executeNode` destructures `context`/`input` back out of that same `nodeAPI` before * resolving CognigyScript through them - a shallow spread copies the top-level * properties, so `nodeAPI.context`/`executeNode`'s `executionObjects.context` and this * object's own `context` stay the same reference only as long as nothing reassigns it. * Reassigning `context` or `input` here breaks that shared identity: later writes would * land on the new object while CognigyScript resolution keeps reading the old one. */ export interface IExecutionObjects { input: { [key: string]: any; }; context: { [key: string]: any; }; profile: { [key: string]: any; }; cognigyScriptInput?: { [key: string]: any; }; lastConversationEntries: ILastConversationEntry[]; metadata: IExecutionMetadata; } export declare type TEmitter = (type: TDebugEventType, payload: TDebugEventPayload, options?: IEmitterOptions) => void; export interface IEmitterOptions { isDebugEvent?: boolean; newEventAddress?: string; } export interface IAddConditionalEntrypointParams { entrypoint: string; retentionTime: number; condition: string; cognigyScriptInput?: IExecutionObjects["input"]; } export interface IExecuteCognigyNLUParams { text: string; data: any; inputId: string; pipeline: IGetNluPipelineParams; input?: { [key: string]: any; }; } export interface IExecuteFlowNodeConfig { flowNode: { flow: string; node: string; isGoto?: boolean; }; parseIntents?: boolean; parseKeyphrases?: boolean; absorbContext?: boolean; } export interface IExecuteFlowNodeParams extends INodeFunctionBaseParams { config: IExecuteFlowNodeConfig; } export interface ISMTPConnectionFields { host: string; port: number; username: string; password: string; tlsOption: "tls" | "starttls" | "none"; } export interface IEmailServiceConnectionFields { username: string; password: string; } export interface IEmailServiceOAuth2ConnectionFields { user: string; clientId: string; clientSecret: string; accessToken: string; tlsOption?: string | "tls" | "starttls" | "none"; refreshToken?: string; expiryDate?: string; accessUrl?: string; } export interface IEmailServiceOAuth2ClientCredentialsConnectionFields { tokenEndpointUrl: string; clientId: string; clientSecret: string; scope?: string; user: string; } export interface IEmailServiceOAuth2JwtBearerConnectionFields { tokenEndpointUrl: string; jwt: string; user: string; } export interface ISMTPEmailConnection { smtpType: "otherSmtp" | "126" | "163" | "1und1" | "AOL" | "DebugMail" | "DynectEmail" | "FastMail" | "GandiMail" | "Gmail" | "Godaddy" | "GodaddyAsia" | "GodaddyEurope" | "hot.ee" | "Hotmail" | "iCloud" | "mail.ee" | "Mail.ru" | "Maildev" | "Mailgun" | "Mailjet" | "Mailosaur" | "Mandrill" | "Naver" | "OpenMailBox" | "Outlook365" | "Postmark" | "QQ" | "QQex" | "SendCloud" | "SendGrid" | "SendinBlue" | "SendPulse" | "SES" | "SES-US-EAST-1" | "SES-US-WEST-2" | "SES-EU-WEST-1" | "Sparkpost" | "Yahoo" | "Yandex" | "Zoho" | "qiye.aliyun"; authType: "basic" | "oauth2" | "oauth2_client_credentials" | "oauth2_jwt_bearer"; oAuth2Connection?: IEmailServiceOAuth2ConnectionFields; oAuth2ClientCredentialsConnection?: IEmailServiceOAuth2ClientCredentialsConnectionFields; oAuth2JwtBearerConnection?: IEmailServiceOAuth2JwtBearerConnectionFields; connection: ISMTPConnectionFields; serviceConnection: IEmailServiceConnectionFields; organisationId?: string; projectId?: TMongoId; } export interface ISendEmailNodeParams extends INodeFunctionBaseParams { config: { serviceWarning: string; googleWarning: string; authDeprecationWarning: string; recipient: string; from: string; senderName: string; message: string; subject: string; replyTo: string; cc: string; bcc: string; text: string; defineText: boolean; priority: "normal" | "high" | "low"; async: boolean; attachmentType: "none" | "text" | "url" | "base64" | "custom" | "raw"; attachmentFilename: string; attachmentContentType: string; attachmentEncodingType: string; attachmentContent: string; attachmentURL: string; attachmentRaw: string; storeLocation: "none" | "input" | "context"; inputKey: string; contextKey: string; stopOnError: boolean; } & (ISMTPEmailConnection); } export interface IEmailNotificationNodeParams extends INodeFunctionBaseParams { config: Pick; } export interface ISQLConnectionFields { host: string; port: number; username: string; password: string; database: string; } export interface IMongoDBConnectionFields { connectionString: string; } export interface IMongoFindNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; options: any; projection: object; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; shouldCacheResult: boolean; cacheExpiry: number; index: string; }; } export interface IMongoFindOneNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; options: any; projection: object; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; shouldCacheResult: boolean; cacheExpiry: number; }; } export interface IMongoInsertNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; documents: object; options: any; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; }; } export interface IMongoUpdateOneNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; update: object; options: any; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; useOperators: boolean; }; } export interface IMongoUpdateManyNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; update: object; options: any; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; useOperators: boolean; }; } export interface IMongoRemoveNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; options: any; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; }; } export interface IMongoAggregateNodeParams extends INodeFunctionBaseParams { config: { connection: IMongoDBConnectionFields; collection: string; query: object; options: any; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; }; } declare const ruleOperands: readonly [ "lt", "lte", "eq", "neq", "gt", "gte", "exists", "nexists", "contains", "ncontains", "isyes", "isno" ]; export declare type TRuleOperand = typeof ruleOperands[number]; export interface IRule { left: string; operand: TRuleOperand; right: string; } export interface ICondition { type: "rule" | "condition"; condition: string; rule: IRule; } export interface IIfNodeParams extends INodeFunctionBaseParams { config: { condition: ICondition; }; } export declare type TSwitchType = "intent" | "cognigyScript" | "state" | "type" | "mode" | "text" | "handoverStatus" | "callEventStatus"; export interface ISwitchNodeParams extends INodeFunctionBaseParams { config: { switch: { operator: string; type: TSwitchType; originalOperator?: string; }; intentLevel: string; useStrict: boolean; }; } export interface IStopNodeParams extends INodeFunctionBaseParams { config: never; } export interface IIntervalNodeParams extends INodeFunctionBaseParams { config: { interval: number; }; } export interface IOnceNodeParams extends INodeFunctionBaseParams { config: never; } export interface ISleepNodeParams extends INodeFunctionBaseParams { config: { milliseconds: number; }; } export interface IWaitNodeParams extends INodeFunctionBaseParams { config: never; } export interface IResetStateNodeParams extends INodeFunctionBaseParams { config: never; } export interface ISetStateNodeParams extends INodeFunctionBaseParams { config: { state: string; text?: string; data?: { [key: string]: any; }; }; } /** * @deprecated since 4.98.0. * Use THINK_V2 instead */ export interface IThinkNodeParams extends INodeFunctionBaseParams { config: { thinkType: "default" | "intent"; intent?: string; text?: string; data?: { [key: string]: any; }; }; } export interface IGoToNodeParams extends INodeFunctionBaseParams { config: { flowNode: { flow: string; node: string; }; absorbContext: boolean; executionMode: "continue" | "wait"; injectedText: string; injectedData: { [key: string]: any; }; parseIntents?: boolean; parseKeyphrases?: boolean; }; } export interface ISwitchLocaleNodeParams extends INodeFunctionBaseParams { config: { localeReferenceId: string; localeScript: string; getLocaleFromScript: boolean; }; } export interface ISetTranslationNodeParams extends INodeFunctionBaseParams { config: { translationEnabled: boolean; inputLanguage: string; flowLanguage: string; padPayloads: boolean; noTranslateMarker: string; alwaysRemoveNoTranslateMarker: boolean; setInputLanguageOnExecutionCount: number; }; } /** * The A2A authentication-connection shape, canonical here in `shared/` since it was previously * re-declared independently 6 times across `INodeExecutionAPI.ts` (this file, twice), * `ISessionState.ts`, and 3 files in `service-ai` (`applyA2AAuth.ts`, `executeA2AAgent.ts`, * `fetchA2AAgentCard.ts`). Declared here — not reused from any of the `service-ai`-local types — * because `shared/` must not import from a specific service; every other site extends/intersects * this instead. */ export declare type TA2AAuthConnectionParams = { authType?: "none" | "oAuth2" | "basic" | "bearer" | "apiKey"; oAuth2Connection?: { oAuth2Url: string; oAuth2ClientId: string; oAuth2ClientSecret: string; oAuth2Scope?: string; }; basicConnection?: { username: string; password: string; }; bearerConnection?: { authApiKey: string; }; apiKeyConnection?: { authApiKey: string; }; apiKeyHeader?: string; }; export interface INodeExecutionAPI extends Omit { setNextNode: (nodeId: string, newFlowId?: string) => void; resetNextNodes: () => void; stopExecution: () => void; parseCognigyScriptCondition: (condition: string) => Promise; parseCognigyScriptText: (text: string) => Promise; parseCognigyScriptResultLocation?: (text: string) => Promise; evaluateRule: (rule: IRule) => Promise; /** * @deprecated since 4.98.0. * Use thinkV2 instead * */ think: (text: string, data: { [key: string]: any; }) => void; thinkV2?: (text: string, data: { [key: string]: any; }) => void; getExecutionAmount: (nodeId: string) => number; resetExecutionAmount: (nodeId: string) => void; setExecutionAmount: (nodeId: string, value: number) => void; getLastExecutionMarker?: (nodeId: string) => number; setLastExecutionMarker?: (nodeId: string, lastExecutionMarker: number) => void; executeCognigyNLU?: (text: string, data: any, inputId: string, pipeline: IGetNluPipelineParams) => Promise; handleIntentDefaultReply?: (nlProperties: INLProperties) => Promise; executeFlow: (config: IExecuteFlowNodeConfig) => Promise; goToNode?: (config: Pick) => Promise; addConditionalEntrypoint: (addConditionalEntrypointParams: IAddConditionalEntrypointParams) => void; runSQLQuery?: (params: { connection: ISQLConnectionFields; query: string; traceId: string; }) => Promise; runSQLTransaction?: (params: { connection: ISQLConnectionFields; query: string; traceId: string; }) => Promise; runSQLStoredProcedure?: (params: { connection: ISQLConnectionFields; inputs: object; outputs: object; storedProcedure: string; traceId: string; }) => Promise; sendEmail?: (params: ISendEmailNodeParams) => Promise; emailNotification?: (params: IEmailNotificationNodeParams) => Promise; mongoFind?: (params: { config: IMongoFindNodeParams["config"]; organisation: string; traceId: string; }) => Promise; mongoFindOne?: (params: { config: IMongoFindOneNodeParams["config"]; organisation: string; traceId: string; }) => Promise; mongoInsert?: (params: { config: IMongoInsertNodeParams["config"]; }) => Promise; mongoUpdateOne?: (params: { config: IMongoUpdateOneNodeParams["config"]; }) => Promise; mongoUpdateMany?: (params: { config: IMongoUpdateManyNodeParams["config"]; }) => Promise; mongoRemove?: (params: { config: IMongoRemoveNodeParams["config"]; }) => Promise; mongoAggregate?: (params: { config: IMongoAggregateNodeParams["config"]; traceId: string; }) => Promise; fuseSearch?: (list: any, options: any, pattern: string) => any; addToInput: (key: string, value: any) => void; resetCognigyScriptInput?: () => void; setForwardDatesOnly?: () => void; parseCognigyScript?: (text: string, condition?: boolean) => Promise; trackAnalyticsStep?: (step: string) => void; triggerFunction?: (config: ITriggerFunctionNodeParams["config"]) => Promise; initAppSession: (params: { styleConfig: Record; appInterimScreenOverride?: string; appConnectScreenOverride?: string; }) => Promise; setAppState: (appTemplateId: string, appTemplateData: Record, options?: { webchat3?: { overlaySettingsMetaData?: ISetAppStateOverlaySettingsMetaData; }; }) => void; getAppSessionPin: () => Promise; validateDatepickerFunctionInSecureContext?: (codeToValidate: string) => string | null; completeGoal: (goal: string) => void; knowledgeSearch: (data: IKnowledgeSearchData, nodeAnalyticsParams?: TNodeAnalyticsParams) => Promise; runGenerativeAIPrompt: (options: IRunGenerativeAIPromptOptions, useCase: TGenerativeAIUseCases, nodeAnalyticsParams?: TNodeAnalyticsParams) => Promise; matchPattern: (patternType: IPatternTypes, phrase: string, locale?: string) => IPatternMatchResult; getAgentAssistConfigId: () => string; /** * True when the Agent V1 rebranding switch is on for the organisation of this run. * Optional because other places build a node API too; a missing function means off. */ isAgentV1RebrandingEnabled?: () => boolean; countGPTTokens: (prompt: string) => number; getConversationTranscript?: (mode: string, options?: any) => any; getEndpointSettings: () => IEndpointSettings; updateSessionStateValues(values: Partial): void; getLLMTokenUsageForSession(): TSessionUsageInformation | null; loadSessionState: () => Promise>; emitToOpsCenter: (params: { projectId?: string; title: string; subComponent?: string; errorCode?: string; metadata?: Record; isSnapshotError?: boolean; }) => void; fetchMcpTools: (params: { mcpServerUrl: string; timeout: number; cacheTools: boolean; mcpHeaders?: Record; authType?: "none" | "oAuth2"; oAuth2Connection?: { oAuth2Url: string; oAuth2ClientId: string; oAuth2ClientSecret: string; oAuth2Scope?: string; }; }) => Promise<{ tools: any[]; fromCache: boolean; }>; executeMcpTool: (params: { toolName: string; toolArgs: { [x: string]: unknown; }; mcpServerUrl: string; timeout: number; mcpHeaders?: Record; authType?: "none" | "oAuth2"; oAuth2Connection?: { oAuth2Url: string; oAuth2ClientId: string; oAuth2ClientSecret: string; oAuth2Scope?: string; }; }) => Promise<{ [x: string]: unknown; }>; fetchA2AAgentCard: (params: { agentBaseUrl: string; timeout: number; cacheCard: boolean; agentHeaders?: Record; agentCardPath?: string; authForDiscovery?: boolean; } & TA2AAuthConnectionParams) => Promise<{ card: any; fromCache: boolean; }>; executeA2AAgent: (params: { agentBaseUrl: string; message: string; timeout: number; agentHeaders?: Record; blocking?: boolean; taskTimeout?: number; agentCardPath?: string; taskId?: string; /** * The `contextId` that was in effect when `taskId` was stored. A caller cannot derive the * current `contextId` itself (it is chosen inside service-ai, not by the flow), so it hands * back what it recorded and lets the executor decide: when the two no longer match, the * stored task belongs to a conversation the remote agent no longer associates with this * caller, and continuing it would fail on every turn until the remote's task TTL expires. */ taskContextId?: string; authForDiscovery?: boolean; } & TA2AAuthConnectionParams) => Promise<{ text: string; raw: any; request: { endpoint: string; method: string; params: any; }; method: string; /** The `contextId` actually sent to the remote agent, to be stored alongside `taskId`. */ contextId: string; taskId?: string; /** Mirrors `@a2a-js/sdk`'s `TaskState` enum (a plain number at runtime) — kept as `number` * here rather than importing the SDK type, since this interfaces/ file is compiled by every * service via `shared/`, not just service-ai/service-endpoint. See * `shared/charts/descriptors/service/aiAgent/helpers/a2aPendingTasks.ts`'s `TA2ATaskState` * for the canonical local mirror and named constants. */ taskState?: number; }>; sendTrackGoal: (payload: IGoalAnalyticsPayload) => Promise; } export interface IAddToContextNodeParams extends INodeFunctionBaseParams { config: { value: string; key: string; mode: "simple" | "array"; }; } export interface ICopyDataToContextNodeParams extends INodeFunctionBaseParams { config: never; } export interface ICopySlotsToContextNodeParams extends INodeFunctionBaseParams { config: { key: string; tag: string; useNeg: boolean; mode: "simple" | "array"; }; } export interface IRemoveFromContextNodeParams extends INodeFunctionBaseParams { config: { value: string; key: string; mode: "simple" | "array"; }; } export interface IResetContextNodeParams extends INodeFunctionBaseParams { config: never; } export interface ILogNodeParams extends INodeFunctionBaseParams { config: { level: "info" | "debug" | "error"; message: string; }; } export interface IDebugMessageNodeParams extends INodeFunctionBaseParams { config: { level: "info" | "error"; message: string; header: string; }; } export interface INodeExecutionCognigyObject extends IExecutionObjects { api: INodeExecutionAPI; flowReferenceId?: string; } export interface INodeFunctionInputOptions { handledIntentReconfirmation?: boolean; nluLanguage?: TNluLanguage; } export interface INodeFunctionBaseParams { cognigy: INodeExecutionCognigyObject; childConfigs: TNodeChildConfigs[]; config: { [key: string]: any; }; nodeId: string; nodeType?: string; organisationId?: string; projectId?: TMongoId; inputOptions?: INodeFunctionInputOptions; } export declare type TNodeChildConfigs = Pick; export declare type TNodeFunction = (params: T) => Promise; export declare type THttpRequestMethod = "get" | "GET" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | "purge" | "PURGE" | "link" | "LINK" | "unlink" | "UNLINK"; export interface IHttpRequestParams { method: THttpRequestMethod; url: string; data?: { [key: string]: any; }; headers?: { [key: string]: any; }; [key: string]: any; } export interface IHttpRequestResponse { status: number; statusText: string; headers?: { [key: string]: any; }; data?: { [key: string]: any; }; } export interface IResolverParams { config: { [key: string]: any; }; api?: IHttpExecutionApi; } export interface IHttpExecutionApi { httpRequest?: (params: IHttpRequestParams) => Promise; } export interface IOptionsResolverReturnData { label: string; value: string; } export declare type TResolverFunction = (params: IResolverParams) => Promise; export interface INodeDescriptorSet { _id?: any; descriptors: INodeDescriptor[]; /** * @deprecated Ignored at runtime. Nodes from uploaded extensions always run on * serverless, regardless of this flag. */ trustedCode: boolean; /** * Does this descriptor set contain 'cognigy' internal nodes? * We distinguish the nodes this way as we have to require their * node-functions in a slightly different way. */ isCognigy: boolean; extension: string; imageUrlToken: string; projectReference?: TMongoId; organisationReference: TMongoId; resourceType: TChartableResourceType; } export interface INodeAppearance { color?: string; textColor?: string; contrastTextColor?: string; showIcon?: boolean; variant?: "regular" | "mini" | "hexagon"; } export interface INodeBehavior { stopping?: boolean; entrypoint?: boolean; } declare const nodePreviewTypes: readonly [ "text", "sayNode", "custom", "resource", "image", "aiAgent" ]; export declare type TNodePreviewType = typeof nodePreviewTypes[number]; export interface INodePreview { type: TNodePreviewType; key: string; } export declare type INodeConstraint = { /** A list of Node types */ whitelist?: string[]; /** A list of Node types */ blacklist?: string[]; }; /** * This section describes a ruleset that should be applied to the Node for editing. * You can e.g. allow or disallow only specific predecessor, successor or child types. */ export interface INodeConstraints { /** Should this node be editable? */ editable?: boolean; /** Should this node be deletable? */ deletable?: boolean; /** Should this node be manually creatable */ creatable?: boolean; /** Should this node be callapsable */ collapsable?: boolean; /** Should it be possible to create child flow from this node */ childFlowCreatable?: boolean; /** Should this node be movable */ movable?: boolean; /** Additional placement information */ placement: { predecessor?: INodeConstraint; successor?: INodeConstraint; children?: INodeConstraint; }; } export interface INodeDependencies { /** A list of Node types */ children: string[]; } declare const nodeFieldTypes: readonly [ "a2aTestConnection", "adaptivecard", "agentAssistConfig", "aiAgentSelect", "aiAgentV2Select", "appTemplate", "backgroundSelector", "caseNode", "checkbox", "checkAgentAvailabilityProvider", "checkAgentAvailabilityConfig", "chipInput", "code", "mockCode", "cognigyLLMText", "cognigyText", "cognigyTextArray", "condition", "connection", "cxOneKnowledgeHubSelect", "date", "daterange", "datetime", "description", "flow", "flowNode", "function", "goalAndStepsSelect", "handoverProvider", "handoverProviderConfig", "json", "keyValuePairs", "knowledgeSourceTags", "knowledgeStore", "knowledgeStoreSelect", "lexicon", "llmSelect", "localeField", "node", "number", "profileSchemaField", "rule", "say", "select", "slider", "slotFillerArray", "state", "sttLanguageAzureSelect", "sttLanguageGoogleSelect", "sttSelect", "sttTierModelSelect", "switchNode", "text", "textArray", "time", "toggle", "toolParameters", "ttsSelect", "typescript", "vadGatedMinNumber", "xml" ]; export declare type TNodeFieldType = typeof nodeFieldTypes[number]; export declare type TComparableValue = string | number | boolean; export declare type TNodeFieldCondition = INodeFieldSingleCondition | INodeFieldANDCondition | INodeFieldORCondition; export interface INodeFieldSingleCondition { /** The key of the Field whose value should be matched */ key: string; /** The expected value(s) that make this condition match */ value: TComparableValue | TComparableValue[]; /** If this is true, the condition result will be inverted */ negate?: boolean; or?: never; and?: never; } export interface INodeFieldANDCondition { key?: never; value?: never; negate?: never; or?: never; and: TNodeFieldCondition[]; } export interface INodeFieldORCondition { key?: never; value?: never; negate?: never; or: TNodeFieldCondition[]; and?: never; } export interface INodeFieldTranslations { default: string; enUS?: string; deDE?: string; esES?: string; jaJP?: string; koKR?: string; } export declare type TOptionsResolverSet = (keyof IResolverParams["config"])[]; export interface INodeOptionsResolver { dependencies: TOptionsResolverSet; resolverFunction: TResolverFunction; } export declare type INodeFieldSet = INodeField[]; /** * Calendar date in ISO 8601 `YYYY-MM-DD` form. Segment widths are pinned by the JSON * schema's `format: "date"`, not by this type; neither rejects a date like `"2026-02-30"`. */ export declare type TIsoDate = `${number}-${number}-${number}`; /** Marks a descriptor field or section as deprecated. */ export interface INodeDeprecation { removalDate: TIsoDate; /** i18n key of the deprecation message shown by the node editor. */ messageKey: string; docsUrl?: string; } export interface INodeField { type: TNodeFieldType; key: K; label: string | INodeFieldTranslations; condition?: TNodeFieldCondition; defaultValue?: any; fallbackValue?: any; description?: string | INodeFieldTranslations; params?: { [key: string]: any; }; optionsResolver?: INodeOptionsResolver; resetOption?: IResetOption; /** Marks this field as deprecated and scheduled for removal */ deprecated?: INodeDeprecation; /** * Marks the field that switches off the deprecated parameters of its section. Lets the * node editor find the toggle structurally instead of by a well-known config key, so a * descriptor can carry several deprecated sections, each governed by its own toggle */ deprecationToggle?: boolean; } export interface IResetOption { lookupValue: string; fieldsToReset: string[]; } export interface INodeSection { /** Unique identifier for this section within all sections of a descriptor, e.g. 'authentication' */ key: string; /** Human readable lable of the seciton, e.g. 'Authentication' */ label: string | INodeFieldTranslations; /** Human readable description of the section, e.g. 'Configure authentication for this node' */ description?: string | INodeFieldTranslations; /** Condition whether this section should be rendered */ condition?: TNodeFieldCondition; /** Whether the sections should be collapsed by default (default: false) */ defaultCollapsed: boolean; /** The fields that should be grouped in this section, points to 'key' of node-fields */ fields: string[]; /** Marks this section as deprecated and scheduled for removal */ deprecated?: INodeDeprecation; } export interface INodeFieldAndSectionFormElement { /** A key either pointing to a 'field -> key' or 'section -> key' */ key: string; /** The type of the pointer, either 'field' or 'section' */ type: "field" | "section"; } export declare type TCognigyNodeTagType = "basic" | "logic" | "message" | "analytics" | "service" | "nlu" | "data"; export declare type TNodeTagType = TCognigyNodeTagType | string; export interface INodeDescriptor { _id?: TMongoId; type: U; parentType?: string | string[] | null; defaultLabel: string | INodeFieldTranslations; summary?: string | INodeFieldTranslations; appearance: INodeAppearance; behavior?: INodeBehavior; constraints?: INodeConstraints; dependencies?: INodeDependencies; fields?: INodeFieldSet; function?: TNodeFunction | null; /** Defines how the preview should be generated for nodes using this descriptor */ preview?: INodePreview; /** * Tags which allow searching individual Nodes * * The following tags will put the Node * into the distinct "function tabs": * * - basic * - logic * - message * - analytics * - service * - nlu * - data * */ tags?: TNodeTagType[]; /** Definition of tokens this node might fill */ tokens?: Omit[]; /** Sections which allow to group multiple fields */ sections?: INodeSection[]; /** The form defines how fields and sections should be render in order */ form?: INodeFieldAndSectionFormElement[]; mocking?: { defaultMockCode?: string; }; } export interface IAppTemplate extends IEntityMeta { /** The object id of this app template */ _id: TMongoId; /** The technical type of the app template, e.g. 'flightSeatPicker' */ type: string; /** The name of the app template, e.g. 'flightBooking' */ extension: string; /** Human readable label of the app template, e.g. 'Flight Seat Picker' */ label: string; /** Whether this is an internal Cognigy resource or one defined from the customer */ isCognigy: boolean; /** Path to the app template relative to the root of the extension, e.g. './templates/flightSeatPicker' */ path: string; projectReference: TMongoId; organisationReference: TMongoId; } declare const knowledgeFieldTypes: readonly [ "text", "rule", "json", "checkbox", "time", "date", "datetime", "select", "xml", "textArray", "chipInput", "toggle", "slider", "number", "daterange", "connection", "condition", "description" ]; export declare type TKnowledgeFieldType = typeof knowledgeFieldTypes[number]; export declare type IKnowledgeFieldSet = IKnowledgeField[]; export interface IKnowledgeField { type: TKnowledgeFieldType; key: K; label: string | INodeFieldTranslations; condition?: TNodeFieldCondition; defaultValue?: any; description?: string | INodeFieldTranslations; params?: { [key: string]: any; }; optionsResolver?: INodeOptionsResolver; resetOption?: IResetOption; } /** * @openapi * * components: * schemas: * IKnowledgeDescriptor: * type: object * properties: * type: * type: string * label: * oneOf: * - type: string * description: The label that should be used when a new Knowledge of this type is created * - type: object * description: A localized version of the label that should be used when a new Knowledge of this type is created * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * summary: * oneOf: * - type: string * description: A short line of text that describes what this Node is used for * - type: object * description: A localized version of a short line of text that describes what this Knowledge is used for * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * fields: * type: array * items: * type: object * properties: * type: * type: string * enum: * - text * - rule * - json * - checkbox * - time * - date * - datetime * - select * - xml * - textArray * - chipInput * - toggle * - slider * - number * - daterange * - connection * - condition * - description * key: * type: string * label: * oneOf: * - type: string * - type: object * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * defaultValue: * description: The default value for that field * sections: * type: array * items: * $ref: '#/components/schemas/INodeFieldCondition_2_0' * form: * type: array * items: * $ref: '#/components/schemas/INodeFieldAndSectionFormElement_2_0' */ export interface IKnowledgeDescriptor { type: string; label: string | INodeFieldTranslations; summary?: string | INodeFieldTranslations; fields?: IKnowledgeFieldSet; /** Sections which allow to group multiple fields */ sections?: INodeSection[]; /** The form defines how fields and sections should be rendered in order */ form?: INodeFieldAndSectionFormElement[]; } /** * @openapi * * components: * schemas: * IKnowledgeDescriptorAggregatedItem: * allOf: * - $ref: '#/components/schemas/IKnowledgeDescriptor' * - type: object * properties: * extension: * type: string * description: The extension name that this knowledge descriptor belongs to * version: * type: string * description: The version of the extension that this knowledge descriptor belongs to * extensionImg: * type: string * description: The image URL of the extension that this knowledge descriptor belongs to */ export interface IKnowledgeDescriptorAggregatedItem extends IKnowledgeDescriptor { extension: string; extensionImg: string; version: string; } export declare type IExtensionType = "nodes"; export interface IExtension extends IExtensionData, IExtensionNodePackage { } export interface IExtensionDataStorage { layout: "old_nfs" | "new_nfs" | "tenant_scoped"; path: string; } export interface IExtensionData extends IEntityMeta { /** The name of the extension */ name: string; /** Optional human readable name of the extension */ label: string; /** Version string of the extension */ version: string; /** An image URL token - can be used to build the fully qualified image URL */ imageUrlToken: string; /** Optional description of the extension */ description: string; /** Optional readme which usually contains 'markdown' */ readme: string; /** Optional list of tags to find the extension */ tags: string[]; /** Author of the extension */ author: string; /** Type of this extension, e.g. 'nodes' */ extensionType: IExtensionType; /** Path to the main executable file in the extension package */ pathToPackageExecutable: string; /** A reference to a 'sub-resource'. Currently a 'node-descriptor-set' */ subResourceReference: TMongoId; /** A reference to a knowledge descriptor set */ knowledge?: IKnowledgeDescriptor[]; /** A reference to the project of this extension */ projectReference: TMongoId; /** A reference to the organisation of this extension */ organisationReference: TMongoId; /** More information about the storage location of the extension */ storage?: IExtensionDataStorage; } export interface IExtensionNodePackage { nodes: INodeDescriptor[]; tools?: Record[]; knowledge?: IKnowledgeDescriptor[]; connections: Pick[]; appTemplates: Pick[]; } export interface IGraphExtension { type: "extension"; _id: TMongoId; name: string; properties: Pick; } declare const allowedMimeTypes: readonly [ "image/png", "image/jpeg", "application/json" ]; export declare type TAllowedMimeTypes = typeof allowedMimeTypes[number]; export interface IFile extends IEntityMeta { /** The mimetype of the file */ mimetype: TAllowedMimeTypes; /** The human readable name of the file */ name: string; /** The actual data as a Node.JS buffer */ data: Buffer; /** * A 64-character wide hex-token which can be used to retrieve the file. * This token is cryptografically secure and can't be guessed. */ fileToken: string; /** The organisation this file belongs to */ projectReference: TMongoId; /** The project this file belongs to */ organisationReference: TMongoId; } export interface IGraphFile { type: "file"; _id: TMongoId; name: string; properties: Pick; } export interface IFunction extends IEntityMeta { /** Reference id of the Cognigy Function */ referenceId: string; /** The human-readable name of the Cognigy Function */ name: string; /** Whether the function is disabled */ isDisabled: boolean; /** The code for the Cognigy Function */ code: string; projectReference: TMongoId; /** the object id of the organisation the user belongs to */ organisationReference: TMongoId; } export interface IGraphFunction { type: "function"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } declare const knowledgeStoreStatus: readonly [ "ready", "ingesting", "warning", "empty" ]; export declare type TKnowledgeStoreStatus = typeof knowledgeStoreStatus[number]; export interface IKnowledgeStore extends IEntityMeta { referenceId: string; name: string; description: string; status: TKnowledgeStoreStatus; language: string; documents: string[]; projectReference: TMongoId; organisationReference: TMongoId; } export interface IGraphKnowledgeStoreAttachmentSource { _id: string; type: "attachedSource"; } export interface IGraphKnowledgeStoreAttachmentChunk { _id: string; type: "attachedChunk"; } export interface IGraphKnowledgeStore { type: "knowledgeStore"; _id: TMongoId; name: string; referenceId: string; properties: Pick; dependencies?: (IGraphKnowledgeStoreAttachmentSource | IGraphKnowledgeStoreAttachmentChunk)[]; } export interface ILexicon extends IEntityMeta { name: string; description?: string; referenceId: string; projectReference: TMongoId; organisationReference: TMongoId; } export interface IGraphLexicon { type: "lexicon"; _id: TMongoId; referenceId: string; name: string; properties: Pick; } export interface ILocale extends IEntityMeta { _id: TMongoId; referenceId: string; name: string; primary: boolean; nluLanguage: TNluLanguage; fallbackLocaleReference: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; intentTrainGroupReference: TMongoId; intentTrainGroupReferenceId: string; feedbackReport: Pick; isTrainingOutOfDate: boolean; lastTrainedAt: number; nluOptions: IIntentTrainGroup["nluOptions"]; } export interface IGraphLocale { type: "locale"; _id: TMongoId; name: string; referenceId: string; properties: Pick; } export interface IPlaybook extends IEntityMeta { _id: TMongoId; name: string; abortOnError: boolean; timeout: number; steps: IPlaybookStep[]; projectReference: TMongoId; organisationReference: TMongoId; } export interface IPlaybookStep { _id?: TMongoId; text?: string; data?: any; asserts: IPlaybookStepAssert[]; } declare const assertTypes: readonly [ "assertText", "assertData", "assertState", "assertContext", "assertIntent", "assertSlot" ]; export declare type TAssertType = typeof assertTypes[number]; export interface IPlaybookAssert { _id: TMongoId; type: TAssertType; params: { [key: string]: any; }; } export declare type IPlaybookStepAssert = IAssertText | IAssertData | IAssertState | IAssertIntent | IAssertContext | IAssertSlot; export interface IAssertText extends IPlaybookAssert { _id: TMongoId; type: "assertText"; params: { text: string; fuzzy: boolean; negate: boolean; }; } export interface IAssertData extends IPlaybookAssert { _id: TMongoId; type: "assertData"; params: { data: any; partial: boolean; negate: boolean; }; } export interface IAssertState extends IPlaybookAssert { _id: TMongoId; type: "assertState"; params: { state: string; negate: boolean; }; } export interface IAssertContext extends IPlaybookAssert { _id: TMongoId; type: "assertContext"; params: { data: any; partial: boolean; negate: boolean; }; } export interface IAssertIntent extends IPlaybookAssert { _id: TMongoId; type: "assertIntent"; params: { intent: string; negate: boolean; }; } export interface IAssertSlot extends IPlaybookAssert { _id: TMongoId; type: "assertSlot"; params: { slot: string; negate: boolean; }; } export interface IGraphPlaybook { type: "playbook"; _id: TMongoId; name: string; properties: Pick; } export interface IGoal extends IEntityMeta { _id: TMongoId; name: string; version: string; steps: IGoalStep[]; description: string; referenceId: string; projectReference: TMongoId; organisationReference: TMongoId; } export interface IGoalStep { _id?: string; name?: string; description?: string; order?: number; type?: "start" | "completion"; metrics?: IGoalStepMetric[]; } export interface IGoalStepMetric { _id?: string; name: string; description: string; type?: "currency" | "duration" | "revenue"; value?: number; } export interface IGraphGoal { type: "goal"; _id: TMongoId; referenceId: string; name: string; properties: Pick; } declare const handoverServices: readonly [ "cognigy", "none", "rce", "chatwoot", "salesforce", "liveAgent", "genesysCloud", "genesysCloudOM", "eightByEight", "salesforceMIAW" ]; export declare type THandoverService = typeof handoverServices[number]; export declare type TServiceSettings = IRCEHandoverSettings | IChatwootHandoverSettings | ICognigyHandoverSettings | ISalesForceHandoverSettings | ILiveAgentHandoverSettings | IEightByEightHandoverSettings | IGenesysCloudHandoverSettings | IGenesysCloudOMHandoverSettings | ISalesforceMIAWHandoverSettings; export interface IHandoverServiceProperties { key: "basicActionTile"; type: "cognigyText"; label: "UI__NODE_EDITOR__ASSIST_INFO__ACTION_TITLE__LABEL"; description: "UI__NODE_EDITOR__ASSIST_INFO__ACTION_TITLE__DESCRIPTION"; defaultValue: ""; condition: { key: "cardType"; value: "basic"; }; } export declare type HandoverProviderPropertyValue = string | boolean; export interface IHandoverProviderProperty { key: string; value: HandoverProviderPropertyValue; } export interface IRCEHandoverSettings { /** * Whether to forward all conversations * to the Service, or only the conversations * that trigger a handover. If this setting is true, * then we will only forward conversations were handover * was triggered. */ forwardOnlyHandoverConversations?: boolean; /** * Indicates if queue updates should be enabled * to receive events about the estimated wait time */ getQueueUpdates?: boolean; /** * The API access token * you can create within RCE */ apiAccessToken: string; /** * The API URL to your * RCE installation */ baseApiUrl: string; /** * The access token for your * rce source sdk source */ realtimeAccessToken: string; /** * The endpoint URL of your * rce source sdk source */ realtimeEndpointUrl: string; /** * The secret used to secure * webhooks in RCE */ webhookSecret: string; /** * The ID of the category you use * as the 'bot category' within RCE */ botCategoryId: string; /** * The ID of the category you use * as the 'bot category' within RCE */ agentCategoryId: string; } export interface IEightByEightHandoverSettings { /** * The API access token * you can create within 8x8 */ /** * The API URL to the 8x8 environment */ baseUrl: string; /** * The API access token * you can create within 8x8 */ apiKey: string; /** * It is a key which has * to be included in the header */ apiTenant: string; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface IChatwootHandoverSettings { baseUrl: string; accountId: string; apiKey: string; chatwootInboxId: string; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface ILiveAgentHandoverSettings { baseUrl: string; accountId: string; apiKey: string; liveAgentInboxId: string; /** if this is set to "true", the apiKey and baseUrl will be automatically picked from the system configuration as overrides */ usePlatformToken: boolean; /** * This setting cannot be changed, * since the chatwoot client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface ICognigyHandoverSettings { /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface ISalesForceHandoverSettings { apiVersion: string; baseUrl: string; organizationId: string; deploymentId: string; buttonId: string; /** * Same as other clients, this setting cannot be changed, * and is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * Whether to forward any unknown event to the flow as an * agentInject message */ forwardUnknownEventsToFlow: boolean; } export interface IGenesysCloudHandoverSettings { host: string; organizationId: string; deploymentId: string; queue: string; queueId: string; sessionDuration: number; sendProfile: boolean; oAuth2Connection: string; /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface IGenesysCloudOMHandoverSettings { host: string; deploymentName: string; queue: string; webhookSecret: string; sendProfile: boolean; clientId: string; clientSecret: string; /** * This setting cannot be changed, * since the cognigy client only supports * forwarding handover conversations. The value * is therefore set to 'true' */ forwardOnlyHandoverConversations: true; } export interface ISalesforceMIAWHandoverSettings { baseUrl: string; capabilitiesVersion: string; organizationId: string; esDeveloperName: string; /** * Same as other clients, this setting cannot be changed, * and is therefore set to 'true' */ forwardOnlyHandoverConversations: true; /** * Whether to forward any unknown event to the flow as an * agentInject message */ forwardUnknownEventsToFlow: boolean; } export interface IHandoverProvider { _id: TMongoId; referenceId: string; organisationId: string; serviceId: string; service: THandoverService; /** The name of the handover provider resource */ name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; properties: IHandoverProviderProperty[]; settings: IHandoverProviderSettings; } export interface IGraphHandoverProvider extends IHandoverProvider { type: "handoverProvider"; } export interface IHandoverProviderSettings { service: THandoverService; serviceSettings?: TServiceSettings; } declare enum SuccessCriterionType { TEXT = "text", GOAL_COMPLETED = "goalCompleted" } export interface ISuccessCriteriaTextParams { text: string; name: string; } export interface ISuccessCriteriaGoalParams { referenceId: string; name: string; } export interface ISuccessCriteria { type: SuccessCriterionType; params: ISuccessCriteriaTextParams | ISuccessCriteriaGoalParams; } export interface IProjectMetadata { projectReference: string; organisationReference: string; } export interface ISimulation extends IProjectMetadata { id: string; _id: string; referenceId: string; name: string; persona: string; personaName: string; mission: string; successCriteria: ISuccessCriteria[]; maxTurns?: number; timeout?: number; createdAt?: number; createdBy: string; updatedAt?: number; updatedBy: string; lastChanged: number; lastChangedBy?: string; } export interface IGraphSimulation extends ISimulation { type: "simulation"; } /** * Eval profiles are owned by service-toolkit and treated as an external model by * the packaging/snapshot system, exactly like simulations. Only the * dependency-graph shape lives here; the full profile schema stays in * service-toolkit. The graph node mirrors what the graphEvalProfiles RPC returns * ({ type, _id, name, referenceId, properties }) and carries a referenceId, so it * is a member of IGraphResourceWithReferenceId. */ export interface IGraphEvalProfile { type: "evalProfile"; _id: string; name: string; referenceId: string; properties: { createdAt: string; createdBy: string; updatedAt: string; }; } /** * AI Agents (v2) are owned by service-agents and treated as an external model by * the packaging system, exactly like simulations and eval profiles. Only the * dependency-graph shape lives here; the full agent schema stays in * service-agents. The graph node mirrors what the GraphResources RPC returns * ({ type, _id, name, referenceId }) and carries a referenceId, so it is a * member of IGraphResourceWithReferenceId. * * `properties` is OPTIONAL and is not emitted today: the GraphResources RPC * deliberately carries no timestamps or audit fields for these four types * (see internal/packaging/graph_use_case.go's GraphNode). Every consumer reads * `properties` defensively, so an absent one renders as "no extra detail" * rather than breaking a row — but a required field that never arrives would be * a lie in this contract, hence the `?`. * * Unlike its persona/tool/skill siblings, an agent carries its own * dependencies[]: service-agents resolves its own persona/tool/skill links * before returning the node, and * service-resources appends cross-service edges (LLM, locale) on top before the * node reaches the picker. Extend IGraphAiAgentV2Dependency's type union * additively when a new edge kind is needed — do not widen it to a bare string. */ export interface IGraphAiAgentV2 { type: "aiAgentV2"; _id: string; name: string; referenceId: string; properties?: { createdAt: string; createdBy: string; updatedAt: string; }; dependencies?: IGraphAiAgentV2Dependency[]; } /** * One edge out of an `aiAgentV2*` graph node. * * TWO forms, and the difference is load-bearing: * * - **resolved** — `_id` set: the graph found the target inside the project it * graphed. `getDependencyGraph` keys on `_id`, so this is the form that * pre-checks a dependency in the export picker and drives the Replace * cascade warning. * - **unresolved** — `referenceId` set and NO `_id`: the reference points at * something that is not in the project being graphed. Keyed on `_id`, * `getDependencyGraph` skips it rather than mistaking it for an in-package * dependency, and the import-warning surface reports it (R11). This is the * same shape `projectGraph.ts` already tolerates and rewrites for the * simulation → evalProfile case. * * `type` names the TARGET's resource type — `"aiAgentV2Persona"`, not * `"attachedAiAgentV2Persona"`. Two reasons, both verified: it is what the * GraphResources RPC puts on the wire (`internal/packaging/graph_use_case.go` * emits `string(ResourceTypePersona)`), and the packaging MFE only translates a * dependency type to a human label when it is a packageable resource type * (`useResourceTypeLabel`), so an `attached…` spelling would surface to users as * the raw identifier. This corrects the union's first draft, which used the * `attached…` spelling copied from the native graph controllers; it had no * consumers. */ export interface IGraphAiAgentV2Dependency { /** `_id` of the linked resource. Absent when the reference did not resolve. */ _id?: string; /** `referenceId` of the linked resource. Set on unresolved edges. */ referenceId?: string; /** * The TARGET's resource type. The first four are in-service edges resolved * by service-agents; the rest are cross-service edges resolved by * service-resources against its own collections. * * `"aiAgentV2McpServer"` is emitted for a `source: "mcp"` tool, pointing at * the remote server it dispatches against. It sits with the first three * rather than the cross-service group: both ends are records service-agents * owns, so it resolves that edge itself. * * `"flow"` is emitted for a `source: "toolFlow"` tool, pointing at the Tool * Flow its descriptor is bound to. Unlike `"locale"` this one is a real, * useful edge on both halves of the resolved/unresolved split: a Tool Flow * IS a packageable resource type, so a resolved edge becomes a real * pre-checked row in the Dependencies step, and an unresolved one is a true * warning — the tool cannot execute without its flow. * * `"locale"` is currently NOT EMITTED by anything. An agent's * `localizedData[].localeReferenceId` used to arrive here as an edge and no * longer does: `locale` is not a packageable resource type, and every * project generates its own locale referenceId, so the edge could only ever * be an unlabelled picker row (resolved) or a false "will not work until it * is created here" warning (unresolved). Locales are MAPPED by the import * wizard's Locales step instead — see the "Locales are NOT an edge" note in * `utils/externalModels/aiAgentV2CrossServiceDependencies.ts`. The member is * kept rather than removed because this file feeds * `@cognigy/rest-api-client`, so narrowing the union is a published-contract * change that needs its own decision. * * `"vgSpeechCredential"` is emitted for a builtin tool with a * `ttsCredentialReferenceId` / `sttCredentialReferenceId` parameter (today * the voice tool, `voice-config-defaults`), pointing at the Voice Gateway * speech credentials they name (CGY-44512, vg-resources TDD 06/028 X30). Only in its * resolved form: VG graphs a project's own credentials only, so a miss is * usually an organisation-wide credential the target has as well. */ type: "aiAgentV2Persona" | "aiAgentV2Tool" | "aiAgentV2Skill" | "aiAgentV2McpServer" | "largeLanguageModel" | "locale" | "connection" | "flow" | "vgSpeechCredential"; } /** * AI Agent Personas (v2) are owned by service-agents and treated as an external * model by the packaging system, exactly like simulations and eval profiles. * Only the dependency-graph shape lives here; the full persona schema stays in * service-agents. The graph node mirrors what the GraphResources RPC returns * ({ type, _id, name, referenceId }) and carries a referenceId, so it is a * member of IGraphResourceWithReferenceId. `properties` is optional and not * emitted today — see IGraphAiAgentV2 for why. * * A persona is a leaf in BOTH graphs — no in-service references (service-agents * emits none) and none across services (its `image` is an inline data URI, not * a reference into an asset store). `dependencies` is therefore always an empty * array; it is present anyway so every `aiAgentV2*` node has one uniform shape * for consumers to read. */ export interface IGraphAiAgentV2Persona { type: "aiAgentV2Persona"; _id: string; name: string; referenceId: string; properties?: { createdAt: string; createdBy: string; updatedAt: string; }; dependencies?: IGraphAiAgentV2Dependency[]; } /** * AI Agent Tools (v2) are owned by service-agents and treated as an external * model by the packaging system, exactly like simulations and eval profiles. * Only the dependency-graph shape lives here; the full tool schema stays in * service-agents. The graph node mirrors what the GraphResources RPC returns * ({ type, _id, name, referenceId }) and carries a referenceId, so it is a * member of IGraphResourceWithReferenceId. `properties` is optional and not * emitted today — see IGraphAiAgentV2 for why. * * A tool is a leaf in the agents-v2 dependency graph — it has no in-service * references of its own — but it is NOT a leaf across services: a * `type: "connection"` parameter's value is a connection referenceId * (`internal/tools/params.go` resolves it as one), and a dangling one fails the * tool call at run time. service-resources resolves those against its own * `connection` collection and appends them here, which is why this interface * carries `dependencies` while its persona/skill siblings do not. * * Note that a `source: extension` tool is skipped (and named) by service-agents * on export rather than being carried — it resolves against an uploaded binary * package that no archive contains. It still appears in the graph, so it can be * selected, and the skip is reported afterwards. It is now the only * source treated that way: `toolFlow` tools travel with their descriptor * inlined in the tool's entry, and `mcp` tools travel with their binding, the * server itself being an `aiAgentV2McpServer` resource of its own. */ export interface IGraphAiAgentV2Tool { type: "aiAgentV2Tool"; _id: string; name: string; referenceId: string; properties?: { createdAt: string; createdBy: string; updatedAt: string; }; dependencies?: IGraphAiAgentV2Dependency[]; } /** * AI Agent Skills (v2) are owned by service-agents and treated as an external * model by the packaging system, exactly like simulations and eval profiles. * Only the dependency-graph shape lives here; the full skill schema stays in * service-agents. The graph node mirrors what the GraphResources RPC returns * ({ type, _id, name, referenceId }) and carries a referenceId, so it is a * member of IGraphResourceWithReferenceId. `properties` is optional and not * emitted today — see IGraphAiAgentV2 for why. * * `dependencies` carries one entry per tool the skill bundles: a skill's * `bundledTools[]` are `aiAgentV2Tool` referenceIds, and service-agents * resolves each to that tool's own `_id` so the picker can pre-check it. A * skill that bundles nothing gets an empty array — the key is always present, * so every `aiAgentV2*` node has one uniform shape for consumers. A * `bundledTools` entry with no matching tool in the project is omitted rather * than emitted with an empty id; the import screen reports it as unresolved. */ export interface IGraphAiAgentV2Skill { type: "aiAgentV2Skill"; _id: string; name: string; referenceId: string; properties?: { createdAt: string; createdBy: string; updatedAt: string; }; dependencies?: IGraphAiAgentV2Dependency[]; } export interface IGraphAiAgentV2McpServer { type: "aiAgentV2McpServer"; _id: string; name: string; referenceId: string; properties?: { createdAt: string; createdBy: string; updatedAt: string; }; dependencies?: IGraphAiAgentV2Dependency[]; } /** * A Voice Gateway speech credential as the package wizards and the import conflict check see it (CGY-44512, * vg-resources TDD 06/028 X15, X33). Owned by vg-resources-api; graphed by the `vgSpeechCredential` external model. * `_id` is the credential's id in a project, or the parked record's id in a package staging id. */ export interface IGraphVgSpeechCredential { type: "vgSpeechCredential"; _id: string; name: string; referenceId: string; properties?: { vendor: string; }; /** The Cognigy Connection a Connection-backed credential uses, when it resolves in the scope (X48). */ dependencies?: { _id: string; type: "connection"; }[]; } /** * A Voice Gateway recording bucket as the package wizards and the import conflict check see it (CGY-44512, * vg-resources TDD 06/028 P2, X15, X33). Owned by vg-resources-api; graphed by the `vgRecordingBucket` external model. * `_id` is the bucket's id in a project, or the parked record's id in a package staging id. `name` is the bucket * connection's label, or its bucket when it has none. */ export interface IGraphVgRecordingBucket { type: "vgRecordingBucket"; _id: string; name: string; referenceId: string; properties?: { vendor: string; }; /** The storage Connection a Connection-backed bucket uses, when it resolves in the scope (X48). */ dependencies?: { _id: string; type: "connection"; }[]; } /** * A Voice Gateway SIP carrier as the package wizards and the import conflict check see it (CGY-44512, * vg-resources TDD 06/028 P3, X33). Owned by vg-resources-api; graphed by the `vgCarrier` external model. * `_id` is the carrier's id in a project, or the parked record's id in a package staging id. */ export interface IGraphVgCarrier { type: "vgCarrier"; _id: string; name: string; referenceId: string; /** The SIP auth Connections the carrier uses, when they resolve in the scope (X51). */ dependencies?: { _id: string; type: "connection"; }[]; } /** * A Voice Gateway outbound route, graphed by the `vgOutboundRoute` external model (P3, X13c). `dependencies` are the * carriers it uses (default first), by their `_id` in the same scope, so picking a route pre-ticks them. */ export interface IGraphVgOutboundRoute { type: "vgOutboundRoute"; _id: string; name: string; referenceId: string; dependencies?: { _id: string; type: "vgOutboundRouteCarrier"; }[]; } export declare type IGraphResourceWithReferenceId = IGraphAgentAssistConfig | IGraphConnection | IGraphFlow | IGraphFunction | IGraphLargeLanguageModel | IGraphLexicon | IGraphLocale | IGraphNLUConnector | IGraphSnippet | IGraphAgentAssistConfig | IGraphKnowledgeStore | IGraphGoal | IGraphHandoverProvider | IGraphAiAgent | IGraphSimulation | IGraphEvalProfile | IGraphAiAgentV2 | IGraphAiAgentV2Persona | IGraphAiAgentV2Tool | IGraphAiAgentV2Skill | IGraphAiAgentV2McpServer | IGraphVgSpeechCredential | IGraphVgRecordingBucket | IGraphVgCarrier | IGraphVgOutboundRoute; export declare type IGraphResourceWithoutReferenceId = IGraphEndpoint | IGraphExtension | IGraphFile | IGraphPlaybook; export declare type IGraphResource = IGraphResourceWithReferenceId | IGraphResourceWithoutReferenceId; /** * @openapi * * components: * schemas: * IGraph_2_0: * type: object * additionalProperties: * oneOf: * - $ref: '#/components/schemas/IGraphProject_2_0' * * IGraphProject_2_0: * type: object * properties: * type: * type: string * example: project * enum: * - project * - snapshot * name: * type: string * description: The name of the Resource * example: lexicon * resources: * type: array * items: * $ref: '#/components/schemas/IGraphResource_2_0' * * IGraphResource_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Resource * example: lexicon * properties: * type: object */ export interface IGraph_2_0 { [projectId: string]: { type: "project" | "snapshot"; name: string; resources: IGraphResource[]; }; } export interface IGraphProjectRestDataParams_2_0 { projectId: string; } export interface IGraphProjectRestData_2_0 extends IGraphProjectRestDataParams_2_0 { packages?: boolean; dependencies?: boolean; snapshots?: boolean; } export interface IGraphProjectRestReturnValue_2_0 extends IGraph_2_0 { } export interface IValidateProjectNameRestDataBody_2_0 { name: string; } export interface IValidateProjectNameRestData_2_0 extends IValidateProjectNameRestDataBody_2_0 { } export interface IValidateProjectNameRestReturnValue_2_0 { } export interface ITrainAllProjectFlowsRestDataParams_2_0 extends IProjectScope { } export interface ITrainAllProjectFlowsRestData_2_0 extends ITrainAllProjectFlowsRestDataParams_2_0 { } export interface ITrainAllProjectFlowsRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * IIntentIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * referenceId: * type: string * format: uuid * name: * type: string * example: OrderFood * description: * type: string * example: Intent to order food * tags: * type: array * items: * type: string * isRejectIntent: * type: boolean * isDisabled: * type: boolean * localeReference: * $ref: '#/components/schemas/TMongoId' * parentIntentId: * $ref: '#/components/schemas/TMongoId' * feedbackReport: * $ref: '#/components/schemas/IIntentFeedbackReport_2_0' */ export interface IIntentIndexItem_2_0 { _id: string; referenceId: string; name: string; description?: string; tags: string[]; isRejectIntent: boolean; isDisabled: boolean; localeReference: string; parentIntentId: string; feedbackReport: IIntentFeedbackReport_2_0; } export interface IIndexIntentsRestDataParams_2_0 { flowId: string; } export interface IIndexIntentsRestData_2_0 extends IRestPagination, IIndexIntentsRestDataParams_2_0 { parent?: string; preferredLocaleId?: string; includeChildren?: boolean; includeFeedbackReport?: boolean; } export interface IIndexIntentsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export declare type IBatchIntentsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchIntentsRestDataBody_2_0 { operations: IBatchIntentsRestOperationSet; } export interface IBatchIntentsRestDataParams_2_0 { flowId: string; } export interface IBatchIntentsRestData_2_0 extends IBatchIntentsRestDataBody_2_0, IBatchIntentsRestDataParams_2_0 { } export interface IBatchIntentsRestReturnValue_2_0 { created: string[]; updated: string[]; deleted: string[]; } export interface ICreateIntentRestDataBody_2_0 extends Partial> { } export interface ICreateIntentRestDataParams_2_0 { flowId: string; } /** * @openapi * components: * parameters: * shouldGenerateSentencesParam: * in: query * name: shouldGenerateSentences * required: false * schema: * type: boolean * generateSentenceLimitParam: * in: query * name: generateSentenceLimit * required: false * schema: * type: integer * minimum: 5 * maximum: 20 */ export interface ICreateIntentRestDataQuery_2_0 { shouldGenerateSentences?: boolean; generateSentenceLimit?: number; } export interface ICreateIntentRestData_2_0 extends ICreateIntentRestDataBody_2_0, ICreateIntentRestDataParams_2_0, ICreateIntentRestDataQuery_2_0 { } export interface ICreateIntentRestReturnValue_2_0 extends IIntent_2_0 { sentences?: string[]; } export interface IReadIntentRestDataParams_2_0 { flowId: string; intentId: string; } export interface IReadIntentRestDataQuery_2_0 { preferredLocaleId?: string; } export interface IReadIntentRestData_2_0 extends IReadIntentRestDataParams_2_0, IReadIntentRestDataQuery_2_0 { } export interface IReadIntentRestReturnValue_2_0 extends IIntent_2_0 { } export interface IUpdateIntentRestBody_2_0 extends Partial> { localeId: string; } export interface IUpdateIntentRestParams_2_0 { flowId: string; intentId: string; } export interface IUpdateIntentRestData_2_0 extends IUpdateIntentRestParams_2_0, IUpdateIntentRestBody_2_0 { } export interface IUpdateIntentRestReturnValue_2_0 { } export interface IDeleteIntentRestDataParams_2_0 { flowId: string; intentId: string; } export interface IDeleteIntentRestData_2_0 extends IDeleteIntentRestDataParams_2_0 { } export interface IDeleteIntentRestReturnValue_2_0 { } export interface ITrainIntentsRestDataParams_2_0 { flowId: string; } export interface ITrainIntentsRestDataBody_2_0 { localeId?: string; mode?: "full" | "quick"; } export interface ITrainIntentsRestData_2_0 extends ITrainIntentsRestDataParams_2_0, ITrainIntentsRestDataBody_2_0 { } export interface ITrainIntentsRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IImportIntentsRestDataParams_2_0 { flowId: string; } export interface IImportIntentsRestDataBody_2_0 { file: File | Buffer; localeId: string; mode: TImportIntentsMode_2_0; } export interface IImportIntentsRestData_2_0 extends IImportIntentsRestDataParams_2_0, IImportIntentsRestDataBody_2_0 { } export interface IImportIntentsRestReturnValue_2_0 extends ICreatedTask_2_0 { } export declare type TImportIntentsMode_2_0 = "skip" | "overwrite" | "merge"; export interface IAddIntentLocalizationRestDataParams_2_0 { flowId: string; intentId: string; } export interface IIntentTranslationSettings { from: string; to: string; } export interface IAddIntentLocalizationRestDataBody_2_0 { localeId: string; inheritFromLocaleId?: string; intentTranslationSettings?: IIntentTranslationSettings; } export interface IAddIntentLocalizationRestData_2_0 extends IAddIntentLocalizationRestDataParams_2_0, IAddIntentLocalizationRestDataBody_2_0 { } export interface IAddIntentLocalizationRestReturnValue_2_0 { translationError?: InternalServerError; } export interface IRemoveIntentLocalizationRestDataParams_2_0 { flowId: string; intentId: string; } export interface IRemoveIntentLocalizationRestDataBody_2_0 { localeId: string; } export interface IRemoveIntentLocalizationRestData_2_0 extends IRemoveIntentLocalizationRestDataParams_2_0, IRemoveIntentLocalizationRestDataBody_2_0 { } export interface IRemoveIntentLocalizationRestReturnValue_2_0 { } export interface IExportIntentsRestDataParams_2_0 { flowId: string; } export interface IExportIntentsRestDataBody_2_0 { localeId: string; format: TExportIntentsFormat_2_0; } export interface IExportIntentsRestData_2_0 extends IExportIntentsRestDataParams_2_0, IExportIntentsRestDataBody_2_0 { } export interface IExportIntentsRestReturnValue_2_0 { } export declare type TExportIntentsFormat_2_0 = "csv" | "json"; /** * @openapi * * components: * schemas: * ISentenceFeedbackReport_2_0: * type: object * properties: * findings: * type: array * items: * type: object * properties: * type: * $ref: '#/components/schemas/TSentenceFeedbackFindingType_2_0' * info: * type: object * properties: * trueIntent: * type: string * topIntent: * type: string * runnerUp: * type: string * topScore: * type: number * runnerUpScore: * type: number * difference: * type: number * trueIntentName: * type: string * topIntentName: * type: string * runnerUpIntentName: * type: string */ export interface ISentenceFeedbackReport_2_0 { findings: { type: TSentenceFeedbackFindingType_2_0; }[]; info: { trueIntentReferenceId: string; topIntentReferenceId: string; topScore: number; runnerUpIntentReferenceId: string; runnerUpScore: number; difference: number; trueIntentName: string; topIntentName: string; runnerUpIntentName: string; runnerUpIntentId: string; runnerUpFlowName: string; runnerUpFlowId: string; trueIntentIntentId: string; trueIntentFlowName: string; trueIntentFlowId: string; topIntentIntentId: string; topIntentFlowName: string; topIntentFlowId: string; }; } declare const sentenceFeedbackFindingArrayType_2_0: readonly [ "poorScore", "fairScore", "goodScore", "overlap", "wrongIntent" ]; /** * @openapi * * components: * schemas: * TSentenceFeedbackFindingType_2_0: * type: string * enum: * - poorScore * - fairScore * - goodScore * - overlap * - wrongIntent */ export declare type TSentenceFeedbackFindingType_2_0 = typeof sentenceFeedbackFindingArrayType_2_0[number]; /** * @openapi * * components: * schemas: * ISentenceData_2_0: * description: The payload for creating or updating an Example Sentence. * type: object * properties: * text: * type: string * description: The text in the Example Sentence. * example: I want to buy a pizza. * slots: * type: array * description: "The Slot segments in the Example Sentence. Each item defines a start and end indexes, and the Slot type: system-defined or user-defined Slot." * items: * oneOf: * - $ref: '#/components/schemas/IAnySlot_2_0' * - $ref: '#/components/schemas/ISystemSlot_2_0' * - $ref: '#/components/schemas/ILexiconSentenceSlot_2_0' * * ISentenceGeneratedData_2_0: * type: object * properties: * localeReference: * $ref: '#/components/schemas/TMongoId' * feedbackReport: * $ref: '#/components/schemas/ISentenceFeedbackReport_2_0' * * ISentence_2_0: * allOf: * - $ref: '#/components/schemas/ISentenceGeneratedData_2_0' * - $ref: '#/components/schemas/ISentenceData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ISentence_2_0 { _id: string; text: string; slots: ISlot_2_0[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; localeReference: TMongoId; feedbackReport: ISentenceFeedbackReport_2_0; } export declare type ISlot_2_0 = ILexiconSentenceSlot_2_0 | IAnySlot_2_0 | ISystemSlot_2_0; /** * @openapi * * components: * schemas: * ILexiconSentenceSlot_2_0: * description: The user-defined Slot. * type: object * properties: * type: * type: string * enum: * - lexiconSlot * description: The identifier for the Slot type. * lexiconReference: * $ref: '#/components/schemas/TMongoId' * slotReference: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The display name of the Slot. * start: * type: number * description: The start index of the Slot in the Example Sentence text. * end: * type: number * description: The end index of the Slot in the Example Sentence text. */ export interface ILexiconSentenceSlot_2_0 { type: "lexiconSlot"; lexiconReference?: TMongoId; slotReference?: TMongoId; name?: string; start: number; end: number; } /** * @openapi * * components: * schemas: * IAnySlot_2_0: * description: A Slot defined by the start and end indexes in the Example Sentence. The value is the text that appears in the range between the start and end indexes. * type: object * properties: * type: * type: string * enum: * - anySlot * description: The identifier for the Slot type. * name: * type: string * description: The display name of the Slot. * start: * type: number * description: The start index of the Slot in the Example Sentence text. * end: * type: number * description: The end index of the Slot in the Example Sentence text. */ export interface IAnySlot_2_0 { type: "anySlot"; name: string; start: number; end: number; } /** * @openapi * * components: * schemas: * ISystemSlot_2_0: * description: A system-defined Slot that references a system-defined data. * type: object * properties: * type: * type: string * enum: * - systemSlot * description: The identifier for the Slot type. * dimension: * type: string * description: The system-defined data type. * start: * type: number * description: The start index of the Slot in the Example Sentence text. * end: * type: number * description: The end index of the Slot in the Example Sentence text. */ export interface ISystemSlot_2_0 { type: "systemSlot"; dimension: string; start: number; end: number; } /** * @openapi * * components: * schemas: * ISentenceIndexItemData_2_0: * type: object * properties: * text: * type: string * example: I want to buy a pizza. * localeReference: * $ref: '#/components/schemas/TMongoId' * slots: * type: array * items: * type: object * additionalProperties: false * properties: * tagReference: * type: string * lexiconReference: * type: string * feedbackReport: * $ref: '#/components/schemas/ISentenceFeedbackReport_2_0' * * ISentenceIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/ISentenceIndexItemData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ISentenceIndexItem_2_0 { _id: string; text: string; localeReference: string; slots: ISlot_2_0[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; feedbackReport: ISentenceFeedbackReport_2_0; } export interface IIndexSentencesRestDataParams_2_0 { flowId: string; intentId: string; } export interface IIndexSentencesRestData_2_0 extends IRestPagination, IIndexSentencesRestDataParams_2_0 { preferredLocaleId?: string; includeFeedbackReport?: boolean; } export interface IIndexSentencesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateSentenceRestDataBody_2_0 extends Partial> { localeId: string; } export interface ICreateSentenceRestDataParams_2_0 { flowId: string; intentId: string; } export interface ICreateSentenceRestData_2_0 extends ICreateSentenceRestDataBody_2_0, ICreateSentenceRestDataParams_2_0 { } export interface ICreateSentenceRestReturnValue_2_0 extends Omit { } export interface IReadSentenceRestDataParams_2_0 { flowId: string; intentId: string; sentenceId: string; } export interface IReadSentenceRestData_2_0 extends IReadSentenceRestDataParams_2_0 { } export interface IReadSentenceRestReturnValue_2_0 extends ISentence_2_0 { } export interface IUpdateSentenceRestBody_2_0 extends Omit { } export interface IUpdateSentenceRestParams_2_0 { flowId: string; intentId: string; sentenceId: string; } export interface IUpdateSentenceRestData_2_0 extends IUpdateSentenceRestParams_2_0, IUpdateSentenceRestBody_2_0 { } export interface IUpdateSentenceRestReturnValue_2_0 { } export interface IDeleteSentenceRestDataParams_2_0 { flowId: string; intentId: string; sentenceId: string; } export interface IDeleteSentenceRestData_2_0 extends IDeleteSentenceRestDataParams_2_0 { } export interface IDeleteSentenceRestReturnValue_2_0 { } export declare type IBatchSentencesRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchSentencesRestDataBody_2_0 { operations: IBatchSentencesRestOperationSet; } export interface IBatchSentencesRestDataParams_2_0 { flowId: string; intentId: string; } export interface IBatchSentencesRestData_2_0 extends IBatchSentencesRestDataBody_2_0, IBatchSentencesRestDataParams_2_0 { } export interface IBatchSentencesRestReturnValue_2_0 { created: string[]; updated: string[]; deleted: string[]; } export interface IGenerateSentencesRestDataParams_2_0 { flowId: string; intentId: string; } /** * @openapi * components: * parameters: * localeIdParam: * in: query * name: localeId * description: The 24-character unique identifier for the Locale used to generate Example Sentences. * required: false * schema: * $ref: '#/components/schemas/TMongoId' * limitSentencesParam: * in: query * name: limit * description: The maximum number of Example Sentences to generate for the Intent. The value must be between 5 and 20. The default is 5. * required: false * schema: * type: integer * minimum: 5 * maximum: 20 * default: 5 */ export interface IGenerateSentencesRestDataQuery_2_0 { localeId?: string; limit?: number; } export interface IGenerateSentencesRestData_2_0 extends IGenerateSentencesRestDataParams_2_0, IGenerateSentencesRestDataQuery_2_0 { } export interface IGenerateSentencesRestReturnValue_2_0 { sentences: string[]; } /** * @openapi * * components: * schemas: * IChartNodeIndexItemData_2_0: * type: object * properties: * type: * type: string * example: "if" * referenceId: * type: string * format: uuid * extension: * type: string * example: "@cognigy/basic-nodes" * label: * type: string * example: "A new Node" * analyticsLabel: * type: string * example: "Step name" * comment: * type: string * example: "this is a very important node" * commentColor: * oneOf: * - $ref: '#/components/schemas/TCSSColor' * - type: string * nullable: false * enum: * - "" * isCollapsed: * type: boolean * example: false * isEntryPoint: * type: boolean * example: false * isDisabled: * type: boolean * example: false * * IChartNodeIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * - $ref: '#/components/schemas/IChartNodeIndexItemData_2_0' */ export interface IChartNodeIndexItem_2_0 { _id: TMongoId; referenceId: string; type: string; label: string; analyticsLabel: string; comment: string; commentColor: string; isEntryPoint: boolean; isDisabled: boolean; extension: string; } export interface IIndexChartNodesRestData_2_0 extends IRestPagination { resourceId: TMongoId; resourceType: TChartableResourceType; } export interface IIndexChartNodesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IChartNodeRelation_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * node: * $ref: '#/components/schemas/TMongoId' * children: * type: array * items: * $ref: '#/components/schemas/TMongoId' * next: * allOf: * - $ref: '#/components/schemas/TMongoId' * nullable: true */ export interface IChartNodeRelation_2_0 { _id: TMongoId; node: TMongoId; children: TMongoId[]; next: TMongoId | null; } /** * @openapi * * components: * schemas: * IChart_2_0: * type: object * properties: * nodes: * type: array * items: * $ref: '#/components/schemas/IChartNodeIndexItem_2_0' * relations: * type: array * items: * $ref: '#/components/schemas/IChartNodeRelation_2_0' */ export interface IChart_2_0 { _id: TMongoId; nodes: IChartNodeIndexItem_2_0[]; relations: IChartNodeRelation_2_0[]; } /** * @openapi * * components: * schemas: * IChartNodeData_2_0: * type: object * properties: * type: * type: string * example: if * description: Type of the Node * extension: * type: string * example: "@cognigy/basic-nodes" * label: * type: string * example: A new Node * description: Replaces the default name of the Node displayed in the Flow Editor. * comment: * type: string * example: this is a very important node * description: Adds additional information about Nodes, for example, a specific of the Node. * commentColor: * oneOf: * - $ref: '#/components/schemas/TCSSColor' * - type: string * nullable: false * enum: * - "" * isEntryPoint: * type: boolean * example: false * isDisabled: * type: boolean * example: false * config: * type: object * example: {"condition":{"type":"rule","condition":"","rule":{"left":"1","operand":"gt","right":"2"}}} * localeReference: * type: string * example: "63bd8ebb648e6e739f1bbd82" * analyticsLabel: * type: string * example: "condition" * mock: * type: object * properties: * isEnabled: * type: boolean * example: false * code: * type: string * example: "console.log('Hello, world!');" * description: Mock code to be executed when the mock mode is enabled. * nullable: false * * IChartNode_2_0: * allOf: * - $ref: '#/components/schemas/IChartNodeData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' */ export interface IChartNode_2_0 { _id: TMongoId; referenceId: string; type: string; label: string; comment: string; commentColor: string; preview: any; isEntryPoint: boolean; isDisabled: boolean; config: T["config"]; extension: string; localeReference: string; analyticsLabel?: string; mock: { isEnabled: boolean; code: string; }; } declare enum ConvertActionType { ADDED = "added", REMOVED = "removed", UPDATED = "updated" } export declare type TConvertAction = (typeof ConvertActionType)[keyof typeof ConvertActionType]; export declare type TNodeConversionMetadata = Record; export interface IMockData { isEnabled: boolean; code: string; transpiled?: string; hasError?: boolean; } export interface IChartNodeBase { _id: TMongoId; referenceId: string; label: string; comment: string; commentColor: string; /** * A node can optionally have an analytics step * configured. */ analyticsLabel?: string; isEntryPoint: boolean; isDisabled: boolean; /** * preview is a virtual field * that is derived from the "localizedData" */ preview: any; /** * localeReference is a virtual field that is derived from the * "localizedData" */ localeReference: TMongoId; chartReference: TMongoId; resourceReference: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; mock: IMockData; } export interface IChartNode extends IChartNodeBase { type: T; extension: E; /** * config is a virtual field that is derived from the "localizedData" */ config: D["config"]; } export interface IChartNodeInDB extends Omit { localizedData: { config: { [key: string]: any; }; preview: any; localeReference: TMongoId; }[]; } export interface IReadChartNodeRestDataQuery_2_0 { preferredLocaleId?: string; includeConversionMetadata?: string; } export declare type IReadChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: string; }; export interface IReadChartNodeRestData_2_0 extends IReadChartNodeRestDataParams_2_0, IReadChartNodeRestDataQuery_2_0 { resourceType: TChartableResourceType; } export interface IReadChartNodeRestReturnValue_2_0 extends IChartNode_2_0 { conversionMetadata?: TNodeConversionMetadata; } export interface IReadChartRestData_2_0 extends IReadChartNodeRestDataQuery_2_0 { resourceId: string; resourceType: string; } export interface IReadChartRestReturnValue_2_0 extends IChart_2_0 { } export declare type ICreateChartNodeRestDataParams_2_0

= { [key in P]: string; }; export interface ICreateChartNodeRestDataBaseBody_2_0 { mode: TCreateChartNodeType; target: string; position?: number; explicit?: boolean; } export interface ICreateChartNodeRestDataGenericBody_2_0 extends Partial>, ICreateChartNodeRestDataBase_2_0 { type: string; extension?: string; } export interface ICreateChartNodeRestDataBase_2_0 extends ICreateChartNodeRestDataBaseBody_2_0, ICreateChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export declare type TCreateChartNodeType = "append" | "prepend" | "appendChild" | "prependChild" | "insertChildAt" | "insertAfter" | "insertBefore"; export interface ICreateChartNodeRestReturnValue_2_0 extends IChartNode_2_0 { } export declare type IUpdateChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: string; }; export interface IUpdateChartNodeRestDataBody_2_0 extends Partial> { localeId?: string; } export interface IUpdateChartNodeRestData_2_0 extends IUpdateChartNodeRestDataParams_2_0, IUpdateChartNodeRestDataBody_2_0 { resourceType: TChartableResourceType; } export interface IUpdateChartNodeRestReturnValue_2_0 { } export declare type IDeleteChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: string; }; export interface IDeleteChartNodeRestData_2_0 extends IDeleteChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface IDeleteChartNodeRestReturnValue_2_0 { } export declare type IMoveChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: TMongoId; }; export interface IMoveChartNodeRestDataBody_2_0 { mode: TMode; target: TMongoId; position?: number; } export interface IMoveChartNodeRestData_2_0 extends IMoveChartNodeRestDataBody_2_0, IMoveChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export declare type TMode = "append" | "prepend" | "insertChildAt" | "insertAfter" | "insertBefore"; export interface IMoveChartNodeRestReturnValue_2_0 { } export declare type ICopyChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: TMongoId; }; export interface ICopyChartNodeRestData_2_0 extends ICopyChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface ICopyChartNodeRestReturnValue_2_0 { } export declare type ICutChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: TMongoId; }; export interface ICutChartNodeRestData_2_0 extends ICutChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface ICutChartNodeRestReturnValue_2_0 { } export declare type IPasteChartNodeRestDataParams_2_0

= { [key in P]: string; } & { nodeId: TMongoId; }; export interface IPasteChartNodeRestData_2_0 extends IPasteChartNodeRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface IPasteChartNodeRestReturnValue_2_0 { } export declare type IAddChartNodeLocalizationRestDataParams_2_0

= { [key in P]: string; } & { nodeId: string; }; export interface IIntentTranslationSettings { from: string; to: string; } export interface IAddChartNodeLocalizationRestDataBody_2_0 { localeId: string; inheritFromLocaleId?: string; nodeTranslationSettings?: IIntentTranslationSettings; } export interface IAddChartNodeLocalizationRestData_2_0 extends IAddChartNodeLocalizationRestDataParams_2_0, IAddChartNodeLocalizationRestDataBody_2_0 { resourceType: TChartableResourceType; } export interface IAddChartNodeLocalizationRestReturnValue_2_0 { translationError?: InternalServerError; } export declare type IRemoveChartNodeLocalizationRestDataParams_2_0

= { [key in P]: string; } & { nodeId: string; }; export interface IRemoveChartNodeLocalizationRestDataBody_2_0 extends IRemoveChartNodeLocalizationRestDataParams_2_0 { localeId: string; } export interface IRemoveChartNodeLocalizationRestData_2_0 extends IRemoveChartNodeLocalizationRestDataParams_2_0, IRemoveChartNodeLocalizationRestDataBody_2_0 { resourceType: TChartableResourceType; } export interface IRemoveChartNodeLocalizationRestReturnValue_2_0 { } export declare type IUndoChartRestDataParams_2_0

= { [key in P]: string; }; export interface IUndoChartRestData_2_0 extends IUndoChartRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface IUndoChartRestReturnValue_2_0 { } export declare type IRedoChartRestDataParams_2_0

= { [key in P]: string; }; export interface IRedoChartRestData_2_0 extends IRedoChartRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface IRedoChartRestReturnValue_2_0 { } export interface IChartNodeRelation { _id?: TMongoId; node: TMongoId; children: TMongoId[]; next: TMongoId | null; } declare const arrayTActions: readonly [ "createChartNode", "deleteChartNode", "updateChartNode", "moveChartNode", "mergePartialChart", "addChartNodeLocalization", "removeChartNodeLocalization" ]; export interface IUndoRedoAction { action: typeof arrayTActions[number]; /** * The ID of the locale where the action was performed. * Null if no locale was specified, meaning the action * was done on the primary locale */ localeId: TMongoId | null; nodeId?: string; nodeType?: string; relations: IChartNodeRelation[]; nodes: IChartNodeInDB[]; } export declare type IGetUndoRedoStepsRestDataParams_2_0

= { [key in P]: string; }; export interface IGetUndoRedoStepsRestData_2_0 extends IGetUndoRedoStepsRestDataParams_2_0 { resourceType: TChartableResourceType; } export interface IGetUndoRedoStepsRestReturnValue_2_0 { redoSteps: IUndoRedoAction[]; undoSteps: IUndoRedoAction[]; } /** * @openapi * * components: * schemas: * IChartNodeSearchResult_2_0: * type: object * properties: * nodeId: * $ref: '#/components/schemas/TMongoId' * nodeReferenceId: * type: string * format: uuid * matches: * type: array * items: * type: object * properties: * fieldType: * type: string * matchPath: * type: string */ export interface IChartNodeSearchResult_2_0 { nodeId: TMongoId; nodeReferenceId: string; matches: { /** fieldType where we found the match, on the node level the type is always "text"*/ fieldType: string; /** json path to the found match */ matchPath: string; }[]; } export interface ISearchChartNodesRestDataQuery_2_0 { preferredLocaleId: string; filter: string; } export interface ISearchChartNodesRestData_2_0 extends ISearchChartNodesRestDataQuery_2_0 { resourceId: TMongoId; resourceType: TChartableResourceType; } export interface ISearchChartNodesRestReturnValue_2_0 { items: IChartNodeSearchResult_2_0[]; total: number; } export declare type TOutputTypes = "text" | "adaptiveCard"; export interface IAdaptiveCard { type: "AdaptiveCard"; body: IAdaptiveCardElement[]; actions?: IAdaptiveCardAction[]; version: string; speak?: string; } export interface IAdaptiveCardElement { type: string; id?: string; isVisible?: boolean; spacing?: "none" | "small" | "default" | "medium" | "large" | "extraLarge"; separator?: boolean; height?: "auto" | "stretch"; width?: "auto" | "stretch"; style?: "default" | "emphasis"; backgroundColor?: string; backgroundImage?: string; verticalContentAlignment?: "top" | "center" | "bottom"; horizontalAlignment?: "left" | "center" | "right"; } export interface IAdaptiveCardAction { type: string; id: string; title?: string; iconUrl?: string; style?: "default" | "positive" | "destructive"; speak?: string; tooltip?: string; url?: string; data?: any; displayStyle?: "inline" | "popup"; } export interface IGenerateNodeOutputReturnValue { output: string[] | IAdaptiveCard; outputType: TOutputTypes; } /** * @openapi * * components: * schemas: * IGenerateNodeOutput_2_0: * type: object * properties: * localeId: * $ref: '#/components/schemas/TMongoId' * userText: * type: string * example: "greetings" * outputType: * type: string * example: "text" * enum: * - "text" * - "adaptiveCard" * lastOutput: * type: string * description: Last adaptive card output * example: "{\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\", ...}" * generateContentLimit: * type: number * description: The number of sentences to be generated * example: 3 * IGenerateTextNodeOutputResponse_2_0: * type: object * properties: * output: * type: array * items: * type: string * example: "Greetings" * outputType: * type: string * example: "text" * IGenerateAdaptiveCardNodeOutputResponse_2_0: * type: object * properties: * output: * type: object * properties: * type: * type: string * example: AdaptiveCard * body: * type: array * items: * type: object * actions: * type: array * items: * type: object * version: * type: string * example: 1.0 * speak: * type: string * example: "create a poll for playing football on saturday at 3pm with the following options: yes, no, maybe" * outputType: * type: string * example: "adaptiveCard" */ export interface IGenerateNodeOutputRestDataBody_2_0 { localeId: string; outputType: TOutputTypes; userText: string; generateContentLimit?: number; lastOutput?: string; } export interface IGenerateNodeOutputRestDataParam_2_0 { flowId: string; } export interface IGenerateNodeOutputRestData_2_0 extends IGenerateNodeOutputRestDataBody_2_0, IGenerateNodeOutputRestDataParam_2_0 { } export interface IGenerateNodeOutputRestReturnValue_2_0 extends IGenerateNodeOutputReturnValue { } /** * @openapi * * components: * schemas: * IAiAgentData_2_0: * type: object * properties: * name: * type: string * example: "Cognigy AI Agent" * image: * type: string * description: Avatar of the AI Agent. * example: "https://cognigy.com/ai-agent.png" * imageOptimizedFormat: * type: boolean * description: Whether the optimized image format defined by Cognigy is used. * example: true * knowledgeReferenceId: * type: string * nullable: true * format: uuid * description: A referenceId of a Knowledge Store this Agent will use as base knowledge or null. * example: "c7b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b" * description: * type: string * maxLength: 1000 * description: A short description of the AI Agent, up to 1000 characters. * example: "I am a virtual assistant that can help you with your questions." * speakingStyle: * type: object * properties: * completeness: * type: string * formality: * type: string * example: { "completeness": "concise", "formality": "formal" } * voiceConfigs: * type: object * properties: * ttsVoice: * type: string * ttsLanguage: * type: string * ttsVendor: * enum: ["aws", "deepgram", "elevenlabs", "google", "microsoft", "default", "custom", "none"] * type: string * ttsModel: * type: string * ttsLabel: * type: string * ttsDisableCache: * type: boolean * example: { "ttsVoice": "Xb7hH8MSUJpSbSDYk0k2", "ttsLanguage": "zh", "ttsVendor": "Elevenlabs", "ttsModel": "eleven_multilingual_v2", "ttsLabel": "microsoft US", "ttsDisableCache": false } * enableVoiceConfigs: * type: boolean * description: Enables the use of voice configuration. * example: false * enableAutoLanguageDetection: * type: boolean * description: Whether the AI Agent should automatically detect and respond in the user's language. * example: true * safetySettings: * type: object * properties: * avoidHarmfulContent: * type: boolean * avoidUngroundedContent: * type: boolean * avoidCopyrightInfringements: * type: boolean * preventJailbreakAndManipulation: * type: boolean * contactProfilesOption: * type: string * enum: * - "none" * - "selectedProfileFields" * - "completeProfile" * - "profileMemoriesOnly" * description: Option to enable or customize Contact profiles selection for the AI Agent. * example: "selectedProfileFields" * contactProfilesSelected: * type: array * items: * type: string * description: Selected contact profiles for the AI Agent, it is used only when contactProfilesOption is set to 'selectedProfileFields'. * example: ["name", "email"] * instructions: * type: string * description: Instructions for the AI Agent. * example: "I can help you with your questions, provide information and much more." * maxLength: 1000 * IAiAgent_2_0: * allOf: * - $ref: '#/components/schemas/IAiAgentData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IAiAgent_2_0 { _id: TMongoId; name: string; referenceId: string; image: string; imageOptimizedFormat: boolean; instructions: string; knowledgeReferenceId: string | null; description: string; speakingStyle: ISpeakingStyle; voiceConfigs: IVoiceConfigParams; enableVoiceConfigs: boolean; enableAutoLanguageDetection?: boolean; safetySettings: ISafetySettings; contactProfilesOption: TContactProfileOptions; contactProfilesSelected: string[]; projectReference: TMongoId; organisationReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface ICreateAiAgentRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateAiAgentRestData_2_0 extends ICreateAiAgentRestDataBody_2_0 { } export interface ICreateAiAgentRestReturnValue_2_0 extends IAiAgent_2_0 { } export interface IUpdateAiAgentRestDataBody_2_0 extends Partial> { } export interface IUpdateAiAgentRestDataParams_2_0 { aiAgentId: string; } export interface IUpdateAiAgentRestData_2_0 extends IUpdateAiAgentRestDataBody_2_0, IUpdateAiAgentRestDataParams_2_0 { } export interface IUpdateAiAgentRestReturnValue_2_0 { } export interface IReadAiAgentRestDataParams_2_0 { aiAgentId: string; } export interface IReadAiAgentRestData_2_0 extends IReadAiAgentRestDataParams_2_0 { } export interface IReadAiAgentRestReturnValue_2_0 extends IAiAgent_2_0 { } export interface IIndexAiAgentsRestData_2_0 extends IRestPagination, IProjectScope { } export interface IIndexAiAgentsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IDeleteAiAgentRestDataParams_2_0 { aiAgentId: string; } export interface IDeleteAiAgentRestData_2_0 extends IDeleteAiAgentRestDataParams_2_0 { } export interface IDeleteAiAgentRestReturnValue_2_0 { } /** * @openapi * components: * schemas: * IAiAgentHiringTemplate_2_0: * type: object * properties: * templateId: * type: string * description: The ID of the AI Agent template to hire. * example: RetailAssistant-Rita * aiAgentName: * type: string * description: The name of the AI Agent. * example: Rita * aiAgentFileName: * type: string * description: The file name of the AI Agent. * example: Rita.tar * aiAgentImage: * type: string * description: The image of the AI Agent. * example: https://cognigy.com/rita.png * aiAgentDescription: * type: string * description: A short description of the AI Agent, up to 1000 characters. * example: "I am a virtual assistant that can help you with your questions." * */ export interface IAiAgentHiringTemplate_2_0 { templateId: string; aiAgentName: string; aiAgentFileName: string; aiAgentImage: string; aiAgentDescription: string; } export interface IGetAiAgentHiringTemplatesRestData_2_0 { } export interface IGetAiAgentHiringTemplatesRestReturnValue_2_0 { templates: IAiAgentHiringTemplate_2_0[]; } /** * @openapi * components: * schemas: * IAiAgentTemplateId_2_0: * type: object * properties: * templateId: * type: string * description: The ID of the AI Agent template to hire. * example: airline-support-agent-en * overrideAiAgentReferenceId: * type: string * description: The reference ID of the AI Agent to override the AI Agent from the hired package. * example: 5f7b1b1b-7b1b-4b1b-9b1b-7b1b1b1b1b1b */ export interface IHireAiAgentRestDataBody_2_0 extends IProjectScope { templateId: string; overrideAiAgentReferenceId?: string; } export interface IHireAiAgentRestData_2_0 extends IHireAiAgentRestDataBody_2_0 { } export interface IHireAiAgentRestReturnValue_2_0 { } export interface IValidateAiAgentNameRestDataBody_2_0 extends IProjectScope { name: string; } export interface IValidateAiAgentNameRestData_2_0 extends IValidateAiAgentNameRestDataBody_2_0 { } export interface IValidateAiAgentNameRestReturnValue_2_0 { } export interface IGetAiAgentJobAndToolsRestDataParams_2_0 { aiAgentId: string; } export interface IGetAiAgentJobAndToolsRestData_2_0 extends IGetAiAgentJobAndToolsRestDataParams_2_0 { } /** * Interface for a Tool attached to a Job node. * Allows future tool types without code changes. */ export interface IAiAgentJobToolNode_2_0 { _id: string; referenceId: string; type: string; label: string; comment: string; commentColor: string; analyticsLabel: string | null; isDisabled: boolean; isEntryPoint: boolean; extension: string; config: Record; } /** * Interface for a Job Node with its associated Tool nodes, as returned by the endpoint. */ export interface IAiAgentJobNodeWithTools_2_0 { _id: string; referenceId: string; type: string; label: string; comment: string; commentColor: string; analyticsLabel: string | null; isDisabled: boolean; isEntryPoint: boolean; extension: string; chartId: string; flowId: string; config: Record; tools: IAiAgentJobToolNode_2_0[]; } /** * The main return type for the endpoint - always an array of job nodes (each with tools). */ export declare type IGetAiAgentJobAndToolsRestReturnValue_2_0 = IAiAgentJobNodeWithTools_2_0[]; /** * No AI Agent resource is required to call this endpoint: `aiAgentJobA2AAgent` nodes can also * live in an ordinary Flow (not just inside a saved AI Agent's Tools tab), where no AI Agent * resource exists at all — so this is project-scoped via `IProjectScope`, not AI-Agent-scoped. */ export interface ITestA2AAgentConnectionRestDataBody_2_0 extends IProjectScope { agentBaseUrl: string; agentCardPath?: string; timeout: number; agentHeaders?: Record; authType: "none" | "oAuth2" | "basic" | "bearer" | "apiKey"; apiKeyHeader?: string; authForDiscovery?: boolean; /** Raw Connection reference IDs, exactly as stored on the node config — resolved server-side. */ oAuth2Connection?: string; basicConnection?: string; bearerConnection?: string; apiKeyConnection?: string; } export interface ITestA2AAgentConnectionRestData_2_0 extends ITestA2AAgentConnectionRestDataBody_2_0 { } export interface ITestA2AAgentConnectionRestReturnValue_2_0 { isReachable: boolean; msg: string; card?: { name: string; description: string; skills: Array<{ id: string; name: string; description: string; }>; }; } /** * @openapi * * components: * schemas: * INodeDescriptor_2_0: * type: object * properties: * type: * type: string * parentType: * type: string * description: The type of the node parent, if there is one * defaultLabel: * oneOf: * - type: string * description: The label that should be used when a new Node of this type is created * - type: object * description: A localized version of the label that should be used when a new Node of this type is created * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * summary: * oneOf: * - type: string * description: A short line of text that describes what this Node is used for * - type: object * description: A localized version of a short line of text that describes what this Node is used for * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * extension: * type: string * extensionImg: * type: string * appearance: * type: object * properties: * logo: * type: string * textColor: * type: string * example: blue * oneOf: * - $ref: '#/components/schemas/TCSSColorName' * - $ref: '#/components/schemas/TCognigyColorName' * contrastTextColor: * type: string * example: blue * oneOf: * - $ref: '#/components/schemas/TCSSColorName' * - $ref: '#/components/schemas/TCognigyColorName' * color: * type: string * example: red * oneOf: * - $ref: '#/components/schemas/TCSSColorName' * - $ref: '#/components/schemas/TCognigyColorName' * variant: * type: string * enum: * - regular * - mini * - hexagon * behavior: * type: object * properties: * stopping: * type: boolean * entrypoint: * type: boolean * constraints: * type: object * properties: * editable: * type: boolean * description: Should this node be editable * deletable: * type: boolean * description: Should this node be deletable * creatable: * type: boolean * description: Should this node be manually creatable * collapsable: * type: boolean * description: Should this node be collapsable * childFlowCreatable: * type: boolean * description: Should it be possible to create child flow from this node * movable: * type: boolean * description: Should this node be movable * placement: * type: object * description: Additional placement information * properties: * predecessor: * type: object * properties: * whitelist: * items: * type: string * blacklist: * items: * type: string * successor: * type: object * properties: * whitelist: * items: * type: string * blacklist: * items: * type: string * children: * type: object * properties: * whitelist: * items: * type: string * blacklist: * items: * type: string * dependencies: * type: object * properties: * children: * type: array * items: * type: string * fields: * type: array * items: * type: object * properties: * type: * type: string * enum: * - text * - rule * key: * type: string * label: * oneOf: * - type: string * - type: object * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * defaultValue: * description: The default value for that field * deprecated: * type: object * description: Marks this field as deprecated and scheduled for removal * properties: * removalDate: * type: string * format: date * messageKey: * type: string * docsUrl: * type: string * deprecationToggle: * type: boolean * description: Marks the field that switches off the deprecated parameters of its section * previews: * type: array * items: * type: object * properties: * type: * type: string * enum: * - message * - image * - code * key: * type: string * tokens: * type: array * items: * type: object * properties: * label: * type: string * maxLength: 30 * example: word count * script: * type: string * maxLength: 500 * example: ci.text.split(' ').length * type: * type: string * enum: * - profile * - input * - context * - custom * - answer * - flow-output * - flow-input * example: input * tags: * type: string * enum: * - basic * - logic * - message * - profile * - service * - nlu * - data * sections: * type: array * items: * $ref: '#/components/schemas/INodeFieldCondition_2_0' * form: * type: array * items: * $ref: '#/components/schemas/INodeFieldAndSectionFormElement_2_0' */ export interface INodeDescriptor_2_0 { type: string; parentType?: string | string[]; defaultLabel: string | INodeFieldTranslations; summary: string | INodeFieldTranslations; extension: string; extensionImg: string; appearance: INodeAppearance_2_0; behavior?: INodeBehavior_2_0; constraints?: INodeConstraints_2_0; dependencies?: INodeDependencies_2_0; fields?: INodeField_2_0[]; preview?: INodePreview_2_0; tags?: TNodeTag[]; tokens?: Omit[]; /** Sections which allow to group multiple fields */ sections?: INodeSection_2_0[]; /** The form defines how fields and sections should be render in order */ form?: INodeFieldAndSectionFormElement_2_0[]; } export interface INodeBehavior_2_0 { stopping: boolean; entrypoint: boolean; } export interface INodeAppearance_2_0 { color?: string; textColor?: string; contrastTextColor?: string; showIcon?: boolean; variant?: "regular" | "mini" | "hexagon"; } export interface INodePreview_2_0 { type: "text" | "sayNode" | "custom" | "resource" | "image"; key: string; } export interface INodeConstraints_2_0 { editable?: boolean; deletable?: boolean; creatable?: boolean; collapsable?: boolean; /** Should it be possible to create child flow from this node */ childFlowCreatable?: boolean; movable?: boolean; placement: { predecessor?: INodeConstraint_2_0; successor?: INodeConstraint_2_0; children?: INodeConstraint_2_0; }; } export interface INodeConstraint_2_0 { /** A list of Node types */ whitelist?: string[]; /** A list of Node types */ blacklist?: string[]; } export interface INodeField_2_0 { type: TNodeFieldType_2_0; key: string; label: string | INodeFieldTranslations; condition?: TNodeFieldCondition; defaultValue: any; description?: string | INodeFieldTranslations; params?: { [key: string]: any; }; /** Marks this field as deprecated and scheduled for removal */ deprecated?: INodeDeprecation; /** * Marks the field that switches off the deprecated parameters of its section. Lets the * node editor find the toggle structurally instead of by a well-known config key, so a * descriptor can carry several deprecated sections, each governed by its own toggle */ deprecationToggle?: boolean; } export declare type TNodeTag = "basic" | "logic" | "message" | "profile" | "service" | "nlu" | "data" | string; export declare type TNodeFieldType_2_0 = "text" | "rule" | "select" | "xml" | "typescript" | "json" | "textArray" | "chipInput" | "date" | "datetime" | "time" | "cognigyText" | "checkbox" | "toggle" | "slider" | "number" | "daterange" | "say" | "code" | "connection" | "condition" | "flow" | "node" | "flowNode" | "lexicon" | "switchNode" | "caseNode" | "sttSelect" | "sttTierModelSelect" | "ttsSelect" | "sttLanguageAzureSelect" | "sttLanguageGoogleSelect" | "mock"; export interface INodeDependencies_2_0 { /** A list of Node types */ children: string[]; } /** * @openapi * * components: * schemas: * INodeFieldCondition_2_0: * type: object * properties: * key: * type: string * description: The key of the Field whose value should be matched * value: * description: The expected value(s) that make this condition match * negate: * type: boolean * description: If this is true, the condition result will be inverted */ export interface INodeFieldCondition_2_0 { /** The key of the Field whose value should be matched */ key: string; /** The expected value(s) that make this condition match */ value: (string | number | boolean) | (string | number | boolean)[]; /** If this is true, the condition result will be inverted */ negate?: boolean; } /** * @openapi * * components: * schemas: * INodeSection_2_0: * type: object * properties: * key: * type: string * description: Unique identifier for this section within all sections of a descriptor, e.g. 'authentication * label: * oneOf: * - type: string * description: Condition whether this section should be rendered * - type: object * description: A localized Condition whether this section should be rendered * properties: * default: * type: string * enUS: * type: string * deDE: * type: string * esES: * type: string * jaJP: * type: string * koKR: * type: string * condition: * $ref: '#/components/schemas/INodeFieldCondition_2_0' * defaultCollapsed: * type: boolean * description: Whether the sections should be collapsed by default * default: false * fields: * type: array * items: * type: string * theme: * type: string * description: Used to highlight sections if they contain new features * deprecated: * type: object * description: Marks this section as deprecated and scheduled for removal * properties: * removalDate: * type: string * format: date * messageKey: * type: string * docsUrl: * type: string */ export interface INodeSection_2_0 { /** Unique identifier for this section within all sections of a descriptor, e.g. 'authentication' */ key: string; /** Human readable lable of the seciton, e.g. 'Authentication' */ label: string | INodeFieldTranslations; /** Human readable description of the section, e.g. 'Configure authentication for this node' */ description?: string | INodeFieldTranslations; /** Condition whether this section should be rendered */ condition?: INodeFieldCondition_2_0; /** Whether the sections should be collapsed by default (default: false) */ defaultCollapsed: boolean; /** The fields that should be grouped in this section, points to 'key' of node-fields */ fields: string[]; /** Marks this section as deprecated and scheduled for removal */ deprecated?: INodeDeprecation; } /** * @openapi * * components: * schemas: * INodeFieldAndSectionFormElement_2_0: * type: object * properties: * key: * type: string * description: A key either pointing to a 'field -> key' or 'section -> key' * type: * type: string * description: The type of the pointer, either 'field' or 'section' * enum: * - field * - section */ export interface INodeFieldAndSectionFormElement_2_0 { /** A key either pointing to a 'field -> key' or 'section -> key' */ key: string; /** The type of the pointer, either 'field' or 'section' */ type: "field" | "section"; } export interface IIndexNodeDescriptorsRest_2_0 { resourceId: string; resourceType: TChartableResourceType; } export interface IIndexNodeDescriptorsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IOptionsResolverRestDataBody_2_0 extends IProjectScope { fieldKey: string; extension: string; nodeType: string; dependencies: { [fieldKey: string]: any; }; } /** * @openapi * components: * schemas: * IOptionsResolverRestReturnValue_2_0: * type: object * properties: * options: * type: array * items: * type: object * properties: * label: * type: string * value: * type: string */ export interface IOptionsResolverReturnData { label: string; value: string; } export interface IOptionsResolverRestReturnValue_2_0 { options: IOptionsResolverReturnData[]; } /** * @openapi * * components: * schemas: * ILearningSentenceIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * count: * type: integer * example: 42 * sentence: * type: string * example: How do you turn this on? */ export interface ILearningSentenceIndexItem_2_0 { _id: string; confirmedCount: number; rejectedCount: number; sentence: string; } export interface IIndexLearningSentencesRestDataParams_2_0 { flowId?: string; flowReferenceId: string; intentId: string; } export interface IIndexLearningSentencesRestData_2_0 extends IRestPagination, IIndexLearningSentencesRestDataParams_2_0 { } export interface IIndexLearningSentencesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILearningSentenceData_2_0: * type: object * properties: * confirmationCount: * type: integer * example: 42 * rejectedCount: * type: integer * example: 42 * sentence: * type: string * example: How do you turn this on? * * ILearningSentence_2_0: * allOf: * - $ref: '#/components/schemas/ILearningSentenceData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILearningSentence_2_0 { _id: string; confirmedCount: number; rejectedCount: number; sentence: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IReadLearningSentenceRestDataParams_2_0 { flowReferenceId: string; flowId?: string; learningSentenceId: string; } export interface IReadLearningSentenceRestData_2_0 extends IReadLearningSentenceRestDataParams_2_0 { } export interface IReadLearningSentenceRestReturnValue_2_0 extends ILearningSentence_2_0 { } export interface IDeleteLearningSentenceRestDataParams_2_0 { learningSentenceId: string; flowId?: string; flowReferenceId: string; } export interface IDeleteLearningSentenceRestData_2_0 extends IDeleteLearningSentenceRestDataParams_2_0 { } export interface IDeleteLearningSentenceRestReturnValue_2_0 { } export interface IReadAgentSettingsRestDataParams_2_0 extends IProjectScope { } export interface IReadAgentSettingsRestDataQuery_2_0 { /** Opt-in: attach the project's Voice Gateway default speech credentials as `voiceSettings`. */ includeVoiceSettings?: boolean; } export interface IReadAgentSettingsRestData_2_0 extends IReadAgentSettingsRestDataParams_2_0, IReadAgentSettingsRestDataQuery_2_0 { } /** One VG speech credential, reduced to what the UI needs to label and route it. */ export interface IProjectVoiceSettingsCredential_2_0 { /** VG credential id (24-hex). */ id: string; /** VG vendor, e.g. "microsoft", "google", "elevenlabs", or "custom:". */ vendor: string; name: string; } export interface IProjectVoiceSettings_2_0 { defaultTts: IProjectVoiceSettingsCredential_2_0 | null; defaultStt: IProjectVoiceSettingsCredential_2_0 | null; } export interface IReadAgentSettingsRestReturnValue_2_0 extends IAgentSettings_2_0 { /** * Present only when requested with `includeVoiceSettings=true`. * `null` when Voice Gateway could not be read. */ voiceSettings?: IProjectVoiceSettings_2_0 | null; } export interface IUpdateAgentSettingsRestDataBody_2_0 extends RecursivePartial> { } export interface IUpdateAgentSettingsRestDataParams_2_0 extends IProjectScope { } export interface IUpdateAgentSettingsRestData_2_0 extends IUpdateAgentSettingsRestDataBody_2_0, IUpdateAgentSettingsRestDataParams_2_0 { } export interface IUpdateAgentSettingsRestReturnValue_2_0 { } export interface ISetupCognigyGenerativeAIRestDataParams_2_0 extends IProjectScope { } export interface ISetupCognigyGenerativeAIRestData_2_0 extends ISetupCognigyGenerativeAIRestDataParams_2_0 { } export interface ISetupCognigyGenerativeAIRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ILocaleSettings_2_0: * type: object * properties: * localeReference: * $ref: '#/components/schemas/TMongoId' * inheritFallbackLocaleModel: * type: boolean */ export interface ILocaleSettings_2_0 { localeReference: string; inheritFallbackLocaleModel: boolean; } /** * @openapi * * components: * schemas: * IFlowSettingsData_2_0: * type: object * properties: * continueExecutionAfterAttachedFlow: * type: boolean * continueExecutionAterDefaultReply: * type: boolean * continueExecutionAfterNegativeConfirmation: * type: boolean * passDefaultRepliesIntoFlow: * type: boolean * flowIntentMappingOrder: * type: string * enum: ["joint", "main", "attached"] * useAttachedFlowThresholds: * type: boolean * useAttachedFlowContinueAfterDefaultReply: * type: boolean * useAttachedFlowPassDefaultRepliesIntoFlow: * type: boolean * implicitSlotParsing: * type: string * enum: ["disabled", "full", "system", "lexicon"] * useAttachedFlowImplicitSlotParsing: * type: boolean * lexiconSlotsWithSubMatches: * type: boolean * useIntentDefaultRepliesAsExamples: * description: 'Enable/Disable using default replies as training examples.' * type: boolean * localeSettings: * $ref: '#/components/schemas/ILocaleSettings_2_0' * * IFlowSettingsResponse_2_0: * type: object * properties: * continueExecutionAfterAttachedFlow: * type: boolean * continueExecutionAterDefaultReply: * type: boolean * continueExecutionAfterNegativeConfirmation: * type: boolean * passDefaultRepliesIntoFlow: * type: boolean * flowIntentMappingOrder: * type: string * enum: ["joint", "main", "attached"] * useAttachedFlowThresholds: * type: boolean * useAttachedFlowContinueAfterDefaultReply: * type: boolean * useAttachedFlowPassDefaultRepliesIntoFlow: * type: boolean * implicitSlotParsing: * type: string * enum: ["disabled", "full", "system", "lexicon"] * useAttachedFlowImplicitSlotParsing: * type: boolean * lexiconSlotsWithSubMatches: * type: boolean * useIntentDefaultRepliesAsExamples: * description: 'Enable/Disable using default replies as training examples.' * type: boolean * localeSettings: * type: array * items: * type: object * properties: * type: * $ref: '#/components/schemas/ILocaleSettings_2_0' * * IFlowSettings_2_0: * allOf: * - $ref: '#/components/schemas/IFlowSettingsResponse_2_0' * - $ref: '#/components/schemas/ISharedSettings_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IFlowSettings_2_0 extends ISharedSettings_2_0 { _id: string; continueExecutionAfterAttachedFlow: boolean; continueExecutionAfterDefaultReply: boolean; continueExecutionAfterNegativeConfirmation: boolean; passDefaultRepliesIntoFlow: boolean; flowIntentMappingOrder: "joint" | "main" | "attached"; useAttachedFlowThresholds: boolean; useAttachedFlowContinueAfterDefaultReply: boolean; useAttachedFlowPassDefaultRepliesIntoFlow: boolean; implicitSlotParsing: "disabled" | "full" | "system" | "lexicon"; useAttachedFlowImplicitSlotParsing: boolean; lexiconSlotsWithSubMatches: boolean; useIntentDefaultRepliesAsExamples: boolean; localeSettings: ILocaleSettings_2_0; } export interface IFlowSettingsResponse_2_0 extends Omit { localeSettings: ILocaleSettings_2_0[]; } export interface IReadFlowSettingsRestDataParams_2_0 { flowId: string; } export interface IReadFlowSettingsRestData_2_0 extends IReadFlowSettingsRestDataParams_2_0 { } export interface IReadFlowSettingsRestReturnValue_2_0 extends IFlowSettingsResponse_2_0 { } export interface IUpdateFlowSettingsRestDataBody_2_0 extends Partial> { } export interface IUpdateFlowSettingsRestDataParams_2_0 { flowId: string; } export interface IUpdateFlowSettingsRestData_2_0 extends IUpdateFlowSettingsRestDataBody_2_0, IUpdateFlowSettingsRestDataParams_2_0 { } export interface IUpdateFlowSettingsRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * INLUConnectorIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the NLUConnector * example: New NLUConnector * referenceId: * type: string * format: uuid * type: * $ref: '#/components/schemas/TNLUConnectorType_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface INLUConnectorIndexItem_2_0 { /** The Mongo id of the entity */ _id: TMongoId; /** * The name of the new NLUConnector resource */ name: string; /** * The type of the NLUConnector (e.g. DialogFlow) */ type: TNLUConnectorType_2_0; referenceId: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexNLUConnectorsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexNLUConnectorsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * INLUConnectorData_2_0: * type: object * properties: * name: * type: string * description: The name of the NLU Connector. * example: New NLUConnector * type: * $ref: '#/components/schemas/TNLUConnectorType_2_0' * settings: * oneOf: * - $ref: '#/components/schemas/IAlexaSettings_2_0' * - $ref: '#/components/schemas/IDialogFlowSettings_2_0' * - $ref: '#/components/schemas/ILuisSettings_2_0' * - $ref: '#/components/schemas/IWatsonSettings_2_0' * - $ref: '#/components/schemas/ILexSettings_2_0' * transformer: * $ref: '#/components/schemas/INLUTransformerFunction_2_0' * * INLUConnectorGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * INLUConnector_2_0: * allOf: * - $ref: '#/components/schemas/INLUConnectorData_2_0' * - $ref: '#/components/schemas/INLUConnectorGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface INLUConnector_2_0 { /** The Mongo id of the entity */ _id: TMongoId; /** * The name of the new NLUConnector resource */ name: string; referenceId: string; /** * The type of the NLUConnector (e.g. DialogFlow) */ type: TNLUConnectorType_2_0; /** * The NLUConnector specific settings. * Different for the various NLUConnector types. */ settings: AnyNLUConnectorSettings_2_0; transformer: INLUTransformerFunction_2_0; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * INLUTransformerFunction_2_0: * type: object * properties: * abortOnError: * type: boolean * description: If set to `true`, cancels message processing if the transformer throws an error. If set to `false`, processing continues. The default value is `false`. * example: false * transformerStackEnabled: * type: boolean * description: If set to `true`, writes the transformer data to the Input object in the Interaction Panel. The default value is `false`. * example: false * transformer: * type: string * description: The transformer's JavaScript source code. If the parameter is empty, a code template specific to the NLU Connector type is used. * preNluTransformerEnabled: * type: boolean * description: If set to `true`, runs the pre-NLU transformer when a message arrives. The transformer receives the incoming text and data, and can modify them before the NLU engine runs. Only relevant for external NLU. The default value is `false`. * example: false * postNluTransformerEnabled: * type: boolean * description: If set to `true`, runs the post-NLU transformer after the NLU engine has produced a result. The transformer receives the NLU engine result, text and data, and can modify them before the Flow is executed. The default value is `false`. * example: false * nluCodeTransformerEnabled: * type: boolean * description: If set to `true`, runs the code in the transformer editor in the NLU Connector settings on each message. Only relevant for Code and Cognigy NLU Connector types. The default value is `false`. * example: false */ export interface INLUTransformerFunction_2_0 { /** * If true, then we will * abort the message processing * if the transformer throws an * error. Otherwise, we will * continue with normal message * processing in the event of an error */ abortOnError: boolean; /** * If true, then we will * write the transformer stack * in the input object, * when the channel is adminconsole */ transformerStackEnabled: boolean; /** * The transformer object * as written by the user. * This will be displayed in the UI * since it includes typings. */ transformer: string; /** * The transformer object * written by the user, but * without typings. This will * be executed. */ transpiledTransformer?: string; preNluTransformerEnabled?: boolean; postNluTransformerEnabled?: boolean; nluCodeTransformerEnabled?: boolean; } /** * The different kinds of NLUConnector settings. */ export declare type AnyNLUConnectorSettings_2_0 = IAlexaSettings_2_0 | IDialogFlowSettings_2_0 | ILuisSettings_2_0 | IWatsonSettings_2_0 | ILexSettings_2_0; /** * @openapi * * components: * schemas: * IDialogFlowSettings_2_0: * type: object * description: The settings used by the DialogFlow NLU Connector. * properties: * dialogflowApiVersion: * type: integer * description: The version of the dialogflow API to use. * enum: * - 1 * - 2 * dialogflowProjectId: * type: string * description: The projectId of the Dialogflow Agent. * accessToken: * description: The access token used to authenticate requests. Used by DialogFlow. * type: string * privateKey: * type: string * description: The private key of a Google Service Account that has access rights to use the Dialogflow API. */ export interface IDialogFlowSettings_2_0 { /** * The version of the dialogflow * API to use. */ dialogflowApiVersion: 1 | 2; /** * The projectId of the Dialogflow * Agent. */ dialogflowProjectId: string; /** * The access token used to authenticate requests. * Used by DialogFlow. */ accessToken?: string; /** * The private key of a Google * Service Account that has the access * right to use the Dialogflow API. */ privateKey?: string; } /** * @openapi * * components: * schemas: * ILuisSettings_2_0: * type: object * description: The settings used by the LUIS NLU Connector. * properties: * authenticationURL: * type: string * description: The URL used to authenticate requests by LUIS. */ export interface ILuisSettings_2_0 { /** * The URL Used to authenticate requests by LUIS. */ authenticationURL: string; } /** * @openapi * * components: * schemas: * IWatsonSettings_2_0: * type: object * description: The settings used by the Watson NLU Connector. * properties: * apikey: * type: string * description: The API key for accessing the Watson NLU API. * workspaceid: * type: string * description: The skill ID for accessing the Assistant skill. * serviceURL: * type: string * description: The URL used to authenticate requests by Watson. */ export interface IWatsonSettings_2_0 { /** * Apikey for accessing the Watson NLU Api */ apikey: string; /** * Skill ID for accessing the Assistant skill */ workspaceId: string; /** * The URL used to authenticate requests by Watson */ serviceURL: string; } /** * @openapi * * components: * schemas: * ILexSettings_2_0: * type: object * description: The settings used by the Lex NLU Connector. * properties: * accessKeyId: * type: string * description: The API key for accessing the Lex NLU API. * secretAccessKey: * type: string * description: The secret access key for accessing the Lex NLU API. * awsRegion: * type: string * description: The AWS region the Lex bot is deployed to. * botId: * type: string * description: The ID of the Lex bot. * botAliasId: * type: string * description: The alias ID of the Lex bot. */ export interface ILexSettings_2_0 { /** * Access Key for accessing the Lex NLU Api */ accessKeyId: string; /** * Secret Access Key for accessing the Lex NLU Api */ secretAccessKey: string; /** * The AWS region the Lex bot is deployed */ awsRegion: string; /** * Id of the target Lex bot */ botId: string; /** * Id of the target Lex bot alias */ botAliasId: string; } /** * @openapi * * components: * schemas: * IAlexaSettings_2_0: * type: object * description: The settings used by the Alexa NLU Connector. * properties: * invocationName: * type: string * description: The invocation name of the Alexa skill. Necessary to start Alexa simulations. * reparseAlexaSlots: * type: boolean * description: If set to `true`, reparses slots from Alexa with the Keyphrase mapper. * skill: * $ref: '#/components/schemas/ISkill_2_0' */ export interface IAlexaSettings_2_0 { /** * The invocation name of the Alexa skill. * Necessary to start Alexa simulations. */ invocationName: string; /** * Whether to reparse slots from Alexa with our own keyphrase mapper. * Used by Alexa. */ reparseAlexaSlots: boolean; /** * Information about the skill the NLUConnector connects to. */ skill: ISkill_2_0; } /** * @openapi * * components: * schemas: * ISkill_2_0: * type: object * properties: * lastUpdated: * type: string * description: When the skill was last updated. * nameByLocale: * type: object * description: The name of the skill for different locales. * properties: * en-US: * type: string * de-DE: * type: string * ja-JP: * type: string * en-GB: * type: string * en-IN: * type: string * skillId: * type: string * description: The unique ID of the skill. * stage: * type: string * description: The current stage of the skill life cycle, for example, development, production. */ export interface ISkill_2_0 { /** * When the skill was last updated */ lastUpdated: string; /** * Gives the name of the skill for different locales in the format: * "en-US": "cognigy", * "de-DE": "german cognigy" */ nameByLocale: { "en-US"?: string; "de-DE"?: string; "ja-JP"?: string; "en-GB"?: string; "en-IN"?: string; }; /** * The unique id of the skill */ skillId: string; /** * The current stage of the skills life cycle (e.g. is it in development, production..) */ stage: string; } export declare type IBatchNLUConnectorsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchNLUConnectorsRestDataBody_2_0 { operations: IBatchNLUConnectorsRestOperationSet; } export interface IBatchNLUConnectorsRestDataQuery_2_0 extends IProjectScope { } export interface IBatchNLUConnectorsRestData_2_0 extends IBatchNLUConnectorsRestDataBody_2_0, IBatchNLUConnectorsRestDataQuery_2_0 { } export interface IBatchNLUConnectorsRestReturnValue_2_0 { } export interface ICreateNLUConnectorRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateNLUConnectorRestDataQuery_2_0 { resourceId?: string; } export interface ICreateNLUConnectorRestData_2_0 extends ICreateNLUConnectorRestDataBody_2_0, ICreateNLUConnectorRestDataQuery_2_0 { } export interface ICreateNLUConnectorRestReturnValue_2_0 extends INLUConnector_2_0 { } export interface IReadNLUConnectorRestDataParams_2_0 { nluConnectorId: string; } export interface IReadNLUConnectorRestData_2_0 extends IReadNLUConnectorRestDataParams_2_0 { } export interface IReadNLUConnectorRestReturnValue_2_0 extends INLUConnector_2_0 { } export interface IUpdateNLUConnectorRestDataBody_2_0 extends Partial> { } export interface IUpdateNLUConnectorRestDataParams_2_0 { nluConnectorId: string; } export interface IUpdateNLUConnectorRestData_2_0 extends IUpdateNLUConnectorRestDataBody_2_0, IUpdateNLUConnectorRestDataParams_2_0 { } export interface IUpdateNLUConnectorRestReturnValue_2_0 { } export interface IDeleteNLUConnectorRestDataParams_2_0 { nluConnectorId: string; } export interface IDeleteNLUConnectorRestData_2_0 extends IDeleteNLUConnectorRestDataParams_2_0 { } export interface IDeleteNLUConnectorRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IExtensionIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Extension * example: new-extension * label: * type: string * description: Optional human readable extension name * example: New Extension * version: * type: string * description: The version of the Extension * example: 1.0.0 * imageUrlToken: * type: string * format: alphanum-64 * description: A fully qualified URL to an image/icon for the extension. * description: * type: string * description: Optional description of the extension * example: This is a fancy extension * trustedCode: * type: boolean * deprecated: true * description: Deprecated and ignored. Extensions always run isolated on serverless. * providesNodes: * type: boolean * description: Indicates if the extension provides flow nodes. * providesKnowledgeConnectors: * type: boolean * description: Indicates if the extension provides knowledge connectors. * - $ref: '#/components/schemas/IEntityMeta' */ export interface IExtensionIndexItem_2_0 { _id: TMongoId; name: string; label?: string; version: string; imageUrlToken: string; description: string; /** @deprecated Ignored. Extensions always run isolated on serverless. */ trustedCode: boolean; providesNodes: boolean; providesKnowledgeConnectors: boolean; } export interface IIndexExtensionsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexExtensionsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue> { } export interface IUploadExtensionRestDataBody_2_0 extends IProjectScope { file?: File | Buffer; url?: string; name?: string; } export interface IUploadExtensionRestData_2_0 extends IUploadExtensionRestDataBody_2_0 { } export interface IUploadExtensionRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IUpdateExtensionPackageRestDataBody_2_0 { /** * Parameter that has the Id/name of the extension that needs to be updated * This will have Id for custom extension and name for extensions from * market place */ extension: TMongoId | string; /** * The project Id */ projectId: TMongoId; /** * The extension binary file or the buffer */ file?: File | Buffer; /** * Market place URL of the extension */ url?: string; } export interface IUpdateExtensionPackageRestData_2_0 extends IUpdateExtensionPackageRestDataBody_2_0 { } export interface IUpdateExtensionPackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * IConnectionSchemaIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * extension: * type: string * description: The package name of the extension this schema was found * example: azure * - $ref: '#/components/schemas/IEntityMeta' */ export interface IConnectionSchemaIndexItem_2_0 { /** The object id of the connection schema */ _id: TMongoId; /** The package name of the extension */ extension: string; /** The type of the connection, e.g. 'oauth' */ type: string; /** An additional label for the connection schema, by default the same as 'type' */ label: string; /** The actual fields of the connection schema */ fields: IConnectionSchemaField[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexConnectionSchemasRestData_2_0 extends IRestPagination, Partial { } export interface IIndexConnectionSchemasRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IConnectionSchemaData_2_0: * type: object * properties: * extension: * type: string * description: The package name of the extension * example: azure * type: * type: string * description: The type of the connection within the extension * example: oauth-2 * label: * type: string * description: The label for the connection type * example: OAuth-2 * fields: * type: array * items: * type: object * properties: * fieldName: * type: string * description: The name of the field * example: client_secret * * IConnectionSchema_2_0: * allOf: * - $ref: '#/components/schemas/IConnectionSchemaData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IConnectionSchema_2_0 { /** The object id of this connection schema */ _id: TMongoId; /** The package name of the extension */ extension: string; /** The type of the connection, e.g. 'oauth' */ type: string; /** An additional label for the connection schema */ label: string; /** The actual fields for the connection schema */ fields: IConnectionSchemaField[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * IExtensionData_2_0: * type: object * properties: * name: * type: string * description: The name of the Extension * example: New Extension * label: * type: string * description: The label of the Extension * example: New Extension * version: * type: string * description: The version of the Extension * pattern: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' * example: 1.0.0 * imageUrlToken: * type: string * format: alphanum-64 * description: A fully qualified URL to an image/icon for the extension. * description: * type: string * description: Optional description of the extension * tags: * type: array * description: Optional list of tags to find the extension * items: * type: string * author: * type: string * description: Author of the extension * extensionType: * type: string * description: Type of this extension * enum: * - nodes * trustedCode: * type: boolean * deprecated: true * description: Deprecated and ignored. Extensions always run isolated on serverless. * nodes: * $ref: '#/components/schemas/INodeDescriptor_2_0' * connections: * $ref: '#/components/schemas/IConnectionSchema_2_0' * knowledge: * $ref: '#/components/schemas/IKnowledgeDescriptor' * * IExtension_2_0: * allOf: * - $ref: '#/components/schemas/IExtensionData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IExtension_2_0 { /** The object id of the Extension */ _id: TMongoId; /** The name of the Extension */ name: string; /** The label of the Extension */ label: string; /** The version of the Extension */ version: string; /** Fully resolved image url */ imageUrlToken: string; /** Optional description of the extension */ description: string; /** Optional readme (can be e.g. markdown) */ readme: string; /** Optional list of tags to find the extension */ tags: string[]; /** Author of the extension */ author: string; /** Type of this extension, e.g. 'nodes' */ extensionType: IExtensionType; /** @deprecated Ignored. Extensions always run isolated on serverless. */ trustedCode: boolean; /** The node-descriptors within this extension */ nodes: INodeDescriptor_2_0[]; /** The connection schemas defined in this extension */ connections: IConnectionSchema_2_0[]; /** The knowledge-descriptors within this extension */ knowledge: IKnowledgeDescriptor[]; /** Unix-timestamp when the entity was created initially */ createdAt: number; /** Unix-timestamp when the entity was changed last time */ lastChanged: number; /** Id of the user who created the entity initially */ createdBy: TMongoId; /** Id of the user who did the last modification */ lastChangedBy: TMongoId; } export interface IReadExtensionRestDataParams_2_0 { extensionId: string; } export interface IReadExtensionRestData_2_0 extends IReadExtensionRestDataParams_2_0 { } export interface IReadExtensionRestReturnValue_2_0 extends IExtension_2_0, IProjectScope { } export interface IDeleteExtensionRestDataParams_2_0 { extensionId: string; } export interface IDeleteExtensionRestData_2_0 extends IDeleteExtensionRestDataParams_2_0 { } export interface IDeleteExtensionRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ISnapshotIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Snapshot * example: New Snapshot * description: * type: string * description: The description of the Snapshot * example: Version 1 * isPackaged: * type: boolean * description: Whether the Snapshot has already been packaged and is ready for download * packageExpiresAt: * type: number * description: The timestamp where the downloadable package expires * hash: * type: string * description: The hash of the Snapshot identifying the contents of the Snapshot * createdBy: * $ref: '#/components/schemas/TMongoId' * createdAt: * type: integer * minimum: 0 * maximum: 2147483647 * example: 1527621049 */ export interface ISnapshotIndexItem_2_0 { _id: TMongoId; /** * The name of the Snapshot. */ name: string; /** * The description of the Snapshot */ description: string; /** * The hash of the Snapshot identifying the contents of the Snapshot */ hash: string; createdAt: number; createdBy: TMongoId; isPackaged: boolean; packageExpiresAt: number; } export interface IIndexSnapshotsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexSnapshotsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IResourceInSnapshotItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Resource * example: New Resource * referenceId: * type: string * description: The reference ID of the resource * resourceType: * type: string * description: The type of resource * example: flow * createdBy: * $ref: '#/components/schemas/TMongoId' * createdAt: * type: integer * minimum: 0 * maximum: 2147483647 * example: 1527621049 */ export interface IResourceInSnapshotItem_2_0 { /** * The _id of the resource */ _id: TMongoId; /** * The reference ID of the resource */ referenceId: string; /** * The type of the resource, * e.g. "flow" */ resourceType: string; /** * The name of the resource */ name: string; /** * When the resource was created */ createdAt: string; /** * The user who created the resource */ createdBy: string; } export interface IIndexResourcesInSnapshotRestData_2_0 extends IRestPagination { snapshotId: string; resourceType: "flow" | "nluconnector" | "locale" | "flowState" | "largeLanguageModel" | "aiAgentV2"; /** Only applies when resourceType is "flow"; ignored otherwise. */ kind?: TFlowKind; } export interface IIndexResourcesInSnapshotRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ISnapshotData_2_0: * type: object * properties: * name: * type: string * description: The name of the Snapshot * example: New Snapshot * description: * type: string * description: The description of the Snapshot * example: Version 1 * * ISnapshotGeneratedData_2_0: * type: object * properties: * isPackaged: * type: boolean * description: Whether the Snapshot has already been packaged and is ready for download * _id: * $ref: '#/components/schemas/TMongoId' * hash: * type: string * description: The hash identifying the contents of the Snapshot * example: Version 1 * createdBy: * $ref: '#/components/schemas/TMongoId' * createdAt: * $ref: '#/components/schemas/TTimestamp' * * ISnapshot_2_0: * allOf: * - $ref: '#/components/schemas/ISnapshotData_2_0' * - $ref: '#/components/schemas/ISnapshotGeneratedData_2_0' */ export interface ISnapshot_2_0 { _id: TMongoId; /** * The name of the Snapshot. */ name: string; /** * The description of he Snapshot */ description: string; /** * The hash identifying the contents of the Snapshot */ hash: string; createdAt: number; createdBy: TMongoId; isPackaged: boolean; } export interface IReadSnapshotRestDataParams_2_0 { snapshotId: TMongoId; } export interface IReadSnapshotRestData_2_0 extends IReadSnapshotRestDataParams_2_0 { } export interface IReadSnapshotRestReturnValue_2_0 extends ISnapshot_2_0 { } export interface ICreateSnapshotRestDataBody_2_0 extends IProjectScope, Partial> { description: string; name: string; } export interface ICreateSnapshotRestData_2_0 extends ICreateSnapshotRestDataBody_2_0 { } export interface ICreateSnapshotRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IDeleteSnapshotRestDataParams_2_0 { snapshotId: string; } export interface IDeleteSnapshotRestData_2_0 extends IDeleteSnapshotRestDataParams_2_0 { } export interface IDeleteSnapshotRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IRestoreSnapshotRestDataParams_2_0 { snapshotId: string; } export interface IRestoreSnapshotRestData_2_0 extends IRestoreSnapshotRestDataParams_2_0 { } export interface IRestoreSnapshotRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IPackageSnapshotRestDataParams_2_0 { snapshotId: string; } export interface IPackageSnapshotRestData_2_0 extends IPackageSnapshotRestDataParams_2_0 { } export interface IPackageSnapshotRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IUploadSnapshotPackageRestDataBody_2_0 extends IProjectScope { file: File | Buffer; } export interface IUploadSnapshotPackageRestData_2_0 extends IUploadSnapshotPackageRestDataBody_2_0 { } export interface IUploadSnapshotPackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IComposeSnapshotDownloadLinkRestDataParams_2_0 { snapshotId: string; } export interface IComposeSnapshotDownloadLinkRestData_2_0 extends IComposeSnapshotDownloadLinkRestDataParams_2_0 { } export interface IComposeSnapshotDownloadLinkRestReturnValue_2_0 { downloadLink: string; } /** * @openapi * * components: * schemas: * IConnectionIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * referenceId: * type: string * description: The reference id of the Connection * example: 0f7b5514-e7a5-4947-ae44-7519a23c7403 * name: * type: string * description: The name of the Connection * example: azure * isDeprecated: * type: boolean * description: Marked 'true' if the connection type is deprecated * connectionSchema: * type: object * properties: * extension: * type: string * description: The package-name of the extension. * type: * type: string * description: The type of connection. * - $ref: '#/components/schemas/IEntityMeta' */ export interface IConnectionIndexItem_2_0 extends Pick { _id: TMongoId; referenceId: string; name: string; isDeprecated: boolean; extension: string; type: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexConnectionsRestData_2_0 extends IRestPagination, Pick, Partial { } export interface IIndexConnectionsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IConnectionDataFields_2_0: * type: object * properties: * fields: * type: object * description: The fields of the Connection. Key-Value pairs. The key should match the connection schema of the specific connection type. * minProperties: 1 * maxProperties: 10 * example: { "some-key-from-connection-schema": "x123sdfu12312" } * * IConnectionDataCreate_2_0: * allOf: * - type: object * properties: * name: * type: string * example: "some name" * isDeprecated: * type: boolean * description: Marked 'true' if the connection type is deprecated * type: * type: string * example: "http_basic" * extension: * type: string * example: "@cognigy/basic-nodes" * - $ref: '#/components/schemas/IConnectionDataFields_2_0' * * IConnectionData: * allOf: * - type: object * properties: * referenceId: * type: string * description: The reference id of the Connection * format: uuid * name: * type: string * description: The name of the Connection * example: Azure API * isDeprecated: * type: boolean * description: Marked 'true' if the connection type is deprecated * connectionSchema: * type: object * description: Identifies the schema which should be used to validate the connection fields. * properties: * extension: * type: string * description: The package-name of the extension. * example: 'azure' * type: * type: string * description: The type of the connection defined in the extension. * example: 'oauth2' * - $ref: '#/components/schemas/IConnectionDataFields_2_0' * * IConnection_2_0: * allOf: * - $ref: '#/components/schemas/IConnectionData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IConnection_2_0 extends Pick { referenceId: string; _id: TMongoId; name: string; isDeprecated: boolean; fields: IConnectionFields; extension: string; type: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export declare type IBatchConnectionsRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchConnectionsRestDataBody_2_0 { operations: IBatchConnectionsRestOperationSet; } export interface IBatchConnectionsRestDataQuery_2_0 extends IProjectScope { } export interface IBatchConnectionsRestData_2_0 extends IBatchConnectionsRestDataBody_2_0, IBatchConnectionsRestDataQuery_2_0 { } export interface IBatchConnectionsRestReturnValue_2_0 { } export interface ICreateConnectionRestDataBody_2_0 extends Partial, Partial> { } export interface ICreateConnectionRestData_2_0 extends ICreateConnectionRestDataBody_2_0 { } export interface ICreateConnectionRestReturnValue_2_0 extends IConnection_2_0 { } export interface IReadConnectionRestDataParams_2_0 { connectionId: string; } export interface IReadConnectionRestData_2_0 extends IReadConnectionRestDataParams_2_0 { } export interface IReadConnectionRestReturnValue_2_0 extends IConnection_2_0 { } export interface IUpdateConnectionRestDataBody_2_0 extends Partial> { } export interface IUpdateConnectionRestDataParams_2_0 { connectionId: string; } export interface IUpdateConnectionRestData_2_0 extends IUpdateConnectionRestDataBody_2_0, IUpdateConnectionRestDataParams_2_0 { } export interface IUpdateConnectionRestReturnValue_2_0 { } export interface IDeleteConnectionRestDataParams_2_0 { connectionId: string; } export interface IDeleteConnectionRestData_2_0 extends IDeleteConnectionRestDataParams_2_0 { } export interface IDeleteConnectionRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IConnectionData_2_0: * type: object * properties: * key: * type: string * description: The key of the connection field. The key should match the connection schema of the specific connection type. * example: some-key-from-connection-schema * value: * type: string * description: The value of the connection field * example: x123w123 */ export interface IConnectionField_2_0 { key: string; value: string; } export interface ICreateConnectionFieldRestDataParams_2_0 { connectionId: string; } export interface ICreateConnectionFieldRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateConnectionFieldRestData_2_0 extends ICreateConnectionFieldRestDataParams_2_0, ICreateConnectionFieldRestDataBody_2_0 { } export interface ICreateConnectionFieldRestReturnValue_2_0 { } export interface IDeleteConnectionFieldRestDataParams_2_0 { connectionId: string; fieldName: string; } export interface IDeleteConnectionFieldRestData_2_0 extends IDeleteConnectionFieldRestDataParams_2_0 { } export interface IDeleteConnectionFieldRestReturnValue_2_0 { } /** * Type definitions for CXone nodes */ /** * Handover action type */ export declare type HandoverAction = "End" | "Escalate"; /** * Sanitized summary of a CXOne Knowledge Hub, safe to pass to a client (browser). * Deliberately excludes everything else the real config API returns for a KB * (data sources, connector configuration, embedded credentials/tokens, etc.). */ export interface ICXOneKnowledgeHubSummary { id: string; name: string; status: string; } export interface IListCxOneKnowledgeHubsRestData_2_0 { } export interface IListCxOneKnowledgeHubsRestReturnValue_2_0 { knowledgeHubs: ICXOneKnowledgeHubSummary[]; } declare const slotFillerTypesGeneric: readonly [ "age", "date", "duration", "email", "intent", "slot", "money", "number", "percentage", "regex", "temperature" ]; declare const slotFillerTypesRegex: readonly [ "regex" ]; declare const slotFillerTypesSlot: readonly [ "slot" ]; export declare type TSlotFillerTypeGeneric = typeof slotFillerTypesGeneric[number]; export declare type TSlotFillerTypeRegex = typeof slotFillerTypesRegex[number]; export declare type TSlotFillerTypeSlot = typeof slotFillerTypesSlot[number]; /** * @openapi * components: * schemas: * TSlotFillerType: * description: The type of the Slot Filler. * type: string * example: age * enum: * - age * - date * - duration * - email * - intent * - slot * - money * - number * - percentage * - regex * - temperature */ export declare type TSlotFillerType = TSlotFillerTypeGeneric | TSlotFillerTypeRegex | TSlotFillerTypeSlot; /** * @openapi * * components: * schemas: * ISlotFillerIndexItemData_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * example: pizza * type: * $ref: '#/components/schemas/TSlotFillerType' * referenceId: * type: string * * ISlotFillerIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/ISlotFillerIndexItemData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * */ export interface ISlotFillerIndexItem_2_0 { /** The Mongo id of the entity */ _id: TMongoId; name: string; type: TSlotFillerType; referenceId: string; /** Unix-timestamp when the entity was created initially */ createdAt: TTimestamp; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; /** The mongoId of the user who created the entity initially */ createdBy: TMongoId; /** The mongoId of the user who did the last modification */ lastChangedBy: TMongoId; } export interface IIndexSlotFillersRestDataParams_2_0 { flowId: string; } export interface IIndexSlotFillersRestData_2_0 extends IRestPagination, IIndexSlotFillersRestDataParams_2_0 { } export interface IIndexSlotFillersRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ISlotFillerBase_2_0 { referenceId: string; name: string; usePositiveOnly: boolean; removeNegated: boolean; storeResultInContext: boolean; contextKey: string; storeInContactProfile: boolean; profileKey: string; storeDetailedResults: boolean; skipIfResultInContext: boolean; additionalValidation: string; resultLocation: string; /** The Mongo id of the entity */ _id: TMongoId; /** Unix-timestamp when the entity was created initially */ createdAt: TTimestamp; /** Unix-timestamp when the entity was changed last time */ lastChanged: TTimestamp; /** The mongoId of the user who created the entity initially */ createdBy: TMongoId; /** The mongoId of the user who did the last modification */ lastChangedBy: TMongoId; } export interface ISlotFillerKeyphrase_2_0 extends ISlotFillerBase_2_0 { type: Extract; slot: string; } export interface ISlotFillerRegex_2_0 extends ISlotFillerBase_2_0 { type: Extract; regex: string; } export interface ISlotFillerGeneric_2_0 extends ISlotFillerBase_2_0 { type: Exclude; } /** * @openapi * * components: * schemas: * ISlotFillerData_2_0: * description: The payload for creating or updating a Slot Filler. * type: object * properties: * name: * type: string * description: The display name of the Slot Filler. * type: * $ref: '#/components/schemas/TSlotFillerType' * usePositiveOnly: * type: boolean * description: If set to `true`, extracts only Slots from predefined Keyphrases. * storeResultInContext: * type: boolean * description: If set to `true`, stores the result in the Context object. * contextKey: * type: string * description: The key used to store the result in the Context object. * storeInContactProfile: * type: boolean * description: If set to `true`, the result is stored in the Contact Profile. * profileKey: * type: string * description: The key used to store the result in the Contact Profile. * storeDetailedResults: * type: boolean * description: If set to `true`, stores metadata about the extracted Slot. * skipIfResultInContext: * type: boolean * description: If set to `true`, the user input isn't checked for the Slot that is already in the Context object. * additionalValidation: * type: string * description: The additional validation expression or script. * resultLocation: * type: string * description: Determines where to extract the Slot value from. By default, the Slot value is extracted from the user input. You can set a CognigyScript expression in this parameter to override the detected Slot value with a value from the [Input, Context, or Profile objects](/ai/agents/develop/ai-agent-memory/overview). This parameter works only if the user input is recognized and the CognigyScript expression doesn't resolve to a falsy value. * regex: * type: string * description: The regex pattern to extract specific data from the user input. Used only when the Slot Filler type is `regex`. * slot: * type: string * description: Specifies which Slot this Filler is associated with, for example, `date` or `airport_code`. Used only when the Slot Filler type is `slot`. * * ISlotFillerGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * ISlotFiller_2_0: * allOf: * - $ref: '#/components/schemas/ISlotFillerData_2_0' * - $ref: '#/components/schemas/ISlotFillerGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export declare type ISlotFiller_2_0 = ISlotFillerGeneric_2_0 | ISlotFillerRegex_2_0 | ISlotFillerKeyphrase_2_0; export declare type IBatchSlotFillersRestOperationSet = (IBatchActionOperation<"create", Omit> | IBatchActionOperation<"update", Omit> | IBatchActionOperation<"delete">)[]; export interface IBatchSlotFillersRestDataBody_2_0 { operations: IBatchSlotFillersRestOperationSet; } export interface IBatchSlotFillersRestDataParams_2_0 { flowId: string; } export interface IBatchSlotFillersRestData_2_0 extends IBatchSlotFillersRestDataBody_2_0, IBatchSlotFillersRestDataParams_2_0 { } export interface IBatchSlotFillersRestReturnValue_2_0 { created: string[]; updated: string[]; deleted: string[]; } export interface ICreateSlotFillerRestDataBody_2_0 extends Partial> { } export interface ICreateSlotFillerRestDataParams_2_0 { flowId: string; } export interface ICreateSlotFillerRestData_2_0 extends ICreateSlotFillerRestDataBody_2_0, ICreateSlotFillerRestDataParams_2_0 { } export declare type ICreateSlotFillerRestReturnValue_2_0 = ISlotFiller_2_0; export interface IReadSlotFillerRestDataParams_2_0 { flowId: string; slotFillerId: string; } export interface IReadSlotFillerRestData_2_0 extends IReadSlotFillerRestDataParams_2_0 { } export declare type IReadSlotFillerRestReturnValue_2_0 = ISlotFiller_2_0; export interface IUpdateSlotFillerRestDataBody_2_0 extends Partial> { } export interface IUpdateSlotFillerRestDataParams_2_0 { flowId: string; slotFillerId: string; } export interface IUpdateSlotFillerRestData_2_0 extends IUpdateSlotFillerRestDataBody_2_0, IUpdateSlotFillerRestDataParams_2_0 { } export interface IUpdateSlotFillerRestReturnValue_2_0 { } export interface IDeleteSlotFillerRestDataParams_2_0 { flowId: string; slotFillerId: string; } export interface IDeleteSlotFillerRestData_2_0 extends IDeleteSlotFillerRestDataParams_2_0 { } export interface IDeleteSlotFillerRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IFunctionIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the function * example: New Function * code: * type: string * description: The code of the function * example: console.log('Hello World'); * referenceId: * type: string * format: uuid * isDisabled: * type: boolean * - $ref: '#/components/schemas/IEntityMeta' */ export interface IFunctionIndexItem_2_0 { _id: TMongoId; /** The referenceId id.*/ referenceId: string; /** Whether the function is disabled */ isDisabled: boolean; /** The name of the function resource */ name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexFunctionsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexFunctionsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IFunctionData_2_0: * type: object * properties: * name: * type: string * code: * type: string * isDisabled: * type: boolean * IFunction_2_0: * allOf: * - $ref: '#/components/schemas/IFunctionData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IFunction_2_0 { _id: TMongoId; /** The referenceId id.*/ referenceId: string; /** Whether the function is disabled */ isDisabled: boolean; /** The name of the function resource */ name: string; /** The code of the function */ code: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface ICreateFunctionRestDataBody_2_0 extends Partial, IProjectScope { } export interface ICreateFunctionRestData_2_0 extends ICreateFunctionRestDataBody_2_0 { } export interface ICreateFunctionRestReturnValue_2_0 extends IFunction_2_0 { } export interface IReadFunctionRestDataParams_2_0 { functionId: string; } export interface IReadFunctionRestData_2_0 extends IReadFunctionRestDataParams_2_0 { } export interface IReadFunctionRestReturnValue_2_0 extends IFunction_2_0 { } export interface IUpdateFunctionRestDataBody_2_0 extends Partial> { } export interface IUpdateFunctionRestDataParams_2_0 { functionId: TMongoId; } export interface IUpdateFunctionRestData_2_0 extends IUpdateFunctionRestDataBody_2_0, IUpdateFunctionRestDataParams_2_0 { } export interface IUpdateFunctionRestReturnValue_2_0 { } export interface IDeleteFunctionRestDataParams_2_0 { functionId: string; } export interface IDeleteFunctionRestData_2_0 extends IDeleteFunctionRestDataParams_2_0 { } export interface IDeleteFunctionRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * TFunctionInstanceTrigger_2_0: * type: string * enum: * - flow * - manual * description: How was this function instance triggered, e.g. was it spawned while executing a Flow? * example: 'flow' */ export declare type TFunctionInstanceTrigger_2_0 = "flow" | "manual"; /** * @openapi * * components: * schemas: * TFunctionInstanceStatus_2_0: * type: string * enum: * - queued * - active * - done * - error * description: The current state of the instance. New instances are in the 'queued' state, while running ones are in 'active' state. * example: 'active' */ export declare type TFunctionInstanceStatus_2_0 = "queued" | "active" | "done" | "error"; /** * @openapi * * components: * schemas: * IFunctionInstanceIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * trigger: * $ref: '#/components/schemas/TFunctionInstanceTrigger_2_0' * status: * $ref: '#/components/schemas/TFunctionInstanceStatus_2_0' * error: * type: string * createdAt: * $ref: '#/components/schemas/TTimestamp' * finishedAt: * $ref: '#/components/schemas/TTimestamp' */ export interface IFunctionInstanceIndexItem_2_0 { /** The object id of the function instance */ _id: TMongoId; /** How the instance was triggered/started */ trigger: TFunctionInstanceTrigger_2_0; /** The current status of the function instance */ status: TFunctionInstanceStatus_2_0; /** The error message in case there was an error */ error: string; /** Unix-timestamp when the instance was created/spawned */ createdAt: number; /** Unix-timestamp when the instance was stopped/finished execution */ finishedAt: number; } /** * @openapi * * components: * schemas: * IFunctionInstanceData_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * functionReference: * $ref: '#/components/schemas/TMongoId' * trigger: * $ref: '#/components/schemas/TFunctionInstanceTrigger_2_0' * status: * $ref: '#/components/schemas/TFunctionInstanceStatus_2_0' * error: * type: string * createdAt: * $ref: '#/components/schemas/TTimestamp' * finishedAt: * $ref: '#/components/schemas/TTimestamp' * IFunctionInstance_2_0: * allOf: * - $ref: '#/components/schemas/IFunctionInstanceData_2_0' */ export interface IFunctionInstance_2_0 { /** The object id of the function instance */ _id: TMongoId; /** The object id of the function this instance belongs to */ functionId: TMongoId; parameters: { traceId?: string; userId?: string; sessionId?: string; flowReferenceId?: string; [key: string]: any; }; /** How the instance was triggered/started */ trigger: TFunctionInstanceTrigger_2_0; /** The current status of the function instance */ status: TFunctionInstanceStatus_2_0; /** The error message in case there was an error */ error: string; /** Unix-timestamp when the instance was created/spawned */ createdAt: number; /** Unix-timestamp when the instance was stopped/finished execution */ finishedAt: number; } export interface IIndexFunctionInstancesRestDataParams_2_0 { functionId: TMongoId; } export interface IIndexFunctionInstancesRestData_2_0 extends IRestPagination, IIndexFunctionInstancesRestDataParams_2_0, Partial { } export interface IIndexFunctionInstancesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadFunctionInstanceRestDataParams_2_0 { functionId: string; functionInstanceId: string; } export interface IReadFunctionInstanceRestData_2_0 extends IReadFunctionInstanceRestDataParams_2_0 { } export interface IReadFunctionInstanceRestReturnValue_2_0 extends IFunctionInstance_2_0 { } export interface ITriggerFunctionRestDataParams_2_0 { functionId: TMongoId; } export interface ITriggerFunctionRestDataBody_2_0 { parameters: { [key: string]: unknown; }; } export interface ITriggerFunctionRestData_2_0 extends ITriggerFunctionRestDataBody_2_0, ITriggerFunctionRestDataParams_2_0 { } export interface ITriggerFunctionRestReturnValue_2_0 { functionInstanceId: TMongoId; } export interface IStopFunctionInstanceRestDataParams_2_0 { functionId: TMongoId; functionInstanceId: TMongoId; } export interface IStopFunctionInstanceRestData_2_0 extends IStopFunctionInstanceRestDataParams_2_0 { } export interface IStopFunctionInstanceRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IPackageIndexItem_2_0: * allOf: * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * description: The name of the Package * example: New Package * description: * type: string * description: The description of the Package * example: Version 1 * hash: * type: string * description: The hash of the Package identifying the contents of the Package * createdBy: * $ref: '#/components/schemas/TMongoId' * createdAt: * $ref: '#/components/schemas/TTimestamp' */ export interface IPackageIndexItem_2_0 { /** The object id of the Package */ _id: TMongoId; /** * The name of the Package. */ name: string; /** * The description of the Package */ description: string; /** * The hash of the Package identifying the contents of the Package */ hash: string; /** Unix-timestamp when the entity was created initially */ createdAt: number; /** Id of the user who created the entity initially */ createdBy: TMongoId; } export interface IIndexPackagesRestData_2_0 extends IRestPagination, Partial { } export interface IIndexPackagesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IPackageData_2_0: * type: object * properties: * name: * type: string * description: The name of the Package * example: New Package * description: * type: string * description: The description of the Package * example: Version 1 * * IPackageGeneratedData_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * hash: * type: string * description: The hash identifying the contents of the Package * example: Version 1 * createdBy: * $ref: '#/components/schemas/TMongoId' * createdAt: * $ref: '#/components/schemas/TTimestamp' * * IPackageDataCreate_2_0: * allOf: * - $ref: '#/components/schemas/IPackageData_2_0' * - type: object * properties: * resourceIds: * type: array * items: * $ref: '#/components/schemas/TMongoId' * * IPackage_2_0: * allOf: * - $ref: '#/components/schemas/IPackageData_2_0' * - $ref: '#/components/schemas/IPackageGeneratedData_2_0' */ export interface IPackage_2_0 { _id: TMongoId; /** * The name of the Package. */ name: string; /** * The description of he Package */ description: string; /** * The hash identifying the contents of the Package */ hash: string; createdAt: number; createdBy: TMongoId; } export interface IReadPackageRestDataParams_2_0 { packageId: TMongoId; } export interface IReadPackageRestData_2_0 extends IReadPackageRestDataParams_2_0 { } export interface IReadPackageRestReturnValue_2_0 extends IPackage_2_0 { } export interface ICreatePackageRestDataBody_2_0 extends IProjectScope, Partial> { description?: string; name: string; resourceIds: TMongoId[]; } export interface ICreatePackageRestData_2_0 extends ICreatePackageRestDataBody_2_0 { } export interface ICreatePackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IDeletePackageRestDataParams_2_0 { packageId: string; } export interface IDeletePackageRestData_2_0 extends IDeletePackageRestDataParams_2_0 { } export interface IDeletePackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * IStrategy_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * rename: * type: string * description: explicitly sets a new name for the imported resource * example: "new flow" * autoRename: * type: boolean * description: | * If set to true, will append a "counter-suffix" to the name in * case the name already exists in the agent. * default: true * example: true * identityConflictStrategy: * type: string * description: | * Defines what should be done in case the agent already contains a resource * with the same id. * default: abort * enum: * - replace * - re-identify * - abort * - merge * mergeStrategy: * type: object * properties: * replaceContent: * type: boolean * replaceStructure: * type: boolean * localeOverrides: * type: array * items: * type: object * properties: * replaceContent: * type: boolean * localeId: * type: string */ export interface IStrategy_2_0 { /** the id of the resource from the package that should be imported */ _id: string; /** explicitly sets a new name for the imported resource */ rename?: string; /** * If set to true, will append a "counter-suffix" to the name in case the * name already exists in the agent. * * @default true */ autoRename?: boolean; /** * Defines what should be done in case the agent already contains a resource * with the same id. * * replace causes the imported resource to replace the resource in the agent * re-identify causes the imported resource to get a new reference id and to * be put next to the original one * abort causes the request to be rejected in case there is an identity * conflict (this means nothing gets imported at all) * * @default abort */ identityConflictStrategy?: "replace" | "re-identify" | "abort" | "merge"; mergeStrategy?: { replaceContent: boolean; replaceStructure: boolean; localeOverrides?: { localeId: string; replaceContent: boolean; }[]; }; } export interface IMergePackageRestDataBody_2_0 { resourceIds: TMongoId[]; strategies?: IStrategy_2_0[]; localeMapping: { agentLocaleId: TMongoId; packageLocaleId: TMongoId; }[]; } export interface IMergePackageRestDataParams_2_0 { packageId: string; } export interface IMergePackageRestData_2_0 extends IMergePackageRestDataBody_2_0, IMergePackageRestDataParams_2_0 { } export interface IMergePackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IUploadPackageRestDataBody_2_0 extends IProjectScope { file: File | Buffer; } export interface IUploadPackageRestData_2_0 extends IUploadPackageRestDataBody_2_0 { } export interface IUploadPackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IComposePackageDownloadLinkRestDataParams_2_0 { packageId: string; } export interface IComposePackageDownloadLinkRestData_2_0 extends IComposePackageDownloadLinkRestDataParams_2_0 { } export interface IComposePackageDownloadLinkRestReturnValue_2_0 { downloadLink: string; } export interface ICreateChartNodeBasicNodesData extends Partial, TReferenceAndEntityMetaKeys | "type" | "extension">> { type: T; extension?: E; } export interface IPlaceholderNodeParams extends INodeFunctionBaseParams { config: { text: string; data: string; }; } export interface IDatePickerConfig { datepicker_eventName: string; datepicker_locale: string; datepicker_dateFormat: string; datepicker_time24Hours: boolean; datepicker_defaultDate: string; datepicker_minDate: string; datepicker_maxDate: string; datepicker_wantEnableDisable: "none" | "enable" | "disable"; datepicker_disableEnableRange: boolean; datepicker_enabledDates: string[]; datepicker_disabledDates: string[]; datepicker_enableTime: boolean; datepicker_mode: "single" | "multiple" | "range"; datepicker_openPickerButtonText: string; datepicker_cancelButtonText: string; datepicker_submitButtonText: string; datepicker_defaultHour: number; datepicker_defaultMinute: number; datepicker_enableSeconds: boolean; datepicker_hourIncrement: number; datepicker_minuteIncrement: number; datepicker_noCalendar: boolean; datepicker_weekNumbers: boolean; datepicker_hidePicker: boolean; datepicker_functionEnable: string; datepicker_functionDisable: string; } export interface IDatePickerNodeParams extends INodeFunctionBaseParams { config: IDatePickerConfig; } export declare type ISayNodeParams = ISayParams; export interface IContinuousASRParams extends INodeFunctionBaseParams { config: { asrEnabled: boolean; asrDigit: string; asrTimeout: number; }; } export interface IDTMFParams extends INodeFunctionBaseParams { config: { dtmfEnable: boolean; dtmfInterDigitTimeout: number; dtmfMaxDigits: number; dtmfSubmitDigit: string; }; } export interface IHangupParams extends INodeFunctionBaseParams { config: { hangupReason: string; }; } export interface IUserNoInputParams extends INodeFunctionBaseParams { config: { userNoInputMode: TVoiceGateway2UserNoInputMode; userNoInputTimeout: number; userNoInputRetries: number; userNoInputSpeech: string; userNoInputUrl: string; }; } export interface IVoiceConfigParams { bargeInMinWordCount: number; bargeInOnSpeech: boolean; bargeInOnDtmf: boolean; bargeInSticky: boolean; enableAdvancedSTTConfig: boolean; sttLanguage: string; sttVendor: string; sttHints: string[]; sttHintsDynamicHints: string[] | undefined; sttDisablePunctuation: boolean; sttVadEnabled: boolean; sttVadMode: number; sttVadVoiceMs: number; sttLabel: string; sttListenDuringPrompt: boolean; ttsDisableCache: boolean; ttsVoice: string; ttsLanguage: string; ttsModel: string; ttsVendor: string; ttsEngine: string; ttsLabel: string; azureSttContextId: string; azureSpeechRecognitionMode: string; azureEnableAudioLogging: boolean; azureHintsBoost: number; azureProfanityOption: "masked" | "removed" | "raw"; googleDisablePunctuation: boolean; googleInteractionType: string; googleHintsBoost: number; googleModel: string; googleModelCustom: string; userNoInputMode: TVoiceGateway2UserNoInputMode; userNoInputTimeout: number; userNoInputTimeoutEnable: boolean; userNoInputRetries: number; userNoInputSpeech: string; userNoInputUrl: string; flowNoInputTimeoutEnable: boolean; flowNoInputTimeout: number; flowNoInputMode: TVoiceGateway2FlowNoInputMode; flowNoInputRetries: number; flowNoInputSpeech: string; flowNoInputUrl: string; flowNoInputFail: boolean; dtmfEnable: boolean; dtmfInterDigitTimeout: number; dtmfMaxDigits: number; dtmfMinDigits: number; dtmfSubmitDigit: string; asrDigit: string; asrEnabled: boolean; asrTimeout: number; sessionParams: IVoiceGateway2ActivityParams; recognizeLanguagesAzure: boolean; sttAzure: string; sttAzureLang1: string; sttAzureLang2: string; sttAzureLang3: string; recognizeLanguagesGoogle: boolean; sttGoogle: string; sttGoogleLang1: string; sttGoogleLang2: string; sttGoogleLang3: string; sttModel: string; deepgramEndpointing: boolean; deepgramEndpointingValue: number; deepgramSmartFormatting: boolean; deepgramfluxEndpointing: boolean; deepgramfluxEndOfTurnThreshold: number; deepgramfluxEndOfTurnTimeoutMs: number; speechmaticsEndpointing: boolean; speechmaticsEndpointingValue: number; openaiEndpointing: boolean; openaiEndpointingValue: number; niceEndpointing: boolean; niceEndpointingValue: number; atmosphereAction: TVoiceGateway2DubActionType; atmosphereUrl: string; atmosphereLoop: boolean; atmosphereVolume: number; silenceOverlayAction: boolean | string; silenceOverlayURL: string; silenceOverlayDelay: number; } export interface ISetSessionConfigParams extends INodeFunctionBaseParams { config: IVoiceConfigParams; input?: any; context?: any; } export interface IPlayParamsConfig extends IVoiceConfigParams { url: string; loop: number; urlCaching: boolean; setActivityParams: boolean; } export interface IPlayParams extends INodeFunctionBaseParams { config: IPlayParamsConfig; } export interface ITransferParams extends INodeFunctionBaseParams { config: { transferReason: string; referTo: string; referredBy: string; useTransferSipHeaders: boolean; transferSipHeaders: any; }; } export interface IBargeInParams extends INodeFunctionBaseParams { config: { bargeInEnable: boolean; bargeInMinWordCount: number; bargeInOnSpeech: boolean; bargeInOnDtmf: boolean; bargeInSticky: boolean; dtmfEnable: boolean; dtmfInterDigitTimeout: number; dtmfMaxDigits: number; dtmfSubmitDigit: string; }; } export interface ISendMetadataParams extends INodeFunctionBaseParams { config: { metadata: { [key: string]: string; }; }; } export interface IMuteSpeechInputParamsConfig { muteSpeechInput: boolean; muteDtmfInput: boolean; } export interface IMuteSpeechInputParams extends INodeFunctionBaseParams { config: IMuteSpeechInputParamsConfig; } export interface IVoiceConfigParams { enableAdvancedSTTConfig: boolean; sttLanguage: string; sttVendor: string; sttHints: string[]; sttHintsDynamicHints: string[] | undefined; ttsVoice: string; ttsLanguage: string; ttsVendor: string; ttsModel: string; sttDisablePunctuation: boolean; azureSttContextId: string; azureEnableAudioLogging: boolean; googleModel: string; sttModel: string; deepgramEndpointing: boolean; deepgramEndpointingValue: number; deepgramSmartFormatting: boolean; deepgramfluxEndpointing: boolean; deepgramfluxEndOfTurnThreshold: number; deepgramfluxEndOfTurnTimeoutMs: number; niceEndpointing: boolean; niceEndpointingValue: number; } export interface ISessionSpeechParams extends INodeFunctionBaseParams { config: IVoiceConfigParams; } export interface IActivateProfileNodeParams extends INodeFunctionBaseParams { config: never; } export interface ICompleteGoalNodeParams extends INodeFunctionBaseParams { config: { goal: string; }; } export interface IDeactivateProfileNodeParams extends INodeFunctionBaseParams { config: { deleteData: boolean; maskAndKeepAnalytics?: boolean; }; } export interface IDeleteProfileNodeParams extends INodeFunctionBaseParams { config: { maskAndKeepAnalytics?: boolean; }; } export interface IMergeProfileNodeParams extends INodeFunctionBaseParams { config: { contactId: string; }; } export interface IUpdateProfileNodeParams extends INodeFunctionBaseParams { config: { key: string; value: string; }; } export interface IAddMemoryNodeParams extends INodeFunctionBaseParams { config: { memory: string; }; } export interface IBlindModeNodeParams extends INodeFunctionBaseParams { config: { maskLogging: boolean; maskAnalytics: boolean; disableIntentTrainer: boolean; disableConversations: boolean; }; } export interface IOverwriteAnalyticsParams extends INodeFunctionBaseParams { config: { customDesc: string; defaultDesc: string; custom1: string; custom2: string; custom3: string; custom4: string; custom5: string; custom6: string; custom7: string; custom8: string; custom9: string; custom10: string; intent: string; intentScore: number; inputText: string; inputData: any; state: string; slots: any; completedGoals: string[]; understood: boolean; handoverEscalations: number; }; } export interface ISetRatingParams extends INodeFunctionBaseParams { config: { rating: number; ratingComment: string; }; } export interface IRequestRatingNodeParams extends INodeFunctionBaseParams { config: { ratingScreenTitleText: string; ratingTitleText: string; ratingCommentText: string; ratingSubmitButtonText: string; ratingEventBannerText: string; ratingChatStatusMessage: string; }; } export interface ITrackGoalNodeParams extends INodeFunctionBaseParams { config: { goal: { goalId: string; name: string; description?: string; referenceId: string; version: string; selectedSteps: { stepId: string; name: string; type: string; description?: string; order?: number; metrics?: IGoalDefinitionStepMetric[]; }[]; }; }; } export interface IInitAppSessionNodeParams extends INodeFunctionBaseParams { appInterimScreenOverride?: string; appConnectScreenOverride?: string; } export interface IGetAppSessionPinNodeParams extends INodeFunctionBaseParams { } export declare type TCardType = "basic" | "suggested" | "table" | "custom"; export interface IAssistInfoNodeParams extends INodeFunctionBaseParams { config: { cardType: TCardType; title: string; subtitle: string; body: string; basicImage?: string; basicActionTitle?: string; basicActionUrl?: string; suggestedActionTitles: string[]; tableFacts: JSON; customJson: JSON; }; } export interface ICognigyMongoNodes { "mongoFind": ICreateChartNodeBasicNodesData<"mongoFind", IMongoFindNodeParams, TMONGO_DB_EXTENSION>; "mongoFindOne": ICreateChartNodeBasicNodesData<"mongoFindOne", IMongoFindOneNodeParams, TMONGO_DB_EXTENSION>; "mongoInsert": ICreateChartNodeBasicNodesData<"mongoInsert", IMongoInsertNodeParams, TMONGO_DB_EXTENSION>; "mongoUpdateOne": ICreateChartNodeBasicNodesData<"mongoUpdateOne", IMongoUpdateOneNodeParams, TMONGO_DB_EXTENSION>; "mongoUpdateMany": ICreateChartNodeBasicNodesData<"mongoUpdateMany", IMongoUpdateManyNodeParams, TMONGO_DB_EXTENSION>; "mongoRemove": ICreateChartNodeBasicNodesData<"mongoRemove", IMongoRemoveNodeParams, TMONGO_DB_EXTENSION>; "mongoAggregate": ICreateChartNodeBasicNodesData<"mongoAggregate", IMongoAggregateNodeParams, TMONGO_DB_EXTENSION>; } export interface ISqlRunQueryNodeParams extends INodeFunctionBaseParams { config: { connection: ISQLConnectionFields; query: string; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; }; } export interface ISqlRunTransactionNodeParams extends INodeFunctionBaseParams { config: { connection: ISQLConnectionFields; query: string; storeLocation: string; contextKey: string; inputKey: string; stopOnError: boolean; }; } export interface ISqlRunStoredProcedureNodeParams extends INodeFunctionBaseParams { config: { connection: ISQLConnectionFields; storedProcedure: string; inputs: object; outputs: object; storeLocation: "input" | "context"; contextKey: string; inputKey: string; stopOnError: boolean; }; } export interface ICognigySqlNodes { "sqlRunQuery": ICreateChartNodeBasicNodesData<"sqlRunQuery", ISqlRunQueryNodeParams, TSQL_EXTENSION>; "sqlRunTransaction": ICreateChartNodeBasicNodesData<"sqlRunTransaction", ISqlRunTransactionNodeParams, TSQL_EXTENSION>; "sqlRunStoredProcedure": ICreateChartNodeBasicNodesData<"sqlRunStoredProcedure", ISqlRunStoredProcedureNodeParams, TSQL_EXTENSION>; } export interface ICognigySMTPNodes { "sendEmail": ICreateChartNodeBasicNodesData<"sendEmail", ISendEmailNodeParams, TSMTP_EXTENSION>; "emailNotification": ICreateChartNodeBasicNodesData<"emailNotification", IEmailNotificationNodeParams, TSMTP_EXTENSION>; } export interface ISendMessageRequestParams extends INodeFunctionBaseParams { config: { text: string; activityParams: any; setActivityParams: boolean; azureUseContextPhrases: boolean; azureSpeechRecognitionMode: string; ttsDeploymentId: string; sttContextPhrasesAzure: string[]; sttContextBoostAzure: number; bargeIn: boolean; bargeInOnDTMF: boolean; bargeInMinWordCount: number; botFailOnErrors: boolean; botNoInputGiveUpTimeoutMS: number; botNoInputTimeoutMS: number; botNoInputRetries: number; botNoInputSpeech: string; botNoInputUrl: string; userNoInputTimeoutMS: number; userNoInputRetries: number; userNoInputSendEvent: boolean; userNoInputSpeech: string; userNoInputUrl: string; continuousASR: boolean; continuousASRDigits: string; continuousASRTimeoutInMS: number; disableTtsCache: boolean; googleInteractionType: string; language: string; sendDTMF: boolean; dtmfCollect: boolean; dtmfCollectInterDigitTimeoutMS: number; dtmfCollectMaxDigits: number; dtmfCollectSubmitDigit: string; sttContextId: string; sttContextPhrases: string[]; sttContextBoost: number; sttDisablePunctuation: boolean; azureEnableAudioLogging: boolean; voiceName: string; }; } export interface ISetSessionParamsParams extends INodeFunctionBaseParams { config: { sessionParams: any; azureSpeechRecognitionMode: string; azureUseContextPhrases: boolean; ttsDeploymentId: string; sttContextPhrasesAzure: string[]; sttContextBoostAzure: number; bargeIn: boolean; bargeInOnDTMF: boolean; bargeInMinWordCount: number; botFailOnErrors: boolean; botNoInputGiveUpTimeoutMS: number; botNoInputTimeoutMS: number; botNoInputRetries: number; botNoInputSpeech: string; botNoInputUrl: string; userNoInputTimeoutMS: number; userNoInputRetries: number; userNoInputSendEvent: boolean; userNoInputAutoHangup: boolean; userNoInputSpeech: string; userNoInputUrl: string; continuousASR: boolean; continuousASRDigits: string; continuousASRTimeoutInMS: number; disableTtsCache: boolean; googleInteractionType: string; language: string; sendDTMF: boolean; dtmfCollect: boolean; dtmfCollectInterDigitTimeoutMS: number; dtmfCollectMaxDigits: number; dtmfCollectSubmitDigit: string; sttContextId: string; sttContextPhrases: string[]; sttContextBoost: number; sttSpeechContexts: [ { phrases: string[]; boost: number; } ]; sttDisablePunctuation: boolean; azureEnableAudioLogging: boolean; voiceName: string; }; } export interface IAgentAssistParams extends INodeFunctionBaseParams { config: { activity: "startRecognition" | "stopRecognition"; targetParticipant: "both" | "caller" | "callee"; }; } export interface ICallRecordingParams extends INodeFunctionBaseParams { config: { activity: "startCallRecording" | "stopCallRecording" | "pauseCallRecording" | "resumeCallRecording"; callRecordingServer: string; callRecordingId: string; callRecordingDestUsername: string; }; } export interface IHandoverParams extends INodeFunctionBaseParams { config: { handoverReason: string; transferTarget: string; transferReferredByURL: string; useTransferSipHeaders: boolean; transferSipHeaders: any; transferNotifications: boolean; transferNotificationsHangupMS: number; }; } export interface IHangupParams extends INodeFunctionBaseParams { config: { hangupReason: string; }; } export interface IPlayURLParamsConfig { playUrlUrl: string; playUrlMediaFormat: "wav/lpcm16" | "raw/lpcm16" | "wav/mulaw" | "raw/mulaw"; playUrlAltText: string; playUrlCaching: boolean; activityParams: any; setActivityParams: boolean; azureUseContextPhrases: boolean; azureSpeechRecognitionMode: string; ttsDeploymentId: string; sttContextPhrasesAzure: string[]; sttContextBoostAzure: number; bargeIn: boolean; bargeInOnDTMF: boolean; bargeInMinWordCount: number; botFailOnErrors: boolean; botNoInputGiveUpTimeoutMS: number; botNoInputTimeoutMS: number; botNoInputRetries: number; botNoInputSpeech: string; botNoInputUrl: string; userNoInputTimeoutMS: number; userNoInputRetries: number; userNoInputSendEvent: boolean; userNoInputSpeech: string; userNoInputUrl: string; continuousASR: boolean; continuousASRDigits: string; continuousASRTimeoutInMS: number; disableTtsCache: boolean; googleInteractionType: string; language: string; sendDTMF: boolean; dtmfCollect: boolean; dtmfCollectInterDigitTimeoutMS: number; dtmfCollectMaxDigits: number; dtmfCollectSubmitDigit: string; sttContextId: string; sttContextPhrases: string[]; sttContextBoost: number; sttDisablePunctuation: boolean; azureEnableAudioLogging: boolean; voiceName: string; } export interface IPlayURLParams extends INodeFunctionBaseParams { config: IPlayURLParamsConfig; } export interface ISendMetaDataParams extends INodeFunctionBaseParams { config: { metaData: string; }; } export interface ICognigyVoiceGatewayNodes { "sendMessage": ICreateChartNodeBasicNodesData<"sendMessage", ISendMessageRequestParams, TVOICE_GATEWAY_EXTENSION>; "playURL": ICreateChartNodeBasicNodesData<"playURL", IPlayURLParams, TVOICE_GATEWAY_EXTENSION>; "handover": ICreateChartNodeBasicNodesData<"handover", IHandoverParams, TVOICE_GATEWAY_EXTENSION>; "hangup": ICreateChartNodeBasicNodesData<"hangup", IHangupParams, TVOICE_GATEWAY_EXTENSION>; "setSessionParams": ICreateChartNodeBasicNodesData<"setSessionParams", ISetSessionParamsParams, TVOICE_GATEWAY_EXTENSION>; "sendMetaData": ICreateChartNodeBasicNodesData<"sendMetaData", ISendMetaDataParams, TVOICE_GATEWAY_EXTENSION>; "agentAssist": ICreateChartNodeBasicNodesData<"agentAssist", IAgentAssistParams, TVOICE_GATEWAY_EXTENSION>; "callRecording": ICreateChartNodeBasicNodesData<"callRecording", ICallRecordingParams, TVOICE_GATEWAY_EXTENSION>; } export interface IMicrosoftTokenStatusParams extends INodeFunctionBaseParams { config: { /** * When on, decide the branch from a specific connection instead of the * endpoint default. When off, the legacy top-level fields (the endpoint * default connection) are used. */ overwriteConnection: boolean; /** The connection name to check (only used when `overwriteConnection` is on). */ connectionOverwrite: string; }; } export interface IMicrosoftGetTokenParams extends INodeFunctionBaseParams { config: { /** When on, request the token for a specific connection instead of the endpoint default. */ overwriteConnection: boolean; /** The connection name to request the token for (only used when `overwriteConnection` is on). */ connectionOverwrite: string; }; } export interface IMicrosoftInvalidateTokenParams extends INodeFunctionBaseParams { config: { /** When on, revoke the token for a specific connection instead of the endpoint default. */ overwriteConnection: boolean; /** The connection name whose token should be revoked (only used when `overwriteConnection` is on). */ connectionOverwrite: string; }; } export interface ICognigyMicrosoftNodes { "microsoftTokenStatus": ICreateChartNodeBasicNodesData<"microsoftTokenStatus", IMicrosoftTokenStatusParams, TMICROSOFT_EXTENSION>; "microsoftGetToken": ICreateChartNodeBasicNodesData<"getTmicrosoftGetTokenoken", IMicrosoftGetTokenParams, TMICROSOFT_EXTENSION>; "microsoftInvalidateToken": ICreateChartNodeBasicNodesData<"microsoftInvalidateToken", IMicrosoftInvalidateTokenParams, TMICROSOFT_EXTENSION>; } export interface IDtmfParams extends INodeFunctionBaseParams { config: { dtmf: string; duration?: number; }; } export interface IHangupParams extends INodeFunctionBaseParams { config: { hangupReason: string; hangupImmediately: boolean; }; } export interface IPlayParamsConfig extends IVoiceConfigParams { url: string; loop: number; urlCaching: boolean; setActivityParams: boolean; } export interface IPlayParams extends INodeFunctionBaseParams { config: IPlayParamsConfig; } export interface ITransferNodeParams extends INodeFunctionBaseParams { config: { transferType: "refer" | "dial"; transferReason: string; transferTarget: string; referredBy: string; mediaPath: TVoiceGateway2MediaPath; anchorMedia?: boolean; useTransferSipHeaders: boolean; transferSipHeaders: { [key: string]: string | object; }; agentAssistEnabled: boolean; agentAssistHeadersKey?: string; dialCallerId?: string; dialMusic?: string; dialTimeout?: number; enableTimeLimit?: boolean; timeLimit?: number; dialTranscriptionWebhook?: string; recognitionChannel: number; sttLanguage: string; sttVendor: string; sttModel: string; sttDisablePunctuation: boolean; googleModel: string; googleModelCustom: string; sttLabel: string; deepgramEndpointing: boolean; deepgramEndpointingValue: number; deepgramSmartFormatting: boolean; deepgramfluxEndpointing: boolean; deepgramfluxEndOfTurnThreshold: number; deepgramfluxEndOfTurnTimeoutMs: number; speechmaticsEndpointing: boolean; speechmaticsEndpointingValue: number; openaiEndpointing: boolean; openaiEndpointingValue: number; niceEndpointing: boolean; niceEndpointingValue: number; amdEnabled: boolean; amdRedirectOnMachineDetected: boolean; amdRedirectText: string; }; } export interface IMSTeamsTransferNodeParams extends INodeFunctionBaseParams { config: { targetType?: string; transferTarget: string; topic?: string; callerName?: string; context: string; callSentiment?: string; suggestedActions?: string; }; } export interface ISendMetadataParams extends INodeFunctionBaseParams { config: { metadata: { [key: string]: string; }; }; } export declare type TRecordAction = "startCallRecording" | "stopCallRecording" | "pauseCallRecording" | "resumeCallRecording"; export interface IRecordNodeParams extends INodeFunctionBaseParams { config: { action: TRecordAction; siprecServerURL?: string; recordingId?: string; }; } export interface IMuteSpeechInputParamsConfig { muteSpeechInput: boolean; muteDtmfInput: boolean; } export interface IMuteSpeechInputParams extends INodeFunctionBaseParams { config: IMuteSpeechInputParamsConfig; } export interface ICognigyVoiceGateway2Nodes { "setSessionConfig": ICreateChartNodeBasicNodesData<"setSessionConfig", ISetSessionConfigParams, TVOICE_GATEWAY_2_EXTENSION>; "dtmf": ICreateChartNodeBasicNodesData<"dtmf", IDtmfParams, TVOICE_GATEWAY_2_EXTENSION>; "hangup": ICreateChartNodeBasicNodesData<"hangup", IHangupParams, TVOICE_GATEWAY_2_EXTENSION>; "play": ICreateChartNodeBasicNodesData<"play", IPlayParams, TVOICE_GATEWAY_2_EXTENSION>; "refer": ICreateChartNodeBasicNodesData<"refer", ITransferNodeParams, TVOICE_GATEWAY_2_EXTENSION>; "transfer": ICreateChartNodeBasicNodesData<"transfer", ITransferNodeParams, TVOICE_GATEWAY_2_EXTENSION>; "sendMetadata": ICreateChartNodeBasicNodesData<"sendMetadata", ISendMetadataParams, TVOICE_GATEWAY_2_EXTENSION>; "recordNode": ICreateChartNodeBasicNodesData<"recordNode", IRecordNodeParams, TVOICE_GATEWAY_2_EXTENSION>; "muteSpeechInputNode": ICreateChartNodeBasicNodesData<"muteSpeechInput", IMuteSpeechInputParams, TVOICE_GATEWAY_2_EXTENSION>; "msTeamsTransferNode": ICreateChartNodeBasicNodesData<"msTeamsTransfer", IMSTeamsTransferNodeParams, TVOICE_GATEWAY_2_EXTENSION>; } export interface ISearchExtractOutputNodeParams extends INodeFunctionBaseParams { config: { mode: "seo" | "se" | "s"; followUpDetection: "none" | "transcript"; followUpDetectionSteps: number; hallucinationShield: boolean; topK: number; searchString: string; searchStoreLocation: "input" | "context" | "default"; searchStoreLocationContextKey: string; searchStoreLocationInputKey: string; searchSourceTags: string[]; searchSourceTagsFilterOp: ISearchTagsFilterOps; knowledgeStoreId?: string; prompt: string; temperature: number; maxTokens: number; topP: number; presencePenalty: number; frequencyPenalty: number; useStop: boolean; stop: string[]; extractSettingsIgnoreDeprecatedParameters: boolean; storeLocation: string; contextKey: string; inputKey: string; timeout: number; timeoutMessage: string; outputMode: "text" | "stream" | "adaptiveCard"; outputFallback: string; errorHandling: "stop" | "continue" | "goto"; errorHandlingGotoTarget: { flow: string; node: string; }; organisationId: string; streamStopTokens: string[]; streamDescription: string; searchStringDescription: string; debugLogTokenCount: boolean; debugLogRequestAndCompletion: boolean; debugDescription: string; customModelOptions: JSON; customRequestOptions: JSON; }; } export interface ICXOneHandoverNodeParams extends INodeFunctionBaseParams { config: { action: HandoverAction; businessNumber: string; contactId: string; spawnedContactId: string; optionalParamsObject?: unknown[]; }; } export interface ICXOneSendSignalNodeParams extends INodeFunctionBaseParams { config: { contactId: string; signalParams: string[]; }; } export interface ICXOneKnowledgeHubNodeParams extends INodeFunctionBaseParams { config: { query: string; responseType: TCXOneKnowledgeHubResponseType; queryPersona?: string; queryLanguage?: string; filters?: string; promptEditorProfileId?: string; answersMaxWords: number; linksMax: number; knowledgeHubId: string; awsBedrockKbId: string; maxKernels: number; prompt?: string; modelArn?: string; storeLocation: "input" | "context"; inputKey: string; contextKey: string; logErrorToSystem: boolean; errorHandling: "stop" | "continue" | "goto"; errorHandlingGotoTarget: { flow: string; node: string; }; errorMessage: string; debugLogRequestBody: boolean; debugLogRequestLatency: boolean; /** CXone tenant UUID — populated server-side on node save */ cxoneTenantId: string; /** CXone agent UID — populated server-side on node save */ cxoneAgentUid: string; }; } export interface ICXOneSendCopilotStatusNodeParams extends INodeFunctionBaseParams { config: { status: "Complete" | "Failed"; data?: Record | null; }; } export interface ICXOneProviderNodes { cxOneHandover: ICreateChartNodeBasicNodesData<"cxOneHandover", ICXOneHandoverNodeParams, TCXONE_EXTENSION>; cxOneSendSignal: ICreateChartNodeBasicNodesData<"cxOneSendSignal", ICXOneSendSignalNodeParams, TCXONE_EXTENSION>; cxOneKnowledgeHub: ICreateChartNodeBasicNodesData<"cxOneKnowledgeHub", ICXOneKnowledgeHubNodeParams, TCXONE_EXTENSION>; cxOneSendCopilotStatus: ICreateChartNodeBasicNodesData<"cxOneSendCopilotStatus", ICXOneSendCopilotStatusNodeParams, TCXONE_EXTENSION>; } export interface ICognigyBasicNodes { addToContext: ICreateChartNodeBasicNodesData<"addToContext", IAddToContextNodeParams, TBASIC_EXTENSION>; copyDataToContext: ICreateChartNodeBasicNodesData<"copyDataToContext", ICopyDataToContextNodeParams, TBASIC_EXTENSION>; copySlotsToContext: ICreateChartNodeBasicNodesData<"copySlotsToContext", ICopySlotsToContextNodeParams, TBASIC_EXTENSION>; removeFromContext: ICreateChartNodeBasicNodesData<"removeFromContext", IRemoveFromContextNodeParams, TBASIC_EXTENSION>; resetContext: ICreateChartNodeBasicNodesData<"resetContext", IResetContextNodeParams, TBASIC_EXTENSION>; code: ICreateChartNodeBasicNodesData<"code", ICodeNodeBasicParams, TBASIC_EXTENSION>; log: ICreateChartNodeBasicNodesData<"log", ILogNodeParams, TBASIC_EXTENSION>; debugMessage: ICreateChartNodeBasicNodesData<"debugMessage", IDebugMessageNodeParams, TBASIC_EXTENSION>; activateProfile: ICreateChartNodeBasicNodesData<"activateProfile", IActivateProfileNodeParams, TBASIC_EXTENSION>; /** @deprecated Blind Mode Node deprecated (CGY-36954) */ blindMode: ICreateChartNodeBasicNodesData<"blindMode", IBlindModeNodeParams, TBASIC_EXTENSION>; completeGoal: ICreateChartNodeBasicNodesData<"completeGoal", ICompleteGoalNodeParams, TBASIC_EXTENSION>; deactivateProfile: ICreateChartNodeBasicNodesData<"deactivateProfile", IDeactivateProfileNodeParams, TBASIC_EXTENSION>; deleteProfile: ICreateChartNodeBasicNodesData<"deleteProfile", IDeleteProfileNodeParams, TBASIC_EXTENSION>; mergeProfile: ICreateChartNodeBasicNodesData<"mergeProfile", IMergeProfileNodeParams, TBASIC_EXTENSION>; updateProfile: ICreateChartNodeBasicNodesData<"updateProfile", IUpdateProfileNodeParams, TBASIC_EXTENSION>; addMemory: ICreateChartNodeBasicNodesData<"addMemory", IAddMemoryNodeParams, TBASIC_EXTENSION>; overwriteAnalytics: ICreateChartNodeBasicNodesData<"overwriteAnalytics", IOverwriteAnalyticsParams, TBASIC_EXTENSION>; setRating: ICreateChartNodeBasicNodesData<"setRating", ISetRatingParams, TBASIC_EXTENSION>; requestRating: ICreateChartNodeBasicNodesData<"requestRating", IRequestRatingNodeParams, TBASIC_EXTENSION>; trackGoal: ICreateChartNodeBasicNodesData<"trackGoal", ITrackGoalNodeParams, TBASIC_EXTENSION>; executeFlow: ICreateChartNodeBasicNodesData<"executeFlow", IExecuteFlowNodeParams, TBASIC_EXTENSION>; goTo: ICreateChartNodeBasicNodesData<"goTo", IGoToNodeParams, TBASIC_EXTENSION>; if: ICreateChartNodeBasicNodesData<"if", IIfNodeParams, TBASIC_EXTENSION>; interval: ICreateChartNodeBasicNodesData<"interval", IIntervalNodeParams, TBASIC_EXTENSION>; once: ICreateChartNodeBasicNodesData<"once", IOnceNodeParams, TBASIC_EXTENSION>; /** @deprecated since 2026.7.0 — State feature deprecated (ADO #122834) */ resetState: ICreateChartNodeBasicNodesData<"resetState", IResetStateNodeParams, TBASIC_EXTENSION>; /** @deprecated since 2026.7.0 — State feature deprecated (ADO #122834) */ setState: ICreateChartNodeBasicNodesData<"setState", ISetStateNodeParams, TBASIC_EXTENSION>; sleep: ICreateChartNodeBasicNodesData<"sleep", ISleepNodeParams, TBASIC_EXTENSION>; stop: ICreateChartNodeBasicNodesData<"stop", IStopNodeParams, TBASIC_EXTENSION>; switch: ICreateChartNodeBasicNodesData<"switch", ISwitchNodeParams, TBASIC_EXTENSION>; think: ICreateChartNodeBasicNodesData<"think", IThinkNodeParams, TBASIC_EXTENSION>; switchLocale: ICreateChartNodeBasicNodesData<"switchLocale", ISwitchLocaleNodeParams, TBASIC_EXTENSION>; setTranslation: ICreateChartNodeBasicNodesData<"setTranslation", ISetTranslationNodeParams, TBASIC_EXTENSION>; wait: ICreateChartNodeBasicNodesData<"wait", IWaitNodeParams, TBASIC_EXTENSION>; datePicker: ICreateChartNodeBasicNodesData<"datePicker", IDatePickerNodeParams, TBASIC_EXTENSION>; say: ICreateChartNodeBasicNodesData<"say", ISayNodeParams, TBASIC_EXTENSION>; addLexiconKeyphrase: ICreateChartNodeBasicNodesData<"addLexiconKeyphrase", IAddLexiconKeyphraseNodeParams, TBASIC_EXTENSION>; executeCognigyNLU: ICreateChartNodeBasicNodesData<"executeCognigyNLU", IExecuteCognigyNLUNodeParams, TBASIC_EXTENSION>; regexSlotFiller: ICreateChartNodeBasicNodesData<"regexSlotFiller", IRegexSlotFillerParams, TBASIC_EXTENSION>; matchPattern: ICreateChartNodeBasicNodesData<"matchPattern", IMatchPatternParams, TBASIC_EXTENSION>; fuzzySearch: ICreateChartNodeBasicNodesData<"fuzzySearch", IFuzzySearchParams, TBASIC_EXTENSION>; generativeSlotFiller: ICreateChartNodeBasicNodesData<"generativeSlotFiller", IGenerativeSlotFillerParams, TBASIC_EXTENSION>; handover: ICreateChartNodeBasicNodesData<"handover", IHandoverNodeParams, TBASIC_EXTENSION>; handoverV2: ICreateChartNodeBasicNodesData<"handoverV2", IHandoverNodeV2Params, TBASIC_EXTENSION>; checkAgentAvailability: ICreateChartNodeBasicNodesData<"checkAgentAvailability", ICheckAgentAvailabilityNodeParams, TBASIC_EXTENSION>; sendTileUpdateToAgentAssistWorkspace: ICreateChartNodeBasicNodesData<"sendTileUpdateToAgentAssistWorkspace", ISendTileUpdateParams, TBASIC_EXTENSION>; sendConfigUpdateToAgentAssistWorkspace: ICreateChartNodeBasicNodesData<"sendConfigUpdateToAgentAssistWorkspace", ISendConfigUpdateParams, TBASIC_EXTENSION>; httpRequest: ICreateChartNodeBasicNodesData<"httpRequest", IHttpRequestNodeParams, TBASIC_EXTENSION>; triggerFunction: ICreateChartNodeBasicNodesData<"triggerFunction", ITriggerFunctionNodeParams, TBASIC_EXTENSION>; onScheduled: ICreateChartNodeBasicNodesData<"onScheduled", IScheduledNodeParams, TBASIC_EXTENSION>; onSchedulingError: ICreateChartNodeBasicNodesData<"onSchedulingError", ISchedulingErrorNodeParams, TBASIC_EXTENSION>; placeholder: ICreateChartNodeBasicNodesData<"placeholder", IPlaceholderNodeParams, TBASIC_EXTENSION>; question: ICreateChartNodeBasicNodesData<"question", IQuestionNodeParams, TBASIC_EXTENSION>; optionalQuestion: ICreateChartNodeBasicNodesData<"optionalQuestion", IOptionalQuestionNodeParams, TBASIC_EXTENSION>; initAppSession: ICreateChartNodeBasicNodesData<"initAppSession", IInitAppSessionNodeParams, TBASIC_EXTENSION>; getAppSessionPin: ICreateChartNodeBasicNodesData<"getAppSessionPin", IGetAppSessionPinNodeParams, TBASIC_EXTENSION>; hangup: ICreateChartNodeBasicNodesData<"hangup", IHangupParams, TBASIC_EXTENSION>; play: ICreateChartNodeBasicNodesData<"play", IPlayParams, TBASIC_EXTENSION>; transfer: ICreateChartNodeBasicNodesData<"transfer", ITransferParams, TBASIC_EXTENSION>; bargeIn: ICreateChartNodeBasicNodesData<"bargeIn", IBargeInParams, TBASIC_EXTENSION>; continuousASR: ICreateChartNodeBasicNodesData<"continuousASR", IContinuousASRParams, TBASIC_EXTENSION>; dtmf: ICreateChartNodeBasicNodesData<"dtmf", IDTMFParams, TBASIC_EXTENSION>; noUserInput: ICreateChartNodeBasicNodesData<"noUserInput", IUserNoInputParams, TBASIC_EXTENSION>; sessionSpeechParameters: ICreateChartNodeBasicNodesData<"sessionSpeechParameters", ISessionSpeechParams, TBASIC_EXTENSION>; muteSpeechInput: ICreateChartNodeBasicNodesData<"muteSpeechInput", IMuteSpeechInputParams, TBASIC_EXTENSION>; sendMetadata: ICreateChartNodeBasicNodesData<"sendMetadata", ISendMetadataParams, TBASIC_EXTENSION>; assistInfo: ICreateChartNodeBasicNodesData<"assistInfo", IAssistInfoNodeParams, TBASIC_EXTENSION>; searchExtractOutput: ICreateChartNodeBasicNodesData<"searchExtractOutput", ISearchExtractOutputNodeParams, TBASIC_EXTENSION>; extractAiAgent: ICreateChartNodeBasicNodesData<"extractAiAgent", ILoadAiAgentNodeParams, TBASIC_EXTENSION>; } export interface ICognigyNodes { "@cognigy/basic-nodes": ICognigyBasicNodes; "@cognigy/mongodb": ICognigyMongoNodes; "@cognigy/mssql": ICognigySqlNodes; "@cognigy/smtp": ICognigySMTPNodes; "@cognigy/voicegateway": ICognigyVoiceGatewayNodes; "@cognigy/microsoft": ICognigyMicrosoftNodes; "@cognigy/voiceGateway2": ICognigyVoiceGateway2Nodes; [CXONE_EXTENSION]: ICXOneProviderNodes; } export interface IUploadFileRestDataQuery_2_0 extends IProjectScope { } export interface IUploadFileRestDataBody_2_0 extends Pick { file: File | Buffer; } export interface IUploadFileRestData_2_0 extends IUploadFileRestDataBody_2_0, IUploadFileRestDataQuery_2_0 { } export interface IUploadFileRestReturnValue_2_0 { /** The uuid of the file within the system */ fileId: string; /** The name of the created file */ name: string; /** The mimetype of the created file */ mimetype: string; /** The file token which can be used to retrieve the file later on */ fileToken: string; } /** * @openapi * * components: * schemas: * IAudioPreviewLanguages_2_0: * type: object * properties: * audioPreviewLanguages: * type: array * items: * type: object * properties: * voiceId: * type: string * maxLength: 50 * description: Audio preview provided voice Id. This is the ID that you specify when calling the SynthesizeSpeech operation. * languageCode: * type: string * maxLength: 10 * description: Language code of the voice. */ export interface IAudioPreviewLanguages_2_0 { audioPreviewLanguages: { voiceId: string; languageCode: string; }[]; } export interface IIndexAudioPreviewLanguagesRestDataQuery_2_0 { projectId: string; } export interface IIndexAudioPreviewLanguagesRestData_2_0 extends IIndexAudioPreviewLanguagesRestDataQuery_2_0 { } export interface IIndexAudioPreviewLanguagesRestReturnValue_2_0 { audioPreviewLanguages: IAudioPreviewLanguages_2_0; } /** * @openapi * * components: * schemas: * IVGCallSettings_2_0: * type: object * properties: * sipRealm: * type: string * username: * type: string * password: * type: string * userId: * description: temporary user id * type: string * */ export interface IVGCallSettings_2_0 { sipRealm: string; username: string; password: string; userId: string; } /** * @openapi * * components: * schemas: * IVoicePrepareCall_2_0: * type: object * properties: * entrypoint: * $ref: '#/components/schemas/TMongoId' * flowId: * type: string * format: uuid * description: The Flow's referenceId. Required unless targetType is "agent". * localeId: * type: string * description: The locale's referenceId (a UUID), or an empty string. * nluConnectorId: * type: string * description: Either a custom NLU connector's referenceId (a UUID) or a built-in NLU connector type keyword (e.g. cognigy, noNlu). * language: * type: string * voice: * type: string * engine: * type: string * enum: [standard, neural, generative] * agentId: * type: string * targetType: * type: string * enum: [flow, agent] */ export interface IVoicePrepareCall_2_0 { entrypoint: string; flowId: string; localeId: string; nluConnectorId: string; language: string; voice: string; engine?: string; agentId?: string; targetType?: TEndpointTargetType; } export interface IVoicePrepareCallRestDataBody_2_0 extends IProjectScope, IVoicePrepareCall_2_0 { } export interface IVoicePrepareCallRestData_2_0 extends IVoicePrepareCallRestDataBody_2_0 { } export interface IVoicePrepareCallRestReturnValue_2_0 extends IVGCallSettings_2_0 { } /** * @openapi * * components: * schemas: * ITestVoiceProvider_2_0: * type: object * properties: * voiceProvider: * type: string * isCredentialsValid: * type: boolean * msg: * type: string * msgErr: * type: string * */ export interface ITestVoiceProvider_2_0 { voiceProvider: TAudioPreviewProvider; isCredentialsValid: boolean; msg: string; msgErr?: string; } export interface ITestVoiceProviderRestDataBody_2_0 extends Partial { } export interface ITestVoiceProviderRestData_2_0 extends ITestVoiceProviderRestDataBody_2_0 { } export interface ITestVoiceProviderRestReturnValue_2_0 extends ITestVoiceProvider_2_0 { } /** * @openapi * * components: * schemas: * IVoiceTestCall_2_0: * type: object * required: [entrypoint, localeId, nluConnectorId, language, voice] * properties: * entrypoint: * $ref: '#/components/schemas/TMongoId' * flowId: * type: string * description: The Flow's referenceId. Required for Flow targets, empty for AI Agent targets. * targetType: * type: string * enum: [flow, agent] * description: What the call talks to. Defaults to flow. * agentId: * type: string * description: The AI Agent's referenceId. Required when targetType is agent. * localeId: * type: string * description: The locale's referenceId (a UUID), or an empty string. * nluConnectorId: * type: string * description: Either a custom NLU connector's referenceId (a UUID) or a built-in NLU connector type keyword (e.g. cognigy, noNlu). * language: * type: string * description: Language for both speech synthesis and recognition. * voice: * type: string * description: Voice of the project's default Voice Gateway TTS provider. * enableMocking: * type: boolean * oneOf: * - title: Flow target * required: [flowId] * properties: * targetType: * type: string * enum: [flow] * flowId: * type: string * format: uuid * - title: AI Agent target * required: [targetType, agentId] * properties: * targetType: * type: string * enum: [agent] * agentId: * type: string * format: uuid * IVoiceTestCallSettings_2_0: * type: object * properties: * endpointUrl: * type: string * description: URL serving the click-to-call configuration of the call's temporary Endpoint. * endpointId: * type: string * description: Id of the temporary Endpoint. End the call with it. * userId: * type: string * description: Id to dial with, so the conversation is keyed on it. */ export interface IVoiceTestCall_2_0 { entrypoint: string; flowId: string; targetType?: TEndpointTargetType; agentId?: string; localeId: string; nluConnectorId: string; language: string; voice: string; enableMocking?: boolean; } export interface IVoiceTestCallSettings_2_0 { endpointUrl: string; endpointId: string; userId: string; } export interface ICreateVoiceTestCallRestDataBody_2_0 extends IProjectScope, IVoiceTestCall_2_0 { } export interface ICreateVoiceTestCallRestData_2_0 extends ICreateVoiceTestCallRestDataBody_2_0 { } export interface ICreateVoiceTestCallRestReturnValue_2_0 extends IVoiceTestCallSettings_2_0 { } export interface IDeleteVoiceTestCallRestDataParams_2_0 { endpointId: string; } export interface IDeleteVoiceTestCallRestData_2_0 extends IDeleteVoiceTestCallRestDataParams_2_0, IProjectScope { } /** * @openapi * * components: * schemas: * ITestTranslationSettings_2_0: * type: object * properties: * language: * type: string * error: * type: object * msg: * type: string * */ export interface ITestTranslationSettings_2_0 { language: string; error?: InternalServerError; msg: string; } export interface ITestTranslationSettingsRestDataBody_2_0 extends Partial { } export interface ITestTranslationSettingsRestData_2_0 extends ITestTranslationSettingsRestDataBody_2_0 { } export interface ITestTranslationSettingsRestReturnValue_2_0 extends ITestTranslationSettings_2_0 { } export interface ICreateYesNoSentenceRestDataBody_2_0 extends Partial> { } export interface ICreateYesNoSentenceRestDataParams_2_0 { localeId: string; intentId: string; } export interface ICreateYesNoSentenceRestData_2_0 extends ICreateYesNoSentenceRestDataBody_2_0, ICreateYesNoSentenceRestDataParams_2_0 { } export interface ICreateYesNoSentenceRestReturnValue_2_0 extends Omit { } export interface IDeleteYesNoSentenceRestDataParams_2_0 { localeId: string; intentId: string; sentenceId: string; } export interface IDeleteYesNoSentenceRestData_2_0 extends IDeleteYesNoSentenceRestDataParams_2_0 { } export interface IDeleteYesNoSentenceRestReturnValue_2_0 { } export interface IUpdateYesNoSentenceRestBody_2_0 extends Omit { } export interface IUpdateYesNoSentenceRestParams_2_0 { localeId: string; intentId: string; sentenceId: string; } export interface IUpdateYesNoSentenceRestData_2_0 extends IUpdateYesNoSentenceRestParams_2_0, IUpdateYesNoSentenceRestBody_2_0 { } export interface IUpdateYesNoSentenceRestReturnValue_2_0 { } export interface IIndexYesNoSentencesRestDataParams_2_0 { localeId: string; intentId: string; } export interface IIndexYesNoSentencesRestData_2_0 extends IRestPagination, IIndexYesNoSentencesRestDataParams_2_0 { } export interface IIndexYesNoSentencesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IAgentAssistGridConfig_2_0: * type: object * properties: * grid: * type: object * properties: * columns: * type: number * description: Number of columns in the grid. * rows: * type: number * description: Number of rows in the grid. * gap: * type: number * description: Padding between tiles in pixels. The default value is 10. If you set it to 0, the default will be used. * tiles: * type: object * properties: * tile-id: * type: object * description: The Tile ID is used in the Flow Nodes to fill in this specific tile. * properties: * x: * type: number * description: The row number where the tile is located, starting from 1. * y: * type: number * description: The column number where the tile is located, starting from 1. * columns: * type: number * description: The number of columns the tile should occupy. The default value is 1. * rows: * type: number * description: The number of rows the tile should occupy. The default value is 1. * * IAgentAssistConfigData_2_0: * type: object * properties: * name: * type: string * description: The human readable name of the config. * description: * type: string * description: The description which can be used to understand what the agent assist config contains in terms of tiles. * config: * type: object * description: The actual grid-config. * $ref: '#/components/schemas/IAgentAssistGridConfig_2_0' * * IAgentAssistConfigGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * IAgentAssistConfig_2_0: * allOf: * - $ref: '#/components/schemas/IAgentAssistConfigData_2_0' * - $ref: '#/components/schemas/IAgentAssistConfigGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IAgentAssistConfig_2_0 { _id: TMongoId; name: string; description: string; config: IAgentAssistGridConfig; referenceId: string; projectReference: string; organisationReference: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface ICreateAgentAssistConfigRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateAgentAssistConfigRestData_2_0 extends ICreateAgentAssistConfigRestDataBody_2_0 { } export interface ICreateAgentAssistConfigRestReturnValue_2_0 extends IAgentAssistConfig_2_0 { } export interface IUpdateAgentAssistConfigRestDataBody_2_0 extends Partial> { } export interface IUpdateAgentAssistConfigRestDataParams_2_0 { configId: string; } export interface IUpdateAgentAssistConfigRestData_2_0 extends IUpdateAgentAssistConfigRestDataBody_2_0, IUpdateAgentAssistConfigRestDataParams_2_0 { } export interface IUpdateAgentAssistConfigRestReturnValue_2_0 { } export interface IReadAgentAssistConfigRestDataParams_2_0 { configId: string; projectId?: string; organisationId?: string; } export interface IReadAgentAssistConfigRestData_2_0 extends IReadAgentAssistConfigRestDataParams_2_0 { } export interface IReadAgentAssistConfigRestReturnValue_2_0 extends IAgentAssistConfig_2_0 { } export interface IDeleteAgentAssistConfigRestDataParams_2_0 { configId: string; } export interface IDeleteAgentAssistConfigRestData_2_0 extends IDeleteAgentAssistConfigRestDataParams_2_0 { } export interface IDeleteAgentAssistConfigRestReturnValue_2_0 { } export interface IIndexAgentAssistConfigsRestData_2_0 extends IRestPagination, IProjectScope { } export interface IIndexAgentAssistConfigsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IOpenAIMeta_2_0 { customModel?: string; baseCustomUrl?: string; } export interface IOpenAICompatibleMeta_2_0 { customModel: string; baseCustomUrl: string; customAuthHeader?: string; } export interface IAnthropicMeta_2_0 { customModel?: string; } export interface IAwsBedrockMeta_2_0 { region: string; customModel?: string; } export interface IAlephAlphaMeta_2_0 { customModel?: string; baseCustomUrl?: string; } export interface IAzureOpenAIMeta_2_0 { resourceName?: string; deploymentName?: string; baseCustomUrl?: string | null; apiVersion?: string; customModel?: string; /** * Responses API migration toggle (CGY-34908). When `true`, the deployment name is sent as * the request-body `model` (the fix); when `false`/unset, the legacy model-family value is * used. Defaults to `undefined` (legacy) for existing connections. */ useDeploymentNameAsModel?: boolean; } export interface IGoogleVertexAIMeta_2_0 { location: string; apiEndPoint: string; publisher?: string; } export interface IMistralMeta_2_0 { customModel?: string; baseCustomUrl?: string | null; } /** * @openapi * * components: * schemas: * ILLMFallback_2_0: * type: object * properties: * isFallbackEnabled: * type: boolean * description: If set to `true`, activates large language model fallback. * fallbackLLMReferenceId: * type: string * format: uuid * minLength: 36 * maxLength: 36 * description: The identifier for the fallback large language model. * immediateFallBack: * type: object * properties: * failedRequests: * type: number * description: The number of failed requests until the fallback large language model is used instead of the primary large language model. * durationInMinutes: * type: number * description: The duration in minutes for which the fallback large language model is used instead of the primary large language model. * emailNotificationList: * type: array * items: * type: string * description: The list of email addresses to notify when the large language model fallback is triggered. * description: Large language model fallback configuration. */ export interface ILLMFallback_2_0 { order: number; isFallbackEnabled: boolean; fallbackLLMReferenceId: string; immediateFallBack: { failedRequests: number; durationInMinutes: number; emailNotificationList: string[]; }; } /******************************************************************************/ /** * IMPORTANT! * Openapi components from the llm-providers pacakge, if you need to updtate something here * make sure that the actual code in the llm-providers package is updated as well */ /******************************************************************************/ export interface IGoogleGeminiMeta_2_0 { location: string; } export interface IGoogleGenAIMeta_2_0 { location: string; } /** * @openapi * * components: * schemas: * ILargeLanguageModelFieldsBase_2_0: * type: object * required: ['name', 'modelType', 'provider', 'connectionId'] * properties: * name: * type: string * example: "Large language model for customer service" * description: * type: string * example: "Large language model for customer-facing AI Agents." * modelType: * $ref: '#/components/schemas/TGenerativeAIModels' * modelGroup: * $ref: '#/components/schemas/TModelGroups' * apiType: * type: string * enum: * - chatCompletion * - responses * description: The API type for chat models. Defaults to chatCompletion when not specified. The responses API is only supported for OpenAI, Azure OpenAI, and OpenAI Compatible providers. * isCustomModel: * type: boolean * example: true * provider: * $ref: '#/components/schemas/TGenerativeAIProviders' * connectionId: * type: string * format: uuid * minLength: 36 * maxLength: 36 * description: The identifier for the large language model connection. * openAI: * type: object * description: Metadata for OpenAI large language models. * properties: * customModel: * type: string * example: gpt-4-32k-0613 * description: The custom model name. * anthropic: * type: object * description: Metadata for Anthropic large language models. * properties: * customModel: * type: string * example: claude-sonnet-4-6 * description: The custom model name. * azureOpenAI: * type: object * description: Metadata for Azure OpenAI large language models. * properties: * resourceName: * type: string * description: The Azure OpenAI resource name. For more information, read the [Microsoft Azure OpenAI resource](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource) documentation. * deploymentName: * type: string * description: The model deployment name. For more information, read the [Microsoft Azure OpenAI resource](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) documentation. * apiVersion: * type: string * description: The API version in `YYYY-MM-DD` format (for example, `YYYY-MM-DD-preview`). For more information, read the [Microsoft Azure OpenAI REST API versioning](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#rest-api-versioning) documentation. * baseCustomUrl: * type: string * description: The custom URL to route connections between your clusters and Microsoft Azure OpenAI through a dedicated proxy for enhanced security. When set, `resourceName`, `deploymentName`, and `apiVersion` are ignored. For API key connections on 2025.20 and earlier use `https://.openai.azure.com/openai/deployments//?api-version=`. * example: * - https://.openai.azure.com/openai/deployments//chat/completions?api-version= * - https://.openai.azure.com/openai/deployments//completions?api-version= * - https://.openai.azure.com/openai/deployments//embeddings?api-version= * useDeploymentNameAsModel: * type: boolean * description: Responses API only. When `true`, the deployment name is sent as the request-body model (fixed behavior); when `false` or unset, the legacy model-family value is used. Migration toggle; defaults to unset (legacy) for existing connections. * googleVertexAI: * type: object * description: Metadata for Google Vertex AI large language models. * properties: * location: * type: string * apiEndpoint: * type: string * publisher: * type: string * googleGemini: * type: object * description: Metadata for Google Gemini large language models. * properties: * location: * type: string * googleGenAI: * type: object * description: Google GenAI specific meta data * properties: * location: * type: string * alephAlpha: * type: object * description: Metadata for Aleph Alpha large language models. * properties: * customModel: * type: string * example: luminous-003 * description: The custom model name. * baseCustomUrl: * type: string * example: https://api.aleph-alpha.com * openAICompatible: * type: object * description: Metadata for OpenAI-compatible large language models. * properties: * customModel: * type: string * example: luminous-003 * description: The custom model name. * baseCustomUrl: * type: string * example: https://own-llm-deployment.company.com/openai/v1 * customAuthHeader: * type: string * example: Ocp-Apim-Subscription-Key * description: The API key will be sent via this http header if specified. * * ILargeLanguageModelFields_2_0: * allOf: * - $ref: '#/components/schemas/ILargeLanguageModelFieldsBase_2_0' * - $ref: '#/components/schemas/IProjectResourceFields_2_0' * - type: object * properties: * isDefault: * type: boolean * description: If set to `true`, the large language model is used as the default large language model when no other large language model is set. * example: false * fallbacks: * type: array * description: (Alpha) The list of fallback large language models used when the primary large language model stops working. * items: * $ref: '#/components/schemas/ILLMFallback_2_0' * isInPlatformLlm: * type: boolean * description: Whether this LLM is managed by the in-platform LLM feature. * example: false * inPlatformLlm: * type: object * description: Tier and region of an in-platform LLM. * properties: * modelTier: * type: string * enum: [included, resell] * description: Resell models must be assigned to a project before it can use them. Absent means included. * isCrossRegion: * type: boolean * useCases: * type: array * description: The use cases this in-platform LLM supports. * items: * type: string * IGlobalLargeLanguageModelFields_2_0: * allOf: * - $ref: '#/components/schemas/ILargeLanguageModelFieldsBase_2_0' * - $ref: '#/components/schemas/IGlobalResourceFields_2_0' * ILargeLanguageModelCreate_2_0: * allOf: * - $ref: '#/components/schemas/ILargeLanguageModelFields_2_0' * ILargeLanguageModelData_2_0: * allOf: * - $ref: '#/components/schemas/ILargeLanguageModelFields_2_0' * - type: object * properties: * referenceId: * type: string * description: The reference ID of the large language model. * format: uuid * IGlobalLargeLanguageModelData_2_0: * allOf: * - $ref: '#/components/schemas/IGlobalLargeLanguageModelFields_2_0' * - type: object * properties: * referenceId: * type: string * description: The reference ID of the large language model. * format: uuid * IGlobalLargeLanguageModel_2_0: * allOf: * - $ref: '#/components/schemas/IGlobalLargeLanguageModelData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * ILargeLanguageModel_2_0: * oneOf: * - allOf: * - $ref: '#/components/schemas/ILargeLanguageModelData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * - allOf: * - $ref: '#/components/schemas/IGlobalLargeLanguageModelData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILargeLanguageModel_2_0 extends IGlobalResource { referenceId: string; _id: TMongoId; name: string; description: string; modelType: TGenerativeAIModels; /** model type e.g. chat */ modelGroup?: TModeType; /** The API type for chat models: chatCompletion or responses */ apiType?: TApiType; isCustomModel?: boolean; provider: TGenerativeAIProviders; connectionId: string; isDefault: boolean; isInPlatformLlm?: boolean; inPlatformLlm?: Pick; useCases?: TGenerativeAIUseCases[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; /** Meta data for the AzureOpenAI connection */ azureOpenAI?: IAzureOpenAIMeta_2_0; /** Meta data for the OpenAI LLM */ openAI?: IOpenAIMeta_2_0; /** Meta data for OpenAI Compatible LLMs */ openAICompatible?: IOpenAICompatibleMeta_2_0; /** Meta Data for the AlephAlpha LLM */ alephAlpha?: IAlephAlphaMeta_2_0; /** Meta data for the GoogleVertexAI connection */ googleVertexAI?: IGoogleVertexAIMeta_2_0; /** Meta data for the GoogleGemini connection */ googleGemini?: IGoogleGeminiMeta_2_0; /** Meta data for the GoogleGenAI connection */ googleGenAI?: IGoogleGenAIMeta_2_0; /** Meta data for the Anthropic connection */ anthropic?: IAnthropicMeta_2_0; /** Meta data for the AwsBedrock connection */ awsBedrock?: IAwsBedrockMeta_2_0; /** Meta data for the Mistral connection */ mistral?: IMistralMeta_2_0; /** Fallback LLM configuration */ fallbacks?: ILLMFallback_2_0[]; } /** * @openapi * * components: * schemas: * ILargeLanguageModelIndexItem_2_0: * allOf: * - type: object * properties: * referenceId: * type: string * description: The reference id of the LargeLanguageModel * format: uuid * name: * type: string * example: "LLM Name" * description: * type: string * example: "LLM Name" * modelType: * $ref: '#/components/schemas/TGenerativeAIModels' * modelGroup: * $ref: '#/components/schemas/TModelGroups' * provider: * $ref: '#/components/schemas/TGenerativeAIProviders' * connectionId: * type: string * description: The reference id of the GenerativeAI Provider Connection * format: uuid * isDefault: * type: boolean * description: Sets the LLM to default (fallback) if no other LLM is set * example: false * displayName: * type: string * description: Human-friendly display label. Falls back to `name` when absent. * example: "inPlatformLLM" * useCases: * type: array * description: The use cases this in-platform LLM supports. * items: * type: string * inPlatformLlm: * type: object * description: Tier and region of an in-platform LLM. The admin-only details are only on the in-platform LLM list. * properties: * isCrossRegion: * type: boolean * modelTier: * type: string * enum: [included, resell] * description: Resell models must be assigned to a project before it can use them. Absent means included. * - $ref: '#/components/schemas/IEntityMeta' */ export interface ILargeLanguageModelIndexItem_2_0 extends IGlobalResource { referenceId: string; _id: TMongoId; name: string; description: string; modelType: TGenerativeAIModels; modelGroup?: TModeType; provider: TGenerativeAIProviders; connectionId: string; /** Fallback LLM configuration */ fallbacks?: ILLMFallback_2_0[]; isDefault: boolean; isInPlatformLlm?: boolean; inPlatformLlm?: IInPlatformLlmSettings; configSetId?: string; useCases?: TGenerativeAIUseCases[]; displayName?: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexLargeLanguageModelsRestData_2_0 extends IRestPagination, Pick, Partial, Partial { } export interface IIndexLargeLanguageModelsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IIndexInPlatformLlmsRestData_2_0 extends IRestPagination { } export interface ICreateLargeLanguageModelRestDataBody_2_0 extends Partial, Partial> { } export interface ICreateLargeLanguageModelRestData_2_0 extends ICreateLargeLanguageModelRestDataBody_2_0 { } export interface ICreateLargeLanguageModelRestReturnValue_2_0 extends ILargeLanguageModel_2_0 { } export interface IReadLargeLanguageModelRestDataParams_2_0 { largeLanguageModelId: string; } export interface IReadLargeLanguageModelRestData_2_0 extends IReadLargeLanguageModelRestDataParams_2_0 { } export interface IReadLargeLanguageModelRestReturnValue_2_0 extends ILargeLanguageModel_2_0 { } export interface IUpdateLargeLanguageModelRestDataBody_2_0 extends Partial> { } export interface IUpdateLargeLanguageModelRestDataParams_2_0 { largeLanguageModelId: string; } export interface IUpdateLargeLanguageModelRestData_2_0 extends IUpdateLargeLanguageModelRestDataBody_2_0, IUpdateLargeLanguageModelRestDataParams_2_0 { } export interface IUpdateLargeLanguageModelRestReturnValue_2_0 { } export interface IDeleteLargeLanguageModelRestQuery_2_0 { force?: string; } export interface IDeleteLargeLanguageModelRestDataParams_2_0 { largeLanguageModelId: string; } export interface IDeleteLargeLanguageModelRestData_2_0 extends IDeleteLargeLanguageModelRestDataParams_2_0, IDeleteLargeLanguageModelRestQuery_2_0 { } export interface IDeleteLargeLanguageModelRestReturnValue_2_0 { } export interface ICloneLargeLanguageModelRestDataParams_2_0 { largeLanguageModelId: string; } export interface ICloneLargeLanguageModelRestData_2_0 extends ICloneLargeLanguageModelRestDataParams_2_0 { } export interface ICloneLargeLanguageModelRestReturnValue_2_0 extends ILargeLanguageModel_2_0 { } export interface ITestLargeLanguageModelRestDataParams_2_0 { largeLanguageModelId: string; } export interface ITestLargeLanguageModelRestData_2_0 extends ITestLargeLanguageModelRestDataParams_2_0 { } export interface ITestLargeLanguageModelRestReturnValue_2_0 { llmProvider: TGenerativeAIProviders; isCredentialsValid: boolean; msg: string; msgErr?: string; } /** * @openapi * components: * schemas: * IAvailableModelItem_2_0: * type: object * properties: * modelName: * type: string * modelId: * type: string * providerName: * type: array * */ /** * @openapi * components: * schemas: * IAvailableModelsForLLMProvider_2_0: * allOf: * - type: object * properties: * availableModels: * type: array * items: * $ref: '#/components/schemas/IAvailableModelItem_2_0' * */ export interface IAvailableModelsForLLMProvider_2_0 { availableModels: { modelName: string; modelId: string; providerName: string; }[]; } export interface IGetAvailableModelsForLLMRestDataParams_2_0 { largeLanguageModelId: string; } export interface IGetAvailableModelsForLLMRestData_2_0 extends IGetAvailableModelsForLLMRestDataParams_2_0 { connectionRefId: string; } export interface IGetAvailableModelsForLLMRestReturnValue_2_0 extends IAvailableModelsForLLMProvider_2_0 { } /** * @openapi * * components: * schemas: * ILlmConfigurationLargeLanguageModelFields_2_0: * type: object * description: | * The large language model half of the unified LLM configuration request. Same field * set as the plain `largelanguagemodels` resource, minus `connectionId` (always derived * server-side from `credentials`) and every server-managed field (`configSetId`, * `isInPlatformLlm`, `useCases`, ...). * properties: * name: * type: string * example: "Large language model for customer service" * description: * type: string * provider: * $ref: '#/components/schemas/TGenerativeAIProviders' * modelType: * $ref: '#/components/schemas/TGenerativeAIModels' * modelGroup: * $ref: '#/components/schemas/TModelGroups' * apiType: * type: string * enum: [chatCompletion, responses] * isCustomModel: * type: boolean * isDefault: * type: boolean * areFallbacksEnabled: * type: boolean * fallbacks: * type: array * items: * $ref: '#/components/schemas/ILLMFallback_2_0' * openAI: * type: object * anthropic: * type: object * azureOpenAI: * type: object * googleVertexAI: * type: object * googleGemini: * type: object * googleGenAI: * type: object * alephAlpha: * type: object * openAICompatible: * type: object * awsBedrock: * type: object * mistral: * type: object * * ILlmConfigurationCredentialsCreate_2_0: * type: object * required: [mode, name, type, fields] * properties: * mode: * type: string * enum: [create] * name: * type: string * example: "My OpenAI credentials" * type: * type: string * example: "OpenAiProvider" * fields: * $ref: '#/components/schemas/IConnectionDataFields_2_0' * * ILlmConfigurationCredentialsReuse_2_0: * type: object * required: [mode, referenceId] * properties: * mode: * type: string * enum: [reuse] * referenceId: * type: string * format: uuid * description: The reference id of an existing set of credentials (Connection) to point this large language model at. * * ILlmConfigurationCredentialsUpdate_2_0: * type: object * required: [mode, referenceId, fields] * properties: * mode: * type: string * enum: [update] * referenceId: * type: string * format: uuid * fields: * $ref: '#/components/schemas/IConnectionDataFields_2_0' * * ILlmConfigurationCredentials_2_0: * description: Credentials for the large language model being configured. `mode` is explicit rather than inferred from the presence of `referenceId`. * oneOf: * - $ref: '#/components/schemas/ILlmConfigurationCredentialsCreate_2_0' * - $ref: '#/components/schemas/ILlmConfigurationCredentialsReuse_2_0' * - $ref: '#/components/schemas/ILlmConfigurationCredentialsUpdate_2_0' * * ILlmConfigurationCredentialsSummary_2_0: * type: object * description: Never includes `fields` — credential values are never echoed back by this route. * properties: * referenceId: * type: string * format: uuid * name: * type: string * type: * type: string * * ILlmConfigurationConfigSetResult_2_0: * type: object * description: Whether a Gateway Config Set was created/updated for this large language model, or why it was skipped. * properties: * status: * type: string * enum: [synced, skipped] * configSetId: * type: string * skippedReason: * type: string * enum: [providerUnsupported, noConnection, rolloutDisabled, inPlatformManaged, gatewayUnconfigured] * * ICreateLlmConfigurationRestDataBody_2_0: * type: object * required: [largeLanguageModel, credentials] * properties: * resourceLevel: * $ref: '#/components/schemas/ResourceLevel' * projectId: * $ref: '#/components/schemas/TMongoId' * largeLanguageModel: * $ref: '#/components/schemas/ILlmConfigurationLargeLanguageModelFields_2_0' * credentials: * $ref: '#/components/schemas/ILlmConfigurationCredentials_2_0' * * ICreateLlmConfigurationRestReturnValue_2_0: * type: object * properties: * largeLanguageModel: * $ref: '#/components/schemas/ILargeLanguageModel_2_0' * credentials: * $ref: '#/components/schemas/ILlmConfigurationCredentialsSummary_2_0' * configSet: * $ref: '#/components/schemas/ILlmConfigurationConfigSetResult_2_0' */ /** * Mirrors `TUpsertLlmConfigurationLargeLanguageModel` at the RPC layer (same exclusions: * `connectionId` is always derived from `credentials`; entity-meta/global-resource keys and * every server-managed key are never client-settable) but expressed against the REST-facing * `ILargeLanguageModel_2_0` shape rather than the internal one. */ export declare type TLlmConfigurationLargeLanguageModel_2_0 = Partial>; /** * `mode: "create"` is CREATE-ONLY — the controller rejects it with a `BadRequestError` when * updating an existing large language model. Kept as one shared union (rather than a * create-only vs. update-only variant) because it mirrors * `TUpsertLlmConfigurationCredentials` at the RPC layer exactly, which makes the same * deliberate choice for the same reason (see that type's own doc comment). */ export declare type TLlmConfigurationCredentials_2_0 = { mode: "create"; name: string; type: string; fields: Record; } | { mode: "reuse"; referenceId: string; } | { mode: "update"; referenceId: string; fields: Record; }; export interface ICreateLlmConfigurationRestDataBody_2_0 extends Partial { /** Project-level unless `resourceLevel === "organisation"`. */ resourceLevel?: "project" | "organisation"; largeLanguageModel: TLlmConfigurationLargeLanguageModel_2_0; /** Required on create — either creates new credentials or reuses/patches existing ones. */ credentials: TLlmConfigurationCredentials_2_0; } export interface ICreateLlmConfigurationRestData_2_0 extends ICreateLlmConfigurationRestDataBody_2_0 { } export interface ICreateLlmConfigurationRestReturnValue_2_0 { largeLanguageModel: ILargeLanguageModel_2_0; /** Absent only in the pathological case an updated LLM has no connectionId at all. NEVER includes `fields`. */ credentials?: { referenceId: string; name: string; type: string; }; configSet: { status: "synced" | "skipped"; configSetId?: string; skippedReason?: "providerUnsupported" | "noConnection" | "rolloutDisabled" | "inPlatformManaged" | "gatewayUnconfigured"; }; } /** * @openapi * * components: * schemas: * ILlmConfigurationCredentialsUpdateInput_2_0: * description: | * Same union as `ILlmConfigurationCredentials_2_0`, but `mode: "create"` is rejected * on PATCH with a 400 — re-keying an existing large language model onto brand-new * credentials would either orphan its previous Connection or require new cascade-delete * logic. Create a new LLM configuration (`POST`) instead if you need fresh credentials. * oneOf: * - $ref: '#/components/schemas/ILlmConfigurationCredentialsReuse_2_0' * - $ref: '#/components/schemas/ILlmConfigurationCredentialsUpdate_2_0' * * IUpdateLlmConfigurationRestDataBody_2_0: * type: object * required: [largeLanguageModel] * description: | * `largeLanguageModel` must contain at least one property, even when the only intent is * to change `credentials` — this is a constraint of the underlying RPC schema, not a * REST-layer choice. * properties: * largeLanguageModel: * $ref: '#/components/schemas/ILlmConfigurationLargeLanguageModelFields_2_0' * credentials: * $ref: '#/components/schemas/ILlmConfigurationCredentialsUpdateInput_2_0' * * IUpdateLlmConfigurationRestReturnValue_2_0: * type: object * properties: * largeLanguageModel: * $ref: '#/components/schemas/ILargeLanguageModel_2_0' * credentials: * $ref: '#/components/schemas/ILlmConfigurationCredentialsSummary_2_0' * configSet: * $ref: '#/components/schemas/ILlmConfigurationConfigSetResult_2_0' */ export interface IUpdateLlmConfigurationRestDataBody_2_0 { /** Required, and must have at least one property — see this file's header comment. */ largeLanguageModel: TLlmConfigurationLargeLanguageModel_2_0; /** * Omitting this entirely means "credentials unchanged" (a Config Set push is still * triggered). `mode: "create"` is structurally still part of the shared union type (see * `TLlmConfigurationCredentials_2_0`'s own comment) but is rejected at runtime with a * `BadRequestError` on PATCH. */ credentials?: TLlmConfigurationCredentials_2_0; } export interface IUpdateLlmConfigurationRestDataParams_2_0 { largeLanguageModelId: string; } export interface IUpdateLlmConfigurationRestData_2_0 extends IUpdateLlmConfigurationRestDataBody_2_0, IUpdateLlmConfigurationRestDataParams_2_0 { } export interface IUpdateLlmConfigurationRestReturnValue_2_0 { largeLanguageModel: ILargeLanguageModel_2_0; credentials?: { referenceId: string; name: string; type: string; }; configSet: { status: "synced" | "skipped"; configSetId?: string; skippedReason?: "providerUnsupported" | "noConnection" | "rolloutDisabled" | "inPlatformManaged" | "gatewayUnconfigured"; }; } /** * @file WP4 (C26) — see `ICreateLlmConfigurationRest_2_0.ts`'s file header for surface-wide * context. */ export interface IDeleteLlmConfigurationRestDataParams_2_0 { largeLanguageModelId: string; } export interface IDeleteLlmConfigurationRestQuery_2_0 { /** "true" | "false" (string, like `force` on `DELETE /v2.0/largelanguagemodels/:id`). */ force?: string; /** * "true" | "false". Opt-in cascade — default false. Refused with a 409 `ConflictError` when * another LLM configuration still references the same Connection. This route's own * `credentials` vocabulary, even though it deletes the (unrenamed) Connection underneath. */ deleteCredentials?: string; } export interface IDeleteLlmConfigurationRestData_2_0 extends IDeleteLlmConfigurationRestDataParams_2_0, IDeleteLlmConfigurationRestQuery_2_0 { } export interface IDeleteLlmConfigurationRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ILlmConfigurationCredentialsReadSummary_2_0: * type: object * description: | * Never includes `_id` or credential values (masked or otherwise) — identical in * shape to `ILlmConfigurationCredentialsSummary_2_0`. Masked-field viewing is out of * scope for this route; use `GET /v2.0/connections/{id}` for that. * properties: * referenceId: * type: string * format: uuid * name: * type: string * type: * type: string * * IReadLlmConfigurationRestReturnValue_2_0: * type: object * properties: * largeLanguageModel: * $ref: '#/components/schemas/ILargeLanguageModel_2_0' * credentials: * $ref: '#/components/schemas/ILlmConfigurationCredentialsReadSummary_2_0' * configSet: * $ref: '#/components/schemas/ILlmConfigurationConfigSetResult_2_0' */ export interface ILlmConfigurationCredentialsReadSummary_2_0 { referenceId: string; name: string; type: string; } export interface IReadLlmConfigurationRestDataParams_2_0 { largeLanguageModelId: string; } export interface IReadLlmConfigurationRestData_2_0 extends IReadLlmConfigurationRestDataParams_2_0 { } export interface IReadLlmConfigurationRestReturnValue_2_0 { /** `configSetId` is stripped — see `configSet.configSetId` instead. */ largeLanguageModel: ILargeLanguageModel_2_0; /** Absent on a dangling/missing `connectionId` — never an error. NEVER includes `fields`. */ credentials?: ILlmConfigurationCredentialsReadSummary_2_0; /** Existence only — no sync health (staleness/retry/failure). Same shape as the write routes'. */ configSet: ICreateLlmConfigurationRestReturnValue_2_0["configSet"]; } export interface ILlmConfigurationIndexItem_2_0 { /** `configSetId` is stripped — see `configSet.configSetId` instead. */ largeLanguageModel: ILargeLanguageModelIndexItem_2_0; /** Absent on a dangling/missing `connectionId` for this row — never an error. */ credentials?: ILlmConfigurationCredentialsReadSummary_2_0; configSet: ICreateLlmConfigurationRestReturnValue_2_0["configSet"]; } export interface IIndexLlmConfigurationsRestData_2_0 extends IRestPagination, Pick, Partial, Partial { } export interface IIndexLlmConfigurationsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IKnowledgeStoreDataCreate_2_0: * allOf: * - type: object * properties: * name: * type: string * example: "mystore" * description: The name of the KnowledgeStore * description: * type: string * example: "mystore description" * description: The description about what the knowledge store contains * * IKnowledgeStoreData_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeStoreDataCreate_2_0' * - type: object * properties: * language: * type: string * example: "en-US" * description: The language code * status: * type: string * enum: * - ready * - warning * documents: * type: array * items: * type: string * example: "https://some-website.com/knowledgebase.txt" * description: The document url or the file name ingested for the knowledge store * * IKnowledgeStoreGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * IKnowledgeStore_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeStoreData_2_0' * - $ref: '#/components/schemas/IKnowledgeStoreGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IKnowledgeStore_2_0 { _id: TMongoId; referenceId: string; name: string; description: string; status: TKnowledgeStoreStatus; language: string; documents: string[]; projectReference: TMongoId; organisationReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexKnowledgeStoresRestData_2_0 extends IRestPagination, Partial { } export interface IIndexKnowledgeStoresRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateKnowledgeStoreRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateKnowledgeStoreRestData_2_0 extends ICreateKnowledgeStoreRestDataBody_2_0 { } export interface ICreateKnowledgeStoreRestReturnValue_2_0 extends IKnowledgeStore_2_0 { } export interface IReadKnowledgeStoreRestDataParams_2_0 { knowledgeStoreId: string; } export interface IReadKnowledgeStoreRestData_2_0 extends IReadKnowledgeStoreRestDataParams_2_0 { } export interface IReadKnowledgeStoreRestReturnValue_2_0 extends IKnowledgeStore_2_0 { } export interface IDeleteKnowledgeStoreRestDataParams_2_0 { knowledgeStoreId: string; } export interface IDeleteKnowledgeStoreRestData_2_0 extends IDeleteKnowledgeStoreRestDataParams_2_0 { } export interface IDeleteKnowledgeStoreRestReturnValue_2_0 { } export interface IUpdateKnowledgeStoreRestDataBody_2_0 extends Partial> { } export interface IUpdateKnowledgeStoreRestDataParams_2_0 { knowledgeStoreId: string; } export interface IUpdateKnowledgeStoreRestData_2_0 extends IUpdateKnowledgeStoreRestDataBody_2_0, IUpdateKnowledgeStoreRestDataParams_2_0 { } export interface IUpdateKnowledgeStoreRestReturnValue_2_0 { } export interface IIndexKnowledgeDescriptorsRestDataParams_2_0 { knowledgeStoreId: string; } export interface IIndexKnowledgeDescriptorsRestData_2_0 extends IIndexKnowledgeDescriptorsRestDataParams_2_0 { } export interface IIndexKnowledgeDescriptorsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } declare const knowledgeSourceStatus: readonly [ "ready", "ingesting", "disabled", "failure" ]; export declare type TKnowledgeSourceStatus = typeof knowledgeSourceStatus[number]; declare const knowledgeSourceType: readonly [ "pdf", "txt", "docx", "pptx", "ctxt", "url", "manual", "jpeg", "jpg", "png", "bmp", "heif", "tiff", "extension" ]; export declare type TKnowledgeSourceType = typeof knowledgeSourceType[number]; export interface IKnowledgeSourceMetaData { size?: number; fileName?: string; mimeType?: string; url?: string; failReason?: string; tags?: string[]; extractedChunks?: number; extension?: { name: string; id: string; type: string; }; contentHashOrTimestamp?: string; externalIdentifier?: string; } /** * @openapi * * components: * schemas: * IKnowledgeSourceDataCreate_2_0: * allOf: * - type: object * properties: * name: * type: string * example: "mysource" * description: The name of the KnowledgeSource * description: * type: string * example: "mysource description" * description: The description about what the knowledge source contains * type: * type: string * enum: * - url * - manual * - pdf * - txt * - ctxt * - extension * description: The type of source for the Knowledge store * metaData: * type: object * properties: * tags: * type: array * items: * type: string * example: "tag1" * IKnowledgeSourceDataUpdate_2_0: * allOf: * - type: object * properties: * name: * type: string * example: "mysource" * description: The name of the KnowledgeSource * description: * type: string * example: "mysource description" * description: The description about what the knowledge source contains * status: * type: string * enum: * - ready * - ingesting * - disabled * metaData: * type: object * properties: * tags: * type: array * description: Array of tags to replace the existing tags * items: * type: string * example: "tag1" * IKnowledgeSourceDataTypeWebsite_2_0: * allOf: * - type: object * properties: * url: * type: string * example: "https://www.some-article.com" * description: The url of the website to scrape the data from. This is only applicable for KnowledgeSources of type "url" * * IKnowledgeSourceData_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeSourceDataCreate_2_0' * - type: object * properties: * metaData: * type: object * data: * type: object * additionalProperties: true * description: Custom metadata object to store additional information in the KnowledgeSource * example: * _id: "x4xU6hMntv23p" * sys_CreatedAt: "2019-12-16T11:40:45.7212" * sys_UpdatedAt: "2025-10-01T07:46:04.5932" * Type: "FAQ" * chunkCount: * type: integer * status: * type: string * enum: * - ready * - ingesting * - disabled * connectorReference: * type: string * format: uuid * description: The connector Id associated with the KnowledgeSource. This is only applicable for KnowledgeSources of type "extension" * * IKnowledgeSourceGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * IKnowledgeSourceDataTypeExtension_2_0: * type: object * properties: * connectorId: * type: string * format: uuid * description: The connector Id associated with the KnowledgeSource. This is only applicable for KnowledgeSources of type "extension" * example: * name: "mysource" * description: "mysource description" * type: "extension" * metaData: * tags: ["tag1"] * connectorId: "uuid" * IKnowledgeSource_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeSourceData_2_0' * - $ref: '#/components/schemas/IKnowledgeSourceGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IKnowledgeSource_2_0 { _id: TMongoId; referenceId: string; name: string; description: string; status: TKnowledgeSourceStatus; type: TKnowledgeSourceType; chunkCount: number; metaData: IKnowledgeSourceMetaData; data: Record; storeReference: TMongoId; connectorReference?: TMongoId | null; projectReference: TMongoId; organisationReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexKnowledgeSourcesRestDataParams_2_0 { knowledgeStoreId: string; } export interface IIndexKnowledgeSourcesRestData_2_0 extends IIndexKnowledgeSourcesRestDataParams_2_0, IRestPagination { } export interface IIndexKnowledgeSourcesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateKnowledgeSourceRestDataParams_2_0 { knowledgeStoreId: string; } export interface ICreateKnowledgeSourceRestDataBody_2_0 extends Partial> { url?: string; } export interface ICreateKnowledgeSourceRestData_2_0 extends ICreateKnowledgeSourceRestDataParams_2_0, ICreateKnowledgeSourceRestDataBody_2_0 { } export interface ICreateKnowledgeSourceRestReturnValue_2_0 { knowledgeSource?: IKnowledgeSource_2_0; taskData?: ICreatedTask_2_0; } export interface IReadKnowledgeSourceRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; } export interface IReadKnowledgeSourceRestData_2_0 extends IReadKnowledgeSourceRestDataParams_2_0 { } export interface IReadKnowledgeSourceRestReturnValue_2_0 extends IKnowledgeSource_2_0 { } export interface IDeleteKnowledgeSourceRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; } export interface IDeleteKnowledgeSourceRestData_2_0 extends IDeleteKnowledgeSourceRestDataParams_2_0 { } export interface IDeleteKnowledgeSourceRestReturnValue_2_0 { } export interface IUpdateKnowledgeSourceRestDataBody_2_0 extends Partial> { metaData?: Partial>; } export interface IUpdateKnowledgeSourceRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; } export interface IUpdateKnowledgeSourceRestData_2_0 extends IUpdateKnowledgeSourceRestDataBody_2_0, IUpdateKnowledgeSourceRestDataParams_2_0 { } export interface IUpdateKnowledgeSourceRestReturnValue_2_0 { } export interface IUploadKnowledgeSourceFileRestDataParams_2_0 { knowledgeStoreId: string; } export interface IUploadKnowledgeSourceFileRestDataBody_2_0 { file: File | Buffer; tags?: string[]; } export interface IUploadKnowledgeSourceFileRestData_2_0 extends IUploadKnowledgeSourceFileRestDataParams_2_0, IUploadKnowledgeSourceFileRestDataBody_2_0 { } export interface IUploadKnowledgeSourceFileRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * IKnowledgeChunkDataCreate_2_0: * allOf: * - type: object * properties: * order: * type: number * example: 1 * description: The name of the KnowledgeChunk * text: * type: string * example: "This is a paragraph from an article" * description: The text that is the actual content of the chunk * data: * type: object * description: The extended data of KnowledgeChunk * * IKnowledgeChunkData_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeChunkDataCreate_2_0' * - type: object * properties: * disabled: * type: boolean * enum: * - false * - true * description: The status to check if knowledge chunk is disabled * * IKnowledgeChunkGeneratedData_2_0: * type: object * properties: * referenceId: * type: string * format: uuid * * IKnowledgeChunk_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeChunkData_2_0' * - $ref: '#/components/schemas/IKnowledgeChunkGeneratedData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IKnowledgeChunk_2_0 { _id: TMongoId; referenceId: string; order: number; text: string; disabled: boolean; data: Record; storeReference: TMongoId; sourceReference: TMongoId; projectReference: TMongoId; organisationReference: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexKnowledgeChunksRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; } export interface IIndexKnowledgeChunksRestData_2_0 extends IIndexKnowledgeChunksRestDataParams_2_0, IRestPagination { } export interface IIndexKnowledgeChunksRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateKnowledgeChunkRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; } export interface ICreateKnowledgeChunkRestDataBody_2_0 extends Partial> { } export interface ICreateKnowledgeChunkRestData_2_0 extends ICreateKnowledgeChunkRestDataParams_2_0, ICreateKnowledgeChunkRestDataBody_2_0 { } export interface ICreateKnowledgeChunkRestReturnValue_2_0 extends IKnowledgeChunk_2_0 { } export interface IReadKnowledgeChunkRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; chunkId: string; } export interface IReadKnowledgeChunkRestData_2_0 extends IReadKnowledgeChunkRestDataParams_2_0 { } export interface IReadKnowledgeChunkRestReturnValue_2_0 extends IKnowledgeChunk_2_0 { } export interface IDeleteKnowledgeChunkRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; chunkId: string; } export interface IDeleteKnowledgeChunkRestData_2_0 extends IDeleteKnowledgeChunkRestDataParams_2_0 { } export interface IDeleteKnowledgeChunkRestReturnValue_2_0 { } export interface IUpdateKnowledgeChunkRestDataBody_2_0 extends Partial> { } export interface IUpdateKnowledgeChunkRestDataParams_2_0 { knowledgeStoreId: string; sourceId: string; chunkId: string; } export interface IUpdateKnowledgeChunkRestData_2_0 extends IUpdateKnowledgeChunkRestDataBody_2_0, IUpdateKnowledgeChunkRestDataParams_2_0 { } export interface IUpdateKnowledgeChunkRestReturnValue_2_0 { } export interface IRunKnowledgeExtensionRestDataParams_2_0 { knowledgeStoreId: string; } export interface IRunKnowledgeExtensionRestDataBody_2_0 { extension: string; type: string; updateKnowledge: boolean; config: object; } export interface IRunKnowledgeExtensionRestData_2_0 extends IRunKnowledgeExtensionRestDataParams_2_0, IRunKnowledgeExtensionRestDataBody_2_0 { } export interface IRunKnowledgeExtensionRestReturnValue_2_0 extends ICreatedTask_2_0 { } declare const knowledgeConnectorExecutionStatus: readonly [ "none", "active", "done", "error" ]; export declare type KnowledgeConnectorExecutionStatus = typeof knowledgeConnectorExecutionStatus[number]; /** * @openapi * * components: * schemas: * IKnowledgeConnectorCreatePayload_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeConnectorExtensionReference_2_0' * - $ref: '#/components/schemas/IKnowledgeConnectorDataCreateAndUpdate_2_0' * * IKnowledgeConnectorUpdatePayload_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeConnectorDataCreateAndUpdate_2_0' * * IKnowledgeConnectorExtensionReference_2_0: * type: object * properties: * extension: * type: string * description: The name of the extension * example: "confluence" * version: * type: string * description: The version of extension identifier * example: "1.1.0" * type: * type: string * description: The Knowledge Connector type identifier within an extension * example: "MyConfluenceConnector" * * IKnowledgeConnectorDataCreateAndUpdate_2_0: * type: object * properties: * config: * type: object * description: The configuration of the KnowledgeConnector * name: * type: string * description: The name of the KnowledgeConnector * example: "My Knowledge Connector" * schedule: * type: object * properties: * enabled: * type: boolean * description: If scheduled execution is enabled or not * example: true * hour: * type: number * description: Hour to start the scheduled execution, in UTC, set 0 or any value if schedule is disabled * example: 1 * minute: * type: number * description: Minute to start the scheduled execution, in UTC, set 0 or any value if schedule is disabled * example: 1 * weekDays: * type: array * items: * type: number * description: Repeat x days of the week, Sunday = 0 ... Saturday = 6 * example: [0,3] * * IKnowledgeConnectorData_2_0: * type: object * properties: * config: * type: object * description: The configuration of the KnowledgeConnector * name: * type: string * description: The name of the KnowledgeConnector * example: "My Knowledge Connector" * schedule: * type: object * properties: * enabled: * type: boolean * description: If scheduled execution is enabled or not * example: true * start: * $ref: '#/components/schemas/TTimestamp' * description: Start date and time to calculate scheduled execution, set internally * totalMinutes: * type: number * description: Total minutes for the scheduled execution, set internally * example: 1 * hour: * type: number * description: Hour to start the scheduled execution, in UTC, set 0 or any value if schedule is disabled * example: 1 * minute: * type: number * description: Minute to start the scheduled execution, in UTC, set 0 or any value if schedule is disabled * example: 1 * timezone: * type: string * description: Timezone for the scheduled execution in UTC, set internally * example: "UTC" * weekDays: * type: array * items: * type: number * description: Repeat x days of the week, Sunday = 0 ... Saturday = 6 * example: [0,3] * * IKnowledgeConnectorExecution_2_0: * type: object * properties: * lastExecution: * $ref: '#/components/schemas/TTimestamp' * description: Unix-timestamp when the last execution was triggered or null if never executed * lastExecutionStatus: * type: string * description: Last execution status of the KnowledgeConnector * enum: * - none * - queued * - active * - done * - error * * IKnowledgeConnector_2_0: * allOf: * - $ref: '#/components/schemas/IKnowledgeConnectorExtensionReference_2_0' * - $ref: '#/components/schemas/IKnowledgeConnectorData_2_0' * - $ref: '#/components/schemas/IKnowledgeConnectorExecution_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IKnowledgeConnector_2_0 { /** * Extension nam */ extension: string; /** * The type identifier of Knowledge Connector within an Extension */ type: string; /** * The version of the Knowledge Connector Extension */ version: string; /** * The configuration of the KnowledgeConnector */ config: Record; /** * The name of the KnowledgeConnector */ name: string; /** * Schedule configuration */ schedule: { /** * If scheduled execution is enabled or not */ enabled: boolean; /** * Start date and time to calculate scheduled execution */ start?: number; /** * Hour to start the scheduled execution */ hour: number; /** * Minute to start the scheduled execution */ minute: number; /** * Repeat x days of the week, Sunday = 0 ... Saturday = 6 */ weekDays: Array; /** * Timezone for the scheduled execution always UTC, set internally */ timezone?: string; /** * Total minutes for the scheduled execution, set internally */ totalMinutes?: number; }; _id: TMongoId; referenceId: TMongoId; /** * The knowledge store Id to which the KnowledgeSource belongs to */ storeReference: TMongoId; /** * The project Id to which the KnowledgeSource belongs to */ projectReference: TMongoId; /** * The organisation Id to which the KnowledgeSource belongs to */ organisationReference: TMongoId; /** * Time of last execution */ lastExecution: number | null; /** * Last execution status of the KnowledgeConnector */ lastExecutionStatus: KnowledgeConnectorExecutionStatus; /** * Unix-timestamp when the enKnowledgeSourcetity was created initially */ createdAt: number; /** * Unix-timestamp when the KnowledgeSource was changed last time */ lastChanged: number; /** * Id of the user who created the KnowledgeSource initially */ createdBy: TMongoId; /** * Id of the user who did the last modification */ lastChangedBy: TMongoId; } export interface ICreateKnowledgeConnectorRestDataParams_2_0 { knowledgeStoreId: string; } export interface ICreateKnowledgeConnectorRestDataBody_2_0 { extension: string; type: string; version: string; config: object; name: string; schedule: { enabled: boolean; weekDays: Array; hour: number; minute: number; }; } export interface ICreateKnowledgeConnectorRestData_2_0 extends ICreateKnowledgeConnectorRestDataParams_2_0, ICreateKnowledgeConnectorRestDataBody_2_0 { } export interface ICreateKnowledgeConnectorRestReturnValue_2_0 extends IKnowledgeConnector_2_0 { } export interface IIndexKnowledgeConnectorsRestDataParams_2_0 { knowledgeStoreId: string; } export interface IIndexKnowledgeConnectorsRestData_2_0 extends IIndexKnowledgeConnectorsRestDataParams_2_0, IRestPagination { } export interface IIndexKnowledgeConnectorsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadKnowledgeConnectorRestDataParams_2_0 { knowledgeStoreId: string; connectorId: string; } export interface IReadKnowledgeConnectorRestData_2_0 extends IReadKnowledgeConnectorRestDataParams_2_0 { } export interface IReadKnowledgeConnectorRestReturnValue_2_0 extends IKnowledgeConnector_2_0 { } export interface IDeleteKnowledgeConnectorRestDataParams_2_0 { knowledgeStoreId: string; connectorId: string; } export interface IDeleteKnowledgeConnectorRestData_2_0 extends IDeleteKnowledgeConnectorRestDataParams_2_0 { } export interface IDeleteKnowledgeConnectorRestReturnValue_2_0 { } export interface IUpdateKnowledgeConnectorRestDataBody_2_0 extends Partial> { } export interface IUpdateKnowledgeConnectorRestDataParams_2_0 { knowledgeStoreId: string; connectorId: string; } export interface IUpdateKnowledgeConnectorRestData_2_0 extends IUpdateKnowledgeConnectorRestDataBody_2_0, IUpdateKnowledgeConnectorRestDataParams_2_0 { } export interface IUpdateKnowledgeConnectorRestReturnValue_2_0 { } export interface IRunKnowledgeConnectorRestDataParams_2_0 { knowledgeStoreId: string; connectorId: string; } export interface IRunKnowledgeConnectorRestData_2_0 extends IRunKnowledgeConnectorRestDataParams_2_0 { } export interface IRunKnowledgeConnectorRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * * components: * schemas: * IGoalIndexItem_2_0: * allOf: * - type: object * properties: * name: * type: string * description: The name of the goal * example: New Goal * - $ref: '#/components/schemas/IEntityMeta' */ export interface IGoalIndexItem_2_0 { _id: TMongoId; referenceId: string; name: string; description?: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexGoalsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexGoalsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IGoalStepMetric_2_0: * type: object * properties: * name: * type: string * description: The name of the metric * example: Duration * description: * type: string * description: The description of the metric * example: Time taken to complete the step * type: * type: string * description: Metric type. Available values "currency", "duration", "revenue" * example: "duration" * value: * type: number * description: Metric value * example: 30 */ export interface IGoalStepMetric_2_0 { name: string; description: string; type?: "currency" | "duration" | "revenue"; value?: number; } /** * @openapi * components: * schemas: * IGoalStep_2_0: * type: object * properties: * name: * type: string * description: The name of the goal step * example: Step 1 * description: * type: string * description: The description of the goal step * example: This is the first step * order: * type: number * description: Step order in the goal configuration * example: 1 * type: * type: string * description: Step type * example: "start" * metrics: * type: array * items: * $ref: '#/components/schemas/IGoalStepMetric_2_0' */ export interface IGoalStep_2_0 { _id?: TMongoId; name?: string; description?: string; order?: number; type?: "start" | "completion"; metrics?: IGoalStepMetric_2_0[]; } /** * @openapi * * components: * schemas: * IGoalData_2_0: * type: object * properties: * name: * type: string * description: The name of the Goal * example: New Goal * description: * type: string * description: The description of the goal * example: "This is a sample goal" * steps: * type: array * items: * $ref: '#/components/schemas/IGoalStep_2_0' * * IGoal_2_0: * allOf: * - $ref: '#/components/schemas/IGoalData_2_0' * - $ref: '#/components/schemas/IEntityMeta' * */ export interface IGoal_2_0 { _id: TMongoId; referenceId: string; name: string; version: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; description: string; steps: IGoalStep_2_0[]; } export interface ICreateGoalRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateGoalRestData_2_0 extends ICreateGoalRestDataBody_2_0 { } export interface ICreateGoalRestReturnValue_2_0 extends IGoal_2_0 { } export interface IReadGoalRestDataParams_2_0 { goalId: string; } export interface IReadGoalRestData_2_0 extends IReadGoalRestDataParams_2_0 { } export interface IReadGoalRestReturnValue_2_0 extends IGoal_2_0 { } export interface IUpdateGoalRestDataParams_2_0 { goalId: string; } export interface IUpdateGoalRestDataBody_2_0 extends Partial> { } export interface IUpdateGoalRestData_2_0 extends IUpdateGoalRestDataBody_2_0, IUpdateGoalRestDataParams_2_0 { } export interface IUpdateGoalRestReturnValue_2_0 { } export interface IDeleteGoalRestDataParams_2_0 { goalId: string; } export interface IDeleteGoalRestData_2_0 extends IDeleteGoalRestDataParams_2_0 { } export interface IDeleteGoalRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IHandoverProvider_2_0: * type: object * properties: * _id: * type: string * format: mongoId * description: The object id of the handover provider * referenceId: * type: string * description: The referenceId of the handover provider * organisationId: * type: string * description: The organisation Id associated with the handover provider * serviceId: * type: string * description: The id of the service * service: * type: string * description: The handover provider's specified service; e.g., Live Agent, Genesys * name: * type: string * description: The name of the handover provider resource * createdAt: * type: integer * format: int64 * description: Unix-timestamp when the entity was created initially * lastChangedAt: * type: integer * format: int64 * description: Unix-timestamp when the entity was last modified * createdBy: * type: string * format: mongoId * description: Id of the user who created the entity initially * lastChangedBy: * type: string * format: mongoId * description: Id of the user who made the last modification * properties: * type: array * items: * type: object * description: Properties associated with the handover provider * additionalProperties: * type: string * description: A list of properties associated with the handover provider * settings: * type: object * description: Settings related to the handover provider * additionalProperties: * type: string */ export interface IHandoverProvider_2_0 { _id: TMongoId; referenceId: string; organisationId: string; serviceId: string; service: THandoverService; /** The name of the handover provider resource */ name: string; createdAt: number; lastChangedAt: number; createdBy: TMongoId; lastChangedBy: TMongoId; properties: IHandoverProviderProperty[]; settings: IHandoverProviderSettings_2_0; } export interface IHandoverProviderSettings_2_0 { service: THandoverService; serviceSettings?: TServiceSettings; } export interface IIndexHandoverProvidersRestData_2_0 extends IRestPagination, Partial { } export interface IIndexHandoverProvidersRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateHandoverProviderRestDataBody_2_0 extends IProjectScope, Partial> { } export interface ICreateHandoverProviderRestDataQuery_2_0 { resourceId?: string; } export interface ICreateHandoverProviderRestData_2_0 extends ICreateHandoverProviderRestDataBody_2_0, ICreateHandoverProviderRestDataQuery_2_0 { } export interface ICreateHandoverProviderRestReturnValue_2_0 extends IHandoverProvider_2_0 { } export interface IReadHandoverProviderRestDataParams_2_0 { handoverProviderId: string; } export interface IReadHandoverProviderRestData_2_0 extends IReadHandoverProviderRestDataParams_2_0 { } export interface IReadHandoverProviderRestReturnValue_2_0 extends IHandoverProvider_2_0 { } export interface IUpdateHandoverProviderRestDataBody_2_0 extends Partial> { } export interface IUpdateHandoverProviderRestDataParams_2_0 { handoverProviderId: string; projectId: string; } export interface IUpdateHandoverProviderRestData_2_0 extends IUpdateHandoverProviderRestDataBody_2_0, IUpdateHandoverProviderRestDataParams_2_0 { } export interface IUpdateHandoverProviderRestReturnValue_2_0 extends IHandoverProvider_2_0 { } export interface IDeleteHandoverProviderRestDataParams_2_0 { handoverProviderId: string; projectId: string; } export interface IDeleteHandoverProviderRestData_2_0 extends IDeleteHandoverProviderRestDataParams_2_0 { } export interface IDeleteHandoverProviderRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IHandoverService_2_0: * type: object * properties: * _id: * type: string * format: mongoId * description: The object id of the handover service * referenceId: * type: string * format: uuid * description: The referenceId of the handover service * version: * type: string * description: The version of the handover service * name: * type: string * description: The name of the handover service * serviceUrl: * type: string * format: uri * description: The service URL of the handover service * logoUrl: * type: string * format: uri * description: The logo URL of the handover service * properties: * type: array * items: * type: object * description: Properties associated with the handover service * additionalProperties: * type: string * description: A list of properties for the handover service */ export interface IHandoverService_2_0 { _id: TMongoId; referenceId: string; version: string; name: string; serviceUrl: string; logoUrl: string; properties: IHandoverServiceProperties[]; } export interface IIndexHandoverServicesRestData_2_0 extends IRestPagination, Partial { } export interface IIndexHandoverServicesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * `grid` pins every widget to a fixed cell; `hybrid` (the default for a new Copilot) * splits the space into a pinned band and a scrolling feed. `single` is accepted on * read only, for configs written before single/stack layouts were scoped out. */ export declare type TCopilotLayoutMode = "grid" | "hybrid" | "single"; /** * A widget's id: a template's, a system widget's, or any id the author gave a * custom widget. `string & {}` keeps the known ids suggested. */ export declare type TCopilotWidgetKey = "customer-sentiment" | "real-time-summary" | "knowledge-base-answer" | "autosummary" | "system-real-time-summary" | "system-customer-sentiment" | "system-auto-summary" | "system-knowledge-hub" | (string & {}); /** The rule deciding whether a widget produces a card for a given turn. */ export declare type TCopilotRunsWhen = "everyTurn" | "onAgentQuestion" | "endOfContact"; /** The audience a widget runs for. Fixed at `allContacts` in phase 1. */ export declare type TCopilotRunsFor = "allContacts"; /** * What an unpinned widget does when it fires again: append another card to the * feed, or rewrite the one it already has. Required on an unpinned hybrid * placement, rejected on either positioned shape. */ export declare type TCopilotUnpinnedBehavior = "newTile" | "sameTile"; /** * @openapi * * components: * schemas: * ICopilotSpace_2_0: * type: object * description: How much room the Copilot has in the agent's workspace. * properties: * columns: * type: integer * rows: * type: integer * gap: * type: integer */ export interface ICopilotSpace_2_0 { columns: number; rows: number; gap: number; } /** * @openapi * * components: * schemas: * ICopilotWidgetPlacement_2_0: * type: object * description: > * Where a widget sits. Which fields are present depends on the layout: grid * requires column/row/width/height and omits pinned (a grid cell is a pin by * definition); hybrid unpinned sets pinned false with only height; * hybrid pinned sets pinned true plus the full position and size. * properties: * pinned: * type: boolean * column: * type: integer * row: * type: integer * width: * type: integer * height: * type: integer * unpinnedBehavior: * type: string * enum: [newTile, sameTile] */ export interface ICopilotWidgetPlacement_2_0 { pinned?: boolean; column?: number; row?: number; width?: number; height: number; unpinnedBehavior?: TCopilotUnpinnedBehavior; } /** * @openapi * * components: * schemas: * ICopilotWidget_2_0: * type: object * description: One placed widget and the settings the builder may edit for it. * properties: * key: * type: string * description: > * The widget's id in this Copilot: a template's (customer-sentiment, * real-time-summary, knowledge-base-answer, autosummary), a system * widget's (system-real-time-summary, system-customer-sentiment, * system-auto-summary, system-knowledge-hub), or any id the author * gave a custom widget. * name: * type: string * description: * type: string * runsWhen: * type: string * enum: [everyTurn, onAgentQuestion, endOfContact] * runsFor: * type: string * enum: [allContacts] * placement: * $ref: '#/components/schemas/ICopilotWidgetPlacement_2_0' */ export interface ICopilotWidget_2_0 { key: TCopilotWidgetKey; name: string; description: string; runsWhen: TCopilotRunsWhen; runsFor: TCopilotRunsFor; placement: ICopilotWidgetPlacement_2_0; } /** * @openapi * * components: * schemas: * ICopilotPublication_2_0: * type: object * description: What a completed deploy produced. Null until a deploy has completed. * properties: * publishedAt: * type: integer * description: Unix timestamp in seconds. * flowCount: * type: integer * orchestrationFlowName: * type: string * orchestrationFlowLink: * type: string * endpointName: * type: string * endpointLink: * type: string */ export interface ICopilotPublication_2_0 { publishedAt: number; flowCount: number; orchestrationFlowName: string; orchestrationFlowLink: string; endpointName: string; endpointLink: string; } /** * @openapi * * components: * schemas: * ICopilotConfig_2_0: * type: object * properties: * _id: * type: string * format: mongoId * description: The object id of the Copilot config * name: * type: string * description: The name of the Copilot config * description: * type: string * description: The description of the Copilot config * referenceId: * type: string * format: uuid * description: The referenceId of the Copilot config * projectReference: * type: string * format: mongoId * description: The id of the project the Copilot config belongs to * organisationReference: * type: string * description: The id of the organisation the Copilot config belongs to * createdAt: * type: integer * description: Unix timestamp (seconds) of when the Copilot config was created * lastChanged: * type: integer * description: Unix timestamp (seconds) of when the Copilot config was last changed * createdBy: * type: string * description: The id of the user who created the Copilot config * lastChangedBy: * type: string * description: The id of the user who last changed the Copilot config * layoutMode: * type: string * enum: [grid, hybrid, single] * description: The layout mode of the Copilot config * space: * $ref: '#/components/schemas/ICopilotSpace_2_0' * widgets: * type: array * description: Always an array, never null, even when empty. * items: * $ref: '#/components/schemas/ICopilotWidget_2_0' * hasEverSaved: * type: boolean * description: > * True once a save has succeeded at least once. Not the same as * `published` — publishing is asynchronous, so a config is routinely * saved while still unpublished. * published: * type: boolean * description: Whether the Copilot config is published * publication: * allOf: * - $ref: '#/components/schemas/ICopilotPublication_2_0' * nullable: true * description: The last completed deploy, or null if none has finished. * agenticProfileId: * type: string * description: > * The CXone agentic profile picked for this Copilot, by its * agentAssistId. Absent when none is picked. * agenticProfileLinked: * type: boolean * description: > * Whether this Copilot's endpoint has been written into that profile * yet. Set after a successful deploy, so it can trail a save. * agenticProfileSyncPending: * type: boolean * description: > * True while a deploy has landed but its profile link, switch or * clear is still in flight. A polling client keeps polling while * this is true. */ export interface ICopilotConfig_2_0 { _id: TMongoId; name: string; description: string; referenceId: string; projectReference: TMongoId; organisationReference: string; createdAt: number; lastChanged: number; createdBy: string; lastChangedBy: string; layoutMode: TCopilotLayoutMode; space: ICopilotSpace_2_0; widgets: ICopilotWidget_2_0[]; hasEverSaved: boolean; published: boolean; publication: ICopilotPublication_2_0 | null; /** The CXone agentic profile picked for this Copilot, when one was. */ agenticProfileId?: string; /** Whether this Copilot's endpoint has been written into that profile yet. */ agenticProfileLinked?: boolean; /** Whether a profile link, switch or clear is still in flight after the deploy. */ agenticProfileSyncPending?: boolean; } /** The client-facing shape (typed `sort`), as opposed to the flat wire-level query above. */ export interface IIndexCopilotConfigsRestData_2_0 extends IRestPagination, IProjectScope { } export interface IIndexCopilotConfigsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadCopilotConfigRestDataParams_2_0 { configId: string; } /** * `projectId` is carried alongside the id rather than inferred: the Copilot * service scopes every read by project, and a read that resolved an id without * one would cross project boundaries. */ export interface IReadCopilotConfigRestData_2_0 extends IReadCopilotConfigRestDataParams_2_0, IProjectScope { } export interface IReadCopilotConfigRestReturnValue_2_0 extends ICopilotConfig_2_0 { } /** * @openapi * * components: * schemas: * ISaveCopilotConfigRestDataBody_2_0: * type: object * description: > * The workspace JSON. Create and re-save take the same body - the only * difference is whether an id is supplied - so a rule added to one * cannot drift from the other. Ownership (organisation, createdBy, * lastChangedBy) is established from the session, never from here. * required: * - name * - layoutMode * - space * - widgets * properties: * name: * type: string * description: Required, and required after trimming - a name of spaces is not a name. * description: * type: string * layoutMode: * type: string * enum: [grid, hybrid] * description: '`single` is readable but cannot be saved.' * space: * $ref: '#/components/schemas/ICopilotSpace_2_0' * widgets: * type: array * description: At least one widget - the other half of the save gate, alongside a name. * items: * $ref: '#/components/schemas/ICopilotWidget_2_0' * agenticProfileId: * type: string * description: > * The CXone agentic profile to link this Copilot to, by its * agentAssistId. Omit or send empty for none. Needs agentic * profiles switched on and an organisation connected to CXone. */ export interface ISaveCopilotConfigRestDataBody_2_0 { name: string; description?: string; /** `single` is readable but not saveable, so it is not offered here. */ layoutMode: Exclude; space: ICopilotSpace_2_0; widgets: ICopilotWidget_2_0[]; /** The CXone agentic profile to link this Copilot to; omit for none. */ agenticProfileId?: string; } export interface ICreateCopilotConfigRestData_2_0 extends ISaveCopilotConfigRestDataBody_2_0, IProjectScope { } export interface ICreateCopilotConfigRestReturnValue_2_0 extends ICopilotConfig_2_0 { } export interface IUpdateCopilotConfigRestDataParams_2_0 { configId: string; } export interface IUpdateCopilotConfigRestData_2_0 extends ISaveCopilotConfigRestDataBody_2_0, IUpdateCopilotConfigRestDataParams_2_0, IProjectScope { } export interface IUpdateCopilotConfigRestReturnValue_2_0 extends ICopilotConfig_2_0 { } export interface IDeleteCopilotConfigRestDataParams_2_0 { configId: string; } export interface IDeleteCopilotConfigRestData_2_0 extends IDeleteCopilotConfigRestDataParams_2_0, IProjectScope { } /** The Copilot service answers a delete with 204 and no body. */ export interface IDeleteCopilotConfigRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IPrebuiltCopilotWidget_2_0: * type: object * description: One entry in the read-only catalog of widgets a Copilot can place. * properties: * key: * type: string * description: > * The entry's id: a template's (customer-sentiment, real-time-summary, * knowledge-base-answer, autosummary) or, while agentic profiles are on, * a system widget's (system-real-time-summary, system-customer-sentiment, * system-auto-summary, system-knowledge-hub). * name: * type: string * description: * type: string * defaultHeight: * type: integer * description: Height in rows when the widget is first placed. * defaultRunsWhen: * type: string * enum: [everyTurn, onAgentQuestion, endOfContact] * kind: * type: string * enum: [template, system] * description: > * "system" for a system widget, whose content comes from RTI through * an agentic profile; "template" for every other entry. */ export interface IPrebuiltCopilotWidget_2_0 { key: TCopilotWidgetKey; name: string; description: string; defaultHeight: number; defaultRunsWhen: TCopilotRunsWhen; /** * "system" for a system widget (its content comes from RTI through an * agentic profile), "template" for every other entry. */ kind?: "template" | "system"; } /** * @openapi * * components: * schemas: * IIndexPrebuiltCopilotWidgetsRestReturnValue_2_0: * type: object * description: > * The widget catalog plus the space derived from it. Unscoped - the * catalog is the same for every Project, and the create dialog reads it * before any Copilot config exists, to size a new one's default space * from the sum of the widget heights. * properties: * widgets: * type: array * items: * $ref: '#/components/schemas/IPrebuiltCopilotWidget_2_0' * defaultSpace: * $ref: '#/components/schemas/ICopilotSpace_2_0' */ export interface IIndexPrebuiltCopilotWidgetsRestReturnValue_2_0 { widgets: IPrebuiltCopilotWidget_2_0[]; defaultSpace: ICopilotSpace_2_0; } /** Who said a turn in the sample transcript. */ export declare type TCopilotTranscriptSpeaker = "customer" | "agent"; /** * @openapi * * components: * schemas: * ICopilotTranscriptTurn_2_0: * type: object * description: One turn of the scripted conversation the Review tab steps through. * properties: * speaker: * type: string * enum: [customer, agent] * text: * type: string */ export interface ICopilotTranscriptTurn_2_0 { speaker: TCopilotTranscriptSpeaker; text: string; } /** * @openapi * * components: * schemas: * IReadCopilotSampleTranscriptRestReturnValue_2_0: * type: object * description: > * The sample transcript, in order. The order is part of the contract, * not a presentation detail - reaching the last turn is what fires the * end-of-contact trigger. Unscoped, like the widget catalog. * properties: * turns: * type: array * items: * $ref: '#/components/schemas/ICopilotTranscriptTurn_2_0' */ export interface IReadCopilotSampleTranscriptRestReturnValue_2_0 { turns: ICopilotTranscriptTurn_2_0[]; } export interface IOpenCopilotSessionRestDataParams_2_0 { configId: string; } /** * `projectId` is carried alongside the id for the same reason as the read: * the Copilot service scopes every session by project. */ export interface IOpenCopilotSessionRestData_2_0 extends IOpenCopilotSessionRestDataParams_2_0, IProjectScope { } /** * @openapi * * components: * schemas: * ICopilotSessionSocket_2_0: * type: object * description: Where the Review screen opens its socket, and what with. * properties: * serverUrl: * type: string * description: The endpoint host's origin. * clientScript: * type: string * description: > * The socket client library, served by the endpoint host itself so * its version always matches the server it talks to. * urlToken: * type: string * description: Sent in the socket handshake query, alongside userId and sessionId. */ export interface ICopilotSessionSocket_2_0 { serverUrl: string; clientScript: string; urlToken: string; } /** * @openapi * * components: * schemas: * ICopilotSessionFlow_2_0: * type: object * description: One flow the deploy that backs this session produced. * properties: * _id: * type: string * name: * type: string * link: * type: string * description: The Cognigy UI origin, not the endpoint host. */ export interface ICopilotSessionFlow_2_0 { _id: string; name: string; link: string; } /** * @openapi * * components: * schemas: * IOpenCopilotSessionRestReturnValue_2_0: * type: object * description: > * One test contact against a deployed Copilot. Every call mints a NEW * userId/sessionId pair - this is "open", not "read" - and hands out * the endpoint's urlToken, which no other Copilot config response * carries. There is no transport of Cognigy's own here: both the * socket (opened with this response's `socket` block) and the Agent * Copilot workspace iframe (opened at `workspaceUrl`) talk to the * endpoint host directly with the same ids. * properties: * endpointUrl: * type: string * description: The deployed endpoint's own address, for display and as a REST fallback. * urlToken: * type: string * description: The endpoint's address token. * userId: * type: string * sessionId: * type: string * workspaceUrl: * type: string * description: > * The Agent Copilot workspace, already carrying this session's * ids - the iframe's src exactly as given. * socket: * $ref: '#/components/schemas/ICopilotSessionSocket_2_0' * flows: * type: array * description: What the last deploy built. Empty for a Copilot deployed before this was recorded. * items: * $ref: '#/components/schemas/ICopilotSessionFlow_2_0' * publishedAt: * type: integer * description: Unix timestamp in seconds, matching the config's publication. */ export interface IOpenCopilotSessionRestReturnValue_2_0 { endpointUrl: string; urlToken: string; userId: string; sessionId: string; workspaceUrl: string; socket: ICopilotSessionSocket_2_0; flows: ICopilotSessionFlow_2_0[]; publishedAt: number; } export interface ISendCopilotMessageRestDataParams_2_0 { configId: string; } /** * Who spoke. The endpoint carries one input stream and no notion of a * speaker, so whoever sends a turn has to say. `System` marks a contact * boundary rather than a person, and goes with `copilotEvent`. */ export declare type TCopilotMessageParticipant = "customer" | "agent" | "System"; /** * @openapi * * components: * schemas: * ISendCopilotMessageTextTurn_2_0: * type: object * description: > * A message somebody said. Sent as the customer or the agent, and * carries no copilotEvent. * required: * - text * - data * properties: * text: * type: string * minLength: 1 * pattern: '\S' * description: What was said. Must contain something other than whitespace. * data: * type: object * additionalProperties: false * required: * - participant * properties: * participant: * type: string * enum: * - customer * - agent * ISendCopilotMessageEventTurn_2_0: * type: object * description: > * A contact boundary rather than something anybody said. Sent as * System, and carries no text. * required: * - data * properties: * text: * type: string * maxLength: 0 * description: Must be absent or empty for an event turn. * data: * type: object * additionalProperties: false * required: * - participant * - copilotEvent * properties: * participant: * type: string * enum: * - System * copilotEvent: * type: string * description: > * start makes the once-per-contact setup run promptly; end * fires the end-of-contact widgets. * enum: * - start * - end * ISendCopilotMessageRestDataBody_2_0: * description: > * One turn for a Copilot's test contact: either a text turn (customer * or agent, with text) or an event turn (System, with copilotEvent). * The participant values of the two do not overlap, so a request * matches exactly one. * type: object * required: * - urlToken * - userId * - sessionId * - data * properties: * urlToken: * type: string * description: The urlToken the open-session operation returned. * userId: * type: string * description: The session's userId. * sessionId: * type: string * description: The session's sessionId. * oneOf: * - $ref: '#/components/schemas/ISendCopilotMessageTextTurn_2_0' * - $ref: '#/components/schemas/ISendCopilotMessageEventTurn_2_0' */ /** * The flat superset of the two turn shapes above. The service that receives the * turn enforces which combinations are valid (a text turn needs text, an event * turn needs participant System), so this type does not narrow them. */ export interface ISendCopilotMessageRestDataBody_2_0 { urlToken: string; userId: string; sessionId: string; text?: string; data: { participant: TCopilotMessageParticipant; copilotEvent?: "start" | "end"; }; } /** * `projectId` is carried alongside the id for the same reason as the open: * the Copilot service scopes every session by project. */ export interface ISendCopilotMessageRestData_2_0 extends ISendCopilotMessageRestDataBody_2_0, ISendCopilotMessageRestDataParams_2_0, IProjectScope { } /** * @openapi * * components: * schemas: * ISendCopilotMessageRestReturnValue_2_0: * type: object * description: > * An acknowledgement only. The endpoint acks before the flow runs, and * the Copilot's output reaches the Agent Copilot workspace on its own * connection. * properties: * status: * type: string * enum: * - message sent */ export interface ISendCopilotMessageRestReturnValue_2_0 { status: "message sent"; } /** * @openapi * * components: * schemas: * IAgenticProfileSummary_2_0: * type: object * description: One CXone agentic profile a Copilot may pick. * required: * - agentAssistId * - agentAssistGuid * - endpointLinked * properties: * agentAssistId: * type: string * description: The profile's id, which is also its name. * agentAssistGuid: * type: string * divisionId: * type: integer * description: The profile's CXone division. * endpointLinked: * type: boolean * description: Whether a Copilot's endpoint is already linked to it. * endpointName: * type: string * description: The linked endpoint's name, when one is set. * IIndexAgenticProfilesRestReturnValue_2_0: * type: object * required: * - items * properties: * items: * type: array * items: * $ref: '#/components/schemas/IAgenticProfileSummary_2_0' * IReadAgenticProfileRestReturnValue_2_0: * type: object * required: * - agentAssistId * - endpointLinked * - settings * properties: * agentAssistId: * type: string * endpointLinked: * type: boolean * settings: * type: object * additionalProperties: true * description: > * The profile's widget settings for Real-Time Summary, Customer * Sentiment, Autosummary and Knowledge Base Answer, keyed as * CXone Profile Hub stores them. Read only. */ export interface IAgenticProfileSummary_2_0 { agentAssistId: string; agentAssistGuid: string; divisionId: number; endpointLinked: boolean; endpointName?: string; } /** * `copilotConfigId` names the Copilot doing the picking, so the profile it * already holds stays in the list. Omitted for a Copilot not saved yet. */ export interface IIndexAgenticProfilesRestData_2_0 extends IProjectScope { copilotConfigId?: string; } export interface IIndexAgenticProfilesRestReturnValue_2_0 { items: IAgenticProfileSummary_2_0[]; } export interface IReadAgenticProfileRestDataParams_2_0 { /** The profile's agentAssistId. */ agenticProfileId: string; } export interface IReadAgenticProfileRestData_2_0 extends IReadAgenticProfileRestDataParams_2_0, IProjectScope { } export interface IReadAgenticProfileRestReturnValue_2_0 { agentAssistId: string; endpointLinked: boolean; settings: Record; } declare const uploadResumableTypes: readonly [ "snapshots", "packages" ]; export declare type TUploadResumableTypes = typeof uploadResumableTypes[number]; export interface HttpRequest { getMethod(): string; getURL(): string; setHeader(header: string, value: string): void; getHeader(header: string): string; setProgressHandler(handler: (bytesSent: number) => void): void; send(body: any): Promise; abort(): Promise; getUnderlyingObject(): any; } export interface HttpResponse { getStatus(): number; getHeader(header: string): string; getBody(): string; getUnderlyingObject(): any; } export interface IUploadResumableRestDataBody_2_0 extends IProjectScope { file: Buffer | File; onError?: ((error: Error) => void) | null; onProgress?: ((bytesSent: number, bytesTotal: number) => void) | null; onSuccess?: (() => void) | null; onChunkComplete?: ((chunkSize: number, bytesAccepted: number, bytesTotal: number) => void) | null; onShouldRetry?: ((error: Error, retryAttempt: number, options: unknown) => boolean) | null; onBeforeRequest?: (req: HttpRequest) => (void | Promise); onAfterResponse?: (req: HttpRequest, res: HttpResponse) => (void | Promise); } export interface IUploadResumableRestData_2_0 extends IUploadResumableRestDataBody_2_0 { uploadType: TUploadResumableTypes; } export interface IUploadResumableRestReturnValue_2_0 { fileName: string; url: string; uploadId: string; } /** * @openapi * * components: * schemas: * IGenerateNluScoreData_2_0: * type: object * required: * - flowReferenceId * - localeReferenceId * - sentence * properties: * flowReferenceId: * type: string * format: uuid * description: UUID of the flow reference. * localeReferenceId: * type: string * format: uuid * description: UUID of the locale reference. * sentence: * type: string * description: Sentence to analyze for NLU scoring. * * IGeneratedNluScore_2_0: * type: object * properties: * id: * type: string * description: Unique identifier of the score. * name: * type: string * description: Name of the score type. * score: * type: number * description: Numerical value of the score. * negated: * type: boolean * description: Indicates if the score is negated. * confirmationSentence: * type: string * description: Sentence used to confirm the score. * confirmationSentences: * type: array * items: * type: string * description: Multiple sentences for confirmation if applicable. * disambiguationSentence: * type: string * description: Sentence used for disambiguation. * flow: * type: string * description: UUID of the flow associated with the score. */ export interface IGenerateNluScoresRestDataParams_2_0 { projectId: string; } export interface IGenerateNluScoresRestDataBody_2_0 { flowReferenceId: string; localeReferenceId: string; sentence: string; } export interface IGenerateNluScoresRestData_2_0 extends IGenerateNluScoresRestDataBody_2_0, IGenerateNluScoresRestDataParams_2_0 { } export interface IGenerateNluScoresRestReturnValue_2_0 { } export interface IGenerateDesignTimeLLMOutputRestDataBody_2_0 { useCase: string; params?: Record; messages?: { role: "user" | "assistant"; content: string; }[]; runGenerativeAIParams?: { responseFormat?: "json_object" | "text" | "default"; maxTokens?: number; topK?: number; timeoutInMs?: number; temperature?: number; }; } export interface IGenerateDesignTimeLLMOutputRestDataParams_2_0 { projectId: string; } export interface IGenerateDesignTimeLLMOutputRestData_2_0 extends IGenerateDesignTimeLLMOutputRestDataBody_2_0, IGenerateDesignTimeLLMOutputRestDataParams_2_0 { } export interface IGenerateDesignTimeLLMOutputRestReturnValue_2_0 { output: string | object; } export declare type Agent = { /** * Unique identifier of the Agent. Used in all API calls. */ id: string; /** * Reference ID of the Agent. Used together with the projectId * to address the Agent during runtime. */ referenceId: string; /** * Cognigy.AI project ID. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; /** * All data of an Agent is localized. Contains localized data * with properties for each locale. */ localizedData: LocalizedAgentData[]; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; /** * Reference ID of the LLM used to override the project-level default. * Absent when the agent uses the project default. */ largeLanguageModelReferenceId?: string; /** * LLM parameter overrides for this agent (e.g. temperature, max output tokens). * Absent when the agent uses defaults for all parameters. */ llmConfig?: AgentLLMConfig; /** * Per-agent guardrails — safety-instruction toggles and data-privacy * settings. Absent on agents created before the field was introduced — * the runtime treats `undefined` as "no safety instructions and no * contact-profile injection", matching the v1 product's behavior when * both sub-objects are missing. */ guardrails?: AgentGuardrails; /** * Hooks that run around the Agent's turn. Today this is only the * pre-Turn hook: a Flow the platform runs before the Agent answers each * message. Absent when the Agent has no hooks — the backend leaves the * key out of the response instead of sending an empty block. */ hooks?: AgentHooks; /** * Avatar of the Agent, independent of its linked Persona's avatar. * Either an image URL or a base64 encoded image string. Optional on * create and update (a missing key or explicit `null` leaves it * unchanged on update) — an agent without one is a valid, expressible * state, matching `AgentPersona`. Always present as a string on the * stored resource; empty for an agent that has never had one, including * every agent created before this field was introduced. */ image: string; /** * Whether `image` is stored in Cognigy's optimized format. */ imageOptimizedFormat: boolean; }; export declare type AgentLLMConfig = { temperature?: number; maxOutputTokens?: number; }; /** * The only handler kind an Agent hook can have today: run a Conversation Flow. */ export declare type AgentHookHandlerKind = "conversationFlow"; /** * What a hook runs. `kind` selects the handler; `flowReferenceId` names the * Flow when `kind` is `"conversationFlow"`. */ export declare type AgentHookHandler = { kind: AgentHookHandlerKind; /** * Reference ID of the Flow to run. Required for `"conversationFlow"`; * the backend trims it and rejects an empty value with a 400. It does * not check that the Flow exists. */ flowReferenceId: string; }; /** * One hook that runs before the Agent answers a message. */ export declare type AgentPreTurnHook = { handler: AgentHookHandler; }; /** * The Agent's hooks block, as the backend returns it (`HooksResponse`). * Only present on an Agent that has at least one hook. */ export declare type AgentHooks = { /** * Hooks that run before the Agent answers each message. At most one. */ preTurn?: AgentPreTurnHook[]; }; /** * The hooks block as sent on create and update (`HooksRequest`). * * `preTurn` takes at most one entry; more is rejected with a 400. An empty * list means "no hooks": on create the Agent gets none, and on update it * clears the stored block (the same as sending `hooks: null`). */ export declare type AgentHooksRequest = { preTurn: AgentPreTurnHook[]; }; /** * Wrapper for per-agent guardrails. Each sub-object covers a separate * concern — safety instructions and data privacy today. * * The backend *does* merge between sub-objects: a PATCH writes only the * halves it carries, each as its own path, so sending `dataPrivacy` * alone leaves `safetySettings` untouched and vice versa. Send just the * half you are changing. Do not read the other half and echo it back — * that turns an independent write into a read-modify-write and can * revert a change someone else made in between. * * Inside a sub-object it is replace-wholesale: see `AgentSafetySettings`. */ export declare type AgentGuardrails = { safetySettings?: AgentSafetySettings; dataPrivacy?: AgentDataPrivacy; }; /** * Contact Profile injection policy for this agent. Controls whether and * how the end user's Contact Profile is surfaced to the LLM. */ export declare type ContactProfilesOption = "none" | "completeProfile" | "profileMemoriesOnly" | "selectedProfileFields"; /** * The `guardrails.dataPrivacy` sub-object. Governs what end-user data * the agent may see. */ export declare type AgentDataPrivacy = { contactProfilesOption?: ContactProfilesOption; /** * Profile keys to inject under `selectedProfileFields`. The backend * echoes the list in every mode — it is the builder's stated intent, * and switching modes must not destroy it. */ selectedProfileFields?: string[]; }; /** * Four v1-parity safety-instruction toggles. When a toggle is `true`, * the runtime appends a hardcoded markdown block to the system prompt * before every LLM call. Field names match the v1 product * (`safetySettings`) byte-for-byte so v1↔v2 import/export needs no key * remapping. * * Replace-on-write semantics on PATCH: flipping one toggle requires * resending the whole `AgentSafetySettings` object — the backend does * not field-merge inside this block. */ export declare type AgentSafetySettings = { avoidHarmfulContent: boolean; avoidUngroundedContent: boolean; avoidCopyrightInfringements: boolean; preventJailbreakAndManipulation: boolean; }; export declare type LocalizedAgentData = { /** * Cognigy.AI locale reference ID. */ localeReferenceId: string; /** * Name of the Agent. Will be displayed in the UI. */ name: string; /** * The Agent's role, e.g. "Customer support specialist". At most 100 * Unicode code points, not UTF-16 code units, so `role.length` overcounts * a role with emoji or other astral characters. Trimmed server-side, and a * longer one is rejected with a 400 `InvalidArgumentError`, not truncated. It is used in the Agent's system * prompt and shown in the UI next to the name. * * Renamed from `job` (CGY-47612): the API refuses a request that still * sends `job` with a 400, and returns an Agent stored with a `job` with * that value as its `role`. * * Optional, because a response can lack the key: an AI Agents service from * before the rename sends `job` instead, and a cached/recorded response * from before the field has neither. A current API serialises it without * `omitempty`, so a live read always carries it — as `""` for an Agent * whose author left it blank. Read it as * `agent.role ?? ""` and render an empty value as nothing. */ role?: string; /** * Description of the Agent. Will be displayed in the UI. */ description: string; /** * Instructions of the Agent. Will be fed to the LLM as part * of the system prompt. */ instructions: string; /** * References a single Agent Persona object. */ personaReferenceId: string; /** * References all attached Tools this Agent can use during * execution in conjunction with its instructions. */ toolReferenceIds: string[]; /** * Subset of {@link toolReferenceIds} the Agent must NOT be offered during * execution — a tool that stays attached and configured but is withheld from * the LLM for this Agent (CGY-35323). * * A third state, not a replacement for detaching: detaching removes the tool * from the Agent entirely, while disabling keeps the row, its parameters and * its position, so it can be switched back on without being reconfigured. * Enablement is per-Agent by construction — one project Tool can be attached * to several Agents, so the flag cannot live on the Tool. * * Covers BOTH routes a Tool takes to an Agent: a direct attachment * (`toolReferenceIds`) and one bundled by a hired Skill (`skill.bundledTools`) * are equally disablable, and the runtime withholds either. So a reference * here need not appear in `toolReferenceIds`. * * Optional, and absent means "nothing disabled": a deployment whose * `ai-agents-v2` predates the field simply never sends it. A reference the * Agent cannot reach by either route is ignored rather than rejected, so an * entry left behind by a detach is inert — but it is not erased, and * re-attaching that Tool brings it back disabled. */ disabledToolReferenceIds?: string[]; /** * References all Skills attached to this Agent. */ skillReferenceIds: string[]; /** * In place knowledge information for this Agent. */ knowledge: LocalizedAgentKnowledge; }; export declare type LocalizedAgentKnowledge = { /** * Free-form description of the knowledge domain. Always available; * not RAG. For grounding-enabled agents (`ragMode` of `"always"` or * `"agent"`) this text is injected into the system prompt as a * "What the knowledge contains" line so the LLM can decide whether * a knowledge search is appropriate. */ context: string; /** * When the runtime should invoke knowledge-search. * - `"never"` / `""` — grounding off; the knowledge-search tool is * neither pre-called nor exposed to the LLM. * - `"always"` — the runtime synthesises a knowledge-search call * before the first LLM call of every turn. * - `"agent"` — the runtime exposes the knowledge-search tool to * the LLM, which decides per turn whether to invoke it. * * When the value is `"always"` or `"agent"`, `ragType` must be * `"cognigy"`. */ ragMode: "always" | "never" | "agent" | ""; /** * Which backend powers grounding. Today only `"cognigy"` * (service-search-orchestrator) is wired end-to-end. `"expert"` and * `"knowledgeHub"` are reserved for future adapters; the API * rejects POST/PATCH bodies that set `ragType` to either of those * with a 400. * * The convention for adding a new ragType is to introduce a sibling * `Parameters` field on this object (e.g. `expertParameters`) * and to allow it only when the active `ragType` matches. */ ragType: "cognigy" | ""; /** * Behavior when a knowledge-search call fails during a grounded turn. * Confirmed optional, unlike `ragMode`/`ragType`: the backend's * `KnowledgeResponse.OnSearchFailure` field is JSON-tagged * `omitempty`, and legacy agents (persisted before this field * existed) decode it to the Go zero value (`""`) on read, which * `omitempty` then drops from the response entirely — so the key is * genuinely absent for legacy agents, not just empty. Unset means * `"answerAnyway"`. */ onSearchFailure?: "answerAnyway" | "declineWithError"; /** * Search parameters for the cognigy ragType. Allowed only when * `ragType === "cognigy"`; sending it with any other ragType is * rejected by the API. All fields are optional; unset fields fall * through to the knowledge-search handler defaults (`topK=5`, * `stores=[]` meaning all stores, `language="en-US"`). */ cognigyParameters?: CognigyRAGParameters; }; export declare type CognigyRAGParameters = { /** Maximum number of passages to return. Handler default 5. */ topK?: number; /** Knowledge store IDs to restrict the search to. Empty = all stores. */ stores?: string[]; /** Language tag (e.g. "en-US"). Handler default "en-US". */ language?: string; }; export interface AIAgentsV2_AgentV1API { indexAgents: TRestAPIOperation, IIndexAgentsRestReturnValue_1_0>; createAgent: TRestAPIOperation; readAgent: TRestAPIOperation; deleteAgent: TRestAPIOperation; updateAgent: TRestAPIOperation; } /** * Update Agent */ export interface IUpdateAgentRestDataParams_1_0 { agentId: string; } export interface IUpdateAgentRestDataBody_1_0 extends Partial> { /** * Field-level merge patch (RFC 7396) for the agent's knowledge block. * Each field is independently optional; sending `null` for a field * explicitly clears it. Sending the field absent keeps the existing * stored value. The backend validates the *merged* result, so e.g. * switching `ragType` away from `"cognigy"` while leaving stale * `cognigyParameters` in place is rejected with a 400 — the caller * must null the previous parameters block in the same patch. * * Examples: * { ragMode: "agent" } // flip mode only * { cognigyParameters: { topK: 7 } } // sub-field merge * { ragType: "", cognigyParameters: null, ragMode: "never" } // disable cleanly */ knowledge?: PatchKnowledge; largeLanguageModelReferenceId?: string; llmConfig?: AgentLLMConfig; /** * Per-agent guardrails. Replace-on-write semantics — send the full * `safetySettings` object to update any toggle. Omit the key to * leave the stored block unchanged. The backend does not currently * support clearing an existing guardrails block via PATCH (same * caveat as `llmConfig`). */ guardrails?: AgentGuardrails; /** * The Agent's hooks. Replaces the whole block: send the full `preTurn` * list you want to keep. Send `null` or `{ preTurn: [] }` to clear it. * Omit the key to leave the stored block unchanged. */ hooks?: AgentHooksRequest | null; /** * Avatar of the Agent: a URL or a base64 data URI. Same merge-patch * semantics as every other field here — a missing key or explicit `null` * is "no change" — with one difference: unlike the other fields, an * explicit empty string IS meaningful, since an agent without an avatar * is a valid, expressible state (matching `AgentPersona`'s own avatar). * A caller that isn't editing the avatar should omit this key entirely * rather than resend the agent's current value. */ image?: Agent["image"] | null; /** * Whether `image` is stored in Cognigy's optimized image format. Same * "nil = no change" semantics as `image`; the two are set together, * never independently. */ imageOptimizedFormat?: Agent["imageOptimizedFormat"] | null; } /** * Patch shape for `LocalizedAgentKnowledge`. `T | null` for each field * encodes the JSON Merge Patch convention: explicit `null` clears the * field; absent keeps the stored value; concrete value overwrites. */ export declare type PatchKnowledge = { context?: LocalizedAgentKnowledge["context"] | null; ragMode?: LocalizedAgentKnowledge["ragMode"] | null; ragType?: LocalizedAgentKnowledge["ragType"] | null; onSearchFailure?: LocalizedAgentKnowledge["onSearchFailure"] | null; cognigyParameters?: PatchCognigyRAGParameters | null; }; /** * Patch shape for `CognigyRAGParameters`. Inner-field merge: any * field can be set, cleared (`null`), or omitted independently of the * others. */ export declare type PatchCognigyRAGParameters = { topK?: CognigyRAGParameters["topK"] | null; stores?: CognigyRAGParameters["stores"] | null; language?: CognigyRAGParameters["language"] | null; }; export interface IUpdateAgentRestData_1_0 extends IUpdateAgentRestDataBody_1_0, IUpdateAgentRestDataParams_1_0 { } export interface IUpdateAgentRestReturnValue_1_0 extends IAgentIndexItem_1_0 { } /** * Delete Agent */ export interface IDeleteAgentRestDataParams_1_0 { agentId: string; } export interface IDeleteAgentRestData_1_0 extends IDeleteAgentRestDataParams_1_0 { } export interface IDeleteAgentRestReturnValue_1_0 { } /** * Read Agent */ export interface IReadAgentRestDataParams_1_0 { agentId: string; } export interface IReadAgentRestData_1_0 extends IReadAgentRestDataParams_1_0 { } export interface IReadAgentRestReturnValue_1_0 extends IAgentIndexItem_1_0 { } /** * Create Agent */ export interface ICreateAgentRestData_1_0 extends Pick, Pick { largeLanguageModelReferenceId?: string; llmConfig?: AgentLLMConfig; guardrails?: AgentGuardrails; /** * The Agent's hooks. Optional; omit it or send `{ preTurn: [] }` for an * Agent without hooks. */ hooks?: AgentHooksRequest; /** * Avatar of the Agent: a URL or a base64 data URI. Optional — an agent * may be created without one, matching `AgentPersona`. */ image?: Agent["image"]; imageOptimizedFormat?: Agent["imageOptimizedFormat"]; } export interface ICreateAgentRestReturnValue_1_0 extends IAgentIndexItem_1_0 { } /** * List Agent */ export interface IIndexAgentsRestData_1_0 extends IRestPagination { projectId?: string; } export interface IAgentIndexItem_1_0 extends Pick, Pick { largeLanguageModelReferenceId?: string; llmConfig?: AgentLLMConfig; guardrails?: AgentGuardrails; /** * Present only when the Agent has hooks. */ hooks?: AgentHooks; } export interface IIndexAgentsRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } export declare type AgentPersona = { /** * Unique identifier of the Agent Persona. Used in all API calls. */ id: string; /** * Reference ID of the Agent Persona. Used together with the projectId * to address the Agent Persona during runtime. */ referenceId: string; /** * Name of the Agent Persona, e.g. "Robert" */ name: string; /** * Icon or image for the Agent Persona. This can either contain an image URL * e.g. starting with https:// or it can contain a base64 encoded image string. */ image: string; /** * Whether the image is stored in our optimized format, uses an alpha channel * and whether the AgentPersona can be rendered differently. */ imageOptimizedFormat: boolean; /** * Description of the Agent Persona, e.g. the background story of the persona * could be added here. */ description: string; /** * Defines the tone-of-voide for the Agent Persona, e.g. formal, informal etc. */ speakingStyle: AgentPersonaSpeakingStyle; /** * Voice configuration for the Agent Persona, defining TTS voice settings. */ voiceConfig: AgentPersonaVoiceConfig; /** * Cognigy.AI project ID. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; }; export declare type AgentPersonaSpeakingStyle = { /** * Guided speaking-style steps, e.g. "balanced" and "professional". * Still stored (and sent) even while `useCustomInstructions` is true, * so switching back to guided mode restores them. */ completeness: string; formality: string; /** * Absent means guided — a service predating this field will not * return it, so `false` and absent are equivalent here. */ useCustomInstructions?: false; customInstructions?: undefined; } | { completeness: string; formality: string; useCustomInstructions: true; /** * How the Agent should speak, in free text, for nuance the guided * steps cannot express. Max 1000 characters. */ customInstructions: string; }; export declare type AgentPersonaVoiceConfig = { ttsVoice: string; ttsLanguage: string; ttsVendor: string; ttsModel: string; ttsLabel: string; ttsDisableCache: boolean; }; export interface AIAgentsV2_AgentPersonaV1API { indexAgentPersonas: TRestAPIOperation, IIndexAgentPersonasRestReturnValue_1_0>; createAgentPersona: TRestAPIOperation; readAgentPersona: TRestAPIOperation; deleteAgentPersona: TRestAPIOperation; updateAgentPersona: TRestAPIOperation; } /** * Update Agent Persona */ export interface IUpdateAgentPersonaRestDataParams_1_0 { agentPersonaId: string; } export interface IUpdateAgentPersonaRestData_1_0 extends IUpdateAgentPersonaRestDataParams_1_0, Pick { } export interface IUpdateAgentPersonaRestReturnValue_1_0 extends IAgentPersonaIndexItem_1_0 { } /** * Delete Agent Persona */ export interface IDeleteAgentPersonaRestDataParams_1_0 { agentPersonaId: string; } export interface IDeleteAgentPersonaRestData_1_0 extends IDeleteAgentPersonaRestDataParams_1_0 { } export interface IDeleteAgentPersonaRestReturnValue_1_0 { } /** * Read Agent Persona */ export interface IReadAgentPersonaRestDataParams_1_0 { agentPersonaId: string; } export interface IReadAgentPersonaRestData_1_0 extends IReadAgentPersonaRestDataParams_1_0 { } export interface IReadAgentPersonaRestReturnValue_1_0 extends AgentPersona { } /** * Create Agent Persona */ export interface ICreateAgentPersonaRestData_1_0 extends Pick { } export interface ICreateAgentPersonaRestReturnValue_1_0 extends IAgentPersonaIndexItem_1_0 { } /** * List Agent Personas */ export interface IIndexAgentPersonasRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns * personas across every project the caller may access. */ projectId?: string; } export interface IAgentPersonaIndexItem_1_0 extends Pick { } export interface IIndexAgentPersonasRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } export interface ToolDescriptor extends IToolDescriptor { /** * The image URL field is actually not present in the tool descriptor * that the customer defines in the extension - it is part of the surrounding * extension, but the backend API returning tool descriptors actually includes * it in the response for convenience. */ imageUrl: string; } export interface AIAgentsV2_ToolDescriptorV1API { indexToolDescriptors: TRestAPIOperation, IIndexToolDescriptorsRestReturnValue_1_0>; } /** * List Tool Descriptors */ export interface IIndexToolDescriptorsRestData_1_0 extends IRestPagination { } export interface IToolDescriptorIndexItem_1_0 extends Pick { id: string; extension: string; projectId: string; organisationId: string; } export declare type IIndexToolDescriptorsRestReturnValue_1_0 = ICursorBasedPaginationReturnValue; /** * Origin of the Tool definition. * * - `"extension"`: the Tool is backed by an Extension-provided Tool Descriptor. * - `"managed"`: the Tool is managed directly by the platform. * - `"builtin"`: the Tool is a first-party builtin implementation identified by `builtinSlug`. * - `"toolFlow"`: the Tool is backed by a tool-flow descriptor referenced by * `toolFlowDescriptorReferenceId`. * - `"mcp"`: the Tool is one tool imported from one remote MCP server. The * binding — which server, and which remote tool — lives in the response's * `mcp` object. Such a row is never created by `POST /v1/tools`, which rejects * this source; the only writer is `syncMCPServerTools` * (`POST /v1/mcp-servers/{id}/tools/sync`), which imports one remote tool as * one row. * - `"a2a"`: the Tool calls one remote A2A agent. The binding lives in the * response's `a2a` object. The row is created, rewritten and deleted only * through its A2A agent (`/v1/a2a-agents`): `POST` and `PATCH` on `/v1/tools` * refuse it, and so does `DELETE` while the feature is on. With the feature * off (`FEATURE_ENABLE_A2A_TOOLS`, when `/v1/a2a-agents` answers 404), * `DELETE /v1/tools/{id}` removes the row and its A2A agent record — the * only way to clean up leftover rows after a rollback. Experimental: the * feature is opt-in and the row model may change without a compatibility * promise. */ export declare type ToolSource = "extension" | "managed" | "builtin" | "toolFlow" | "mcp" | "a2a"; /** * Discriminated union on `source`: * * - `"builtin"` requires `builtinSlug`. * - `"toolFlow"` requires `toolFlowDescriptorReferenceId`. * - "extension" and "managed" must not set `builtinSlug` or `toolFlowDescriptorReferenceId`. * * Kept separate from {@link Tool} so `Pick` preserves * the discrimination. */ export declare type ToolSourceInfo = { source: "extension"; builtinSlug?: never; toolFlowDescriptorReferenceId?: never; } | { source: "managed"; builtinSlug?: never; toolFlowDescriptorReferenceId?: never; } | { source: "builtin"; builtinSlug: string; toolFlowDescriptorReferenceId?: never; } | { source: "toolFlow"; builtinSlug?: never; toolFlowDescriptorReferenceId: string; } | { /** * One remote MCP tool, imported as its own row and written only by * `syncMCPServerTools`. */ source: "mcp"; builtinSlug?: never; toolFlowDescriptorReferenceId?: never; } | { /** * One remote A2A agent, written only through `/v1/a2a-agents`. * * @experimental Opt-in feature; the row model may change. */ source: "a2a"; builtinSlug?: never; toolFlowDescriptorReferenceId?: never; }; /** * A row's binding to its remote A2A agent. Present only when `source` is * `"a2a"`, in list and single-resource responses alike. * * @experimental Binding detail of an opt-in feature; not a contract. */ export declare type A2AToolBinding = { /** * `referenceId` of the A2A agent record (`A2AAgent.referenceId`). */ agentReferenceId: string; }; /** * A row's binding to one remote MCP server, as returned in **list** responses. * Present only when `source` is `"mcp"`. */ export declare type MCPToolBindingSummary = { /** * `referenceId` of the MCP server record this row was imported from. Also the * `?mcpServerReferenceId=` filter value for listing one server's rows. */ serverReferenceId: string; /** * The tool's name **on the remote server**, and the join key against a * discovery result. * * service-agents enforces `name === mcp.toolName` on every MCP row and * refuses a document where the two differ, so the row's own `name` is never * disambiguated — not on import from a server, and not when a package * import finds a name already taken. Two rows bound to different servers * can therefore carry the same name; tell them apart by * `serverReferenceId`, not by name. */ toolName: string; }; /** * The single-resource view: the same binding plus the stored input schema, so a * detail view can show exactly what the model is told this tool takes. * * The schema is deliberately **not** in list responses: it is arbitrary customer * JSON Schema, and one row per remote tool would put one schema per row in every * page. */ export declare type MCPToolBinding = { serverReferenceId: string; toolName: string; /** * The remote JSON Schema, stored verbatim at import time. Absent when the * server offered none. * * Safe to walk without resolving anything: the backend's write-time gate * rejects `$ref`, `$defs`, `definitions`, `oneOf`, `allOf`, `anyOf` and `not` * anywhere in the tree, on every write. Property **order is not recoverable** * — `map[string]any` → BSON → `map[string]any` loses it — so a renderer must * impose its own ordering and say so. */ inputSchema?: Record; }; export declare type ToolCommonFields = { /** * Unique identifier of the Tool. Used in all API calls. */ id: string; /** * Reference ID of the Tool. Used together with the projectId * to address the Tool during runtime. */ referenceId: string; /** * The technical type of the tool, e.g. "createZendeskTicket". */ type: string; /** * Name of the Extension the Tool Descriptor belongs to this tool was * based on. */ extension: string; /** * Name of the Tool. Will be displayed in the UI as well as used by the LLM. */ name: string; /** * Description of the Tool. Will be used by the LLM to determine when to use this Tool. */ description: string; /** * Parameters of the Tool. Defines which parameters need to be provided and * instructs the LLM how to fill those parameters. */ parameters: ToolParameter[]; /** * Cognigy.AI project ID. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; }; /** * The current tool / tool parameter implementation is wrong: * https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/tool.go#L53 */ export declare type ToolParameterBase = { /** * Used to map the Tool parameter to the corresponding parameter in the Tool Descriptor. This can * be used in the backend for tool parameter validation against the corresponding Tool Descriptor * parameter definition. */ key: string; /** * Name of the parameter. Will be displayed in the UI but also used by the * LLM in case it should fill the parameter. */ name: string; /** * Description of the parameter. Will be displayed in the UI and used * by the LLM in case it should fill the parameter. The LLM will then * use it in order to determine what value to provide for this parameter. */ description: string; /** * Defines whether this tool parameter should be filled by the agent (via the LLM) * or should be provided during design-time by the user. * * Example: A user provided parameter would e.g. be an URL for an API endpoint. This * URL would be hardcoded. An example for an agent provided parameter would be a text * of a ticket we want to create via a ticketing tool. This text would be generated * by the LLM based on the actual end-user input. */ mode: "dynamic" | "aiFilled"; }; /** * The actual value of the parameter. The Tool's `type` property defines what * the value must be. * * The discriminated union ensures that the TypeScript type of `value` always matches * the runtime `type` discriminant. * * Example: If the parameter has type "number", the value must be a number such as 42. * * The "connection" variant binds the tool parameter to a Cognigy Connection by * its referenceId. At config time the `value` is the UUID of an existing * Connection (see the {@link https://api-docs.cognigy.com/ | Cognigy API docs}); at * execution time service-agents resolves the UUID and substitutes the * decrypted fields before invoking the tool. Mode must be "dynamic" — the LLM * never picks credentials. `connectionTypes` restricts which connection * schema type slugs (e.g. `"http_basic"`, `"OpenAIProvider"`) the parameter * accepts; an empty/missing list means any type is accepted. */ export declare type ToolParameter = ToolParameterBase & ({ type: "string"; value: string; } | { type: "number"; value: number; } | { type: "boolean"; value: boolean; } | { type: "object"; value: Record; } | { type: "array"; value: unknown[]; } | { type: "connection"; value: string; connectionTypes?: string[]; }); /** * Optional-source variant for Create requests. * * Expressed as a single shape rather than a discriminated union because * {@link TRestAPIOperation} applies distributive conditional types to its * `Data` parameter: a union there would collapse to `never` at the call site. * * Runtime constraint enforced by the backend: * - `builtinSlug` is required iff `source === "builtin"`. * - `builtinSlug` must be omitted for `"extension"` and `"managed"`. * - `toolFlowDescriptorReferenceId` is required iff `source === "toolFlow"`. * - `source: "mcp"` is rejected. An MCP row is created only by * `syncMCPServerTools`, which imports one remote tool as one row. * - `source: "a2a"` is rejected. An A2A row is created only by * `createA2AAgent`. */ export declare type CreateToolSourceInfo = { source?: ToolSource; builtinSlug?: string; toolFlowDescriptorReferenceId?: string; }; export interface AIAgentsV2_ToolV1API { indexTools: TRestAPIOperation, IIndexToolsRestReturnValue_1_0>; createTool: TRestAPIOperation; readTool: TRestAPIOperation; updateTool: TRestAPIOperation; deleteTool: TRestAPIOperation; executeTool: TRestAPIOperation; deployTool: TRestAPIOperation; getToolCode: TRestAPIOperation; } /** * Update Tool */ export interface IUpdateToolRestDataParams_1_0 { toolId: string; } export interface IUpdateToolRestDataBody_1_0 extends Partial> { /** * `"mcp"` is deliberately excluded, and the backend rejects it here too: this * payload carries no `mcp` binding, so a tool switched to that source would * have none — and a binding-less mcp row contributes no functions to a turn * without raising anything. An MCP row is created only by importing a remote * tool through `syncMCPServerTools`. * * The exclusion is one-directional in the type but two-directional at the * backend: an existing mcp tool also refuses a change of `source`. Its `name`, * `description` and `parameters` remain editable. * * `"a2a"` is excluded for the same reason, and an existing a2a tool refuses * every edit here: change it through `updateA2AAgent`. */ source?: Exclude; } export interface IUpdateToolRestData_1_0 extends IUpdateToolRestDataBody_1_0, IUpdateToolRestDataParams_1_0 { } export declare type IUpdateToolRestReturnValue_1_0 = ToolResponseCommonFields & ToolSourceInfo & { /** * Present only for `source: "mcp"`. Single-resource shape — one remote * tool, with its stored `inputSchema`. */ mcp?: MCPToolBinding; /** * Present only for `source: "a2a"`. */ a2a?: A2AToolBinding; }; /** * Delete Tool */ export interface IDeleteToolRestData_1_0 { toolId: string; } export interface IDeleteToolRestReturnValue_1_0 { } /** * Read Tool */ export interface IReadToolRestData_1_0 { toolId: string; } export declare type IReadToolRestReturnValue_1_0 = Pick & ToolSourceInfo & { /** * Present only for `source: "mcp"`. Single-resource shape — one remote * tool, with its stored `inputSchema`. */ mcp?: MCPToolBinding; /** * Present only for `source: "a2a"`. */ a2a?: A2AToolBinding; }; /** * Create Tool */ export declare type ICreateToolRestData_1_0 = Pick & { extension?: string; } & CreateToolSourceInfo; export declare type ICreateToolRestReturnValue_1_0 = Pick & ToolSourceInfo & { /** * Present only for `source: "mcp"`. Single-resource shape — one remote * tool, with its stored `inputSchema`. */ mcp?: MCPToolBinding; /** * Present only for `source: "a2a"`. */ a2a?: A2AToolBinding; }; /** * List Tools */ export interface IIndexToolsRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns tools * across every project the caller may access. */ projectId?: string; /** * Restrict the listing to these origins. Serialised as ONE comma-separated * query value (`?source=extension,managed`) — see * {@link serializeToolSourceFilter}. The backend splits on "," and responds * `400` on an unknown token, so only `ToolSource` members may appear. */ source?: ToolSource[]; /** * Narrow `source: "mcp"` rows to one server, by the server's `referenceId` * (not its `id`). Meaningless without `source: ["mcp"]`, and the two are the * pair the MCP tab counts one server's imported tools with. */ mcpServerReferenceId?: string; /** * Restrict the listing to the tools attached to one Agent, by the Agent's * `referenceId`. * * Returns every tool the Agent can reach, by EITHER route: its direct * attachments (`agent.toolReferenceIds`) and the tools bundled by the Skills * it has hired (`skill.bundledTools`), deduplicated. Attachment lives on the * Agent and the Skill, never on the Tool, so the backend resolves both and * matches the union — which is why this needs `projectId` (those lookups are * project-scoped) and answers `400` without it. * * A tool the Agent has DISABLED is still returned: the Tools tab renders it as * a row with a Disabled status rather than hiding it. */ agentReferenceId?: string; } /** * Turn the `source` filter into the single query value `GET /v1/tools` expects. * * Exported because it is the only piece of this file whose behaviour a type * cannot pin: `stringifyQuery` serialises arrays as `source[]=a&source[]=b` * (arrayFormat "bracket"), which the handler never reads. Joining here is what * makes `?source=a,b` reach it. Guarded by `src/spec/aiAgentsV2/toolSourceFilter.test.ts`. */ export declare const serializeToolSourceFilter: (sources: ToolSource[] | undefined) => string | undefined; /** * The field list every tool response shares. Extracted so the list and update * return types can differ **only** in their `mcp` shape. * * Do not express that difference with `Omit`: * `ToolSourceInfo` is a discriminated union, and `Omit` collapses it, silently * destroying `source` narrowing for every consumer. */ export declare type ToolResponseCommonFields = Pick; export declare type IToolIndexItem_1_0 = ToolResponseCommonFields & ToolSourceInfo & { /** * Present only for `source: "mcp"`. List shape — the server and the * remote tool name, without the `inputSchema`. */ mcp?: MCPToolBindingSummary; /** * Present only for `source: "a2a"`. */ a2a?: A2AToolBinding; /** * Present (and `true`) only when the catalog restricts this builtin * tool to skill-bundle installation — e.g. a tool that only ever * arrives on an agent via a hired skill. Cloning or otherwise * re-creating a standalone instance of it is rejected by the backend. * * Only ever populated on this list endpoint (`indexTools`). Always * omitted (never sent as `false`) — for non-builtin sources, for * builtin tools that aren't bundle-restricted, and unconditionally * on every other tool endpoint (create/read/update). Check for * `=== true`, not `=== false`. * * see: https://github.com/Cognigy/ai-agents-v2/blob/37e347734b41c63a2113f054cc68825d60cbb568/internal/tools/api.go#L539 */ bundledOnly?: boolean; }; export interface IIndexToolsRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } /** * Execute Tool */ export interface IExecuteToolRestDataParams_1_0 { toolId: string; } export interface IExecuteToolRestDataBody_1_0 { arguments: Record; projectId: string; } export interface IExecuteToolRestData_1_0 extends IExecuteToolRestDataParams_1_0, IExecuteToolRestDataBody_1_0 { } export interface IExecuteToolRestReturnValue_1_0 { result?: Record; } /** * Deploy Tool */ export interface IDeployToolRestData_1_0 { toolId: string; projectId: string; code: string; dependencies?: string[]; } export interface IDeployToolRestReturnValue_1_0 { status: string; toolDir: string; } /** * Get Tool Code */ export interface IGetToolCodeRestData_1_0 { toolId: string; } export interface IGetToolCodeRestReturnValue_1_0 { code: string; } /** * How service-agents authenticates against the remote MCP server. * * - `"none"`: no authentication beyond any static `headers`. * - `"oAuth2"`: client-credentials from an encrypted Cognigy Connection of type * `http_oauth2`, referenced by `authConnectionReferenceId`. * - `"customHeader"`: one request header whose name AND value both come from an * encrypted Connection of type `http_customHeader` (fields `headerName` + * `headerValue`). Previously the only option was putting the secret in the * plaintext `headers` map below. * * Exactly one connection schema is accepted per auth type; anything else is a * 400 naming the accepted one. A connection picker should filter to that single * type, which is also what lets an inline create dialog auto-select the schema * instead of showing a one-option dropdown. * * `mcp_oauth2` is no longer accepted here — MCP servers were narrowed to the * generic `http_oauth2`. Connections of the retired type keep resolving * elsewhere, since V1's MCP Tool node still declares that schema. */ export declare type MCPServerAuthType = "none" | "oAuth2" | "customHeader"; export declare type MCPServerCommonFields = { /** * Unique identifier of the MCP server record. Used in all API calls. */ id: string; /** * Reference ID of the MCP server. This is the value a tool's * `mcp.serverReferenceId` points at. */ referenceId: string; name: string; /** * Base URL of the remote MCP server, e.g. `https://mcp.example.com/mcp`. */ url: string; /** * Static request headers sent on every call to this server. * * ⚠️ Stored **and returned** unencrypted by the backend. A UI that offers this * field must say so. For anything that should be encrypted at rest, bind a * Connection instead: `authType: "customHeader"` covers exactly the * one-secret-in-one-header case this field was previously abused for, and * `"oAuth2"` covers client-credentials. * * When a bound Connection's `headerName` collides with an entry here, **the * Connection wins** — the MCP client applies auth after copying these. There * is no write-time error for the clash, and there cannot be: the header name * lives in the encrypted Connection, so nothing on the CRUD path can see it. */ headers?: Record; authType: MCPServerAuthType; /** * `referenceId` of the Cognigy Connection holding the credentials. * * Required when `authType` is `"oAuth2"` or `"customHeader"`, and * force-cleared by the backend when it is `"none"`. Switching between the two * credential-bearing types must also change or clear this: each accepts a * different connection schema, so carrying the old reference over is a 400. * * Credential-bearing but empty is a real, loadable state that a migration * produces, so render it as a required-field error rather than treating it * as impossible. */ authConnectionReferenceId?: string; /** * Per-call timeout in seconds. Backend default is 12, clamped to 1-30. */ timeoutSeconds: number; /** * Cognigy.AI project ID. MCP servers are project-scoped. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; }; export declare type MCPServer = MCPServerCommonFields; /** * How one tool the live server offers compares to what **this project** has * already imported from **this server**. Computed per discovery call; never * stored. * * - `"new"`: offered remotely, not imported here. * - `"imported"`: imported, and identical to what the server currently offers. * - `"changed"`: imported, but the server's description or input schema differs * from the stored copy. Re-send the name in `import` to refresh the row. * - `"missing"`: imported here, no longer offered by the server. Nothing to * refresh from — the row will never run, and the remedy is to delete it. * * Labelling is **project-scoped**, matched on `toolName`: since PR 202 one * imported tool is one `tools` row, so "is this imported?" is answerable about * the project without reference to any particular row. */ export declare type MCPToolDriftStatus = "new" | "imported" | "changed" | "missing"; /** * One tool as the live server currently describes it, plus its drift status. * * `name` is the **remote** name — the join key for everything: `import` sends * remote names, and the stored row's `mcp.toolName` holds the same value. * * The stored row's own `name` holds it too: service-agents enforces * `name === mcp.toolName` and refuses a document where the two differ, so an * MCP row's name is never disambiguated against the project's other tool * names. Join on `mcp.toolName` regardless — it is the field that carries the * contract. */ export declare type MCPRemoteTool = { name: string; description: string; /** * The remote JSON Schema, passed through verbatim. */ inputSchema: Record; status: MCPToolDriftStatus; /** * The `tools` row this remote tool was imported as. Present for every status * except `"new"`. */ toolId?: string; /** * The same row's `referenceId` — and the **only** value `remove` accepts. * Present for every status except `"new"`. */ toolReferenceId?: string; /** * True when this tool was added to the server since the last sync. Only ever * true when `status === "new"`. Absent from an older backend — treat a * missing value the same as `false`. */ newSinceReview?: boolean; }; /** * What one sync did to one entry. * * - `"added"`: a new `tools` row was created for this remote tool. * - `"updated"`: the row existed and its description and/or input schema were * overwritten from the server. * - `"unchanged"`: already imported and already in sync, so **nothing was * written** — deliberately, so re-importing 30 tools to refresh them cannot * restamp `lastChangedAt` on all 30 and destroy the signal of which ones the * remote server really changed. * - `"removed"`: the row named by `remove` was deleted, and detached from every * agent and skill that referenced it. * - `"rejected"`: this entry was refused — a `$ref` anywhere in its schema, or a * name the server no longer offers. Read `error` for which. **The batch still * succeeded**; the other entries were applied. */ export declare type MCPSyncStatus = "added" | "updated" | "unchanged" | "removed" | "rejected"; /** * Drift for one server, as four numbers for a badge. Exactly the counts * `discoverMCPServerTools` would let a client compute, without transferring * every schema. * * `unreachable: true` comes back with **HTTP 200**, not a transport error, * precisely so a client can fan this out one call per server and render badges * progressively — one dead server must not blank the others. When it is true the * three counts carry no information: render a neutral "couldn't reach", never * "out of sync". `authFailed` narrows that to the case where the server DID * answer and refused the request. */ export declare type MCPDriftSummary = { /** * Offered by the server and not imported here — INCLUDING every tool the * customer deliberately declined. Not a problem indicator; do not badge on * it. Used with the imported count to render "N of M imported". */ new: number; /** * The subset of `new` the server has added since this server was last * synced. This is the count to surface. `0` for a server that has never * been synced. Absent from an older backend — treat a missing value the * same as `0`. */ newSinceReview?: number; changed: number; missing: number; unreachable: boolean; /** * The server was reached and REFUSED the request (HTTP 401/403) — a * credential or `authType` problem rather than a network one, so the label * to render is "refused", not "couldn't reach". * * Never `true` without `unreachable`, which is also set: the counts are * equally meaningless either way, so a client that ignores this field stays * correct rather than reading three confident zeroes. Absent from an older * backend — treat a missing value the same as `false`. */ authFailed?: boolean; }; export interface AIAgentsV2_MCPServerV1API { indexMCPServers: TRestAPIOperation, IIndexMCPServersRestReturnValue_1_0>; createMCPServer: TRestAPIOperation; readMCPServer: TRestAPIOperation; updateMCPServer: TRestAPIOperation; deleteMCPServer: TRestAPIOperation; discoverMCPServerTools: TRestAPIOperation; syncMCPServerTools: TRestAPIOperation; getMCPServerDriftSummary: TRestAPIOperation; } /** * List MCP Servers */ export interface IIndexMCPServersRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns servers * across every project the caller may access. */ projectId?: string; } export declare type IMCPServerIndexItem_1_0 = MCPServer; export interface IIndexMCPServersRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } /** * Create MCP Server */ export declare type ICreateMCPServerRestData_1_0 = Pick & Partial>; export declare type ICreateMCPServerRestReturnValue_1_0 = MCPServer; /** * Read MCP Server */ export interface IReadMCPServerRestData_1_0 { mcpServerId: string; } export declare type IReadMCPServerRestReturnValue_1_0 = MCPServer; /** * Update MCP Server */ export interface IUpdateMCPServerRestDataParams_1_0 { mcpServerId: string; } export interface IUpdateMCPServerRestDataBody_1_0 extends Partial> { } export interface IUpdateMCPServerRestData_1_0 extends IUpdateMCPServerRestDataBody_1_0, IUpdateMCPServerRestDataParams_1_0 { } export declare type IUpdateMCPServerRestReturnValue_1_0 = MCPServer; /** * Delete MCP Server * * Responds `204`. Fails with `409` when tools still reference the server; the * error message names them, and those tools must be deleted first. */ export interface IDeleteMCPServerRestData_1_0 { mcpServerId: string; } export interface IDeleteMCPServerRestReturnValue_1_0 { } /** * Discover MCP Server Tools * * A **live** call to the remote server: nothing is cached, and every call costs a * network round-trip bounded by the server's `timeoutSeconds`. Responds `502` when * the server cannot be reached. Needs no `projectId` — the project comes from the * server record. * * Labelling is **project-scoped**: every entry comes back tagged against what * this project has already imported from this server, matched on the remote * `toolName`. Since PR 202 one imported tool is one `tools` row, so this single * call answers both "what can I import?" and "what has drifted?" — there is no * row-scoped sibling operation any more. */ export interface IDiscoverMCPServerToolsRestData_1_0 { mcpServerId: string; } export interface IDiscoverMCPServerToolsRestReturnValue_1_0 { items: MCPRemoteTool[]; total: number; } /** * Sync MCP Server Tools * * The **only** writer of a `source: "mcp"` tool row. Explicit intent, not * replace: `import` names remote tools to create-or-refresh, `remove` names rows * to delete. **Omitting a name removes nothing** — so a caller must never send * "the current selection" and rely on absence, because `remove` deletes a real * `tools` row and detaches it from every agent and skill that referenced it. * * Both lists may be sent in one call. Responds `200` whether or not individual * entries were rejected: rejection is per item (`status: "rejected"` plus * `error`), the rest are applied, and a status code could not express that. Read * `items`, never the resolved promise, to learn what happened. */ export interface ISyncMCPServerToolsRestData_1_0 { mcpServerId: string; /** * Required, and sent as a query parameter. See the implementation note. */ projectId: string; /** * Remote tool names, exactly as discovery reported them. Re-sending a name * that is already imported refreshes its description and schema from the live * server. */ import?: string[]; /** * `referenceId`s of the `tools` rows to delete — `MCPRemoteTool.toolReferenceId`, * never a remote name and never a tool `id`. */ remove?: string[]; /** * Every remote tool name this client **displayed** to the customer in the * dialog it is now saving — imported or not, ticked or not. * * This is what makes *declining* a tool a recordable decision. The server * stores it as the reviewed catalogue and reports * `MCPRemoteTool.newSinceReview` for anything the server offers that is * absent from it, which is the count a client should badge on. * * It has to come from here because only this client knows what it rendered. * The customer saw the discovery that opened the dialog; the server discovers * again at save time, so a tool the remote server adds in between would * otherwise be recorded as reviewed **without ever having been shown** — and * would then never surface as new. * * Optional and back-compatible. **Omit** it and the server falls back to the * catalogue it discovers during the request, which is the pre-PR-202 * behaviour. An explicit `[]` is a *real answer* ("the server offered * nothing") and is stored as one — so omit the field, never send `[]`, when * the intent is "I am not telling you". * * Ignored on a remove-only sync (`import: []` with a non-empty `remove`): * that request deliberately never contacts the remote server, so there is no * review to record. */ reviewedToolNames?: string[]; } export interface IMCPSyncResultItem_1_0 { toolName?: string; toolReferenceId?: string; toolId?: string; status?: MCPSyncStatus; /** * Why this entry was rejected. Present only with `status: "rejected"`. */ error?: string; } export interface ISyncMCPServerToolsRestReturnValue_1_0 { /** * One entry per requested name and per requested removal, in request order. */ items: IMCPSyncResultItem_1_0[]; total: number; } /** * MCP Server Drift Summary * * Answers `200` with `unreachable: true` when the server cannot be reached, * rather than failing — so badges can be fanned out one call per server. Never * changes anything. */ export interface IGetMCPServerDriftSummaryRestData_1_0 { mcpServerId: string; } export declare type IGetMCPServerDriftSummaryRestReturnValue_1_0 = MCPDriftSummary; /** * How service-agents authenticates against the remote A2A agent. Every type * except `"none"` takes its credential from a Cognigy Connection referenced by * `authConnectionReferenceId`, and each accepts exactly one connection schema: * * - `"oAuth2"`: `http_oauth2` (client credentials). * - `"basic"`: `http_basic`. * - `"customHeader"`: `http_customHeader` (`headerName` + `headerValue`). * * There is no plaintext header map: credentials exist only in the Connection. */ export declare type A2AAgentAuthType = "none" | "oAuth2" | "basic" | "customHeader"; /** * - `"blocking"`: the remote agent answers the message in one request. * - `"nonBlocking"`: service-agents polls the remote task until it finishes or * `taskTimeoutSeconds` runs out, then cancels it. */ export declare type A2AAgentExecutionMode = "blocking" | "nonBlocking"; /** * Which Agent Card skills the tool description lists. It never limits what the * remote agent does. An unset or empty `skillIds` keeps every skill in both * `whitelist` and `blacklist` mode. */ export declare type A2AAgentSkillFilter = { mode: "none" | "whitelist" | "blacklist"; skillIds: string[]; }; /** * One skill as the remote Agent Card advertises it. Advertising metadata only; * unrelated to an Agents V2 Skill. */ export declare type A2AAgentCardSkill = { id: string; name: string; description: string; tags: string[]; examples: string[]; }; /** * The stored summary of the remote Agent Card, from the last register, address * change or sync. Card text is untrusted: it only changes on an explicit sync. */ export declare type A2AAgentCardSummary = { name: string; description: string; skills: A2AAgentCardSkill[]; streaming: boolean; protocolVersion: string; interfaceUrl: string; extended: boolean; fetchedAt: number; sha256: string; }; export declare type A2AAgentCommonFields = { /** * Unique identifier of the A2A agent record. Used in all API calls. */ id: string; /** * Reference ID of the A2A agent. This is the value its tool's * `a2a.agentReferenceId` points at. */ referenceId: string; name: string; /** * Base URL of the remote agent, e.g. `https://agent.example.com`. */ agentBaseUrl: string; /** * Path of the Agent Card relative to `agentBaseUrl`. Empty means the * well-known path. */ agentCardPath: string; authType: A2AAgentAuthType; /** * `referenceId` of the Cognigy Connection holding the credential. Required * when `authType` is not `"none"`, and force-cleared when it is. */ authConnectionReferenceId?: string; /** * Whether the credential is also sent when fetching the Agent Card. */ authForDiscovery: boolean; /** * Per-request timeout in seconds. Backend default 12, range 1-30. */ timeoutSeconds: number; executionMode: A2AAgentExecutionMode; /** * How long a non-blocking task is polled, in seconds. Backend default 60, * range 10-90. */ taskTimeoutSeconds: number; /** * How often the model may call this agent in one turn. Backend default 4, * range 1-10. */ maxAutonomousTurns: number; skillFilter: A2AAgentSkillFilter; /** * Cognigy.AI project ID. A2A agents are project-scoped. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; }; /** * @experimental Shape of a remote A2A agent record. The feature is opt-in and * carries no compatibility promise; `tool` in particular is a binding detail, * not a contract. */ export declare type A2AAgent = A2AAgentCommonFields & { cardSummary: A2AAgentCardSummary; /** * The agent's one tool row, created by registration. Attach it to an AI * Agent by its `referenceId`, like any other tool. */ tool: { id: string; referenceId: string; }; }; /** * A live Agent Card read, compared against the stored summary. `"changed"` * means a sync would apply something. */ export declare type A2AAgentCard = { name: string; description: string; skills: A2AAgentCardSkill[]; capabilities: { streaming: boolean; }; protocolVersion: string; drift: "unchanged" | "changed"; }; /** * Remote A2A agents (`/v1/a2a-agents`). Every route answers `404` while * service-agents runs with `FEATURE_ENABLE_A2A_TOOLS` off; treat that as * "feature unavailable". * * Pass `{ maxRetries: 0 }` as the second argument to get a 5xx with its real * status. With default options a 5xx on create, update or sync arrives as * `500` (the client picks the error class from a `code` field that the * service-agents error body does not have), and a GET such as * `fetchA2AAgentCard` is retried 3 times first. * * @experimental The A2A agent API ships behind an opt-in flag with no * compatibility promise. Routes, field names and the `tool` binding on the * record may change between releases while the feature is experimental. */ export interface AIAgentsV2_A2AAgentV1API { /** @experimental */ indexA2AAgents: TRestAPIOperation, IIndexA2AAgentsRestReturnValue_1_0>; /** @experimental */ createA2AAgent: TRestAPIOperation; /** @experimental */ readA2AAgent: TRestAPIOperation; /** @experimental */ updateA2AAgent: TRestAPIOperation; /** @experimental */ deleteA2AAgent: TRestAPIOperation; /** @experimental */ fetchA2AAgentCard: TRestAPIOperation; /** @experimental */ syncA2AAgent: TRestAPIOperation; } /** * List A2A Agents */ export interface IIndexA2AAgentsRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns agents * across every project the caller may access. */ projectId?: string; } export declare type IA2AAgentIndexItem_1_0 = A2AAgent; export interface IIndexA2AAgentsRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } /** * Register A2A Agent * * Fetches the Agent Card from inside the serverless sandbox before anything is * stored, so this is also the "test connection" for a new agent. Creates the * agent's one tool row. Errors: `400` validation or the remote refused the * request (HTTP 401/403), `409` name taken, `502` remote unreachable. */ export declare type ICreateA2AAgentRestData_1_0 = Pick & Partial>; export declare type ICreateA2AAgentRestReturnValue_1_0 = A2AAgent; /** * Read A2A Agent */ export interface IReadA2AAgentRestData_1_0 { a2aAgentId: string; } export declare type IReadA2AAgentRestReturnValue_1_0 = A2AAgent; /** * Update A2A Agent * * Re-fetches the Agent Card when an address or auth field changed, and always * rewrites the tool row. */ export interface IUpdateA2AAgentRestDataParams_1_0 { a2aAgentId: string; } export interface IUpdateA2AAgentRestDataBody_1_0 extends Partial> { } export interface IUpdateA2AAgentRestData_1_0 extends IUpdateA2AAgentRestDataBody_1_0, IUpdateA2AAgentRestDataParams_1_0 { } export declare type IUpdateA2AAgentRestReturnValue_1_0 = A2AAgent; /** * Delete A2A Agent * * Responds `204`. Also deletes the agent's tool row and detaches it from every * AI Agent and Skill; never refused with `409`. */ export interface IDeleteA2AAgentRestData_1_0 { a2aAgentId: string; } export interface IDeleteA2AAgentRestReturnValue_1_0 { } /** * Fetch A2A Agent Card * * A **live** read from inside the serverless sandbox; nothing is stored. * `400` when the remote refused the request, `502` when it is unreachable. */ export interface IFetchA2AAgentCardRestData_1_0 { a2aAgentId: string; } export declare type IFetchA2AAgentCardRestReturnValue_1_0 = A2AAgentCard; /** * Sync A2A Agent * * Re-fetches the Agent Card and applies it: the stored summary and the tool * row's description. The row's name follows the record's `name`, so only * `updateA2AAgent` renames the tool the model sees. The only way a card change * reaches the model. */ export interface ISyncA2AAgentRestData_1_0 { a2aAgentId: string; /** * Required, and sent as a query parameter. See the implementation note. */ projectId: string; } export declare type ISyncA2AAgentRestReturnValue_1_0 = A2AAgent; export declare type ToolFlowParameterWidget = "text" | "select" | "connection" | "json" | "keyValuePair"; export interface ToolFlowParameter { /** UI widget, not a data type. */ type: ToolFlowParameterWidget; key: string; label: string; description?: string; defaultValue?: unknown; /** Free-form bag: options / connectionTypes / required, etc. */ params?: Record; } export interface ToolFlowDescriptor { id: string; referenceId: string; /** Technical id; becomes the created tool's `type`. Unique per project. */ type: string; defaultLabel: string; defaultDescription?: string; /** Backing Cognigy Flow reference id (resolved at execution time). */ flowReferenceId: string; defaultParameters: ToolFlowParameter[]; imageUrl?: string; projectId: string; createdBy?: string; createdAt?: number; lastChangedBy?: string; lastChangedAt?: number; } export interface AIAgentsV2_ToolFlowDescriptorV1API { indexToolFlowDescriptors: TRestAPIOperation, IIndexToolFlowDescriptorsRestReturnValue_1_0>; createToolFlowDescriptor: TRestAPIOperation; readToolFlowDescriptor: TRestAPIOperation; readToolFlowDescriptorByFlow: TRestAPIOperation; updateToolFlowDescriptor: TRestAPIOperation; deleteToolFlowDescriptor: TRestAPIOperation; } /** * Response shape shared by all tool-flow-descriptors endpoints (list items, * create/read/update returns) — the backend uses one representation * (`internal_toolflows.ToolFlowDescriptorResponse`) for all of them. * * `ToolFlowDescriptor` (A2, `./toolFlowDescriptor`) does not model * `organisationId`, but the swagger response schema includes it, so it is * added here rather than on the shared entity type. */ export interface IToolFlowDescriptorIndexItem_1_0 extends ToolFlowDescriptor { organisationId: string; } /** List */ export interface IIndexToolFlowDescriptorsRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns * descriptors across every project the caller may access. */ projectId?: string; } export declare type IIndexToolFlowDescriptorsRestReturnValue_1_0 = ICursorBasedPaginationReturnValue; /** * Create * * `flowReferenceId` is deliberately absent: as of CGY-36865 the backing Tool * Flow is created BY ai-agents-v2 as part of creating the template, so the field * is server-owned on write and supplying it is a 400. It remains on * `ToolFlowDescriptor` (the read model) because the UI resolves it to the Flow's * `_id` to link into the Flow editor (D21). */ export declare type ICreateToolFlowDescriptorRestData_1_0 = Pick & Partial>; /** * Create returns the descriptor plus `flowId`: the Mongo `_id` of the Tool Flow * created alongside it. Create-only - it is derived inside that request and * never persisted on the descriptor, so it is absent from read, list, update * and the by-flow route. * * Optional because the field is emitted `json:"flowId,omitempty"`: it is read * straight off the cross-service createFlow reply and not validated as * non-empty, so a degraded reply drops the key from the response altogether. * Callers must therefore check it before navigating. */ export interface ICreateToolFlowDescriptorRestReturnValue_1_0 extends IToolFlowDescriptorIndexItem_1_0 { flowId?: string; } /** Read */ export interface IReadToolFlowDescriptorRestData_1_0 { toolFlowDescriptorId: string; } export declare type IReadToolFlowDescriptorRestReturnValue_1_0 = IToolFlowDescriptorIndexItem_1_0; /** * Read by flow * * The template/flow relationship is 1:1, so this resolves to exactly one * descriptor or 404s. A Tool Flow with no template is a real state (one created * through the retired "Create Tool Flow" entry point), so callers must handle * the 404 rather than treat it as a failure. * * `projectId` is required and goes on the query string, matching * `indexToolFlowDescriptors`. ai-agents-v2's authorization middleware resolves * the single project either from `?projectId=` or from an ownership lookup keyed * on a path parameter literally named `id`; this route's path parameter is * `flowReferenceId`, so the query parameter is the only way it can be resolved * and omitting it makes the endpoint fail. */ export interface IReadToolFlowDescriptorByFlowRestData_1_0 { flowReferenceId: string; projectId: string; } export declare type IReadToolFlowDescriptorByFlowRestReturnValue_1_0 = IToolFlowDescriptorIndexItem_1_0; /** Update (`type` and `flowReferenceId` are both server-owned; not in the patch body) */ export interface IUpdateToolFlowDescriptorRestData_1_0 extends Partial> { toolFlowDescriptorId: string; } export declare type IUpdateToolFlowDescriptorRestReturnValue_1_0 = IToolFlowDescriptorIndexItem_1_0; /** Delete */ export interface IDeleteToolFlowDescriptorRestData_1_0 { toolFlowDescriptorId: string; } export interface IDeleteToolFlowDescriptorRestReturnValue_1_0 { } export interface AIAgentsV2_FlowExecutionToolV1API { readFlowExecutionToolsByFlow: TRestAPIOperation; } /** * Read by flow: the "Execute Tool Flow" tools that run a Flow (CGY-43965). * * The Flow Editor asks this to offer the tools' arguments - which reach the * Flow as `input.data.toolArgs.` - as tokens and Code Node typings. The * Flow stores no link to its tools; only each tool knows its flowReferenceId. * * `projectId` is required and goes on the query string, for the same reason as * `readToolFlowDescriptorByFlow`: the route's path parameter is not named `id`, * so ai-agents-v2's authorization middleware can only resolve the project from * `?projectId=`. */ export interface IReadFlowExecutionToolsByFlowRestData_1_0 { flowReferenceId: string; projectId: string; } /** One tool argument. `name` is its key under `input.data.toolArgs`. */ export interface IFlowExecutionToolParameter_1_0 { name: string; /** The tool parameter's type, e.g. "string", "number", "boolean". */ type: string; description: string; } /** One tool that runs the Flow, with its arguments (every parameter except flowReferenceId). */ export interface IFlowExecutionTool_1_0 { id: string; referenceId: string; name: string; parameters: IFlowExecutionToolParameter_1_0[]; } /** * Every tool in the project that targets the Flow, whether or not an agent uses * it. `items` is empty, never a 404, when no tool runs the Flow. */ export interface IReadFlowExecutionToolsByFlowRestReturnValue_1_0 { items: IFlowExecutionTool_1_0[]; } export declare type SkillResource = { /** * Relative path of the resource within the skill (e.g. "references/summary.md"). * Must not start with '/' or contain '..'. */ path: string; /** * MIME type of the resource (e.g. "text/markdown", "image/png"). */ contentType: string; /** * The content of the resource, encoded according to the `encoding` field. */ content: string; /** * Encoding of the content. Must be either "utf-8" or "base64". */ encoding: "utf-8" | "base64"; }; /** * Discriminated union on `source`: * * - `"builtin"` requires `builtinSlug`. * - `"user"` must not set `builtinSlug`. */ export declare type SkillSourceInfo = { source: "user"; builtinSlug?: never; } | { source: "builtin"; builtinSlug: string; }; export declare type SkillCommonFields = { /** * Unique identifier of the Skill. Used in all API calls. */ id: string; /** * Reference ID of the Skill (UUID format). */ referenceId: string; /** * Name of the Skill. Must be lowercase alphanumeric with optional hyphens, * no leading/trailing/consecutive hyphens. Max 64 characters. */ name: string; /** * Description of the Skill. Max 1024 characters. */ description: string; /** * Instructions for the Skill. Fed to the LLM as part of the system prompt. */ instructions: string; /** * License information for the Skill (optional). */ license: string; /** * Compatibility information for the Skill (optional, max 500 characters). */ compatibility: string; /** * Tool reference IDs (UUIDs) bundled with this Skill. * Bundled tools are progressively disclosed to the LLM when the skill is activated. */ bundledTools: string[]; /** * Arbitrary key-value metadata associated with this Skill. */ metadata: Record; /** * File resources embedded within the Skill (e.g. reference documents, assets). */ resources: SkillResource[]; /** * Cognigy.AI project ID. */ projectId: string; /** * Cognigy.AI organisation/tenant ID. */ organisationId: string; createdBy: string; createdAt: number; lastChangedBy: string; lastChangedAt: number; }; /** * Optional-source variant for Create requests. * * Expressed as a single shape rather than a discriminated union because * {@link TRestAPIOperation} applies distributive conditional types to its * `Data` parameter: a union there would collapse to `never` at the call site. * * Runtime constraint enforced by the backend: * - `builtinSlug` is required iff `source === "builtin"`. * - `builtinSlug` must be omitted for `"user"`. */ export declare type CreateSkillSourceInfo = { source?: SkillSourceInfo["source"]; builtinSlug?: string; }; export interface AIAgentsV2_SkillV1API { indexSkills: TRestAPIOperation, IIndexSkillsRestReturnValue_1_0>; createSkill: TRestAPIOperation; readSkill: TRestAPIOperation; updateSkill: TRestAPIOperation; deleteSkill: TRestAPIOperation; } /** * Update Skill */ export interface IUpdateSkillRestDataParams_1_0 { skillId: string; } export interface IUpdateSkillRestDataBody_1_0 extends Partial> { } export interface IUpdateSkillRestData_1_0 extends IUpdateSkillRestDataBody_1_0, IUpdateSkillRestDataParams_1_0 { } export declare type IUpdateSkillRestReturnValue_1_0 = ISkillIndexItem_1_0; /** * Delete Skill */ export interface IDeleteSkillRestData_1_0 { skillId: string; } export interface IDeleteSkillRestReturnValue_1_0 { } /** * Read Skill */ export interface IReadSkillRestData_1_0 { skillId: string; } export declare type IReadSkillRestReturnValue_1_0 = ISkillIndexItem_1_0; /** * Create Skill */ export declare type ICreateSkillRestData_1_0 = Pick & Partial> & CreateSkillSourceInfo; export declare type ICreateSkillRestReturnValue_1_0 = ISkillIndexItem_1_0; /** * List Skills */ export interface IIndexSkillsRestData_1_0 extends IRestPagination { /** * Restrict the listing to one project. Omitted, the backend returns skills * across every project the caller may access. */ projectId?: string; } export declare type ISkillIndexItem_1_0 = Pick & SkillSourceInfo; export interface IIndexSkillsRestReturnValue_1_0 extends ICursorBasedPaginationReturnValue { } export declare type BuiltinToolDefinition = { /** * Stable identifier for this builtin tool. Used as `builtinSlug` when * creating a tool instance via POST /v1/tools. */ slug: string; /** * Display name shown in the UI. */ name: string; /** * One-line description of what this tool does. */ description: string; /** * Default parameter definitions from the catalog. * * NOTE: these are descriptor parameters, not instance parameters. They are * NOT structurally identical to ToolParameter — a catalog parameter describes * itself by `widget` and may legitimately carry no `value` (an aiFilled * parameter has no design-time default). Build the instance parameters from * these rather than forwarding them verbatim: send each parameter's `type` * (the derived data type), not its `widget`. */ defaultParameters: BuiltinToolDescriptorParameter[]; /** * Optional icon URL for the tool. May be absent if the tool has no icon. */ imageUrl?: string; /** * Whether the tool is currently published by service-builtin-resources-go. * False when the catalog entry has not been refreshed recently — the UI * should grey out the entry and disable instantiation. Existing instances * continue to work regardless of this flag. */ available: boolean; }; /** * The UI control a builtin catalog parameter renders as. * * This vocabulary is shared with extension tool descriptors * (`toolParameterTypes` in `@cognigy/extension-tools`) and is deliberately * minimal — exactly one spelling per data shape, which is why there is no * `toggle`, `chipInput` or `checkbox`. Each widget implies exactly one instance * data type; the mapping is one-way (widget -> data type), because several * widgets share a data type. */ export declare type BuiltinToolParameterWidget = "text" | "select" | "connection" | "json" | "keyValuePair" | "number" | "booleanSelect" | "textArray"; /** * One parameter as declared by a builtin tool's catalog descriptor. * * `widget` is what the catalog stores and the field a UI must render from. * `type` is DERIVED from `widget` by service-agents on every response (it is not * stored), so the two cannot drift; it is echoed here so a client can build a * createTool() payload without reimplementing the widget -> data type map. * * An empty `widget` means the deployed service-builtin-resources-go predates this * vocabulary. service-agents then rejects instance creation for that parameter * rather than guessing, so treat it as a transient rolling-update state. */ export declare type BuiltinToolDescriptorParameter = { key: string; name: string; description?: string; /** * Whether the value is supplied by the agent designer at design time * (`dynamic`) or by the LLM at runtime (`aiFilled`). */ mode: "dynamic" | "aiFilled"; /** The control this parameter renders as. Render from this, not from `type`. */ widget: BuiltinToolParameterWidget; /** The data type an instance's parameter of this key must carry. Derived from `widget`. */ type: ToolParameter["type"]; /** * When true, `mode` is a design-time decision the instance may not change — * service-agents rejects a create or update whose mode differs. Used where the * LLM must never supply the value: send-email's recipient/cc/bcc/priority, and * every connection parameter. */ modeLocked?: boolean; /** * Widget-specific configuration. The only key interpreted today is `options` * for the `select` widget: the choices the dropdown offers. */ params?: { options?: { label: string; value: string; }[]; } & Record; /** * The catalog's default value, when it has one. Absent for aiFilled * parameters (no design-time value) and for connection parameters (the value * is a Connection referenceId the user picks). */ value?: unknown; /** * For a `connection` widget: the allow-list of connection schema type slugs * the parameter accepts. An instance's own list must be a subset of it. */ connectionTypes?: string[]; }; export interface AIAgentsV2_BuiltinToolV1API { indexBuiltinTools: TRestAPIOperation, IIndexBuiltinToolsRestReturnValue_1_0>; readBuiltinTool: TRestAPIOperation; } /** * List Builtin Tools */ export interface IIndexBuiltinToolsRestData_1_0 { projectId?: string; } export declare type IIndexBuiltinToolsRestReturnValue_1_0 = BuiltinToolDefinition[]; /** * Read Builtin Tool */ export interface IReadBuiltinToolRestData_1_0 { slug: string; } export declare type IReadBuiltinToolRestReturnValue_1_0 = BuiltinToolDefinition; export declare type BuiltinSkillResource = { /** * Resource kind (e.g. "file"). */ kind: string; /** * URI of the resource relative to the skill bundle (e.g. "./templates/confirmation.txt"). */ uri: string; /** * Logical name for the resource (e.g. "confirmation-template"). */ name: string; }; export declare type BuiltinSkillDefinition = { /** * Stable identifier for this builtin skill. Used as `builtinSlug` when * creating a skill instance via POST /v1/skills. */ slug: string; /** * Display name shown in the UI. */ name: string; /** * One-line description of what this skill does. */ description: string; /** * LLM instructions injected into the system prompt when this skill is active. */ instructions: string; /** * License string (e.g. "Apache-2.0"). Optional. */ license?: string; /** * Compatibility constraint (e.g. ">=0.0.0"). Optional. */ compatibility?: string; /** * Slugs of builtin tools that are bundled with this skill. When a skill * instance is created via POST /v1/skills, the backend automatically * resolves these slugs to tool instances. */ bundledToolSlugs: string[]; /** * Arbitrary metadata associated with this skill definition. */ metadata?: Record; /** * Catalog-level resource descriptors (kind / uri / name). These describe * the resources bundled in the skill definition and differ from the * SkillResource shape (path / contentType / content / encoding) used on * persisted skill instances. */ resources: BuiltinSkillResource[]; /** * Whether the skill is currently published by service-builtin-resources-go. * Same semantics as BuiltinToolDefinition.available. */ available: boolean; }; export interface AIAgentsV2_BuiltinSkillV1API { indexBuiltinSkills: TRestAPIOperation, IIndexBuiltinSkillsRestReturnValue_1_0>; readBuiltinSkill: TRestAPIOperation; } /** * List Builtin Skills */ export interface IIndexBuiltinSkillsRestData_1_0 { projectId?: string; } export declare type IIndexBuiltinSkillsRestReturnValue_1_0 = BuiltinSkillDefinition[]; /** * Read Builtin Skill */ export interface IReadBuiltinSkillRestData_1_0 { slug: string; } export declare type IReadBuiltinSkillRestReturnValue_1_0 = BuiltinSkillDefinition; export interface AIAgentsV2_SetupV1API { setupToolGenerator: TRestAPIOperation; } /** * Install the Tool Generator workflow in a project. * * Idempotent in the sense that every call leaves the project in the * same fully-installed state, but the call wipes any prior hidden * Tool Generator records and creates a fresh set — so referenceIds * and ObjectIDs in the response change on every call. Callers that * cache resource identifiers across runs should re-read them from * each response. See the handler comment for the full rationale. */ export interface ISetupToolGeneratorRestData_1_0 { projectId: string; agentReferenceId: string; } /** * Identifiers for the resources the installer just provisioned. * * `toolReferenceIds` are workflow-engine handles (UUIDs). `toolIds` * are ObjectID hex strings — needed for endpoints keyed on the tool * ID (e.g. POST /v1/tools/{id}/execute), because the installer's * records are hidden from list endpoints and cannot be looked up by * name. */ export interface ISetupToolGeneratorRestReturnValue_1_0 { workflowReferenceId: string; agentReferenceIds: Record; toolReferenceIds: Record; toolIds: Record; } /** * Run status enum — matches the constants in * internal/workflows/workflow_run.go (RunStatusPending, RunStatusRunning, * RunStatusAwaitingInput, RunStatusCompleted, RunStatusFailed, * RunStatusCancelled). The string values are the on-the-wire values. */ export declare type WorkflowRunStatus = "pending" | "running" | "awaiting_input" | "completed" | "failed" | "cancelled"; /** * Per-step outcome record. One entry is appended on every step * execution; in a loop, the same stepId can appear multiple times * with different `iteration` values. Fields tagged `,omitempty` on * the Go side are optional here. */ export interface WorkflowStepResult { stepId: string; name: string; status: WorkflowRunStatus; iteration: number; sessionId?: string; response?: string; error?: string; startedAt?: number; endedAt?: number; } /** * Workflow run as returned by /v1/executeworkflow, * /v1/workflowruns/{runId}, and /v1/workflowruns/{runId}/input. * * `currentStepId` and `inputPrompt` are set when status is * "awaiting_input" — the UI uses them to know which step to surface * and what prompt to display. `completedAt` is set when status is * "completed". */ export interface IWorkflowRun { runId: string; workflowReferenceId: string; status: WorkflowRunStatus; currentStepId?: string; inputPrompt?: string; userInput: string; stepResults: WorkflowStepResult[]; createdAt: number; completedAt?: number; } export interface AIAgentsV2_WorkflowV1API { executeWorkflow: TRestAPIOperation; readWorkflowRun: TRestAPIOperation; submitWorkflowRunInput: TRestAPIOperation; } /** * Start a workflow run. * * Returns immediately with a 202 and the initial run record; execution * proceeds in the background. Poll with readWorkflowRun until status * transitions to "awaiting_input" (then call submitWorkflowRunInput) * or to a terminal state ("completed" / "failed" / "cancelled"). */ export interface IExecuteWorkflowRestData_1_0 { workflowReferenceId: string; userInput: string; projectId: string; openaiApiKey?: string; } export declare type IExecuteWorkflowRestReturnValue_1_0 = IWorkflowRun; /** * Read the current state of a workflow run. * * Used for polling. The `stepResults` array grows as the run * progresses; on loop iterations, multiple entries with the same * stepId can appear (distinguished by the `iteration` field). */ export interface IReadWorkflowRunRestData_1_0 { runId: string; projectId: string; } export declare type IReadWorkflowRunRestReturnValue_1_0 = IWorkflowRun; /** * Submit user input to a paused workflow run. * * Only valid when the run's status is "awaiting_input". After the * server accepts the input, the run resumes; clients should resume * polling readWorkflowRun. `userInput` is a free-form string — its * interpretation depends on the step that's paused. */ export interface ISubmitWorkflowRunInputRestData_1_0 { runId: string; projectId: string; userInput: string; } export declare type ISubmitWorkflowRunInputRestReturnValue_1_0 = IWorkflowRun; export interface EvalCriteriaCatalogueItem_2_0 { key: string; name: string; description: string; } /** * A selected predefined criterion: the catalogue key plus its i18n label key * (e.g. "TK_EP_RESPONSE_CLARITY"). On write only `key` is read; the service * always (re)derives `label` from its catalogue on read. */ export interface PredefinedCriterion_2_0 { key: string; label?: string; } export interface CreateEvalProfileRequest_2_0 { projectId: string; name: string; description?: string; predefinedCriteria?: PredefinedCriterion_2_0[]; customAiCriteria?: Record[]; deterministicCriteria?: Record[]; } export interface UpdateEvalProfileRequest_2_0 { name?: string; description?: string; predefinedCriteria?: PredefinedCriterion_2_0[]; customAiCriteria?: Record[]; deterministicCriteria?: Record[]; } export interface PatchEvalProfileRequest_2_0 { name?: string; description?: string; predefinedCriteria?: PredefinedCriterion_2_0[]; customAiCriteria?: Record[]; deterministicCriteria?: Record[]; } export interface EvalProfileResponse_2_0 { id: string; name: string; description?: string; predefinedCriteria: PredefinedCriterion_2_0[]; customAiCriteria: Record[]; deterministicCriteria: Record[]; version: number; createdAt: string; updatedAt: string; createdBy: string; organisationId: string; projectId: string; } export interface ListEvalProfilesFilter_2_0 { name?: string; criteriaType?: string; } export interface ListEvalProfilesParams_2_0 { projectId: string; skip?: number; limit?: number; nextCursor?: string; previousCursor?: string; filter?: ListEvalProfilesFilter_2_0; } export interface ListEvalProfilesResponse_2_0 { items: EvalProfileResponse_2_0[]; total?: number; skip?: number; limit?: number; nextCursor?: string; previousCursor?: string; } export interface CatalogueResponse_2_0 { items: EvalCriteriaCatalogueItem_2_0[]; } export interface ReferencesResponse_2_0 { profileId: string; references: string[]; } export interface ServiceToolkitEvalProfileV2API { listEvalProfiles: TRestAPIOperation; createEvalProfile: TRestAPIOperation; getEvalProfile: TRestAPIOperation<{ projectId: string; profileId: string; }, EvalProfileResponse_2_0>; updateEvalProfile: TRestAPIOperation<{ projectId: string; profileId: string; } & UpdateEvalProfileRequest_2_0, EvalProfileResponse_2_0>; patchEvalProfile: TRestAPIOperation<{ projectId: string; profileId: string; } & PatchEvalProfileRequest_2_0, EvalProfileResponse_2_0>; /** * Deletes an eval profile. * * When `force` is false (default) the server checks whether any simulators * still reference the profile and, if so, rejects the request with a * `ConflictError` whose `details` field contains an array of * `{ simulatorId: string; simulatorName: string }`. * * Pass `force: true` to bypass the check and delete unconditionally. */ deleteEvalProfile: TRestAPIOperation<{ projectId: string; profileId: string; force?: boolean; }, void>; getEvalProfileCatalogue: TRestAPIOperation<{ projectId: string; }, CatalogueResponse_2_0>; getEvalProfileReferences: TRestAPIOperation<{ projectId: string; profileId: string; }, ReferencesResponse_2_0>; } export interface ResourcesAPIGroup_2_0 extends AIAgentsV2_AgentV1API, AIAgentsV2_AgentPersonaV1API, AIAgentsV2_ToolDescriptorV1API, AIAgentsV2_ToolV1API, AIAgentsV2_MCPServerV1API, AIAgentsV2_A2AAgentV1API, AIAgentsV2_ToolFlowDescriptorV1API, AIAgentsV2_FlowExecutionToolV1API, AIAgentsV2_SkillV1API, AIAgentsV2_BuiltinToolV1API, AIAgentsV2_BuiltinSkillV1API, AIAgentsV2_SetupV1API, AIAgentsV2_WorkflowV1API, ServiceToolkitEvalProfileV2API { searchResources: TRestAPIOperation; indexActivity: TRestAPIOperation, IIndexActivityRestReturnValue_2_0>; indexFlows: TRestAPIOperation, IIndexFlowsRestReturnValue_2_0>; batchFlows: TRestAPIOperation; createFlow: TRestAPIOperation; readFlow: TRestAPIOperation; updateFlow: TRestAPIOperation; deleteFlow: TRestAPIOperation; cloneFlow: TRestAPIOperation; addFlowLocalization: TRestAPIOperation; removeFlowLocalization: TRestAPIOperation; createChildFlow: TRestAPIOperation, ICreateFlowFromChildrenRestReturnValue_2_0>; readFlowSettings: TRestAPIOperation; updateFlowSettings: TRestAPIOperation; indexProjects: TRestAPIOperation, IIndexProjectsRestReturnValue_2_0>; createProject: TRestAPIOperation; createProjectByTemplate: TRestAPIOperation; readProject: TRestAPIOperation; updateProject: TRestAPIOperation; deleteProject: TRestAPIOperation; validateProjectName: TRestAPIOperation; graphProject: TRestAPIOperation; trainAllProjectFlows: TRestAPIOperation; readProjectSettings: TRestAPIOperation; updateProjectSettings: TRestAPIOperation; setupCognigyGenerativeAI: TRestAPIOperation; indexLexicons: TRestAPIOperation, IIndexLexiconsRestReturnValue_2_0>; batchLexicons: TRestAPIOperation; createLexicon: TRestAPIOperation; readLexicon: TRestAPIOperation; updateLexicon: TRestAPIOperation; deleteLexicon: TRestAPIOperation; importIntoLexicon: TRestAPIOperation; exportFromLexicon: TRestAPIOperation; composeLexiconDownloadLink: TRestAPIOperation; indexLexiconEntries: TRestAPIOperation; batchLexiconEntries: TRestAPIOperation; createLexiconEntry: TRestAPIOperation; updateLexiconEntry: TRestAPIOperation; deleteLexiconEntry: TRestAPIOperation; indexLexiconEntryKeyphrases: TRestAPIOperation; addKeyphraseToLexiconEntry: TRestAPIOperation; removeKeyphraseFromLexiconEntry: TRestAPIOperation; indexLexiconKeyphrases: TRestAPIOperation; updateLexiconKeyphrase: TRestAPIOperation; indexLexiconSlots: TRestAPIOperation; batchLexiconSlots: TRestAPIOperation; createLexiconSlot: TRestAPIOperation; updateLexiconSlot: TRestAPIOperation; deleteLexiconSlot: TRestAPIOperation; addSlotToLexiconEntry: TRestAPIOperation; removeSlotFromLexiconEntry: TRestAPIOperation; indexEndpoints: TRestAPIOperation, IIndexEndpointsRestReturnValue_2_0>; batchEndpoints: TRestAPIOperation; createEndpoint: TRestAPIOperation; readEndpoint: TRestAPIOperation; updateEndpoint: TRestAPIOperation; deleteEndpoint: TRestAPIOperation; createEndpointApiKey: TRestAPIOperation; listEndpointApiKeys: TRestAPIOperation; deleteEndpointApiKey: TRestAPIOperation; readEndpointVoiceSettings: TRestAPIOperation; listVoicePhoneNumbers: TRestAPIOperation; listVoiceSpeechCredentials: TRestAPIOperation; listVoiceSpeechCredentialVoices: TRestAPIOperation; indexGoals: TRestAPIOperation, IIndexGoalsRestReturnValue_2_0>; createGoal: TRestAPIOperation; readGoal: TRestAPIOperation; updateGoal: TRestAPIOperation; deleteGoal: TRestAPIOperation; indexHandoverServices: TRestAPIOperation, IIndexHandoverServicesRestReturnValue_2_0>; indexHandoverProviders: TRestAPIOperation, IIndexHandoverProvidersRestReturnValue_2_0>; indexCopilotConfigs: TRestAPIOperation; readCopilotConfig: TRestAPIOperation; createCopilotConfig: TRestAPIOperation; updateCopilotConfig: TRestAPIOperation; deleteCopilotConfig: TRestAPIOperation; indexPrebuiltCopilotWidgets: TRestAPIOperation, IIndexPrebuiltCopilotWidgetsRestReturnValue_2_0>; readCopilotSampleTranscript: TRestAPIOperation, IReadCopilotSampleTranscriptRestReturnValue_2_0>; openCopilotSession: TRestAPIOperation; sendCopilotMessage: TRestAPIOperation; indexAgenticProfiles: TRestAPIOperation; readAgenticProfile: TRestAPIOperation; createHandoverProvider: TRestAPIOperation; readHandoverProvider: TRestAPIOperation; updateHandoverProvider: TRestAPIOperation; deleteHandoverProvider: TRestAPIOperation; indexPlaybooks: TRestAPIOperation, IIndexPlaybooksRestReturnValue_2_0>; batchPlaybooks: TRestAPIOperation; createPlaybook: TRestAPIOperation; readPlaybook: TRestAPIOperation; updatePlaybook: TRestAPIOperation; deletePlaybook: TRestAPIOperation; schedulePlaybook: TRestAPIOperation; createPlaybookStep: TRestAPIOperation; updatePlaybookStep: TRestAPIOperation; deletePlaybookStep: TRestAPIOperation; createPlaybookStepAssert: TRestAPIOperation; updatePlaybookStepAssert: TRestAPIOperation; deletePlaybookStepAssert: TRestAPIOperation; changePlaybookStepOrder: TRestAPIOperation; indexPlaybookRuns: TRestAPIOperation, IIndexPlaybookRunsRestReturnValue_2_0>; readPlaybookRun: TRestAPIOperation; deletePlaybookRun: TRestAPIOperation; indexSnippets: TRestAPIOperation; createSnippet: TRestAPIOperation; deleteSnippet: TRestAPIOperation; readChart: TRestAPIOperation; indexChartNodes: TRestAPIOperation; createChartNode: (data: { extension: T; type: U; } & (T extends keyof ICognigyNodes ? U extends keyof ICognigyNodes[T] ? ICognigyNodes[T][U] & ICreateChartNodeRestDataBase_2_0 : ICreateChartNodeRestDataGenericBody_2_0 : ICreateChartNodeRestDataGenericBody_2_0), options?: any) => Promise; readChartNode: (args: IReadChartNodeRestData_2_0, options?: IHttpRequestOptions) => Promise>; updateChartNode: TRestAPIOperation; deleteChartNode: TRestAPIOperation; addChartNodeLocalization: TRestAPIOperation; removeChartNodeLocalization: TRestAPIOperation; searchChartNodes: TRestAPIOperation; moveChartNode: TRestAPIOperation; copyChartNode: TRestAPIOperation; cutChartNode: TRestAPIOperation; pasteChartNode: TRestAPIOperation; undoChart: TRestAPIOperation; redoChart: TRestAPIOperation; getUndoRedoSteps: TRestAPIOperation; indexNodeDescriptors: TRestAPIOperation; indexIntents: TRestAPIOperation; batchIntents: TRestAPIOperation; createIntent: TRestAPIOperation; readIntent: TRestAPIOperation; updateIntent: TRestAPIOperation; deleteIntent: TRestAPIOperation; importIntents: TRestAPIOperation; addIntentLocalization: TRestAPIOperation; removeIntentLocalization: TRestAPIOperation; exportIntents: TRestAPIOperation; indexSentences: TRestAPIOperation; batchIntentSentences: TRestAPIOperation; createSentence: TRestAPIOperation; readSentence: TRestAPIOperation; updateSentence: TRestAPIOperation; deleteSentence: TRestAPIOperation; generateSentences: TRestAPIOperation; indexLearningSentences: TRestAPIOperation; readLearningSentence: TRestAPIOperation; deleteLearningSentence: TRestAPIOperation; indexNLUConnectors: TRestAPIOperation, IIndexNLUConnectorsRestReturnValue_2_0>; batchNLUConnectors: TRestAPIOperation; createNLUConnector: TRestAPIOperation; readNLUConnector: TRestAPIOperation; updateNLUConnector: TRestAPIOperation; deleteNLUConnector: TRestAPIOperation; indexExtensions: TRestAPIOperation; readExtension: TRestAPIOperation; uploadExtension: TRestAPIOperation; updateExtensionPackage: TRestAPIOperation; deleteExtension: TRestAPIOperation; indexSnapshots: TRestAPIOperation; createSnapshot: TRestAPIOperation; readSnapshot: TRestAPIOperation; deleteSnapshot: TRestAPIOperation; composeSnapshotDownloadLink: TRestAPIOperation; packageSnapshot: TRestAPIOperation; uploadSnapshotPackage: TRestAPIOperation; indexResourcesInSnapshot: TRestAPIOperation; restoreSnapshot: TRestAPIOperation; trainIntents: TRestAPIOperation; indexConnections: TRestAPIOperation; listCxOneKnowledgeHubs: TRestAPIOperation; batchConnections: TRestAPIOperation; createConnection: TRestAPIOperation; readConnection: TRestAPIOperation; updateConnection: TRestAPIOperation; deleteConnection: TRestAPIOperation; createConnectionField: TRestAPIOperation; deleteConnectionField: TRestAPIOperation; indexConnectionSchemas: TRestAPIOperation; indexLocales: TRestAPIOperation; createLocale: TRestAPIOperation; readLocale: TRestAPIOperation; updateLocale: TRestAPIOperation; deleteLocale: TRestAPIOperation; indexSlotFillers: TRestAPIOperation; batchSlotFillers: TRestAPIOperation; createSlotFiller: TRestAPIOperation; readSlotFiller: TRestAPIOperation; updateSlotFiller: TRestAPIOperation; deleteSlotFiller: TRestAPIOperation; indexFunctions: TRestAPIOperation, IIndexFunctionsRestReturnValue_2_0>; createFunction: TRestAPIOperation; readFunction: TRestAPIOperation; updateFunction: TRestAPIOperation; deleteFunction: TRestAPIOperation; triggerFunction: TRestAPIOperation; indexFunctionInstances: TRestAPIOperation; readFunctionInstance: TRestAPIOperation; stopFunctionInstance: TRestAPIOperation; indexPackages: TRestAPIOperation; createPackage: TRestAPIOperation; readPackage: TRestAPIOperation; deletePackage: TRestAPIOperation; mergePackage: TRestAPIOperation; composePackageDownloadLink: TRestAPIOperation; uploadPackage: TRestAPIOperation; optionsResolver: TRestAPIOperation; uploadFile: TRestAPIOperation; indexAudioPreviewLanguages: TRestAPIOperation; voicePrepareCall: TRestAPIOperation; createVoiceTestCall: TRestAPIOperation; deleteVoiceTestCall: TRestAPIOperation; readYesNoIntents: TRestAPIOperation; updateYesNoIntents: TRestAPIOperation; deleteYesNoIntents: TRestAPIOperation; trainYesNoIntents: TRestAPIOperation; trainYesNoIntentsProject: TRestAPIOperation; indexYesNoSentences: TRestAPIOperation; createYesNoSentence: TRestAPIOperation; updateYesNoSentence: TRestAPIOperation; deleteYesNoSentence: TRestAPIOperation; testVoiceProvider: TRestAPIOperation; testTranslationSettings: TRestAPIOperation; indexAgentAssistConfigs: TRestAPIOperation; createAgentAssistConfig: TRestAPIOperation; readAgentAssistConfig: TRestAPIOperation; updateAgentAssistConfig: TRestAPIOperation; deleteAgentAssistConfig: TRestAPIOperation; createAiAgent: TRestAPIOperation; updateAiAgent: TRestAPIOperation; readAiAgent: TRestAPIOperation; indexAiAgents: TRestAPIOperation; deleteAiAgent: TRestAPIOperation; validateAiAgentName: TRestAPIOperation; getAiAgentHiringTemplates: TRestAPIOperation; hireAiAgent: TRestAPIOperation; getAiAgentJobsAndTools: TRestAPIOperation; generateNodeOutput: TRestAPIOperation; indexInPlatformLlms: TRestAPIOperation, IIndexLargeLanguageModelsRestReturnValue_2_0>; updateInPlatformLlmAssignment: TRestAPIOperation<{ largeLanguageModelId: string; projectId: string; assigned: boolean; }, void>; indexLargeLanguageModels: TRestAPIOperation; createLargeLanguageModel: TRestAPIOperation; readLargeLanguageModel: TRestAPIOperation; updateLargeLanguageModel: TRestAPIOperation; deleteLargeLanguageModel: TRestAPIOperation; cloneLargeLanguageModel: TRestAPIOperation; testLargeLanguageModel: TRestAPIOperation; testA2AAgentConnection: TRestAPIOperation; getAvailableModelsForLLM: TRestAPIOperation; createLlmConfiguration: TRestAPIOperation; updateLlmConfiguration: TRestAPIOperation; deleteLlmConfiguration: TRestAPIOperation; indexLlmConfigurations: TRestAPIOperation; readLlmConfiguration: TRestAPIOperation; indexKnowledgeStores: TRestAPIOperation; createKnowledgeStore: TRestAPIOperation; readKnowledgeStore: TRestAPIOperation; deleteKnowledgeStore: TRestAPIOperation; updateKnowledgeStore: TRestAPIOperation; runKnowledgeExtension: TRestAPIOperation; indexKnowledgeDescriptors: TRestAPIOperation; indexKnowledgeSources: TRestAPIOperation; createKnowledgeSource: TRestAPIOperation; readKnowledgeSource: TRestAPIOperation; deleteKnowledgeSource: TRestAPIOperation; updateKnowledgeSource: TRestAPIOperation; uploadKnowledgeSourceFile: TRestAPIOperation; indexKnowledgeChunks: TRestAPIOperation; createKnowledgeChunk: TRestAPIOperation; readKnowledgeChunk: TRestAPIOperation; deleteKnowledgeChunk: TRestAPIOperation; updateKnowledgeChunk: TRestAPIOperation; indexKnowledgeConnectors: TRestAPIOperation; createKnowledgeConnector: TRestAPIOperation; readKnowledgeConnector: TRestAPIOperation; updateKnowledgeConnector: TRestAPIOperation; deleteKnowledgeConnector: TRestAPIOperation; runKnowledgeConnector: TRestAPIOperation; uploadResumable: TTusAPIOperation; generateNluScores: TRestAPIOperation; generateDesignTimeLLMOutput: TRestAPIOperation; readFlowChartAiAgents: TRestAPIOperation<{ flowId: string; preferredLocaleId?: string; }, { items: any[]; total: number; }>; } declare const ResourcesAPIGroup_2_0: (instance: Base) => ResourcesAPIGroup_2_0; /** * @openapi * * components: * schemas: * IStepIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * label: * type: string * type: * type: string * enum: * - intent * - node * entityReferenceId: * type: string * flowReferenceId: * type: string * flowName: * type: string * snapshotName: * type: string * snapshotId: * $ref: '#/components/schemas/TMongoId' */ export interface IStepIndexItem_2_0 { _id: TMongoId; label: string; type: "intent" | "node"; entityReferenceId: string; flowName: string; flowReferenceId: string; snapshotName?: string; snapshotId?: TMongoId; } export interface IIndexStepsRestData_2_0 extends IRestPagination, Partial { } export interface IIndexStepsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * TAnalyticsQueryFilterOperator_2_0: * type: string * enum: * - equals * - notEquals * - gt * - gte * - lt * - lte */ export declare type TAnalyticsQueryFilterOperator_2_0 = "equals" | "notEquals" | "gt" | "gte" | "lt" | "lte"; /** * @openapi * * components: * schemas: * IAnalyticsQueryFilter_2_0: * type: object * properties: * filters: * type: array * items: * type: object * properties: * field: * type: string * operator: * $ref: '#/components/schemas/TAnalyticsQueryFilterOperator_2_0' * values: * type: array * items: * type: string */ export interface IAnalyticsQueryFilter_2_0 { filters: { field: Fields; operator: TAnalyticsQueryFilterOperator_2_0; values: string[]; }[]; } /** * @openapi * * components: * schemas: * IGenerateReportResponse_2_0: * type: object * properties: * queryHash: * type: string */ export interface IGenerateReportResponse_2_0 { queryHash: string; } declare const timeGrain: readonly [ "hour", "day", "week", "month", "year" ]; export declare type TTimeGrain_2_0 = typeof timeGrain[number]; declare const quantitativeReportQueryName: readonly [ "sessions", "users", "messageHandled", "channelUsage", "sessionLengthAverage", "sessionLengthMinimum", "sessionLengthMaximum", "intentScoreDevelopment", "intentsOverallTimeline", "topExitMessages", "topMessages", "topIntents", "topSlots", "topGoals", "usagePerLocale", "numberOfGoalsHit", "numberOfConversationsTimeline", "usersPerChannel", "usersPerLocale", "sessionsByChannel", "averageExecutionTime", "orderOfIntentsByAverageNluScore", "numberOfMessagesProcessedTimeline", "npsTimeline", "understoodVsMisunderstoodMessages", "thumbsUpTimeline" ]; export declare type TQuantitativeReportQueryName_2_0 = typeof quantitativeReportQueryName[number]; export interface IGenerateReportRestDataBody_2_0 extends IAnalyticsQueryFilter_2_0<"endpointUrlToken" | "localeReferenceId" | "timestamp" | "rating">, IProjectScope { query: TQuantitativeReportQueryName_2_0; grain?: TTimeGrain_2_0; limit?: number; timezoneOffset?: string; } export interface IGenerateReportRestData_2_0 extends IGenerateReportRestDataBody_2_0 { } export interface IGenerateReportRestReturnValue_2_0 extends IGenerateReportResponse_2_0 { } /** * @openapi * * components: * schemas: * ILoadReportByQueryHashResponse_2_0: * type: object * properties: * status: * type: string * enum: * - pending * - done * - error * data: * type: array * items: * type: object * properties: * dimension: * type: string * measure: * type: number * value: * type: string * example: * status: done * data: * - dimension: 2021-01 * measure: 0 * - dimension: 2021-02 * measure: 1 * - dimension: 2021-03 * measure: 0 * - dimension: 2021-04 * measure: 1 */ export interface ILoadReportByQueryHashResponse_2_0 { status: "pending" | "done" | "error"; data: { dimension: string; measure: number; value?: string; }[]; } export interface ILoadReportByQueryHashRestDataBody_2_0 extends IProjectScope { queryHash: string; } export interface ILoadReportByQueryHashRestData_2_0 extends ILoadReportByQueryHashRestDataBody_2_0 { } export interface ILoadReportByQueryHashRestReturnValue_2_0 extends ILoadReportByQueryHashResponse_2_0 { } /** * @openapi * * components: * schemas: * ITopNMessages_2_0: * type: object * properties: * message: * type: string * count: * type: number * source: * type: string * example: * message: "I want pizza" * count: 12345 * source: bot */ export interface ITopNMessages_2_0 { /** message content */ message: string; /** number of messages */ count: number; /** bot or user */ source: string; } export declare type TGenerateMessagesFilterFields = "localeReferenceId" | "endpointUrlToken" | "source" | "timestamp" | "flowReferenceId" | "rating"; declare const messageType: readonly [ "current", "next", "previous" ]; export declare type TMessageType_2_0 = typeof messageType[number]; export interface IGenerateMessagesRestDataBody_2_0 extends IProjectScope, Partial> { timezoneOffset?: string; } export interface IGenerateMessagesRestData_2_0 extends Omit, "filter">, IGenerateMessagesRestDataBody_2_0 { search?: string; messageType?: TMessageType_2_0; } export interface IGenerateMessagesRestReturnValue_2_0 extends IGenerateReportResponse_2_0 { } /** * @openapi * * components: * schemas: * ILoadMessagesReportByQueryHashResponse_2_0: * type: object * properties: * status: * type: string * enum: * - pending * - done * - error * data: * type: array * items: * $ref: '#/components/schemas/ITopNMessages_2_0' * example: * status: done * data: * - message: "I want pizza" * count: 12345 * source: bot */ export interface ILoadMessagesReportByQueryHashResponse_2_0 { status: "pending" | "done" | "error"; data: ICursorBasedPaginationReturnValue; } export interface ILoadMessagesReportByQueryHashRestDataBody_2_0 extends IProjectScope { queryHash: string; } export interface ILoadMessagesReportByQueryHashRestData_2_0 extends ILoadMessagesReportByQueryHashRestDataBody_2_0 { } export interface ILoadMessagesReportByQueryHashRestReturnValue_2_0 extends ILoadMessagesReportByQueryHashResponse_2_0 { } /** * @openapi * components: * schemas: * IConversationSession_2_0: * type: object * properties: * _id: * type: string * contactId: * type: string * channel: * $ref: '#/components/schemas/TChannelType' * projectId: * $ref: '#/components/schemas/TMongoId' * projectName: * type: string * flowName: * type: string * messages: * type: integer * startTime: * type: string * endTime: * type: string * ratings: * type: array * items: * type: number * ratingComments: * type: array * items: * type: string * endpointName: * type: string */ export interface IConversationSession_2_0 { _id: string; contactId: string; projectId: TMongoId; projectName: string; flowName: string; flowReferenceId: string; channel: string; messages: number; startTime: string; endTime: string; sessionId: string; ratings?: number[]; ratingComments?: string[]; endpointName: string; } export declare type TGenerateTranscriptsFilterFields = "localeReferenceId" | "endpointUrlToken" | "source" | "timestamp" | "rating" | "userMessageCount" | "flowReferenceId"; export interface IGenerateTranscriptsRestDataBody_2_0 extends IProjectScope, Partial> { source?: TAnalyticsSource[]; timezoneOffset?: string; stepPath?: { value: string; match?: "all" | "end"; }; } export interface IGenerateTranscriptsRestData_2_0 extends Omit, "filter">, IGenerateTranscriptsRestDataBody_2_0 { search?: string; } export interface IGenerateTranscriptsRestReturnValue_2_0 extends IGenerateReportResponse_2_0 { } /** * @openapi * * components: * schemas: * ILoadTranscriptsReportByQueryHashResponse_2_0: * type: object * properties: * status: * type: string * enum: * - pending * - done * - error * data: * type: array * items: * $ref: '#/components/schemas/IConversationSession_2_0' */ export interface ILoadTranscriptsReportByQueryHashResponse_2_0 { status: "pending" | "done" | "error"; data: ICursorBasedPaginationReturnValue; } export interface ILoadTranscriptsReportByQueryHashRestDataBody_2_0 extends IProjectScope { queryHash: string; } export interface ILoadTranscriptsReportByQueryHashRestData_2_0 extends ILoadTranscriptsReportByQueryHashRestDataBody_2_0 { } export interface ILoadTranscriptsReportByQueryHashRestReturnValue_2_0 extends ILoadTranscriptsReportByQueryHashResponse_2_0 { } export interface IGenerateStepReportRestDataBody_2_0 extends Partial>, IProjectScope { direction: "forward" | "reverse"; startingStepId?: string; containingStepId?: string; timezoneOffset?: string; limit?: number; startingStepIdsForPagination?: string[]; } export interface IGenerateStepReportRestData_2_0 extends IGenerateStepReportRestDataBody_2_0 { } export interface IGenerateStepReportRestReturnValue_2_0 extends IGenerateReportResponse_2_0 { } /** * @openapi * * components: * schemas: * IStep_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * label: * type: string * type: * type: string * enum: * - intent * - node * entityReferenceId: * type: string * flowReferenceId: * type: string * flowName: * type: string * projectName: * type: string * projectId: * $ref: '#/components/schemas/TMongoId' * organisationId: * $ref: '#/components/schemas/TMongoId' * snapshotName: * type: string * snapshotId: * $ref: '#/components/schemas/TMongoId' */ export interface IStep_2_0 { _id: TMongoId; label: string; type: "intent" | "node"; entityReferenceId: string; flowName: string; flowReferenceId: string; projectName: string; projectId: TMongoId; organisationId: TMongoId; snapshotName?: string; snapshotId?: TMongoId; } /** * @openapi * * components: * schemas: * IStepReport_2_0: * type: object * properties: * _id: * type: string * step: * type: string * type: * type: string * enum: * - intent * - node * count: * type: number * flowReferenceId: * type: string * flowName: * type: string * entityReferenceId: * type: string * children: * type: array * items: * type: object * example: * step: Collect Email * type: node * count: 10 * flowReferenceId: 5dcf4edd-e5da-4bdc-837f-f482f8b90f47 * flowName: Main * entityReferenceId: 9f5078b4-2c0e-4e62-a1a3-9f5c1db89ee9 * children: * - step: Find Bookings * type: node * count: 8 * flowReferenceId: 5dcf4edd-e5da-4bdc-837f-f482f8b90f47 * flowName: Main * entityReferenceId: d623f450-ce35-4872-9842-3071ade1430f * - step: Help * type: intent * count: 2 * flowReferenceId: 5dcf4edd-e5da-4bdc-837f-f482f8b90f47 * flowName: Main * entityReferenceId: bfdb0179-32c2-4d5c-bf42-8882f14824a2 */ export interface IStepReport_2_0 { _id: string | null; step: string; type: IStep_2_0["type"]; entityReferenceId: string; flowReferenceId: string; flowName: string; count: number; children?: IStepReport_2_0[]; } /** * @openapi * * components: * schemas: * ILoadStepReportByQueryHashResponse_2_0: * type: object * properties: * status: * type: string * enum: * - pending * - done * - error * data: * $ref: '#/components/schemas/IStepReport_2_0' */ export interface ILoadStepReportByQueryHashResponse_2_0 { status: "pending" | "done" | "error"; data: IStepReport_2_0; } export interface ILoadStepReportByQueryHashRestDataBody_2_0 extends IProjectScope { queryHash: string; } export interface ILoadStepReportByQueryHashRestData_2_0 extends ILoadStepReportByQueryHashRestDataBody_2_0 { } export interface ILoadStepReportByQueryHashRestReturnValue_2_0 extends ILoadStepReportByQueryHashResponse_2_0 { } /** * @openapi * * components: * schemas: * IDeleteAnalyticsRecordsRestDataBody_2_0: * type: object * properties: * contactIds: * type: array * nullable: true * items: * type: string * timestampStart: * type: string * example: "2020-01-01T00:00:00Z" * timestampEnd: * type: string * example: "2020-01-31T23:59:00Z" */ export interface IDeleteAnalyticsRecordsRestDataBody_2_0 { contactIds: string[]; timestampStart?: string; timestampEnd?: string; } export interface IDeleteAnalyticsRecordsRestDataParams_2_0 { projectId: TMongoId; } export interface IDeleteAnalyticsRecordsRestData_2_0 extends IDeleteAnalyticsRecordsRestDataParams_2_0, IDeleteAnalyticsRecordsRestDataBody_2_0 { } export interface InsightsAPIGroup_2_0 { indexSteps: TRestAPIOperation; generateReport: TRestAPIOperation; loadReportByQueryHash: TRestAPIOperation; generateMessagesReport: TRestAPIOperation; loadMessagesReportByQueryHash: TRestAPIOperation; generateTranscriptsReport: TRestAPIOperation; loadTranscriptsReportByQueryHash: TRestAPIOperation; generateStepReport: TRestAPIOperation; loadStepReportByQueryHash: TRestAPIOperation; deleteAnalyticsRecords: TRestAPIOperation; insightsJWT: TRestAPIOperation; } declare function InsightsAPIGroup_2_0(instance: Base): InsightsAPIGroup_2_0; export interface JWTAuthAPIGroup_2_0 { collaborationJWT: TRestAPIOperation; } declare function JWTAuthAPIGroup_2_0(instance: Base): JWTAuthAPIGroup_2_0; export interface IProfilePrivacyPolicy { accepted: boolean; meta?: { [key: string]: { timestamp: number; }; }; } export interface IMemory { id: string; timestamp: string; text: string; } declare const profileTypes: readonly [ "simulator", "regular" ]; export declare type TProfileTypes = (typeof profileTypes)[number]; /** Exact-match search over a single indexed profile field. Mutually exclusive with the `filter` * regex search. Friendly keys are mapped to model paths by the profiles query builder * (`email → profile.email`, `firstname → profile.firstname`, `lastname → profile.lastname`, * `contactId → contactIds`). */ export interface IProfileExactMatch { email?: string; firstname?: string; lastname?: string; contactId?: string; } /** * @openapi * * components: * schemas: * IProfileData_2_0: * type: object * properties: * profile: * $ref: '#/components/schemas/IFlattenedProfile_2_0' * active: * type: boolean * contactIds: * type: array * items: * type: string * example: mail@example.com * * IProfile_2_0: * allOf: * - $ref: '#/components/schemas/IProfileData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IProfile_2_0 { profile: Partial; contactIds: string[]; active: boolean; /** The Mongo id of the entity */ _id: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * IMemory: * type: object * properties: * id: * type: string * description: Unique identifier for the memory * example: "123456" * timestamp: * type: string * format: date-time * description: The timestamp of when the memory was created * example: "2024-09-23T08:37:00Z" * text: * type: string * description: The text content of the memory * example: "This is a memory." * IFlattenedProfile_2_0: * type: object * properties: * prevent_data_collection: * type: boolean * accepted_gdpr: * type: boolean * privacy_policy: * type: object * tasks: * type: array * items: * type: string * example: buyer * memories: * type: array * items: * $ref: '#/components/schemas/IMemory' * description: Array of memories associated with the profile. * firstname: * type: string * example: Max * lastname: * type: string * example: Mustermann * email: * type: string * format: email * profilepic: * type: string * example: "" */ export interface IFlattenedProfile_2_0 { prevent_data_collection: boolean; accepted_gdpr: boolean; privacy_policy: IProfilePrivacyPolicy; tasks?: string[]; memories?: IMemory[]; firstname?: string; lastname?: string; email?: string; profilepic?: string; [key: string]: string | number | boolean | string[] | IMemory[] | IProfilePrivacyPolicy | object; } /** * @openapi * * components: * schemas: * IProfileIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * profile: * $ref: '#/components/schemas/IFlattenedProfile_2_0' * active: * type: boolean * type: * type: string * enum: * - simulator * contactIds: * type: array * items: * type: string * lastChanged: * type: number * projectId: * $ref: '#/components/schemas/TMongoId' */ export interface IProfileIndexItem_2_0 { _id: TMongoId; active: boolean; type?: TProfileTypes; profile: Partial; projectId: TMongoId; lastChanged: number; contactIds: string[]; } export interface IIndexProfilesRestData_2_0 extends IRestPagination, IProjectScope { } export interface IIndexProfilesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateProfileRestDataBody_2_0 extends Partial>, IProjectScope { } export interface ICreateProfileRestDataQuery_2_0 { } export interface ICreateProfileRestData_2_0 extends ICreateProfileRestDataBody_2_0, ICreateProfileRestDataQuery_2_0 { } export interface ICreateProfileRestReturnValue_2_0 extends IProfile_2_0 { } export interface IReadProfileRestDataParams_2_0 { profileId: TMongoId; } export interface IReadProfileRestData_2_0 extends IReadProfileRestDataParams_2_0 { } export interface IReadProfileRestReturnValue_2_0 extends IProfile_2_0 { } export interface IUpdateProfileRestDataParams_2_0 { profileId: TMongoId; } export interface IUpdateProfileRestDataBody_2_0 extends Partial> { } export interface IUpdateProfileRestData_2_0 extends IUpdateProfileRestDataBody_2_0, IUpdateProfileRestDataParams_2_0 { } export interface IUpdateProfileRestReturnValue_2_0 { } export interface IDeleteProfileRestDataParams_2_0 { profileId: string; } export interface IDeleteProfileRestData_2_0 extends IDeleteProfileRestDataParams_2_0 { } export interface IDeleteProfileRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IProfileSchemaData_2_0: * type: object * properties: * schema: * type: object * details: * type: array * items: * $ref: '#/components/schemas/IProfileSchemaEntry_2_0' * * IProfileSchema_2_0: * allOf: * - $ref: '#/components/schemas/IProfileData_2_0' */ export interface IProfileSchema_2_0 { schema: { firstname: "string"; lastname: "string"; email: "string"; age: "number"; birthday: "string"; gender: "string"; location: "string"; profilepic: "string"; prevent_data_collection: "boolean"; accepted_gdpr: "boolean"; privacy_policy: "object"; tasks: "object"; memories: "object"; [key: string]: "string" | "boolean" | "number" | "object"; }; details: IProfileSchemaEntry_2_0[]; } /** * @openapi * * components: * schemas: * IProfileSchemaEntry_2_0: * type: object * properties: * field: * type: string * internal: * type: string * type: * type: string * enum: * - string * - object * - number * - boolean */ export interface IProfileSchemaEntry_2_0 { /** display name */ field: string; /** reference name */ internal: string; type: "string" | "object" | "number" | "boolean"; } export interface IGetProfileSchemaRestDataParams_2_0 extends IProjectScope { } export interface IGetProfileSchemaRestData_2_0 extends IGetProfileSchemaRestDataParams_2_0 { } export interface IGetProfileSchemaRestReturnValue_2_0 extends IProfileSchema_2_0 { } export interface ISetProfileSchemaRestDataParams_2_0 extends IProjectScope { } export interface ISetProfileSchemaRestDataBody_2_0 { details: IProfileSchema_2_0["details"]; } export interface ISetProfileSchemaRestData_2_0 extends ISetProfileSchemaRestDataBody_2_0, ISetProfileSchemaRestDataParams_2_0 { } export interface ISetProfileSchemaRestReturnValue_2_0 { } export interface IMergeProfilesRestDataBody_2_0 { contactId: string; projectId: string; } export interface IMergeProfilesRestDataParams_2_0 { profileId: TMongoId; } export interface IMergeProfilesRestData_2_0 extends IMergeProfilesRestDataBody_2_0, IMergeProfilesRestDataParams_2_0 { } export interface IMergeProfilesRestReturnValue_2_0 extends IProfile_2_0 { } export interface IUnmergeProfilesRestDataParams_2_0 { profileId: TMongoId; } export interface IUnmergeProfilesRestDataBody_2_0 { contactId: string; } export interface IUnmergeProfilesRestData_2_0 extends IUnmergeProfilesRestDataBody_2_0, IUnmergeProfilesRestDataParams_2_0 { } export interface IUnmergeProfilesRestReturnValue_2_0 { } export interface IExportProfileDataRestDataParams_2_0 { profileId: string; } export interface IExportProfileDataRestData_2_0 extends IExportProfileDataRestDataParams_2_0 { } export interface IExportProfileDataRestReturnValue_2_0 extends IProfile_2_0 { sessions: any; } export interface IRemoveProfileDataRestDataParams_2_0 { profileId: string; } export interface IRemoveProfileDataRestData_2_0 extends IRemoveProfileDataRestDataParams_2_0 { } export interface IRemoveProfileDataRestReturnValue_2_0 { } export interface IRemoveContactIdFromProfileRestDataParams_2_0 { profileId: string; } export interface IRemoveContactIdFromProfileRestDataBody_2_0 { contactId: string; } export interface IRemoveContactIdFromProfileRestData_2_0 extends IRemoveContactIdFromProfileRestDataParams_2_0, IRemoveContactIdFromProfileRestDataBody_2_0 { } export interface IRemoveContactIdFromProfileRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ILogEntryIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * msg: * type: string * type: * type: string * enum: [fatal, error, warn, info, debug, trace] * meta: * type: object * traceId: * type: string */ export interface ILogEntryIndexItem_2_0 { _id: TMongoId; timestamp: Date; msg: string; type: TLogLevel; meta?: { [key: string]: any; }; traceId: string; } export interface IIndexLogEntriesRestDataParams_2_0 extends IProjectScope { } export interface IIndexLogEntriesRestData_2_0 extends IRestPagination, IIndexLogEntriesRestDataParams_2_0 { type?: Array; userId?: string; flowName?: string; startDate?: string; endDate?: string; } export interface IIndexLogEntriesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILogEntry_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * msg: * type: string * meta: * type: object * traceId: * type: string */ export interface ILogEntry_2_0 { _id: TMongoId; timestamp: Date; msg: string; type: TLogLevel; meta?: { [key: string]: any; }; traceId: string; } export interface IReadLogEntryRestDataParams_2_0 extends IProjectScope { logEntryId: TMongoId; } export interface IReadLogEntryRestData_2_0 extends IReadLogEntryRestDataParams_2_0 { } export interface IReadLogEntryRestReturnValue_2_0 extends ILogEntry_2_0 { } export interface ITailLogEntriesRestDataParams_2_0 extends IProjectScope { } export interface ITailLogEntriesRestData_2_0 extends IRestPagination, ITailLogEntriesRestDataParams_2_0 { type?: TLogLevel[]; userId?: string; flowName?: string; /** Filters on the log entry's `meta.sessionId`. Matched exactly, unlike userId/flowName. */ sessionId?: string; } export interface ITailLogEntriesRestReturnValue_2_0 { items: ILogEntryIndexItem_2_0[]; total: number; nextCursor: string | null; previousCursor: string | null; } /** * @openapi * * components: * schemas: * ITaskIndexItemData_2_0: * type: object * properties: * name: * type: string * description: The name of the task * data: * type: object * description: The parameters of the task * status: * type: string * enum: * - queued * - active * - done * - cancelling * - cancelled * - error * currentStep: * type: integer * lastRunAt: * type: string * format: date-time * lastFinishedAt: * type: string * format: date-time * totalStep: * type: integer * failReason: * type: string * * ITaskIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/ITaskData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export declare type ITaskIndexItem_2_0 = TAbstractTaskData_2_0 & { _id: TMongoId; currentStep: number; totalStep: number; /** * The status of the task */ status: "queued" | "active" | "done" | "cancelling" | "cancelled" | "error"; failReason: string; lastRunAt: Date | string | null; lastFinishedAt: Date | string | null; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; }; export interface IIndexTasksRestData_2_0 extends IRestPagination, Partial { } export interface IIndexTasksRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue> { } export interface IReadTaskRestDataQuery_2_0 extends Partial { } export interface IReadTaskRestDataParams_2_0 { taskId: TMongoId; } export interface IReadTaskRestData_2_0 extends IReadTaskRestDataParams_2_0, IReadTaskRestDataQuery_2_0 { } export interface IReadTaskRestReturnValue_2_0 extends ITask_2_0 { } export interface ICancelTaskRestDataParams_2_0 { taskId: TMongoId; } export interface ICancelTaskRestData_2_0 extends ICancelTaskRestDataParams_2_0 { } export interface ICancelTaskRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ITrainerRecordData_2_0: * type: object * properties: * text: * type: string * description: The text of the user * example: I want a Pizza * count: * type: number * description: How often the text was used as an input * example: 2 * flowReferenceId: * type: string * format: uuid * handled: * type: boolean * handleAction: * type: string * enum: * - addedToIntent * - skip * - ignored * nlu: * type: object * description: The last NLU object that was created (from InputObject) based on the message * meta: * type: object * snapshotReference: * type: string * description: Reference to a snapshot in case this record was created because a user talked to a snapshot * * ITrainerRecord_2_0: * allOf: * - $ref: '#/components/schemas/ITrainerRecordData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ITrainerRecord_2_0 { /** The Mongo id of the entity */ _id: TMongoId; /** The text of the user, e.g. 'hello my name is Brian' */ text: string; /** How often the text was used as an input, e.g. 2 */ count: number; /** Reference to a snapshot in case this record was created because a user talked to a snapshot */ snapshotId?: TMongoId; /** The reference id of the flow the message passed-through */ flowReferenceId: string; /** The reference id of the locale */ localeReferenceId: string; /** The last NLU object that was created (from InputObject) based on the message */ nlu: { /** The cognigy system slots matched witin the text of the user, as detailed object with value, offset, ... */ detailedSlots?: ISystemSlots_2_0; /** The full results of our intent mapper */ intentMapperResults?: { finalIntentName?: string; finalIntentScore?: number; }; tokens?: string[]; intentFlow?: string; intentId?: string; [key: string]: any; }; /** Meta-data we record when we handle the message */ meta: { [key: string]: any; }; /** Changed from 'false' to 'true' as soon as the record was processed */ handled: boolean; handleAction: "addedToIntent" | "ignored" | "skipped"; /** Unix-timestamp when the entity was created initially */ createdAt: number; /** Unix-timestamp when the entity was changed last time */ lastChanged: number; /** Email of the user who created the entity initially */ createdBy: TMongoId; /** Email of the user who did the last modification */ lastChangedBy: TMongoId; } export interface ISystemSlots_2_0 { DATE: IDateSlot[] | null; NUMBER: INumberSlot[] | null; DURATION: IDurationSlot[] | null; TEMPERATURE: ITemperatureSlot[] | null; AGE: IAgeSlot[] | null; PERCENTAGE: IPercentageSlot[] | null; EMAIL: IEmailSlot[] | null; URL: IUrlSlot[] | null; MONEY: IMoneySlot[] | null; DISTANCE: IDistanceSlot[] | null; } export declare type IBatchTrainerRecordsOperationSet = (IBatchActionOperation<"update", Omit> | IBatchActionOperation<"skip"> | IBatchActionOperation<"ignore"> | IBatchActionOperation<"addToIntent", Omit & { flowId: TMongoId; intentId: TMongoId; localeId: TMongoId; }> | IBatchActionOperation<"delete">)[]; export interface IBatchTrainerRecordsRestDataBody_2_0 extends IProjectScope { operations: IBatchTrainerRecordsOperationSet; } export interface IBatchTrainerRecordsRestData_2_0 extends IBatchTrainerRecordsRestDataBody_2_0 { } export interface IBatchTrainerRecordsRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * ITrainerRecordIndexItem_2_0: * allOf: * - $ref: '#/components/schemas/ITrainerRecordData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface ITrainerRecordIndexItem_2_0 { /** The Mongo id of the entity */ _id: TMongoId; text: string; count: number; snapshotId?: TMongoId; flowReferenceId: string; /** The reference id of the locale */ localeReferenceId: string; /** The last NLU object that was created (from InputObject) based on the message */ nlu: { /** The cognigy system slots matched witin the text of the user, as detailed object with value, offset, ... */ detailedSlots?: ISystemSlots_2_0; /** The full results of our intent mapper */ intentMapperResults?: { finalIntentName?: string; finalIntentScore?: number; }; tokens?: string[]; intentFlow?: string; intentId?: string; [key: string]: any; }; meta: { [key: string]: any; }; handled: boolean; handleAction: "addedToIntent" | "ignored" | "skipped"; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexTrainerRecordsRestData_2_0 extends IRestPagination, Partial { understood?: boolean; intentFound?: boolean; slotFound?: boolean; systemSlotsFound?: boolean; userSlotsFound?: boolean; type?: Array; scoreRange?: Array; } export interface IIndexTrainerRecordsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadTrainerRecordRestDataParams_2_0 extends IProjectScope { recordId: TMongoId; } export interface IReadTrainerRecordRestData_2_0 extends IReadTrainerRecordRestDataParams_2_0 { } export interface IReadTrainerRecordRestReturnValue_2_0 extends ITrainerRecord_2_0 { } export interface IComposeTrainerRecordsDownloadLinkRestDataBody_2_0 { taskId: string; } export interface IComposeTrainerRecordsDownloadLinkRestData_2_0 extends IComposeTrainerRecordsDownloadLinkRestDataBody_2_0 { } export interface IComposeTrainerRecordsDownloadLinkRestReturnValue_2_0 { downloadLink: string; } export interface IPackageTrainerRecordsRestDataBody_2_0 extends IProjectScope { query?: IFilterQuery; } export interface IPackageTrainerRecordsRestData_2_0 extends IPackageTrainerRecordsRestDataBody_2_0 { } export interface IPackageTrainerRecordsRestReturnValue_2_0 extends ICreatedTask_2_0 { } export interface IUploadTrainerRecordsPackageRestDataBody_2_0 extends IProjectScope { file: File | Buffer; } export interface IUploadTrainerRecordsPackageRestData_2_0 extends IUploadTrainerRecordsPackageRestDataBody_2_0 { } export interface IUploadTrainerRecordsPackageRestReturnValue_2_0 extends ICreatedTask_2_0 { } /** * @openapi * components: * schemas: * TAnalyticsType_2_0: * type: string * example: user * enum: * - input * - output */ export declare type TAnalyticsType_2_0 = "input" | "output"; /** * @openapi * components: * schemas: * TAnalyticsSource_2_0: * type: string * example: user * enum: * - user * - bot * - agent * - suggestion */ export declare type TAnalyticsSource_2_0 = "user" | "bot" | "agent" | "suggestion"; /** * @openapi * components: * schemas: * IConversationData_2_0: * type: object * properties: * projectId: * $ref: '#/components/schemas/TMongoId' * projectName: * type: string * inputId: * type: string * sessionId: * type: string * contactId: * type: string * organisation: * $ref: '#/components/schemas/TMongoId' * inputText: * type: string * inputData: * type: object * type: * $ref: '#/components/schemas/TAnalyticsType_2_0' * source: * $ref: '#/components/schemas/TAnalyticsSource_2_0' * flowName: * type: string * flowReferenceId: * type: string * channel: * $ref: '#/components/schemas/TChannelType' * timestamp: * type: object * inHandoverRequest: * type: boolean * inHandoverConversation: * type: boolean * outputId: * type: string * expiresAt: * type: object * endpointUrlToken: * type: string * endpointName: * type: string * localeReferenceId: * type: string * localeName: * type: string * snapshotId: * $ref: '#/components/schemas/TMongoId' * snapshotName: * type: string * rating: * type: number * ratingComment: * type: string */ export interface IConversationData_2_0 { projectId: TMongoId; projectName: string; inputId: string; sessionId: string; contactId: string; organisation: TMongoId; inputText: string; inputData: any; type: TAnalyticsType_2_0; source: TAnalyticsSource_2_0; previousInputText: string; previousInputData: any; previousInputAttachments: any[]; previousSource: TAnalyticsSource_2_0; flowName: string; flowReferenceId: string; channel: string; timestamp: Date; inHandoverRequest: boolean; inHandoverConversation: boolean; outputId?: string; expiresAt: Date; endpointUrlToken: string; endpointName: string; localeReferenceId: string; localeName: string; snapshotId?: TMongoId; snapshotName?: string; rating: number; ratingComment: string; } export interface IIndexConversationsRestRestDataQuery_2_0 extends Partial { contactIds: string[]; } export interface IIndexConversationsRestRestData_2_0 extends IIndexConversationsRestRestDataQuery_2_0 { } export interface IIndexConversationsRestRestReturnValue_2_0 { items: IConversationData_2_0[]; total: number; } export interface IReadConversationRestRestDataParams_2_0 { sessionId: string; } export interface IReadConversationRestRestDataQuery_2_0 extends Partial { expertMode?: string; } export interface IReadConversationRestRestData_2_0 extends IReadConversationRestRestDataParams_2_0, IReadConversationRestRestDataQuery_2_0 { } export interface IReadConversationRestRestReturnValue_2_0 { items: IConversationData_2_0[]; total: number; } export interface IDeleteConversationRestRestDataParams_2_0 { sessionId: string; } export interface IDeleteConversationRestRestDataQuery_2_0 extends Partial { } export interface IDeleteConversationRestRestData_2_0 extends IDeleteConversationRestRestDataQuery_2_0, IDeleteConversationRestRestDataParams_2_0 { } export interface IDeleteConversationRestRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IKnowledgeQueryCounterAggregatedValue_2_0: * type: object * properties: * queries: * type: number * day: * type: number * month: * type: number * year: * type: number */ export interface IKnowledgeQueryCounterAggregatedValue_2_0 { /** The number of queries in the time-span */ queries: number; /** The day, e.g. 1 for the first day in the month */ day: number; /** The month of the year, e.g. 1 for January */ month: number; /** The year, e.g. 2020 */ year: number; } export interface IGetKnowledgeQueryCounterRestDataParams_2_0 { projectId: string; } export interface IGetKnowledgeQueryCounterRestData_2_0 extends IGetKnowledgeQueryCounterRestDataParams_2_0 { year: number; month: number; } export interface IGetKnowledgeQueryCounterRestReturnValue_2_0 { items: IKnowledgeQueryCounterAggregatedValue_2_0[]; } export interface IGetKnowledgeQueryCounterOrganisationRestData_2_0 { year: number; month: number; } export interface IGetKnowledgeQueryCounterOrganisationRestReturnValue_2_0 { items: IKnowledgeQueryCounterAggregatedValue_2_0[]; } /** * @openapi * * components: * schemas: * IConversationCounterAggregatedValue_3_0: * type: object * properties: * conversations: * type: number * day: * type: number * month: * type: number * year: * type: number * perChannel: * type: array * items: * type: object * properties: * channel: * type: string * conversations: * type: number */ export interface IConversationCounterPreAggregatedValue_3_0 { /** The number of conversations in the time-span */ conversations: number; /** The day, e.g., 1 for the first day in the month */ day: number; /** The month of the year, e.g., 1 for January */ month: number; /** The year, e.g., 2020 */ year: number; /** Details on which channels those conversations happened */ perChannel: Array<{ /** The channel name */ channel: string; /** The number of conversations for the specific channel */ conversations: number; }>; } export interface IGetConversationCounterRestDataParams_3_0 { projectId: string; } export interface IGetConversationCounterRestData_3_0 extends IGetConversationCounterRestDataParams_3_0 { year: number; month: number; } export interface IGetConversationCounterRestReturnValue_3_0 { items: IConversationCounterPreAggregatedValue_3_0[]; } export interface IGetConversationCounterOrganisationRestData_3_0 { year: number; month: number; } export interface IGetConversationCounterOrganisationRestReturnValue_3_0 { items: IConversationCounterPreAggregatedValue_3_0[]; } /** * @openapi * * components: * schemas: * ICallCounterAggregatedValue_3_0: * type: object * properties: * day: * type: number * month: * type: number * year: * type: number * maxConcurrency: * type: number * callMinutes: * type: number * processedCalls: * type: number * billableCalls: * type: number */ export interface ICallCounterPreAggregatedValue_3_0 { /** The number of calls in the time-span */ processedCalls: number; /** The number of billable calls in the time-span */ billableCalls: number; /** The day, e.g., 1 for the first day in the month */ day: number; /** The month of the year, e.g., 1 for January */ month: number; /** The year, e.g., 2020 */ year: number; /** The maximum concurrency in the time-span */ maxConcurrency: number; /** The number of call minutes in the time-span */ callMinutes: number; } export interface IGetCallCounterRestDataParams_3_0 { projectId: string; } export interface IGetCallCounterRestData_3_0 extends IGetCallCounterRestDataParams_3_0 { year: number; month: number; } export interface IGetCallCounterRestReturnValue_3_0 { items: ICallCounterPreAggregatedValue_3_0[]; } export interface IGetCallCounterOrganisationRestData_3_0 { year: number; month: number; } export interface IGetCallCounterOrganisationRestReturnValue_3_0 { items: ICallCounterPreAggregatedValue_3_0[]; } export interface MetricsAPIGroup_2_0 { indexTasks: TRestAPIOperation, IIndexTasksRestReturnValue_2_0>; readTask: TRestAPIOperation; cancelTask: TRestAPIOperation; indexProfiles: TRestAPIOperation; createProfile: TRestAPIOperation; readProfile: TRestAPIOperation; updateProfile: TRestAPIOperation; deleteProfile: TRestAPIOperation; getProfileSchema: TRestAPIOperation; setProfileSchema: TRestAPIOperation; exportProfileData: TRestAPIOperation; mergeProfiles: TRestAPIOperation; unmergeProfiles: TRestAPIOperation; removeProfileData: TRestAPIOperation; removeContactIdFromProfile: TRestAPIOperation; indexLogEntries: TRestAPIOperation; tailLogEntries: TRestAPIOperation; readLogEntry: TRestAPIOperation; indexTrainerRecords: TRestAPIOperation; readTrainerRecord: TRestAPIOperation; composeTrainerRecordsDownloadLink: TRestAPIOperation; packageTrainerRecords: TRestAPIOperation; uploadTrainerRecordsPackage: TRestAPIOperation; batchTrainerRecords: TRestAPIOperation; getPreAggregatedConversationCounter: TRestAPIOperation; getPreAggregatedConversationCounterOrganisation: TRestAPIOperation; getPreAggregatedCallCounter: TRestAPIOperation; getPreAggregatedCallCounterOrganisation: TRestAPIOperation; getKnowledgeQueryCounter: TRestAPIOperation; getKnowledgeQueryCounterOrganisation: TRestAPIOperation; indexConversations: TRestAPIOperation; readConversation: TRestAPIOperation; deleteConversation: TRestAPIOperation; } declare function MetricsAPIGroup_2_0(instance: Base): MetricsAPIGroup_2_0; export interface IIndexLogEntriesRestDataParams_2_1 extends IProjectScope { } export interface IIndexLogEntriesRestData_2_1 extends IRestPagination, IIndexLogEntriesRestDataParams_2_1 { type?: Array; userId?: string; flowName?: string; startDate: string; endDate: string; } export interface IIndexLogEntriesRestReturnValue_2_1 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * ILogEntryIndexItem_2_1: * type: object * required: * - _id * - timestamp * - metadata * properties: * _id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * msg: * type: string * meta: * type: object * traceId: * type: string * metadata: * type: object * required: * - organizationId * - projectId * - type * properties: * organizationId: * $ref: '#/components/schemas/TMongoId' * projectId: * $ref: '#/components/schemas/TMongoId' * type: * type: string * enum: [fatal, error, warn, info, debug, trace] */ export interface ILogEntryIndexItem_2_1 { _id: TMongoId; timestamp: Date; msg?: string; meta?: { [key: string]: any; }; metadata: { organizationId: TMongoId; projectId: TMongoId; type: TLogLevel; }; traceId?: string; disableSensitiveLogging?: boolean; } export interface ITailLogEntriesRestDataParams_2_1 extends IProjectScope { } export interface ITailLogEntriesRestData_2_1 extends IRestPagination, ITailLogEntriesRestDataParams_2_1 { type?: TLogLevel[]; userId?: string; flowName?: string; /** Filters on the log entry's `meta.sessionId`. Matched exactly, unlike userId/flowName. */ sessionId?: string; /** * Time window in hours bounding the query to `now() - lastTimeWindow`, overriding the * cluster's configured tail cutoff for this request only. Omit it to keep the configured * cutoff. * * Every cluster accepts 1, 6 and 12 plus its own configured cutoff value, so the accepted * set is not expressible as a union here — an unsupported value is rejected with a 400 * listing what that cluster allows. * * Requires the log entries v2 model. Send it together with the * `x-cognigy-log-model-version: v2` header, unless the service has the v2 model enabled * cluster-wide, in which case no header is needed — service-logs routes to the timeseries * strategy on `modelVersion === "v2"` OR its own `isModelV2Enabled()`. The 400 is returned * only when the request would otherwise route to the v1 model. * * `sessionId` carries no such requirement: it is implemented by every tail strategy. */ lastTimeWindow?: number; } export interface ITailLogEntriesRestReturnValue_2_1 { items: ILogEntryIndexItem_2_1[]; total: number; nextCursor: string | null; previousCursor: string | null; } export interface IReadLogEntryRestDataParams_2_1 extends IProjectScope { logEntryId: TMongoId; } export declare type IReadLogEntryRestReturnValue_2_1 = ILogEntryIndexItem_2_0 | ILogEntryIndexItem_2_1; export interface IPackageLogEntriesRestDataParams_2_1 extends IProjectScope { } /** * Body of POST /v2.1/projects/{projectId}/logs/package. * Same filters as indexLogEntries; when startDate/endDate are omitted a * default 1-hour window ending now is applied (as in indexLogEntries_2_1). */ export interface IPackageLogEntriesRestDataBody_2_1 { type?: Array; userId?: string; flowName?: string; startDate?: string; endDate?: string; } export interface IPackageLogEntriesRestReturnValue_2_1 { /** Identifier of the logs file being written; used to download it once packaging finished. */ logsFileId: string; /** Id of the Task Manager task tracking the packaging progress — poll it via the tasks APIs. */ taskId: string; } /** Params of GET /v2.1/projects/{projectId}/logs/package/{logsFileId}/download. */ export interface IDownloadPackagedLogsRestDataParams_2_1 extends IProjectScope { logsFileId: string; } /** Return value of GET /v2.1/projects/{projectId}/logs/package/{logsFileId}/download — * the packaged logs file content (JSON Lines / one log entry per line). */ export declare type IDownloadPackagedLogsRestReturnValue_2_1 = string; /** Params of GET /v2.1/projects/{projectId}/logs/count. */ export interface ICountTypeLogsRestDataParams_2_1 extends IProjectScope { } /** * The levels countTypeLogs reports on. * * Written out rather than derived as `Exclude`, which would have defeated * the point: deriving it means any level later added to the shared `TLogLevel` silently joins * this endpoint's public response contract, even though the server would not return it. The * server's own list (`COUNT_LOG_LEVELS` in service-logs) is a standalone constant for the same * reason, so an explicit union here is what actually mirrors it. * * Every member is also a valid `TLogLevel`, and that invariant is already enforced on the * server side: service-logs declares `COUNT_LOG_LEVELS: TLogLevel[]`, so renaming or * removing a level upstream is a compile error there. There is deliberately no type-level * assertion here to restate it — this file is compiled by ~28 services through * `COPY shared`, and an assertion of that shape is an unused type alias, which some * tsconfigs reject. Duplicating a guard that already exists is not worth that exposure. */ export declare type TCountTypeLogsLevel = "fatal" | "error" | "warn" | "info" | "debug"; export interface ICountTypeLogsRestData_2_1 extends ICountTypeLogsRestDataParams_2_1 { userId?: string; flowName?: string; sessionId?: string; /** * Time window in hours bounding the count to `now() - lastTimeWindow`, overriding the * cluster's configured cutoff for this request only. Omit it to keep that cutoff. * * Every cluster accepts 1, 6 and 12 plus its own configured cutoff value, so the accepted * set is not expressible as a union here — an unsupported value is rejected with a 400 * listing what that cluster allows. */ lastTimeWindow?: number; } export interface ICountTypeLogsLevelResult_2_1 { /** Entries counted. Equal to `cap` when `capped` is true — the true total is higher. */ count: number; /** True when the level hit the ceiling, i.e. `count` is a lower bound rather than a total. */ capped: boolean; } /** * Return value of GET /v2.1/projects/{projectId}/logs/count. * * Counting is bounded per level by a server-side ceiling, echoed back as `cap`. A level whose * true total exceeds it comes back with `capped: true` and `count` equal to `cap`, meaning * "at least this many" rather than an exact total — so treat a capped level as a lower bound. * * Requires the log entries v2 model: the endpoint reads the V2 time-series collection, so the * `x-cognigy-log-model-version: v2` header is mandatory unless the cluster runs the v2 model * service-wide. Requests on the v1 model are rejected with a 400 rather than served a * differently-shaped count. */ export interface ICountTypeLogsRestReturnValue_2_1 { /** One entry per counted level. */ counts: Record; /** The per-level ceiling applied to this request. */ cap: number; /** The time window the counts cover. */ window: { /** Window size in hours, or null when no lower bound was applied. */ hours: number | null; /** Oldest timestamp included (ISO 8601, UTC), or null when unbounded. */ from: string | null; }; } export interface IIndexProfilesRestData_2_1 extends IIndexProfilesRestData_2_0 { /** When the string "true" is provided, the exact result count is computed and returned in `total`; * otherwise the count is skipped for performance. */ withTotal?: string; /** Exact match on a single field. Mutually exclusive with `filter` — supplying both is a 400. * Serialized to dot-notation query params (`exactMatch.email=...`) by the SDK. */ exactMatch?: IProfileExactMatch; } export interface IIndexProfilesRestReturnValue_2_1 extends IIndexProfilesRestReturnValue_2_0 { } export interface MetricsAPIGroup_2_1 extends Omit { indexLogEntries: TRestAPIOperation; tailLogEntries: TRestAPIOperation; readLogEntry: TRestAPIOperation; /** Performance variant of indexProfiles (`/v2.1/profiles`). Skips the total * count by default; pass `withTotal: "true"` to compute it. */ indexProfiles_2_1: TRestAPIOperation; packageLogEntries: TRestAPIOperation; downloadPackagedLogs: TRestAPIOperation; /** * Counts Log Entries per level (`fatal`, `error`, `warn`, `info`, `debug` — `trace` is not * counted) over a time window, using the same `userId` / `flowName` / `sessionId` filters * as `tailLogEntries`, so a count can be rendered alongside a filtered tail. * * Reads the V2 time-series collection, so `x-cognigy-log-model-version: v2` is sent for * you (override it via `options.headers` if you need to). * * The endpoint is opt-in per cluster: a 404 means `SERVICE_LOGS_COUNT_TYPE_ENABLED` is off, * not that the Project or path is wrong. */ countTypeLogs: TRestAPIOperation; } declare function MetricsAPIGroup_2_1(instance: Base): MetricsAPIGroup_2_1; export interface IInjectRestDataBody_2_0 { text: string; data: object; URLToken: string; sessionId: string; userId: string; } export interface IInjectRestData_2_0 extends IInjectRestDataBody_2_0 { } export declare type IInjectRestReturnValue_2_0 = string; export interface INotifyRestDataBody_2_0 { text: string; data: object; attachments?: TAttachments[]; URLToken: string; userId: string; sessionId: string; } export interface INotifyRestData_2_0 extends INotifyRestDataBody_2_0 { } export declare type INotifyRestReturnValue_2_0 = string; export interface IInjectContextRestDataBody_2_0 { context: { [key: string]: any; }; userId: string; } export interface IInjectContextRestDataParams_2_0 { sessionId: string; } export interface IInjectContextRestData_2_0 extends IInjectContextRestDataBody_2_0, IInjectContextRestDataParams_2_0 { } export interface IInjectContextRestReturnValue_2_0 { [key: string]: any; } export interface IResetContextRestDataBody_2_0 { flowReferenceId: string; entrypoint: string; userId: string; } export interface IResetContextRestDataParams_2_0 { sessionId: string; } export interface IResetContextRestData_2_0 extends IResetContextRestDataBody_2_0, IResetContextRestDataParams_2_0 { } export interface IResetContextRestReturnValue_2_0 { [key: string]: any; } export interface SessionsAPIGroup_2_0 { inject: TRestAPIOperation; notify: TRestAPIOperation; injectContext: TRestAPIOperation; resetContext: TRestAPIOperation; } declare function SessionsAPIGroup_2_0(instance: Base): SessionsAPIGroup_2_0; export interface ICreateAuthenticatedAmazonUserRestDataBody_2_0 { accessToken: string; refreshToken: string; } export interface ICreateAuthenticatedAmazonUserRestData_2_0 extends ICreateAuthenticatedAmazonUserRestDataBody_2_0 { } export interface ICreateAuthenticatedAmazonUserRestReturnValue_2_0 { userId: string; } export interface IDeployAlexaEndpointRestDataBody_2_0 { URLToken: string; } export interface IDeployAlexaEndpointRestDataParams_2_0 { skillId: string; } export interface IDeployAlexaEndpointRestData_2_0 extends IDeployAlexaEndpointRestDataBody_2_0, IDeployAlexaEndpointRestDataParams_2_0 { } export interface IDeployAlexaEndpointRestReturnValue_2_0 { token: string; } /** * @openapi * components: * schemas: * IAlexaSkill_2_0: * type: object * properties: * lastUpdated: * type: string * description: When the skill was last updated * nameByLocale: * type: object * description: Gives the name of the skill for different locales * properties: * en-US: * type: string * de-DE: * type: string * ja-JP: * type: string * en-GB: * type: string * en-IN: * type: string * skillId: * type: string * description: The unique id of the skill * stage: * type: string * description: The current stage of the skills life cycle (e.g. is it in development, production..) */ export interface IAlexaSkill_2_0 { /** * When the skill was last updated */ lastUpdated: string; /** * Gives the name of the skill for different locales in the format: * "en-US": "cognigy", * "de-DE": "german cognigy" */ nameByLocale: { "en-US"?: string; "de-DE"?: string; "ja-JP"?: string; "en-GB"?: string; "en-IN"?: string; }; /** * The unique id of the skill */ skillId: string; /** * The current stage of the skills life cycle (e.g. is it in development, production..) */ stage: string; } export interface IGetAlexaSkillsRestReturnValue_2_0 { items: IAlexaSkill_2_0[]; } /** * @openapi * components: * schemas: * IAmazonUser_2_0: * type: object * properties: * userId: * type: string * description: The userId of the amazon user in the platform. * accessToken: * type: string * description: The user's access token that allows platform to make requests to Amazon. * refreshToken: * type: string * description: A refresh token that is used to generate a new access token refresh token pair. */ export interface IAmazonUser_2_0 { /** * The users organisationId */ organisationId: string; /** * The userId of the user in our product. */ userId: string; /** * The user's access token that allows us to make requests to Amazon. */ accessToken: string; /** * A refresh token that is used to generate a new access token refresh token pair. */ refreshToken: string; } export interface IGetAmazonAccountRestReturnValue_2_0 extends IAmazonUser_2_0 { } export interface ExternalAPIGroup_2_0 { createAuthenticatedAmazonUser: TRestAPIOperation; deleteAmazonAccount: TRestAPIOperation; deployAlexaEndpoint: TRestAPIOperation; getAlexaSkills: TRestAPIOperation; getAmazonAccount: TRestAPIOperation; } declare function ExternalAPIGroup_2_0(instance: Base): ExternalAPIGroup_2_0; export interface IValidatePasswordResetTokenRestDataBody_2_0 { token: string; } export interface IValidatePasswordResetTokenRestData_2_0 extends IValidatePasswordResetTokenRestDataBody_2_0 { } export interface IValidatePasswordResetTokenRestReturnValue_2_0 { } export interface IRequestPasswordResetRestDataBody_2_0 { email: string; } /** * @openapi * components: * parameters: * organisationIdParam: * in: query * name: organisationId * required: false * schema: * type: string */ export interface IRequestPasswordResetRestDataQuery_2_0 { organisationId?: string; } export interface IRequestPasswordResetRestData_2_0 extends IRequestPasswordResetRestDataBody_2_0, IRequestPasswordResetRestDataQuery_2_0 { } export interface IRequestPasswordResetRestReturnValue_2_0 { } export interface IResetPasswordRestDataBody_2_0 { token: string; newPassword: string; } export interface IResetPasswordRestData_2_0 extends IResetPasswordRestDataBody_2_0 { } export interface IResetPasswordRestReturnValue_2_0 { success: true; } export interface IChangePasswordRestDataBody_2_0 { email: string; oldPassword: string; newPassword: string; } /** * @openapi * components: * parameters: * organisationIdParam: * in: query * name: organisationId * required: false * schema: * type: string */ export interface IChangePasswordRestDataQuery_2_0 { organisationId?: string; } export interface IChangePasswordRestData_2_0 extends IChangePasswordRestDataBody_2_0, IChangePasswordRestDataQuery_2_0 { } export interface IChangePasswordRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IAuditEvent_2_0: * allOf: * - type: object * properties: * id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * description: The timestamp when the action happened * example: 2020-04-27T14:22:11.000Z * type: * $ref: '#/components/schemas/TAuditEventType' * actionType: * type: string * description: The type of action, only set if the type of the audit event is 'action' * example: createSnapshot * user: * type: string * description: The email of the user who performed the operation * example: hans.mustermann@xyz.com * modifiedResources: * type: array * description: An list of resources in the chain of the modification * items: * type: object * properties: * resourceId: * type: string * description: The id of the resource in the modification chain * example: '5e997f0cdcfc57730cf32941' * resourceType: * $ref: '#/components/schemas/TAuditEventChainElementType' * payload: * type: object * description: The raw payload of the operation in case it was tracked * example: { name: 'new resource name' } * changes: * type: array * description: The previous and new values of the changed fields. Only present for operations that support previous value tracking. Values are JSON text. * items: * type: object * required: [field] * properties: * field: * type: string * example: name * oldValue: * type: string * description: Value before the change as JSON text. Not set if the field did not exist. * example: '"old name"' * newValue: * type: string * description: Value after the change as JSON text. Not set if the field was removed. * example: '"new name"' * valuesOmitted: * type: boolean * description: True if the values were too large to be recorded */ export interface IAuditEvent_2_0 { _id: TMongoId; timestamp: Date; type: TAuditEventType; actionType?: IAuditEvent["actionType"]; user: string; userReference: TMongoId; organisationReference: TMongoId; chain: IAuditEventModificationChainElement[]; expiresAt: Date; payload: any; projectReference: TMongoId; performedBy?: IActorContext; changes?: IAuditEventChange[]; } /** * @openapi * * components: * schemas: * IAuditEventIndexItem_2_0: * allOf: * - type: object * properties: * id: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * description: The timestamp when the action happened * example: 2020-04-27T14:22:11.000Z * type: * $ref: '#/components/schemas/TAuditEventType' * user: * type: string * description: The email of the user who performed the operation * example: hans.mustermann@xyz.com * modifiedResources: * type: array * description: A list of resources in the chain of the modification * items: * $ref: '#/components/schemas/IAuditEventModificationChainElement' * changes: * type: array * description: The previous and new values of the changed fields. Only present for operations that support previous value tracking. Values are JSON text. * items: * type: object * required: [field] * properties: * field: * type: string * example: name * oldValue: * type: string * description: Value before the change as JSON text. Not set if the field did not exist. * example: '"old name"' * newValue: * type: string * description: Value after the change as JSON text. Not set if the field was removed. * example: '"new name"' * valuesOmitted: * type: boolean * description: True if the values were too large to be recorded */ export interface IAuditEventIndexItem_2_0 { _id: TMongoId; timestamp: Date; type: TAuditEventType; actionType?: IAuditEvent["actionType"]; user: string; userReference: TMongoId; organisationReference: TMongoId; chain: IAuditEventModificationChainElement[]; expiresAt: Date; payload: any; projectReference: TMongoId; performedBy?: IActorContext; changes?: IAuditEventChange[]; } export interface IIndexAuditEventsRestData_2_0 extends IRestPagination, Partial { actor?: string[]; type?: string[]; } export interface IIndexAuditEventsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadAuditEventRestDataParams_2_0 { auditEventId: string; } export interface IReadAuditEventRestData_2_0 extends IReadAuditEventRestDataParams_2_0 { } export interface IReadAuditEventRestReturnValue_2_0 extends IAuditEvent_2_0 { } declare const licenseStates: readonly [ "invalid", "valid", "valid3MonthsLeft", "willExpireSoon", "expiredRenewRequired", "expired" ]; export declare type TLicenseState = typeof licenseStates[number]; export interface IGetSystemLicenseStateRestReturnValue_2_0 { state: TLicenseState; systemCapabilities?: { aiOpsCenterEnabled?: boolean; quotaMaxKnowledgeChunks?: number; }; } export interface ISetSystemLicenseRestDataBody_2_0 { email: string; password: string; licensekey: string; } /** * @openapi * components: * parameters: * organisationIdParam: * in: query * name: organisationId * required: false * schema: * type: string */ export interface ISetSystemLicenseRestDataQuery_2_0 { organisationId?: string; } export interface ISetSystemLicenseRestData_2_0 extends ISetSystemLicenseRestDataBody_2_0, ISetSystemLicenseRestDataQuery_2_0 { } export interface ISetSystemLicenseRestReturnValue_2_0 { } export interface IGetSystemMessageRestReturnValue_2_0 { message: string; until: number; showOnLogin: boolean; } /** * @openapi * * components: * schemas: * IUserData_2_0: * type: object * properties: * id: * type: string * name: * type: string * organisation: * $ref: '#/components/schemas/TMongoId' * roles: * type: array * items: * $ref: '#/components/schemas/TOrganisationWideRole' * projects: * type: array * items: * type: string * acceptedTOS: * type: boolean * disabled: * type: boolean * * IUserDataCreate_2_0: * type: object * required: ['id', 'name', 'password'] * properties: * id: * type: string * name: * type: string * roles: * type: array * items: * $ref: '#/components/schemas/TOrganisationWideRole' * password: * type: string * description: "Enter password in case of non-sso user" * * IUser_2_0: * allOf: * - $ref: '#/components/schemas/IUserData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IUser_2_0 { /** The object id of the user */ _id: TMongoId; /** The id of the user, this is the 'email' */ id: string; /** The name of the user */ name: string; /** The organisation id of the user */ organisation: string; /** The org-wide roles assigned to this user */ roles: TOrganisationWideRole[]; /** The assigned projects for this user */ projects: string[]; /** Whether this user has accepted the terms of services, used for saas envs only */ acceptedTOS: boolean; /** Whether this user is disabled or not */ disabled: boolean; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * IUserIndexItem_2_0: * allOf: * - type: object * properties: * id: * type: string * name: * type: string * lastActive: * type: number * - $ref: '#/components/schemas/IEntityMeta' */ export interface IUserIndexItem_2_0 { /** The object id of the user */ _id: TMongoId; /** The id of the user (email) */ id: string; /** The name of the user */ name: string; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; lastActive: number; } /** * @openapi * * components: * schemas: * ILoginAttempt_2_0: * type: object * properties: * status: * type: string * enum: * - success * - failed * timestamp: * type: number * location: * type: string */ export interface ILoginAttempt_2_0 { /** The status of the login attempt */ status: "success" | "failed"; /** When the login attempt happened */ timestamp: number; /** The location (city and country) of the login attempt */ location: string; } /** * @openapi * * components: * schemas: * ILoginAttemptIndexItem_2_0: * type: object * properties: * status: * type: string * enum: * - success * - failed * timestamp: * type: number * location: * type: string */ export interface ILoginAttemptIndexItem_2_0 { /** The status of the login attempt */ status: "success" | "failed"; /** When the login attempt happened */ timestamp: number; /** The location (city and country) of the login attempt */ location: string; } /** * @openapi * * components: * schemas: * IApiKeyData_2_0: * type: object * properties: * name: * type: string * * IApiKey_2_0: * allOf: * - $ref: '#/components/schemas/IApiKeyData_2_0' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * createdAt: * type: integer * minimum: 0 * maximum: 2147483647 * example: 1527621049 * apiKey: * type: string */ export interface IApiKey_2_0 { /** The object id of the api-key */ _id: TMongoId; /** The name of the api-key, e.g. 'my demo' */ name: string; /** The actual api-key */ apiKey: string; createdAt: number; } /** * @openapi * * components: * schemas: * IApiKeyIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * apiKey: * type: string * createdAt: * type: number */ export interface IApiKeyIndexItem_2_0 { /** The object id of the api-key */ _id: TMongoId; /** The name of the api-key, e.g. 'my demo' */ name: string; /** The actual api-key */ apiKey: string; createdAt: number; } export interface ILogoutUserRestDataParams_2_0 { userId: TMongoId; } export interface ILogoutUserRestData_2_0 extends ILogoutUserRestDataParams_2_0 { } export interface ILogoutUserRestReturnValue_2_0 { } export interface IResetFailedLoginAttemptsRestDataParams_2_0 { userId: TMongoId; } export interface IResetFailedLoginAttemptsRestData_2_0 extends IResetFailedLoginAttemptsRestDataParams_2_0 { } export interface IResetFailedLoginAttemptsRestReturnValue_2_0 { } export interface IReadLastLoginAttemptRestReturnValue_2_0 extends ILoginAttempt_2_0 { } export interface IIndexLoginAttemptsRestData_2_0 extends IRestPagination { } export interface IIndexLoginAttemptsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IIndexUsersRestData_2_0 extends IRestPagination { } export interface IIndexUsersRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadUserRestDataParams_2_0 { userId: TMongoId; } export interface IReadUserRestData_2_0 extends IReadUserRestDataParams_2_0 { } export interface IReadUserRestReturnValue_2_0 extends IUser_2_0 { } export interface INiceProvidedProviders { sttVendors: string[]; ttsVendors: string[]; } export interface IReadUserMeRestReturnValue_2_0 extends IUser_2_0 { orgVoiceGatewayEnabled?: boolean; niceProvidedProviders?: INiceProvidedProviders; cxoneTenantId?: string; cxoneBusinessUnitId?: string; } export interface ICreateUserRestDataBody_2_0 extends Pick, Partial> { password: string; } export interface ICreateUserRestData_2_0 extends ICreateUserRestDataBody_2_0 { } export interface ICreateUserRestReturnValue_2_0 extends IUser_2_0 { } /** * @openapi * * components: * schemas: * IUserAdditional_2_0: * type: object * properties: * newPassword: * type: string * * IUserMeAdditional_2_0: * type: object * properties: * oldPassword: * type: string * newPassword: * type: string * * IUserUpdate_2_0: * allOf: * - type: object * properties: * name: * type: string * - $ref: '#/components/schemas/IUserAdditional_2_0' * * IUserUpdateMe_2_0: * allOf: * - type: object * properties: * name: * type: string * - $ref: '#/components/schemas/IUserMeAdditional_2_0' * */ export interface IUserUpdate_2_0 extends Pick { newPassword: string; } export interface IUserUpdateMe_2_0 extends Pick { oldPassword: string; newPassword: string; } export interface IUpdateUserRestDataParams_2_0 { userId: TMongoId; } export interface IUpdateUserRestDataBody_2_0 extends Partial> { } export interface IUpdateUserRestData_2_0 extends IUpdateUserRestDataParams_2_0, IUpdateUserRestDataBody_2_0 { } export interface IUpdateUserRestReturnValue_2_0 { } export interface IUpdateUserMeRestDataBody_2_0 extends Partial> { } export interface IUpdateUserMeRestData_2_0 extends IUpdateUserMeRestDataBody_2_0 { } export interface IUpdateUserMeRestReturnValue_2_0 { } export interface IDeleteUserRestDataParams_2_0 { userId: TMongoId; } export interface IDeleteUserRestData_2_0 extends IDeleteUserRestDataParams_2_0 { } export interface IDeleteUserRestReturnValue_2_0 { } export interface ICreateApiKeyMeRestDataBody_2_0 extends Partial> { } export interface ICreateApiKeyMeRestData_2_0 extends ICreateApiKeyMeRestDataBody_2_0 { } export interface ICreateApiKeyMeRestReturnValue_2_0 extends IApiKey_2_0 { } export interface IDeleteApiKeyMeRestDataParams_2_0 { apiKeyId: TMongoId; } export interface IDeleteApiKeyMeRestData_2_0 extends IDeleteApiKeyMeRestDataParams_2_0 { } export interface IDeleteApiKeyMeRestReturnValue_2_0 { } export interface IIndexApiKeysMeRestData_2_0 extends IRestPagination { } export interface IIndexApiKeysMeRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IAddRoleToUserRestDataParams_2_0 { userId: TMongoId; } export interface IAddRoleToUserRestDataBody_2_0 { role: TOrganisationWideRole; } export interface IAddRoleToUserRestData_2_0 extends IAddRoleToUserRestDataParams_2_0, IAddRoleToUserRestDataBody_2_0 { } export interface IAddRoleToUserRestReturnValue_2_0 { } export interface IRemoveRoleFromUserRestDataParams_2_0 { userId: TMongoId; } export interface IRemoveRoleFromUserRestDataBody_2_0 { role: TOrganisationWideRole; } export interface IRemoveRoleFromUserRestData_2_0 extends IRemoveRoleFromUserRestDataParams_2_0, IRemoveRoleFromUserRestDataBody_2_0 { } export interface IRemoveRoleFromUserRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IProjectMemberData_2_0: * type: object * properties: * id: * type: string * name: * type: string * roles: * type: array * items: * allOf: * - $ref: '#/components/schemas/TProjectWideRole' * - type: string * enum: * - admin * acceptedTOS: * type: boolean * disabled: * type: boolean * acl: * type: object * allowedLocales: * type: array * nullable: true * items: * type: object * properties: * localeId: * $ref: '#/components/schemas/TMongoId' * * IProjectMember_2_0: * allOf: * - $ref: '#/components/schemas/IProjectMemberData_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IProjectMember_2_0 { /** The object id of the member (the actual user) */ _id: TMongoId; /** The id of the member (the user), this is the 'email' */ id: string; /** The name of the member (the user) */ name: string; /** A list of roles assigned to the user within this project */ roles: (TProjectWideRole | Extract<"admin", TOrganisationWideRole>)[]; /** Flag whether the user has accepted the terms of services */ acceptedTOS: boolean; /** Flag whether this user was disabled */ disabled: boolean; /** Acl of the member in this project */ acl: IProjectWideAcl["rights"]; /** The locales the user has access to */ allowedLocales: { localeId: TMongoId; }[] | null; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * IProjectMemberIndexItem_2_0: * allOf: * - type: object * properties: * id: * type: string * name: * type: string * roles: * type: array * items: * type: string * - $ref: '#/components/schemas/IEntityMeta' */ export interface IProjectMemberIndexItem_2_0 { /** The object id of the member (the actual user) */ _id: TMongoId; /** The id of the member (the user), this is the 'email' */ id: string; /** The name of the member (the user) */ name: string; /** A list of roles assigned to the user within this project */ roles: string[]; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } export interface IIndexProjectMembersRestDataParams_2_0 { projectId: TMongoId; } export interface IIndexProjectMembersRestData_2_0 extends IIndexProjectMembersRestDataParams_2_0, IRestPagination { } export interface IIndexProjectMembersRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadProjectMemberRestDataParams_2_0 { userId: TMongoId; projectId: TMongoId; } export interface IReadProjectMemberRestData_2_0 extends IReadProjectMemberRestDataParams_2_0 { } export interface IReadProjectMemberRestReturnValue_2_0 extends IProjectMember_2_0 { } /** * @openapi * * components: * schemas: * IUserAcl_2_0: * type: object * properties: * organisationWide: * $ref: '#/components/schemas/IOrganisationWideAcl' * projectWide: * type: object * additionalProperties: * $ref: '#/components/schemas/IProjectWideAcl' */ export interface IUserAcl_2_0 { organisationWide: IOrganisationWideAcl; projectWide: { [key: string]: IProjectWideAcl; }; } export interface IReadUserAclMeRestReturnValue_2_0 extends IUserAcl_2_0 { } export interface IAddProjectMemberRestDataParams_2_0 { projectId: TMongoId; } export interface IAddProjectMemberRestDataBody_2_0 { userId: TMongoId; } export interface IAddProjectMemberRestData_2_0 extends IAddProjectMemberRestDataParams_2_0, IAddProjectMemberRestDataBody_2_0 { } export interface IAddProjectMemberRestReturnValue_2_0 { } export interface IRemoveProjectMemberRestDataParams_2_0 { projectId: TMongoId; } export interface IRemoveProjectMemberRestDataBody_2_0 { userId: TMongoId; } export interface IRemoveProjectMemberRestData_2_0 extends IRemoveProjectMemberRestDataParams_2_0, IRemoveProjectMemberRestDataBody_2_0 { } export interface IRemoveProjectMemberRestReturnValue_2_0 { } export interface IUpdateProjectMemberRestDataParams_2_0 { projectId: TMongoId; userId: string; } export interface IUpdateProjectMemberRestDataBody_2_0 extends Partial> { } export interface IUpdateProjectMemberRestData_2_0 extends IUpdateProjectMemberRestDataParams_2_0, IUpdateProjectMemberRestDataBody_2_0 { } export interface IUpdateProjectMemberRestReturnValue_2_0 { } export interface IAddRoleToMemberRestDataParams_2_0 { userId: TMongoId; projectId: TMongoId; } export interface IAddRoleToMemberRestDataBody_2_0 { role: TProjectWideRole; } export interface IAddRoleToMemberRestData_2_0 extends IAddRoleToMemberRestDataParams_2_0, IAddRoleToMemberRestDataBody_2_0 { } export interface IAddRoleToMemberRestReturnValue_2_0 { } export interface IRemoveRoleFromMemberRestDataParams_2_0 { userId: TMongoId; projectId: TMongoId; } export interface IRemoveRoleFromMemberRestDataBody_2_0 { role: TProjectWideRole; } export interface IRemoveRoleFromMemberRestData_2_0 extends IRemoveRoleFromMemberRestDataParams_2_0, IRemoveRoleFromMemberRestDataBody_2_0 { } export interface IRemoveRoleFromMemberRestReturnValue_2_0 { } export interface IDeprecatePasswordRestDataBody_2_0 { userId?: TMongoId; } export interface IDeprecatePasswordRestData_2_0 extends IDeprecatePasswordRestDataBody_2_0 { } export interface IDeprecatePasswordRestReturnValue_2_0 { } export interface IAddProjectToUserRestDataParams_2_0 { userId: TMongoId; } export interface IAddProjectToUserRestDataBody_2_0 { projectId: TMongoId; } export interface IAddProjectToUserRestData_2_0 extends IAddProjectToUserRestDataParams_2_0, IAddProjectToUserRestDataBody_2_0 { } export interface IAddProjectToUserRestReturnValue_2_0 { } export interface IRemoveProjectFromUserRestDataParams_2_0 { userId: TMongoId; } export interface IRemoveProjectFromUserRestDataBody_2_0 { projectId: TMongoId; } export interface IRemoveProjectFromUserRestData_2_0 extends IRemoveProjectFromUserRestDataParams_2_0, IRemoveProjectFromUserRestDataBody_2_0 { } export interface IRemoveProjectFromUserRestReturnValue_2_0 { } export interface IConfigureIdentityProviderRestDataBody_2_0 extends Partial> { } export interface IConfigureIdentityProviderRestData_2_0 extends IConfigureIdentityProviderRestDataBody_2_0 { } export interface IConfigureIdentityProviderRestReturnValue_2_0 { } export interface IResetIdentityProviderRestData_2_0 { } export interface IResetIdentityProviderRestReturnValue { } export interface ISetupCognigyLiveAgentRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 { liveAgentAccount: Number; } export interface ISetupCognigyLiveAgentInboxRestDataParams_2_0 extends IProjectScope { } export interface ISetupCognigyLiveAgentInboxRestData_2_0 extends ISetupCognigyLiveAgentInboxRestDataParams_2_0 { } export interface ISetupCognigyLiveAgentInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 { liveAgentDefaultInbox: Number; } export interface IUpdateCognigyLiveAgentInboxRestDataParams_2_0 extends IProjectScope { } export interface IUpdateCognigyLiveAgentInboxRestDataBody_2_0 { inboxId: number; } export interface IUpdateCognigyLiveAgentInboxRestData_2_0 extends IUpdateCognigyLiveAgentInboxRestDataParams_2_0, IUpdateCognigyLiveAgentInboxRestDataBody_2_0 { } export interface IUpdateCognigyLiveAgentInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 { liveAgentDefaultInbox: Number; } export interface IReadProjectInboxRestDataParams_2_0 extends IProjectScope { } export interface IReadProjectInboxRestData_2_0 extends IReadProjectInboxRestDataParams_2_0 { } export interface IReadProjectInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 { liveAgentDefaultInbox: Number; } export interface IReadLiveAgentAccountRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 { liveAgentAccount: Number; } export interface ICognigyLiveAgentMiddleware_2_0 { error?: string; } declare enum EOrganisationDeletionStatus { TOKEN_REQUESTED = "TOKEN_REQUESTED", IN_PROGRESS = "IN_PROGRESS", COMPLETED = "COMPLETED" } export declare type TDataToBeDeleted = { service: string; collectionName: string; isDeleted: boolean; lastUpdatedAt: string | null; }; export interface IOrganisationDeletion { organisationId: string; organisationName: string; verificationTokenChachedKey: string; createdAt: Date; updatedAt: Date; status: EOrganisationDeletionStatus; dataToBeDeleted: TDataToBeDeleted[]; } export interface IRequestOrganisationDeletionRestReturnValue_2_0 extends Omit { } declare const servicesNames: readonly [ "service-api", "service-resources", "service-logs", "service-profiles", "service-security", "service-trainer", "service-handover", "service-task-manager", "service-app-session-manager", "service-session-state-manager", "service-function-scheduler", "service-alexa-management", "service-runtime-file-manager" ]; export declare type TServicesNames = typeof servicesNames[number]; export declare type TReadCollectionsToBeDeletedRestReturnValue_2_0 = { [key in keyof TServicesNames]: string[]; }; export interface IReadOrganisationKnowledgeChunksCountRestReturnValue_2_0 { chunkCount: number; } export interface IUpdateInPlatformLlmEnabledRestDataParams_2_0 { /** The id of the cross-region in-platform LLM, as returned by the list endpoint. */ largeLanguageModelId: string; } export interface IUpdateInPlatformLlmEnabledRestBody_2_0 { enabled: boolean; /** Must be true when enabling a cross-region model: the admin accepts cross-region inference for the organisation. */ acceptCrossRegionInference?: boolean; } export interface IUpdateInPlatformLlmEnabledRestData_2_0 extends IUpdateInPlatformLlmEnabledRestDataParams_2_0, IUpdateInPlatformLlmEnabledRestBody_2_0 { } export interface IUpdateInPlatformLlmEnabledRestReturnValue_2_0 { } /** * @openapi * * components: * schemas: * IOrganisationData_2_0: * type: object * properties: * disabled: * type: boolean * description: "If set to `true`, the organization is disabled." * quotaMaxProjects: * type: number * quotaMaxUsers: * type: number * quotaMaxChannelsPerProject: * type: number * quotaMaxMessagesPerDay: * type: number * quotaMaxKnowledgeChunks: * type: number * passwordPolicy: * $ref: '#/components/schemas/IOrganisationPasswordPolicy_2_0' * sessionStateTTLInMinutes: * type: number * contactProfileTTLInMinutes: * type: number * conversationTTLInMinutes: * type: number * billingTimezone: * $ref: '#/components/schemas/TTimezone' * dataPrivacySettings: * $ref: '#/components/schemas/IOrganisationDataPrivacySettings_2_0' * voiceConfigurations: * $ref: '#/components/schemas/IOrganisationVoiceConfiguration_2_0' * aiOpsCenterEnabled: * type: boolean * proactiveProductEnabled: * type: boolean * orgInPlatformLlmEnabled: * type: boolean * orgResellLlmEnabled: * type: boolean * simulator: * $ref: '#/components/schemas/IOrganisationSimulator_2_0' * quotaMaxResourceUsage: * type: number * nullable: true * minimum: 0 * description: Dollar quota cap for resource usage. null = use platform default. * resourceUsagePaidTier: * type: boolean * description: Whether this org is on the paid tier for resource usage. * businessUnitId: * type: string * description: The business unit ID of the organization. * tenantId: * type: string * description: The tenant ID of the organization. * IOrganisation_2_0: * allOf: * - $ref: '#/components/schemas/IOrganisationData_2_0' * properties: * name: * type: string * description: The name of the organization. * required: ['name'] * IUpdateOrganisation_2_0: * allOf: * - $ref: '#/components/schemas/IOrganisationData_2_0' * properties: * name: * type: string * description: The name of the organization. */ export interface IOrganisation_2_0 { /** The mongo object id of this organisation */ _id: TMongoId; /** The name of this organisation, e.g. 'cognigy' */ name: string; /** The business unit ID */ businessUnitId?: string; /** The tenant ID */ tenantId?: string; /** Flag whether this organisation is currently disabled */ disabled: boolean; /** Optional quota information */ quotaMaxProjects: number; quotaMaxUsers: number; quotaMaxChannelsPerProject: number; quotaMaxMessagesPerDay: number; passwordPolicy: IOrganisationPasswordPolicy_2_0; sessionStateTTLInMinutes: number; contactProfileTTLInMinutes: number; conversationTTLInMinutes: number; analyticsTTLInMinutes: number; sessionsTTLInMinutes: number; stepEventsTTLInMinutes: number; billingTimezone: string; dataPrivacySettings: IOrganisationDataPrivacySettings_2_0; voiceConfigurations: IOrganisationVoiceConfiguration_2_0; aiOpsCenterEnabled: boolean; proactiveProductEnabled?: boolean; orgInPlatformLlmEnabled?: boolean; orgResellLlmEnabled?: boolean; simulator?: IOrganisationSimulator_2_0; /** Dollar quota cap for resource usage. null = use platform default. */ quotaMaxResourceUsage?: number | null; /** Whether this org is on the paid tier for resource usage. */ resourceUsagePaidTier?: boolean; /** Currency for resource usage billing. */ resourceUsageCurrency?: "USD"; } /** * @openapi * * components: * schemas: * IOrganisationPasswordPolicy_2_0: * type: object * properties: * minLength: * type: integer * maxLength: * type: integer * minAmountLowerCase: * type: integer * minAmountUpperCase: * type: integer * minAmountSpecialCharacters: * type: integer * minAmountNumbers: * type: integer * maxAmountIdenticalCharacters: * type: integer * minAmountFailedAttemptsAutoDisable: * type: integer * description: Consecutive failed logins after which the user account is locked. The user is emailed a password reset link that unlocks the account. Not set means 5, 0 switches the lockout off. */ export interface IOrganisationPasswordPolicy_2_0 { minLength: number; maxLength: number; minAmountLowerCase: number; minAmountUpperCase: number; minAmountSpecialCharacters: number; minAmountNumbers: number; maxAmountIdenticalCharacters: number; minAmountFailedAttemptsAutoDisable: number; } /** * @openapi * * components: * schemas: * IOrganisationDataPrivacySettings_2_0: * type: object * properties: * enabled: * type: boolean * useAnalytics: * type: boolean * useContactProfiles: * type: boolean * useConversations: * type: boolean * maskAnalytics: * type: boolean * maskLogging: * type: boolean * ignoreList: * type: array * items: * $ref: '#/components/schemas/TMongoId' */ export interface IOrganisationDataPrivacySettings_2_0 { enabled: boolean; useAnalytics: boolean; useContactProfiles: boolean; useConversations: boolean; maskAnalytics: boolean; maskLogging: boolean; ignoreList: string[]; } /** * @openapi * * components: * schemas: * INiceProvidedSpeechEntitlement_2_0: * type: object * required: * - vendor * - stt * - tts * properties: * vendor: * type: string * description: Speech vendor identifier (e.g. 'nice-stt', 'microsoft', 'deepgram') * stt: * type: boolean * description: "If set to `true`, STT is activated for this vendor." * tts: * type: boolean * description: "If set to `true`, TTS is activated for this vendor." * IOrganisationVoiceConfiguration_2_0: * type: object * properties: * enableNiceSharedProviders: * type: boolean * description: "[Deprecated] Derived from niceProvidedSpeechEntitlements" * orgVoiceGatewayEnabled: * type: boolean * description: "If set to `true`, Voice Gateway is activated for this organization." * niceProvidedSpeechEntitlements: * type: array * items: * $ref: '#/components/schemas/INiceProvidedSpeechEntitlement_2_0' * description: Per-vendor, per-capability entitlements for NiCE-provided speech providers */ export interface INiceProvidedSpeechEntitlement_2_0 { vendor: string; stt: boolean; tts: boolean; } export interface IOrganisationVoiceConfiguration_2_0 { enableNiceSharedProviders: boolean; orgVoiceGatewayEnabled: boolean; niceProvidedSpeechEntitlements: INiceProvidedSpeechEntitlement_2_0[]; } /** * @openapi * * components: * schemas: * IOrganisationSimulator_2_0: * type: object * properties: * paidTier: * type: boolean * description: "If set to `true`, the paid Simulator tier is activated." * runsMonthlyQuota: * type: integer * minimum: 0 * description: Monthly free simulation run quota */ export interface IOrganisationSimulator_2_0 { paidTier: boolean; runsMonthlyQuota: number; } /** * @openapi * * components: * schemas: * IOrganisationIndexItem_2_0: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * businessUnitId: * type: string * description: The business unit ID * tenantId: * type: string * description: The tenant ID * name: * type: string * description: The name of this organisation * disabled: * type: boolean * description: Flag whether this organisation is currently disabled * quotaMaxProjects: * type: number * quotaMaxUsers: * type: number * quotaMaxChannelsPerProject: * type: number * quotaMaxMessagesPerDay: * type: number * quotaMaxKnowledgeChunks: * type: number * passwordPolicy: * $ref: '#/components/schemas/IOrganisationPasswordPolicy_2_0' * sessionStateTTLInMinutes: * type: number * contactProfileTTLInMinutes: * type: number * conversationTTLInMinutes: * type: number * liveAgentAccount: * type: number * billingTimezone: * $ref: '#/components/schemas/TTimezone' * dataPrivacySettings: * $ref: '#/components/schemas/IOrganisationDataPrivacySettings_2_0' * aiOpsCenterEnabled: * type: boolean * proactiveProductEnabled: * type: boolean * orgInPlatformLlmEnabled: * type: boolean * orgResellLlmEnabled: * type: boolean * quotaMaxResourceUsage: * type: number * nullable: true * minimum: 0 * description: Dollar quota cap for resource usage. null = use platform default. * resourceUsagePaidTier: * type: boolean * description: Whether this org is on the paid tier for resource usage. */ export interface IOrganisationIndexItem_2_0 { /** The mongo object id of this organisation */ _id: TMongoId; /** The name of this organisation, e.g. 'cognigy' */ name: string; /** The business unit ID */ businessUnitId?: string; /** The tenant ID */ tenantId?: string; /** Flag whether this organisation is currently disabled */ disabled: boolean; /** Optional quota information */ quotaMaxProjects: number; quotaMaxUsers: number; quotaMaxChannelsPerProject: number; quotaMaxMessagesPerDay: number; quotaMaxKnowledgeChunks: number; passwordPolicy: IOrganisationPasswordPolicy_2_0; billingTimezone: string; sessionStateTTLInMinutes: number; contactProfileTTLInMinutes: number; conversationTTLInMinutes: number; liveAgentAccount: number; dataPrivacySettings: IOrganisationDataPrivacySettings_2_0; aiOpsCenterEnabled: boolean; proactiveProductEnabled: boolean; orgInPlatformLlmEnabled?: boolean; orgResellLlmEnabled?: boolean; /** Dollar quota cap for resource usage. null = use platform default. */ quotaMaxResourceUsage?: number | null; /** Whether this org is on the paid tier for resource usage. */ resourceUsagePaidTier?: boolean; /** Currency for resource usage billing. */ resourceUsageCurrency?: "USD"; } export interface IIndexOrganisationsRestData_2_0 extends IRestPagination { } export interface IIndexOrganisationsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ICreateOrganisationRestDataBody_2_0 extends Partial> { name: string; } export interface ICreateOrganisationRestData_2_0 extends ICreateOrganisationRestDataBody_2_0 { } export interface ICreateOrganisationRestReturnValue_2_0 extends IOrganisation_2_0 { } export interface IReadOrganisationRestDataParams_2_0 extends IOrganisationScope { } export interface IReadOrganisationRestData_2_0 extends IReadOrganisationRestDataParams_2_0 { } export interface IReadOrganisationRestReturnValue_2_0 extends IOrganisationIndexItem_2_0 { } export interface IUpdateOrganisationRestBody_2_0 extends Partial> { } export interface IUpdateOrganisationRestParams_2_0 { organisationId: string; } export interface IUpdateOrganisationRestData_2_0 extends IUpdateOrganisationRestParams_2_0, IUpdateOrganisationRestBody_2_0 { } export interface IUpdateOrganisationRestReturnValue_2_0 { } export interface IEnforcePasswordPolicyRestParams_2_0 { organisationId: string; } export interface IEnforcePasswordPolicyRestData_2_0 extends IEnforcePasswordPolicyRestParams_2_0 { } export interface IEnforcePasswordPolicyRestReturnValue_2_0 { } export interface ICreateApiKeyRestManagementDataParams_2_0 { organisationId: TMongoId; } export interface ICreateApiKeyRestManagementData_2_0 extends ICreateApiKeyRestManagementDataParams_2_0 { } export interface ICreateApiKeyRestManagementReturnValue_2_0 extends IApiKey_2_0 { } /** * @openapi * components: * parameters: * organisationDeletionTokenParam: * in: query * name: verificationToken * required: true * description: The verification token required to confirm the deletion. * schema: * type: string */ export interface IDeleteOrganisationRestQuery_2_0 { verificationToken: string; } export interface IDeleteOrganisationRestParams_2_0 { organisationId: string; } export interface IDeleteOrganisationRestData_2_0 extends IDeleteOrganisationRestParams_2_0, IDeleteOrganisationRestQuery_2_0 { } export interface IDeleteOrganisationRestReturnValue_2_0 { } export interface IReadVoiceGatewayAccountRestReturnValue_2_0 { voiceGatewayAccount: string; } export interface ISetupVoiceGatewayRestDataBody_2_0 { accountSid: string; } export interface ISetupVoiceGatewayRestData_2_0 extends ISetupVoiceGatewayRestDataBody_2_0 { } export interface IReadVoiceGatewaySpeechCredentialsRestData_2_0 { projectId: string; capability?: "tts" | "stt"; } export interface IVoiceGatewaySpeechCredentialRestItem_2_0 { speechCredentialSid: string; vendor: string; label: string | null; useForTts: boolean; useForStt: boolean; ttsTestedOk: boolean | null; sttTestedOk: boolean | null; isSharedCredential: boolean; type: string; } export interface IReadVoiceGatewaySpeechCredentialsRestReturnValue_2_0 { speechCredentials: IVoiceGatewaySpeechCredentialRestItem_2_0[]; } /** * @openapi * * components: * schemas: * IPinResourceRestDataBody_2_0: * type: object * properties: * resourceType: * $ref: '#/components/schemas/TPinnableResourceType' * resourceId: * $ref: '#/components/schemas/TMongoId' * pin: * type: boolean * */ export interface IPinResourceRestDataBody_2_0 { resourceType: TPinnableResourceType; resourceId: TMongoId; pin: boolean; } export interface IPinResourceRestData_2_0 extends IPinResourceRestDataBody_2_0 { } export interface IPinResourceRestReturnValue_2_0 { } export interface IFreeAiCredits { freeAiCreditsUsagePercentage: number; freeAiCreditsEnabled: boolean; } export interface IGetPinnedResourcesRestDataQuery_2_0 { resourceType: TPinnableResourceType; } export interface IGetPinnedResourcesRestData_2_0 extends IGetPinnedResourcesRestDataQuery_2_0 { } /** * @openapi * * components: * schemas: * IGetPinnedResourcesRestReturnValue_2_0: * type: object * properties: * type: * $ref: '#/components/schemas/TPinnableResourceType' * pinnedIds: * type: array * items: * $ref: '#/components/schemas/TMongoId' */ export interface IGetPinnedResourcesRestReturnValue_2_0 { type: TPinnableResourceType; pinnedIds: TMongoId[]; } export interface AdministrationAPIGroup_2_0 { requestPasswordReset: TRestAPIOperation; validatePasswordResetToken: TRestAPIOperation; resetPassword: TRestAPIOperation; changePassword: TRestAPIOperation; setSystemLicense: TRestAPIOperation; getSystemLicenseState: TRestAPIOperation; getSystemMessage: TRestAPIOperation; indexAuditEvents: TRestAPIOperation, IIndexAuditEventsRestReturnValue_2_0>; readAuditEvent: TRestAPIOperation; logoutUser: TRestAPIOperation; resetFailedLoginAttempts: TRestAPIOperation; readLastLoginAttemptMe: TRestAPIOperation; indexLoginAttemptsMe: TRestAPIOperation; deprecatePassword: TRestAPIOperation; indexUsers: TRestAPIOperation, IIndexUsersRestReturnValue_2_0>; createUser: TRestAPIOperation; readUserMe: TRestAPIOperation; readUser: TRestAPIOperation; updateUser: TRestAPIOperation; updateUserMe: TRestAPIOperation; deleteUser: TRestAPIOperation; deleteUserMe: TRestAPIOperation; createApiKeyMe: TRestAPIOperation; deleteApiKeyMe: TRestAPIOperation; indexApiKeysMe: TRestAPIOperation; addRoleToUser: TRestAPIOperation; removeRoleFromUser: TRestAPIOperation; readUserAclMe: TRestAPIOperation; acceptTermsOfService: TRestAPIOperation; indexProjectMembers: TRestAPIOperation; readProjectMember: TRestAPIOperation; addProjectMember: TRestAPIOperation; updateProjectMember: TRestAPIOperation; removeProjectMember: TRestAPIOperation; addRoleToMember: TRestAPIOperation; removeRoleFromMember: TRestAPIOperation; addProjectToUser: TRestAPIOperation; removeProjectFromUser: TRestAPIOperation; configureIdentityProvider: TRestAPIOperation; resetIdentityProvider: TRestAPIOperation; setupCognigyLiveAgent: TRestAPIOperation; setupCognigyLiveAgentInbox: TRestAPIOperation; updateCognigyLiveAgentInbox: TRestAPIOperation; readProjectInbox: TRestAPIOperation; readLiveAgentAccount: TRestAPIOperation; requestOrganisationDeletion: TRestAPIOperation; readCollectionsToBeDeleted: TRestAPIOperation; setupVoiceGatewayAccount: TRestAPIOperation; readVoiceGatewayAccount: TRestAPIOperation; readVoiceGatewaySpeechCredentials: TRestAPIOperation; readOrganisationPolicies: TRestAPIOperation; updateInPlatformLlmEnabled: TRestAPIOperation; readOrganisationKnowledgeChunksCount: TRestAPIOperation; pinResourceMe: TRestAPIOperation; getPinnedResourcesMe: TRestAPIOperation; getFreeAiCredits: TRestAPIOperation, IFreeAiCredits>; } declare function AdministrationAPIGroup_2_0(instance: Base): AdministrationAPIGroup_2_0; /** * @openapi * * components: * schemas: * IApiKeyIndexItem_2_1: * type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * name: * type: string * createdAt: * type: number */ export interface IApiKeyIndexItem_2_1 { /** The object id of the api-key */ _id: TMongoId; /** The name of the api-key, e.g. 'my demo' */ name: string; createdAt: number; schemaVersion: number; } export interface IIndexApiKeysMeRestData_2_1 extends IRestPagination { } export interface IIndexApiKeysMeRestReturnValue_2_1 extends ICursorBasedPaginationReturnValue { } /** * @openapi * * components: * schemas: * IApiKeyData_2_1: * type: object * properties: * name: * type: string * * IApiKey_2_1: * allOf: * - $ref: '#/components/schemas/IApiKeyData_2_1' * - type: object * properties: * _id: * $ref: '#/components/schemas/TMongoId' * createdAt: * type: integer * minimum: 0 * maximum: 2147483647 * example: 1527621049 * apiKey: * type: string */ export interface IApiKey_2_1 { /** The object id of the api-key */ _id: TMongoId; /** The name of the api-key, e.g. 'my demo' */ name: string; /** The actual api-key */ apiKey: string; createdAt: number; schemaVersion: number; } export interface ICreateApiKeyMeRestDataBody_2_1 extends Partial> { } export interface ICreateApiKeyMeRestData_2_1 extends ICreateApiKeyMeRestDataBody_2_1 { } export interface ICreateApiKeyMeRestReturnValue_2_1 extends IApiKey_2_1 { } export interface AdministrationAPIGroup_2_1 extends Omit { createApiKeyMe: TRestAPIOperation; indexApiKeysMe: TRestAPIOperation; indexLegacyApiKeysMe: TRestAPIOperation; } declare function AdministrationAPIGroup_2_1(instance: Base): AdministrationAPIGroup_2_1; /** * @openapi * * components: * schemas: * IVendor_2_0: * type: object * properties: * version: * type: string * description: The product version we are running * frontendBaseUrl: * type: string * description: Base URL to the frontend UI * hasLicenseAgreement: * type: string * description: Flag whether users need to agree the license agreement within this env * maxContactProfileTTL: * type: number * maxConversationTTL: * type: number * maxSessionStateTTL: * type: number */ export interface IVendor_2_0 { /** The COGNIGY.AI version we are running */ version: string; /** Base URL to the frontend UI */ frontendBaseUrl: string; /** Flag whether users need to agree the license agreement within this env */ hasLicenseAgreement: boolean; maxContactProfileTTL: number; maxConversationTTL: number; maxSessionStateTTL: number; } export interface IReadVendorRestReturnValue_2_0 extends IVendor_2_0 { } /** * @openapi * * components: * schemas: * IConversationCounterAggregatedValue_2_0: * type: object * properties: * conversations: * type: number * day: * type: number * month: * type: number * year: * type: number * channel: * type: string */ export interface IConversationCounterAggregatedValue_2_0 { /** The number of conversations in the time-span */ conversations: number; /** The day, e.g. 1 for the first day in the month */ day: number; /** The month of the year, e.g. 1 for January */ month: number; /** The year, e.g. 2020 */ year: number; /** The channel name */ channel?: string; } export interface IGetBillingInformationRestData_2_0 extends IRestPagination<{ name: string; isDisabled: boolean; }> { year?: number; month?: number; organisationId?: TMongoId; } export interface IGetBillingInformationRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue<{ organisationId: TMongoId; name: string; isDisabled: boolean; conversations: IConversationCounterAggregatedValue_2_0[]; }> { } export interface IGetBillingInformationRestData_3_0 extends IRestPagination<{ name: string; isDisabled: boolean; }> { year?: number; month?: number; organisationId?: TMongoId; } export interface IGetBillingInformationRestReturnValue_3_0 extends ICursorBasedPaginationReturnValue<{ organisationId: TMongoId; name: string; isDisabled: boolean; conversations: IConversationCounterPreAggregatedValue_3_0[]; }> { } export interface ICreateSystemMessageRestDataBody_2_0 { until: number; message: string; showOnLogin?: boolean; } export interface ICreateSystemMessageRestData_2_0 extends ICreateSystemMessageRestDataBody_2_0 { } export interface ICreateSystemMessageRestReturnValue_2_0 { } export interface ISetSystemLicenseManagementRestDataBody_2_0 { licensekey: string; } export interface ISetSystemLicenseManagementRestData_2_0 extends ISetSystemLicenseManagementRestDataBody_2_0 { } export interface ISetSystemLicenseManagementRestReturnValue_2_0 { message: string; } export interface IGetSystemLicenseManagementRestData_2_0 { } export interface IGetSystemLicenseManagementRestReturnValue_2_0 { state: TLicenseState; systemCapabilities?: { aiOpsCenterEnabled?: boolean; quotaMaxKnowledgeChunks?: number; }; company?: string; expirationDate?: string; signedDate?: string; features?: string[]; } /** * @openapi * * components: * schemas: * IUserDataManagement_2_0: * type: object * required: ['id', 'name', 'password', 'organisation'] * properties: * id: * type: string * description: The email address used as the user's login ID. * name: * type: string * description: The name of the user. * password: * type: string * description: The password for the user account. * cxoneEmail: * type: string * description: The email address of the CXOne user, only required for NiCE CXOne users. * cxoneId: * type: string * description: The CXOne ID of the user, only required for NiCE CXOne users. * organisation: * $ref: '#/components/schemas/TMongoId' * roles: * type: array * items: * $ref: '#/components/schemas/TOrganisationWideRole' * description: The global roles assigned to the user. * acceptedTOS: * type: boolean * description: "If set to `true`, the user has accepted the terms of service." * disabled: * type: boolean * description: "If set to `true`, the user account is disabled." * * IUserUpdateDataManagement_2_0: * type: object * properties: * id: * type: string * name: * type: string * acceptedTOS: * type: boolean * disabled: * type: boolean * cxoneEmail: * type: string * description: "The email address of the CXOne user, only required for NiCE CXOne users" * cxoneId: * type: string * description: "The CXOne ID of the user, only required for NiCE CXOne users" * * IManagementUserAdditional_2_0: * type: object * properties: * newPassword: * type: string * * IManagementUserUpdate_2_0: * allOf: * - $ref: '#/components/schemas/IUserUpdateDataManagement_2_0' * - $ref: '#/components/schemas/IManagementUserAdditional_2_0' * * IUserManagement_2_0: * allOf: * - $ref: '#/components/schemas/IUserDataManagement_2_0' * - $ref: '#/components/schemas/IEntityMeta' */ export interface IUserManagement_2_0 { /** The object id of the user */ _id: TMongoId; /** The id of the user, this is the 'email' */ id: string; /** The name of the user */ name: string; /** The email address of the CXOne user, only required for NiCE CXOne users */ cxoneEmail?: string; /** The CXOne ID of the user, only required for NiCE CXOne users */ cxoneId?: string; /** The organisation id of the user */ organisation: string; /** The org-wide roles assigned to this user */ roles: TOrganisationWideRole[]; /** Whether this user has accepted the terms of services, used for saas envs only */ acceptedTOS: boolean; /** Whether this user is disabled or not */ disabled: boolean; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; } /** * @openapi * * components: * schemas: * IUserManagementIndexItem_2_0: * allOf: * - type: object * properties: * id: * type: string * name: * type: string * cxoneEmail: * type: string * description: "The email address of the CXOne user, only required for NiCE CXOne users" * cxoneId: * type: string * description: "The CXOne ID of the user, only required for NiCE CXOne users" * - $ref: '#/components/schemas/IEntityMeta' */ export interface IUserManagementIndexItem_2_0 { /** The object id of the user */ _id: TMongoId; /** The id of the user (email) */ id: string; /** The name of the user */ name: string; /** The email address of the CXOne user, only required for NiCE CXOne users */ cxoneEmail?: string; /** The CXOne ID of the user, only required for NiCE CXOne users */ cxoneId?: string; /** The organisation id the user belongs to */ organisation: TMongoId; createdAt: number; lastChanged: number; createdBy: TMongoId; lastChangedBy: TMongoId; lastActive: number; } export interface IIndexUsersRestManagementData_2_0 extends IRestPagination, IOrganisationScope { } export interface IIndexUsersRestManagementReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface IReadUserRestManagementDataParams_2_0 { userId: TMongoId; } export interface IReadUserRestManagementData_2_0 extends IReadUserRestManagementDataParams_2_0 { } export interface IReadUserRestManagementReturnValue_2_0 extends IUserManagement_2_0 { } export interface ICreateUserRestManagementDataBody_2_0 extends Partial> { password: string; } export interface ICreateUserRestManagementData_2_0 extends ICreateUserRestManagementDataBody_2_0 { } export interface ICreateUserRestManagementReturnValue_2_0 extends IUserManagement_2_0 { } export interface IUpdateUserRestManagementDataParams_2_0 { userId: TMongoId; } export interface IUpdateUserRestManagementDataBody_2_0 extends Partial> { newPassword?: string; } export interface IUpdateUserRestManagementData_2_0 extends IUpdateUserRestManagementDataParams_2_0, IUpdateUserRestManagementDataBody_2_0 { } export interface IUpdateUserRestManagementReturnValue_2_0 { } export interface IDeleteUserRestManagementDataParams_2_0 { userId: TMongoId; } export interface IDeleteUserRestManagementData_2_0 extends IDeleteUserRestManagementDataParams_2_0 { } export interface IDeleteUserRestManagementReturnValue_2_0 { } export interface IImpersonateUserRestManagementDataParams_2_0 { userId: TMongoId; } export interface IImpersonateUserRestManagementData_2_0 extends IImpersonateUserRestManagementDataParams_2_0 { } export interface IImpersonateUserRestManagementReturnValue_2_0 { access_token: string; expires_in: number; refresh_token: string; login_token: string; token_type: "Bearer"; } /** * @openapi * * components: * schemas: * IAuditEventManagementIndexItem_2_0: * type: object * properties: * auditEventId: * $ref: '#/components/schemas/TMongoId' * timestamp: * type: string * format: date-time * description: The timestamp when the action happened * example: 2020-04-27T14:22:11.000Z * type: * $ref: '#/components/schemas/TAuditEventType' * actionType: * type: string * description: The type of action if the audit event is of type 'action' * chain: * type: array * description: A list of resources in the chain of the modification * items: * $ref: '#/components/schemas/IAuditEventModificationChainElement' * performedBy: * type: object * description: The system principal that performed the action * properties: * actor: * type: string * enum: [system] * principalId: * type: string * description: Identifies the calling service/credential, e.g. odata-super-api-key * taskId: * type: string * sessionId: * type: string */ export interface IAuditEventManagementIndexItem_2_0 extends Pick { auditEventId: TMongoId; } export interface IIndexAuditEventsRestManagementData_2_0 { limit?: number; skip?: number; sort?: { [key in "timestamp" | "_id"]?: "asc" | "desc"; }; next?: string; previous?: string; } export interface IIndexAuditEventsRestManagementReturnValue_2_0 extends ICursorBasedPaginationReturnValue { } export interface ManagementAPIGroup_2_0 { readVendor: TRestAPIOperation; getBillingInformation: TRestAPIOperation; getPreAggregatedBillingInformation: TRestAPIOperation; indexOrganisations: TRestAPIOperation, IIndexOrganisationsRestReturnValue_2_0>; createOrganisation: TRestAPIOperation; readOrganisation: TRestAPIOperation; updateOrganisation: TRestAPIOperation; deleteOrganisation: TRestAPIOperation; enforcePasswordPolicy: TRestAPIOperation; indexUsersManagement: TRestAPIOperation, IIndexUsersRestManagementReturnValue_2_0>; createUserManagement: TRestAPIOperation; readUserManagement: TRestAPIOperation; updateUserManagement: TRestAPIOperation; deleteUserManagement: TRestAPIOperation; impersonateUserManagement: TRestAPIOperation; createApiKeyManagement: TRestAPIOperation; createSystemMessage: TRestAPIOperation; setSystemLicenseManagement: TRestAPIOperation; getSystemLicenseManagement: TRestAPIOperation; indexAuditEventsManagement: TRestAPIOperation, IIndexAuditEventsRestManagementReturnValue_2_0>; generateAuthenticationToken: TRestAPIOperation; } declare function ManagementAPIGroup_2_0(instance: Base): ManagementAPIGroup_2_0; /** * @openapi * * components: * schemas: * IUpdateAnalyticsRecordProperties_2_0: * type: object * properties: * state: * type: string * mode: * type: string * userType: * type: string * channel: * type: string * flowLanguage: * type: string * intent: * type: string * intentScore: * type: number * intentFlow: * type: string * flowName: * type: string * inHandoverRequest: * type: boolean * inHandoverConversation: * type: boolean * localeName: * type: string * rating: * type: number * ratingComment: * type: string * entrypointType: * type: string * trackedGoals: * type: array * items: * type: string * endpointName: * type: string * endpointUrlToken: * type: string * handoverEscalations: * type: number * snapshotName: * type: string * slots: * type: object * custom1: * type: string * custom2: * type: string * custom3: * type: string * custom4: * type: string * custom5: * type: string * custom6: * type: string * custom7: * type: string * custom8: * type: string * custom9: * type: string * custom10: * type: string */ export interface IUpdateAnalyticsRecordProperties_2_0 extends IPayloadBasePropertiesData { } export interface IUpdateAnalyticsRecordsRestDataBody_2_0 extends IProjectScope, IUpdateAnalyticsRecordProperties_2_0 { contactId: string; sessionId?: string; inputId?: string; } export interface IUpdateAnalyticsRecordsRestData_2_0 extends IUpdateAnalyticsRecordsRestDataBody_2_0 { } export interface IUpdateAnalyticsRecordsRestReturnValue_2_0 { } export interface AnalyticsAPIGroup_2_0 { updateAnalyticsRecords: TRestAPIOperation; } declare function AnalyticsAPIGroup_2_0(instance: Base): AnalyticsAPIGroup_2_0; export declare type PrometheusResponsePayload = { status: "success" | "error"; /** Actual response data */ data: unknown; /** Only set if the status is "error". */ errorType?: string; /** Only set if the status is "error" */ error?: string; /** Only set if there were warnings while executing the request */ warnings?: string[]; /** Only set if there were info-level annotations while executing the request */ infos?: string[]; }; export interface IGetOpsCenterMetrics extends PrometheusResponsePayload { } export interface IGetOpsCenterMetricsRestDataQuery_2_0 { identifier: string; time: string; projectIds?: string[]; } export interface IGetOpsCenterMetricsRestData_2_0 extends IGetOpsCenterMetricsRestDataQuery_2_0 { } export interface IGetOpsCenterMetricsRestReturnValue_2_0 extends IGetOpsCenterMetrics { } declare const chartTypes: readonly [ "bar-chart", "heat-map", "line-chart", "alerts-errors", "health-status-monitor" ]; declare const segmentConfigArray: readonly [ "voice-gateway", "endpoints", "flows", "overview", "handover-provider" ]; declare const availableColorsArray: readonly [ "default", "blue", "yellow", "green", "purple", "red" ]; export declare type Segment = (typeof segmentConfigArray)[number]; export declare type ChartType = (typeof chartTypes)[number]; export declare type AvailableColors = (typeof availableColorsArray)[number]; export declare type GridSize = "auto" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; export interface ChartConfig { color?: string; height: number; } export interface ChartMeta { xs: GridSize; sm: GridSize; md: GridSize; lg: GridSize; xl: GridSize; } export interface ChartQueryConfig { metric: string; isPositiveTrend: boolean; identifier?: string; queryTemplate: string; } export interface ChartSegmentConfig { type: ChartType; title?: string; description?: string; queryConfig?: ChartQueryConfig; showCounts?: boolean; chartConfig?: ChartConfig; meta?: ChartMeta; } export declare type TColorConfig = { [key in AvailableColors]: string[]; }; export interface IGetOpsCenterMetricsConfig { meta: Record; config: { [key in Segment]: ChartSegmentConfig[]; }; colorConfig: TColorConfig; } export interface IGetOpsCenterMetricsConfigRestReturnValue_2_0 extends IGetOpsCenterMetricsConfig { } export interface IGetOpsCenterMetricsRangeRestDataQuery_2_0 { identifier: string; projectIds?: string[]; start: string; end: string; step: string; } export interface IGetOpsCenterMetricsRangeRestData_2_0 extends IGetOpsCenterMetricsRangeRestDataQuery_2_0 { } export interface IGetOpsCenterMetricsRangeRestReturnValue_2_0 extends IGetOpsCenterMetrics { } export interface IDeleteOpsCenterErrorRestDataParams_2_0 { errorId: string; } export interface IDeleteOpsCenterErrorRestData_2_0 extends IDeleteOpsCenterErrorRestDataParams_2_0 { } export interface IDeleteOpsCenterErrorRestReturnValue_2_0 { } declare const arrayOfTMainComponent: readonly [ "VoiceGateway", "Endpoint", "Flow", "HandoverProvider" ]; /** * Errors and Alerts always belong to one of the main components. */ export declare type MainComponent = (typeof arrayOfTMainComponent)[number]; declare const arrayOfTSubComponent: readonly [ "SpeechToText", "TextToSpeech", "InputTransformer", "OutputTransformer", "ExecutionFinishedTransformer", "InjectTransformer", "NotifyTransformer", "RealtimeTranslation", "MessageRoundtrip", "FlowNodeExecution", "NaturalLanguageUnderstanding", "OutboundHTTPCalls", "LargeLanguageModelCalls", "KnowledgeAIQueries", "OutboundHTTPCalls" ]; /** * Each subcomponent belongs to a main component */ export declare type SubComponent = (typeof arrayOfTSubComponent)[number]; export interface IOpsCenterError { id: string; organisationId: string; projectId?: string; title: string; firstOccurredAt: Date; lastOccurredAt: Date; component?: MainComponent; subComponent?: SubComponent; count: number; errorCode: string; isSnapshotError: boolean; params: { [key: string]: { id?: string; referenceId?: string; name?: string; }; }; } export interface IGetOpsCenterError extends Partial { } export interface IGetOpsCenterErrorRestDataParams_2_0 { errorId: string; } export interface IGetOpsCenterErrorRestData_2_0 extends IGetOpsCenterErrorRestDataParams_2_0 { } export interface IGetOpsCenterErrorRestReturnValue_2_0 extends IGetOpsCenterError { url: string; } export interface IIndexOpsCenterErrorsRestDataQuery_2_0 { projectIds?: string[]; component?: MainComponent; subComponent?: SubComponent; offset?: number; limit?: number; totalCountOnly?: string; sort?: string; } export interface IIndexOpsCenterErrorsRestData_2_0 extends IIndexOpsCenterErrorsRestDataQuery_2_0 { } export interface IIndexOpsCenterErrorsRestReturnValue_2_0 { total?: number; totalErrorCount?: number; items?: IGetOpsCenterError[]; } declare const notificationChannels: readonly [ "email", "webhook" ]; export declare type NotificationChannel = (typeof notificationChannels)[number]; export interface NotificationConfig { channel: NotificationChannel; /** List of email addresses to send notifications to. */ addresses: string[]; webhook?: { url: string; connectionId: string; }; } export interface AlertingConfig { configuredAlerts: { [K in string]: { enabled: boolean; description: string; humanReadableName: string; tooltip: string; }; }; } export interface IOpsCenterObservationConfig { organisationId: string; observationActive: boolean; notificationConfig: NotificationConfig; alertingConfig: AlertingConfig; recordVersion: number; } export interface IGetOpsCenterObservationConfigRestReturnValue_2_0 extends IOpsCenterObservationConfig { } export interface IPatchOpsCenterObservationConfigRestDataBody_2_0 extends Partial> { } export interface IPatchOpsCenterObservationConfigRestData_2_0 extends IPatchOpsCenterObservationConfigRestDataBody_2_0 { } export interface IPatchOpsCenterObservationConfigRestReturnValue_2_0 extends IOpsCenterObservationConfig { } export interface IOpsCenterAlert { type: string; name: string; description: string; humanReadableName: string; component: MainComponent; subComponent: SubComponent; state: string; activeAt: string; } export interface IIndexOpsCenterAlertsRestDataQuery_2_0 { component?: MainComponent; subComponent?: SubComponent; } export interface IIndexOpsCenterAlertsRestData_2_0 extends IIndexOpsCenterAlertsRestDataQuery_2_0 { } export interface IIndexOpsCenterAlertsRestReturnValue_2_0 { items: IOpsCenterAlert[]; total: number; } export interface AIOpsCenterAPIGroup_2_0 { indexOpsCenterErrors: TRestAPIOperation; getOpsCenterErrorById: TRestAPIOperation; deleteOpsCenterErrorById: TRestAPIOperation; getOpsCenterMetrics: TRestAPIOperation; getOpsCenterMetricsConfig: TRestAPIOperation; getOpsCenterMetricsRange: TRestAPIOperation; getOpsCenterObservationConfig: TRestAPIOperation; patchOpsCenterObservationConfig: TRestAPIOperation; indexOpsCenterAlerts: TRestAPIOperation; } declare function AIOpsCenterAPIGroup_2_0(instance: Base): AIOpsCenterAPIGroup_2_0; /** * Project-scoped AI Ops Center API (CGY-12232). * * A sibling of `AIOpsCenterAPIGroup_2_0` rather than an extension of it. The `_2_0` group maps 1:1 * onto the legacy `/beta*` surface, which the ticket freezes: adding these operations there would make * one group span two incompatible route families and two authorisation models, and would oblige every * `_2_0` consumer to recompile against members it cannot call until the service ships. * * **Every URL carries the `/sentinel` routing key**, mirroring how `/toolkit` reaches service-toolkit. * Traefik strips the prefix before the request reaches service-sentinel, where the routes are mounted * at `/projects/:projectId/...` — which is also why the OpenAPI document keeps the prefix in * `servers[].url` and out of its path keys. * * **`projectId` is required on every operation.** There is no organisation-wide fallback and no * `projectIds` array: the legacy surface treats an absent filter as "every project in the * organisation", and carrying that semantic across would defeat the point of scoping. It is * interpolated into the path and deliberately removed from the query string, so it cannot appear * twice. * * Types are declared here rather than in `shared/interfaces/restAPI/opsCenter/**`, following the * precedent of `serviceToolkit/evalProfileAPI.ts`: a cohesive new surface reads better in one place * than spread across nine files. The shared `_2_0` response types are reused where the response shape * is genuinely unchanged. */ /** Common to every operation: the project is part of the resource identity. */ export interface OpsCenterProjectScope_2_1 { projectId: string; } export interface IIndexOpsCenterErrorsRestData_2_1 extends OpsCenterProjectScope_2_1 { component?: MainComponent; subComponent?: SubComponent; offset?: number; limit?: number; totalCountOnly?: string; sort?: string; } export interface IIndexOpsCenterErrorsRestReturnValue_2_1 { total?: number; totalErrorCount?: number; items?: IGetOpsCenterError[]; } export interface IGetOpsCenterErrorRestData_2_1 extends OpsCenterProjectScope_2_1 { errorId: string; } export interface IGetOpsCenterErrorRestReturnValue_2_1 extends IGetOpsCenterError { url?: string; } export interface IDeleteOpsCenterErrorRestData_2_1 extends OpsCenterProjectScope_2_1 { errorId: string; } export declare type IDeleteOpsCenterErrorRestReturnValue_2_1 = void; export interface IIndexOpsCenterAlertsRestData_2_1 extends OpsCenterProjectScope_2_1 { component?: MainComponent; subComponent?: SubComponent; } export interface IIndexOpsCenterAlertsRestReturnValue_2_1 { total: number; items: IOpsCenterAlert[]; } export interface IGetOpsCenterMetricsRestData_2_1 extends OpsCenterProjectScope_2_1 { identifier: string; time?: string; } export declare type IGetOpsCenterMetricsRestReturnValue_2_1 = Record; export interface IGetOpsCenterMetricsRangeRestData_2_1 extends OpsCenterProjectScope_2_1 { identifier: string; start: string; end: string; step: string; } export declare type IGetOpsCenterMetricsRangeRestReturnValue_2_1 = Record; export declare type IGetOpsCenterMetricsConfigRestData_2_1 = OpsCenterProjectScope_2_1; export declare type IGetOpsCenterMetricsConfigRestReturnValue_2_1 = IGetOpsCenterMetricsConfig; export declare type IGetOpsCenterObservationConfigRestData_2_1 = OpsCenterProjectScope_2_1; export declare type IGetOpsCenterObservationConfigRestReturnValue_2_1 = IOpsCenterObservationConfig; export interface IPatchOpsCenterObservationConfigRestData_2_1 extends OpsCenterProjectScope_2_1 { /** Version from the last read. Required for optimistic locking. */ recordVersion: number; observationActive?: boolean; notificationConfig?: IOpsCenterObservationConfig["notificationConfig"]; alertingConfig?: IOpsCenterObservationConfig["alertingConfig"]; } export declare type IPatchOpsCenterObservationConfigRestReturnValue_2_1 = IOpsCenterObservationConfig; export interface AIOpsCenterAPIGroup_2_1 { indexOpsCenterErrors: TRestAPIOperation; getOpsCenterErrorById: TRestAPIOperation; deleteOpsCenterErrorById: TRestAPIOperation; indexOpsCenterAlerts: TRestAPIOperation; getOpsCenterMetrics: TRestAPIOperation; getOpsCenterMetricsRange: TRestAPIOperation; getOpsCenterMetricsConfig: TRestAPIOperation; getOpsCenterObservationConfig: TRestAPIOperation; patchOpsCenterObservationConfig: TRestAPIOperation; } declare function AIOpsCenterAPIGroup_2_1(instance: Base): AIOpsCenterAPIGroup_2_1; declare enum ESuccessCriterionTypeRest_2_0 { TEXT = "text", GOAL_COMPLETED = "goalCompleted" } export interface ISuccessCriteriaRest_2_0 { type: ESuccessCriterionTypeRest_2_0; params: Record; } export interface IProjectMetadataRest_2_0 { projectReference: string; organisationReference: string; } export interface ISimulationRest_2_0 extends IProjectMetadataRest_2_0 { id: string; _id: string; referenceId: string; name: string; persona: string; personaName: string; mission: string; successCriteria: ISuccessCriteriaRest_2_0[]; /** References to eval profiles assigned to this simulation scenario. */ evaluationProfileReferenceIds?: string[]; maxTurns?: number; timeout?: number; /** * Locale (project locale referenceId) defining the language the simulated user converses in. * When set, it takes precedence over the run/batch locale. When unset, the run/batch locale * is used (existing behaviour). */ localeReferenceId?: string; aiAgentReferenceId?: string; aiAgentId?: string; flowReferenceId?: string; flowId?: string; jobNodeId?: string; createdAt?: number; createdBy: string; updatedAt?: number; updatedBy: string; lastChanged: number; lastChangedBy?: string; nextScheduledRun?: string | null; } export interface IIndexSimulationsRestDataQuery_2_0 { projectId?: string; filter?: string; limit?: number; skip?: number; sort?: string; next?: string; previous?: string; includeUpcomingSchedule?: boolean; } export interface IIndexSimulationsRestData_2_0 extends IIndexSimulationsRestDataQuery_2_0 { } export interface IIndexSimulationsRestReturnValue_2_0 { data: ISimulationRest_2_0[]; pagination: { total: number; limit: number; skip: number; hasMore: boolean; next?: string; previous?: string; }; } export interface ICreateSimulationRestData_2_0 { name: string; persona: string; personaName: string; mission: string; successCriteria: ISuccessCriteriaRest_2_0[]; /** References to eval profiles to assign to this simulation scenario. */ evaluationProfileReferenceIds?: string[]; maxTurns?: number; timeout?: number; /** Locale (project locale referenceId) defining the simulated user's conversation language. */ localeReferenceId?: string; projectReference: string; organisationReference: string; } export interface ICreateSimulationRestReturnValue_2_0 { simulation: ISimulationRest_2_0; } export interface IUpdateSimulationsRestDataQuery_2_0 { projectId: string; } export interface IUpdateSimulationsRestDataParams_2_0 { simulationReference: string; } export interface IUpdateSimulationsRestDataBody_2_0 { name?: string; persona?: string; personaName?: string; mission?: string; successCriteria?: ISuccessCriteriaRest_2_0[]; /** References to eval profiles to assign to this simulation scenario. */ evaluationProfileReferenceIds?: string[]; maxTurns?: number; timeout?: number; /** Locale (project locale referenceId) defining the simulated user's conversation language. */ localeReferenceId?: string; } export interface IUpdateSimulationRestData_2_0 extends IUpdateSimulationsRestDataQuery_2_0, IUpdateSimulationsRestDataParams_2_0, IUpdateSimulationsRestDataBody_2_0 { } export interface IUpdateSimulationRestReturnValue_2_0 { simulation: ISimulationRest_2_0; } export interface IDeleteSimulationsRestDataQuery_2_0 { projectId: string; } export interface IDeleteSimulationRestData_2_0 extends IDeleteSimulationsRestDataQuery_2_0 { simulationReference: string; } export interface IDeleteSimulationRestReturnValue_2_0 { } export interface IReadSimulationsRestDataQuery_2_0 { projectId: string; } export interface IReadSimulationRestData_2_0 extends IReadSimulationsRestDataQuery_2_0 { simulationReference: string; } export interface IReadSimulationRestReturnValue_2_0 { simulation: ISimulationRest_2_0; } export interface IScheduleSimulationRestDataParams_2_0 { simulationReference: string; } export interface IScheduleSimulationRestDataBody_2_0 { name: string; runConfig: { flowReferenceId: string; localeReferenceId?: string; entrypoint: string; largeLanguageModelReferenceId?: string; userId?: string; finalPing?: number; data?: Record; enableMocking?: boolean; }; projectReference: string; numberOfExecutions: number; endPointType?: string; /** Override the stored simulation's evaluation profiles for this schedule request. */ evaluationProfileReferenceIds?: string[]; } export interface IScheduleSimulationRestData_2_0 extends IScheduleSimulationRestDataParams_2_0, IScheduleSimulationRestDataBody_2_0 { } export interface IScheduleSimulationRestReturnValue_2_0 { simulation: ISimulationRest_2_0; } export interface ICloneSimulationRestDataParams_2_0 { simulationReference: string; } export interface ICloneSimulationRestDataBody_2_0 { name?: string; } export interface ICloneSimulationRestData_2_0 extends ICloneSimulationRestDataParams_2_0, ICloneSimulationRestDataBody_2_0 { } export interface ICloneSimulationRestReturnValue_2_0 { simulation: ISimulationRest_2_0; } export declare type ResultStatusRest_2_0 = "pass" | "partial" | "fail"; export declare type ToneColorRest_2_0 = "green" | "amber" | "red"; export declare type PredefinedCriterionKeyRest_2_0 = "sentiment_positive" | "goal_completion" | "tone_formality" | "response_clarity" | "empathy" | "professionalism"; /** * A selected predefined criterion: the catalogue key plus its i18n label key * (e.g. "TK_EP_RESPONSE_CLARITY"). Computed by service-toolkit from its * catalogue and frozen as-is. */ export interface IPredefinedCriterionRest_2_0 { key: PredefinedCriterionKeyRest_2_0; label?: string; } export declare type WidgetTypeRest_2_0 = "binary" | "numeric_score" | "option_scale" | "multi_select" | "free_text"; export declare type DeterministicRuleTypeRest_2_0 = "keyword_presence" | "response_length" | "regex" | "json_validity"; export interface ICustomAICriterionRest_2_0 { id: string; name: string; description?: string; prompt: string; widgetType: WidgetTypeRest_2_0; options?: string[]; weight: number; } export interface IDeterministicCriterionRest_2_0 { id: string; name: string; description?: string; ruleType: DeterministicRuleTypeRest_2_0; pattern?: string; minLength?: number; maxLength?: number; weight: number; } export interface IFrozenEvalProfileRest_2_0 { id: string; name: string; predefinedCriteria: IPredefinedCriterionRest_2_0[]; customAiCriteria: ICustomAICriterionRest_2_0[]; deterministicCriteria: IDeterministicCriterionRest_2_0[]; } export interface ICriterionEvalResultRest_2_0 { criterionId: string; criterionName: string; /** * i18n key for the human-readable label (e.g. "TK_EP_RESPONSE_CLARITY"), set for * predefined criteria so consumers render a label instead of the raw snake_case key. * Undefined for custom_ai/deterministic — those carry a user-provided criterionName. */ label?: string; criterionType: "predefined" | "custom_ai" | "deterministic"; score: number | null; rawValue?: string | number | boolean | string[]; /** * - "pass" / "partial" / "fail" — scored result. * - "unparsable" — LLM responded but output could not be normalised to a score. * - "error" — runtime failure (LLM call threw, timed out, or internal error). */ status: ResultStatusRest_2_0 | "error" | "unparsable"; error?: string; tokenUsage?: { inputTokens: number; outputTokens: number; totalTokens: number; } | null; } export interface IConversationEvaluationResultRest_2_0 { profileId: string; profileName: string; overallScore: number | null; overallStatus: ResultStatusRest_2_0 | "error" | "unparsable"; toneColor: ToneColorRest_2_0 | null; criteria: ICriterionEvalResultRest_2_0[]; evaluatedAt: string; totalTokenUsage: { inputTokens: number; outputTokens: number; totalTokens: number; }; } export interface IEvalProfileOverviewRest_2_0 { profileId: string; profileName: string; averageOverallScore: number | null; statusDistribution: { pass: number; partial: number; fail: number; error: number; unparsable?: number; }; } declare enum ETurnTypeRest_2_0 { INPUT = "input", OUTPUT = "output" } export interface ITurnRest_2_0 { type: ETurnTypeRest_2_0; text: string; data?: Record; } declare enum SuccessCriterionType_2_0 { TEXT = "text", GOAL_COMPLETED = "goalCompleted" } export interface ISuccessCriteriaTextParams_2_0 { text: string; name: string; } export interface ISuccessCriteriaGoalParams_2_0 { referenceId: string; name: string; } export interface ISuccessCriteriaRest_2_0 { name?: string; text?: string; type: SuccessCriterionType_2_0; params: ISuccessCriteriaTextParams_2_0 | ISuccessCriteriaGoalParams_2_0; } declare enum ESentimentTypeRest_2_0 { POSITIVE = "POSITIVE", NEUTRAL = "NEUTRAL", NEGATIVE = "NEGATIVE" } declare enum ESimulationStatusRest_2_0 { SUCCESS = "success", FAILED = "failed", ERROR = "error" } declare enum ESimulationErrorCategoryRest_2_0 { NONE = "none", AI_AGENT_TIMEOUT = "ai_agent_timeout", LLM_PROVIDER_ERROR = "llm_provider_error", AI_AGENT_ERROR = "ai_agent_error", UNKNOWN = "unknown" } export interface ISimulationErrorInfoRest_2_0 { category: ESimulationErrorCategoryRest_2_0; message?: string; technicalDetails?: string; } /** * Token usage for a specific purpose (user message generation, success criteria evaluation, etc.) */ export interface ITokenUsageByPurposeItemRest_2_0 { inputTokens: number; outputTokens: number; totalTokens: number; } /** * Token usage breakdown by purpose/category */ export interface ITokensByPurposeRest_2_0 { /** Tokens used for generating user messages during conversation */ userMessageGeneration: ITokenUsageByPurposeItemRest_2_0; /** Tokens used for evaluating success criteria */ successCriteriaEvaluation: ITokenUsageByPurposeItemRest_2_0; /** Tokens used for sentiment analysis */ sentimentAnalysis: ITokenUsageByPurposeItemRest_2_0; } export interface ITokenUsageRest_2_0 { inputTokens: number; outputTokens: number; totalTokens: number; calculationMethod: "api" | "estimate"; llmReferenceId: string; /** Human-readable name of the LLM (e.g., "Production GPT-4") */ llmName: string; /** LLM provider (e.g., "openAI", "anthropic", "azureOpenAI") */ llmProvider: string; /** LLM model type (e.g., "gpt-4", "claude-3") */ llmModelType: string; /** Human-readable name of the simulation */ simulationName: string; turnsWithTokenUsage: number; averageTokensPerTurn: number; /** Detailed breakdown of token usage by purpose (user message generation, success criteria, sentiment analysis) */ tokensByPurpose?: ITokensByPurposeRest_2_0; } export interface ISuccessRateRest_2_0 { percentage: number; fraction: string; achieved: number; total: number; } export interface ISuccessCriterionResultRest_2_0 { criterion: ISuccessCriteriaRest_2_0; achieved: boolean; reason: string; } export interface ISimulationRunRest_2_0 { id: string; organisationReference: string; projectReference: string; simulationReference: string; simulationRunBatchReference: string; sequence: number; largeLanguageModelReferenceId: string; endPointType?: string; turns: ITurnRest_2_0[]; totalTurns: number; maxTurns?: number; successCriteria: ISuccessCriteriaRest_2_0[]; evaluationProfiles?: IFrozenEvalProfileRest_2_0[]; metrics: { sentiment: ESentimentTypeRest_2_0; success: boolean; results?: ISuccessCriterionResultRest_2_0[]; successRate?: ISuccessRateRest_2_0; summary?: string; isBatchStopped?: boolean; isConversationEnded?: boolean; errorInfo?: ISimulationErrorInfoRest_2_0; status?: ESimulationStatusRest_2_0; tokenUsage?: ITokenUsageRest_2_0; evaluationResults?: IConversationEvaluationResultRest_2_0[]; }; createdAt: number; createdBy: string; duration?: number; expiresAt?: Date; } export declare type TBatchModeRest_2_0 = "single" | "multivariate"; export declare type TChannelRest_2_0 = "text" | "voice"; export declare type TVariantStatusRest_2_0 = "IN_PROGRESS" | "COMPLETED" | "STOPPED" | "FAILED"; export declare type TStopConditionRest_2_0 = "none" | "pass_rate_<30" | "pass_rate_<50" | "3_consec_failures" | "5_consec_failures"; export declare type TStoppedReasonRest_2_0 = "pass_rate_<30" | "pass_rate_<50" | "3_consec_failures" | "5_consec_failures" | "user_stop"; export declare type TChannelRowRest_2_0 = "text" | "voice" | "mixed"; export interface IRunConfigRest_2_0 { entrypoint: string; flowReferenceId: string; localeReferenceId: string; largeLanguageModelReferenceId: string | null; userId?: string; finalPing?: number; data?: Record; enableMocking?: boolean; } export interface IVariantAdvancedRest_2_0 { maxTurns?: number; stopCondition?: TStopConditionRest_2_0; aiAgentOutputTimeoutMs?: number; enableMocking?: boolean; customDataPayload?: Record; } export interface IVariantResolvedNamesRest_2_0 { flowName?: string; localeName?: string; snapshotName?: string; scenarioName?: string; aiAgentLlmName?: string; simulationLlmName?: string; } export interface ISimulationVariantRest_2_0 { variantId: string; ordinal: number; label?: string; simulationReference: string; simulationFrozen: { persona: string; personaName: string; mission: string; successCriteria: ISuccessCriteriaRest_2_0[]; maxTurns: number; timeout: number; /** Frozen copies of eval profiles as resolved at batch execution start. */ evaluationProfiles?: IFrozenEvalProfileRest_2_0[]; }; channel: TChannelRest_2_0; snapshotReference?: string | null; localeReferenceId: string; largeLanguageModelReferenceId: string | null; simulationLargeLanguageModelReferenceId: string | null; runConfig: IRunConfigRest_2_0; numberOfExecutions: number; advanced?: IVariantAdvancedRest_2_0; resolvedNames?: IVariantResolvedNamesRest_2_0; } export interface IVariantLatencyRest_2_0 { p50: number; p95: number; ttftMs: number; } export interface IVariantOutcomeRest_2_0 { variantId: string; status: TVariantStatusRest_2_0; stoppedReason?: TStoppedReasonRest_2_0; runResults: { succeeded: number; failed: number; notExecuted: number; }; runsTotal: number; successRate: number; criteriaMetRate: number; averageScore?: number; averageTurns: number; averageSentiment: "positive" | "neutral" | "negative" | "mixed"; latency: IVariantLatencyRest_2_0; toolCallsPerRun: number; tokenUsage?: IBatchTokenUsageRest_2_0; successCriterias?: IBatchSuccessCriteriaOverviewRest_2_0[]; /** Aggregated evaluation profile results across this variant's runs */ evaluationProfilesOverview?: IEvalProfileOverviewRest_2_0[]; completedAt?: number; } export interface IWinnerRest_2_0 { variantId: string; score: number; breakdown: { successRate: number; latencyP50: number; passedRunCount: number; }; tieBrokenBy?: "successRate" | "passedRunCount" | "latencyP50" | null; } export interface IBatchListProjectionRest_2_0 { channel: TChannelRowRest_2_0; subLine: string; hasMixedChannels: boolean; hasMixedFlows: boolean; warningLevel: "none" | "low"; } export interface ISharedAttributesRest_2_0 { snapshotReference?: string | null; flowReferenceId?: string; localeReferenceId?: string; endPointType?: string; } export interface IBatchRest_2_0 { batchId: string; id: string; _id: string; mode: TBatchModeRest_2_0; name: string; testTitle?: string; status: TSimulationRunBatchStatusRest_2_0; numberOfExecutions: number; totalRunsScheduled?: number; totalRunsCompleted?: number; simulationReference?: string; projectReference: string; organisationReference: string; endPointType?: string; runConfig?: IRunConfigRest_2_0; simulationFrozen?: { persona: string; personaName: string; mission: string; flowName?: string; localeName?: string; snapshotName?: string; }; variants?: ISimulationVariantRest_2_0[]; variantOutcomes?: IVariantOutcomeRest_2_0[]; winner?: IWinnerRest_2_0; sharedAttributes?: ISharedAttributesRest_2_0; listProjection?: IBatchListProjectionRest_2_0; createdAt: number; createdBy: string; updatedAt?: number; completedAt?: number; expiresAt?: Date; batchMetrics?: IBatchMetricsRest_2_0; } declare const SimulationRunBatchStatus: readonly [ "STOPPED", "IN_PROGRESS", "COMPLETED", "FAILED", "STOPPED" ]; export declare type TSimulationRunBatchStatusRest_2_0 = typeof SimulationRunBatchStatus[number]; export interface IBatchSuccessCriteriaOverview_2_0 extends ISuccessCriteriaRest_2_0 { percentage: number; } export interface IBatchSuccessCriteriaOverviewRest_2_0 extends ISuccessCriteriaRest_2_0 { percentage: number; } export interface IEfficiencyScoreRest_2_0 { label: string; start: number; end: number; counter: number; } export interface IAverageSuccessRateForRunsRest_2_0 { percentage: number; fraction: string; achieved: number; total: number; average: number; } /** * Token usage breakdown for a specific purpose */ export interface ITokenUsageByPurposeRest_2_0 { inputTokens: number; outputTokens: number; totalTokens: number; } /** * Aggregated token usage breakdown by purpose for batch */ export interface IBatchTokensByPurposeRest_2_0 { /** Tokens used for generating user messages during conversation */ userMessageGeneration: ITokenUsageByPurposeRest_2_0; /** Tokens used for evaluating success criteria */ successCriteriaEvaluation: ITokenUsageByPurposeRest_2_0; /** Tokens used for sentiment analysis */ sentimentAnalysis: ITokenUsageByPurposeRest_2_0; } export interface IBatchTokenUsageRest_2_0 { totalInputTokens: number; totalOutputTokens: number; totalTokens: number; averageInputTokensPerRun: number; averageOutputTokensPerRun: number; averageTokensPerRun: number; averageTokensPerTurn: number; runsWithTokenUsage: number; calculationMethod: "api" | "estimate" | "mixed"; llmReferenceId: string; /** Human-readable name of the LLM (e.g., "Production GPT-4") */ llmName: string; /** LLM provider (e.g., "openAI", "anthropic", "azureOpenAI") */ llmProvider: string; /** LLM model type (e.g., "gpt-4", "claude-3") */ llmModelType: string; /** Human-readable name of the simulation */ simulationName: string; /** Detailed breakdown of token usage by purpose (aggregated across all runs) */ tokensByPurpose?: IBatchTokensByPurposeRest_2_0; } export interface IBatchMetricsRest_2_0 { _v: number; efficiencyScore?: IEfficiencyScoreRest_2_0[]; turnsDistribution?: IEfficiencyScoreRest_2_0[]; successRate?: number; averageSuccessRateForRuns?: IAverageSuccessRateForRunsRest_2_0; successCriterias?: IBatchSuccessCriteriaOverview_2_0[]; averageTurns?: number; averageSentiment?: string; runResults?: { succeeded: number; failed: number; notExecuted?: number; }; tokenUsage?: IBatchTokenUsageRest_2_0; evaluationProfilesOverview?: IEvalProfileOverviewRest_2_0[]; /** Aggregated latency metrics for the batch (p50/p95 turn duration, mean time-to-first-token) */ latency?: { p50: number; p95: number; ttftMs: number; }; } export interface ISimulationRunBatchRest_2_0 { id: string; _id: string; name: string; status: TSimulationRunBatchStatusRest_2_0; stopCondition?: TStopConditionRest_2_0; stoppedReason?: TStoppedReasonRest_2_0 | null; stoppedAt?: number; stoppedAtRunCount?: number; numberOfExecutions: number; simulationReference: string; projectReference: string; organisationReference: string; endPointType?: string; runConfig: { flowReferenceId: string; localeReferenceId?: string; entrypoint: string; largeLanguageModelReferenceId: string; userId?: string; finalPing?: number; }; simulationFrozen: { persona: string; personaName: string; mission: string; /** Frozen copies of eval profiles as resolved at batch execution start. */ evaluationProfiles?: IFrozenEvalProfileRest_2_0[]; }; createdAt: number; createdBy: string; updatedAt?: number; completedAt?: number; expiresAt?: Date; batchMetrics?: IBatchMetricsRest_2_0; } export interface IIndexSimulationRunBatchesRestDataQuery_2_0 { projectId: string; filter?: number; limit?: number; skip?: number; sort?: string; next?: string; previous?: string; scenariosIds?: string[]; status?: string; timespan?: string; timezone?: string; endPointType?: string; /** Batch type filter; omit for all types. "single" also matches legacy batches without a stored mode. */ mode?: "single" | "multivariate"; } export interface IIndexSimulationRunBatchesRestData_2_0 extends IIndexSimulationRunBatchesRestDataQuery_2_0 { } export interface IIndexSimulationRunBatchesRestReturnValue_2_0 { data: ISimulationRunBatchRest_2_0[]; } export interface IGetAllSimulationRunBatchesRestDataQuery_2_0 { projectId: string; filter?: string; limit?: number; skip?: number; sort?: string; next?: string; previous?: string; } export interface IGetAllSimulationRunBatchesRestData_2_0 extends IGetAllSimulationRunBatchesRestDataQuery_2_0 { simulationReference: string; } export interface IGetAllSimulationRunBatchesRestReturnValue_2_0 { simulationRunBatches: ISimulationRunBatchRest_2_0[]; } export interface IReadSimulationRunBatchRestDataQuery_2_0 { projectId: string; } export interface IReadSimulationRunBatchRestData_2_0 extends IReadSimulationRunBatchRestDataQuery_2_0 { simulationReference: string; simulationRunBatchReference: string; } export interface IReadSimulationRunBatchRestReturnValue_2_0 { simulationRunBatch: ISimulationRunBatchRest_2_0; } export interface IIndexSimulationRunsRestDataQuery_2_0 { projectId: string; filter?: string; limit?: number; skip?: number; sort?: string; next?: string; previous?: string; } export interface IIndexSimulationRunsRestData_2_0 extends IIndexSimulationRunsRestDataQuery_2_0 { simulationRunBatchReference: string; simulationReference: string; } export interface IIndexSimulationRunsRestReturnValue_2_0 { simulationRuns: ISimulationRunRest_2_0[]; } export interface IReadSimulationRunRestDataQuery_2_0 { projectId: string; } export interface IReadSimulationRunRestData_2_0 extends IReadSimulationRunRestDataQuery_2_0 { simulationRunReference: string; simulationRunBatchReference: string; simulationReference: string; } export interface IReadSimulationRunRestReturnValue_2_0 { simulationRun: ISimulationRunRest_2_0; } export interface IGetPersonaOptionsRestData_2_0 { flowId: string; projectReference: string; aiagentReferenceId?: string; } export interface IMissionType_2_0 { name: string; description: string; successCriteria: SuccessCriteria[]; } export interface SuccessCriteria { name: string; text: string; } export interface IPersonaType_2_0 { name: string; description: string; } export interface IGetPersonaOptionsRestReturnValue_2_0 { simulationName: string; missionTypes: IMissionType_2_0[]; personaTypes: IPersonaType_2_0[]; } export interface IGeneratePersonaRestData_2_0 { flowReferenceId: string; projectReference: string; selectedMissionType: IMissionType_2_0; selectedPersonaType: IPersonaType_2_0; numberOfSuccessCriteria: number; requestedPackages: number; } export interface ISuccessCriteriaParams_2_0 { name: string; text: string; } export interface ISuccessCriteria_2_0 { type: string; params: ISuccessCriteriaParams_2_0; } export interface IPersonaPackage_2_0 { simulationName: string; personaName: string; personaDescription: string; mission: string; successCriteria: ISuccessCriteria_2_0[]; } export interface IGeneratePersonaMetadata_2_0 { requestId: string; processedAt: string; model: string; } export interface IGeneratePersonaRestReturnValue_2_0 { success: boolean; personaPackages: IPersonaPackage_2_0[]; metadata: IGeneratePersonaMetadata_2_0; } export interface IRegeneratePersonaFieldRestData_2_0 { projectReference: string; fieldToRegenerate: string; successCriteriaIndex?: number; simulationName: string; personaName: string; personaDescription: string; mission: string; successCriteria: ISuccessCriteria_2_0[]; } export interface IRegeneratePersonaFieldMetadata_2_0 { requestId: string; processedAt: string; model: string; regeneratedField: string; regeneratedIndex?: number; } export interface IRegeneratePersonaFieldRestReturnValue_2_0 { success: boolean; personaPackage: IPersonaPackage_2_0; metadata: IRegeneratePersonaFieldMetadata_2_0; } export interface IGenerateBulkPersonaRestData_2_0 { flowReferenceId: string; projectReference: string; allMissionTypes: Array<{ name: string; description: string; }>; allPersonaTypes: Array<{ name: string; description: string; }>; numberOfSuccessCriteria: number; requestedPackages: number; } export interface IGenerateBulkPersonaRestReturnValue_2_0 { success: boolean; personas: { [personaTypeName: string]: Array<{ simulationName: string; personaName: string; personaDescription: string; }>; }; missions: { [missionTypeName: string]: Array<{ mission: string; successCriteria: Array<{ type: string; params: { text: string; name: string; }; }>; }>; }; metadata: { requestId: string; processedAt: string; model: string; personaTypesCount: number; missionTypesCount: number; }; } /** * POST /testing/beta/personas/from-transcript * * Create a scenario draft by analyzing a conversation transcript. The system uses LLM to extract user intent, * conversation goals, and user characteristics from the transcript, then generates an appropriate persona package. * * The endpoint supports: * - Fetching transcript via sessionId from analytics service (RPC call) * - Direct transcript content via transcriptContent * - Optional flow context for enhanced persona generation * - Content safety validation (warnings only, non-blocking) * * Priority: If both sessionId and transcriptContent are provided, sessionId takes precedence. * * operationId: createScenarioFromTranscript * tags: Personas */ export interface IGeneratePersonaFromTranscriptRestData_2_0 { /** * Project reference for context identification (alternative to projectId query parameter) */ projectReference?: string; /** * Session identifier to retrieve transcript from analytics service. * If provided, takes precedence over transcriptContent. */ sessionId?: string; /** * Direct transcript content. Optional if sessionId is provided. */ transcriptContent?: { /** * Array of conversation messages */ messages: Array<{ /** * Message source type: * - 'user' (customer) * - 'bot' (AI agent) * - 'agent' (live human agent) * - 'suggestion' (system suggestion) */ source: "user" | "bot" | "agent" | "suggestion"; /** * Message content */ content: string; /** * Message timestamp (ISO 8601 format) */ timestamp: string; }>; }; /** * Optional: Flow ID to associate with and extract agent context for enhanced generation */ flowId?: string; /** * Optional: Number of success criteria to generate * @default 3 * @minimum 1 * @maximum 10 */ numberOfSuccessCriteria?: number; /** * Optional analysis configuration */ analysisOptions?: { /** * Limit transcript to first N turns (default: no limit) * @minimum 1 */ maxTurns?: number; /** * Focus analysis on extracting user goals (default: true) */ focusOnUserGoals?: boolean; }; } export interface IGeneratePersonaFromTranscriptRestReturnValue_2_0 { /** * Whether the generation was successful */ success: boolean; /** * Generated persona package */ personaPackage: { /** * Generated simulation name */ simulationName: string; /** * Generated persona name */ personaName: string; /** * Generated persona description capturing user characteristics */ personaDescription: string; /** * Generated mission based on user goals */ mission: string; /** * Generated success criteria */ successCriteria: Array<{ /** * Success criterion name */ name: string; /** * Success criterion description */ text: string; }>; }; /** * Analysis metadata */ metadata: { /** * Brief summary of the analyzed transcript */ transcriptSummary: string; /** * When the analysis was performed (ISO 8601 format) */ analysisTimestamp: string; /** * Content safety warnings (if any) */ warnings?: string[]; /** * Number of turns in the transcript */ turnCount: number; /** * User intents/goals extracted from transcript */ extractedIntents: string[]; /** * Original transcript messages */ messages: Array<{ /** * Message source: 'user', 'bot', 'agent', or 'suggestion' */ source: "user" | "bot" | "agent" | "suggestion"; /** * Message content */ content: string; /** * Message timestamp (ISO 8601 format) */ timestamp: string; }>; }; } export interface IStopSimulationRunBatchRestDataQuery_2_0 { projectId: string; } export interface IStopSimulationRunBatchRestData_2_0 extends IStopSimulationRunBatchRestDataQuery_2_0 { simulationReference: string; simulationRunBatchReference: string; } export interface IStopSimulationRunBatchRestReturnValue_2_0 { simulationRunBatchId: ISimulationRunBatchRest_2_0; } export interface IGetSimulationOverviewMetricsRestDataQuery_2_0 { projectId: string; scenarioIds?: string[]; timeWindow?: "7d" | "30d" | "3m"; } export interface IGetSimulationOverviewMetricsRestData_2_0 extends IGetSimulationOverviewMetricsRestDataQuery_2_0 { } export interface IGetSimulationOverviewMetricsRestReturnValue_2_0 { totalScenarios: number; totalSimulations: number; avgSuccessRate: number; scheduledRuns: number; } export interface IGetSuccessRateTrendRestDataQuery_2_0 { projectId: string; scenarioIds?: string[]; timeWindow?: "7d" | "30d" | "3m"; } export interface IGetSuccessRateTrendRestData_2_0 extends IGetSuccessRateTrendRestDataQuery_2_0 { } export interface IGetSuccessRateTrendRestReturnValue_2_0 { data: Array<{ date: string; totalRuns: number; successfulRuns: number; failedRuns: number; successRate: number; successPercentage: number; }>; } export interface IGetUpcomingScheduledRunsRestDataQuery_2_0 { projectId: string; scenarioIds?: string[]; limit?: number; } export interface IGetUpcomingScheduledRunsRestData_2_0 extends IGetUpcomingScheduledRunsRestDataQuery_2_0 { } export interface IGetUpcomingScheduledRunsRestReturnValue_2_0 { data: Array<{ _id: string; id: string; simulationReference: string; simulationName?: string; scenarioName?: string; runName?: string; nextScheduledRun: string; frequency: string; time?: string; enableSchedule?: boolean; numberOfRuns?: number; cronScheduler?: string; emailNotifications?: string[]; projectReference?: string; organisationReference?: string; createdBy?: string; lastChangedBy?: string; createdAt?: number; lastChanged?: number; runConfig?: { flowReferenceId?: string; localeReferenceId?: string; entrypoint?: string; largeLanguageModelReferenceId?: string; finalPing?: number; enableMocking?: boolean; }; }>; } declare enum ESchedulerFrequencyRest_2_0 { DAILY = "daily", EVERY_THREE_DAYS = "every three days", WEEKLY = "weekly", BIWEEKLY = "biweekly", MONTHLY = "monthly" } export interface ISchedulerRunConfigRest_2_0 { flowReferenceId: string; localeReferenceId?: string; entrypoint: string; largeLanguageModelReferenceId: string; userId?: string; finalPing?: number; data?: Record; enableMocking?: boolean; } export interface ISchedulerRest_2_0 extends IProjectMetadataRest_2_0 { id: string; runConfig: ISchedulerRunConfigRest_2_0; enableSchedule: boolean; frequency: ESchedulerFrequencyRest_2_0; time: string; numberOfRuns: number; nextScheduledRun: string; emailNotifications: string[]; scenarioName: string; runName: string; simulationReference: string; endDate?: string; createdAt: number; lastChanged: number; createdBy: string; lastChangedBy: string; } export interface ICreateSchedulerRestDataParams_2_0 { simulationReference: string; } export interface ICreateSchedulerRestDataBody_2_0 { runConfig: ISchedulerRunConfigRest_2_0; enableSchedule: boolean; frequency: ESchedulerFrequencyRest_2_0; time: string; numberOfRuns: number; emailNotifications?: string[]; scenarioName?: string; runName: string; endDate?: string; } export interface ICreateSchedulerRestData_2_0 extends ICreateSchedulerRestDataParams_2_0, ICreateSchedulerRestDataBody_2_0 { } export interface ICreateSchedulerRestReturnValue_2_0 { scheduler: ISchedulerRest_2_0; } export interface IUpdateSchedulerRestDataParams_2_0 { simulationReference: string; schedulerId: string; } export interface IUpdateSchedulerRestDataBody_2_0 { runConfig?: ISchedulerRunConfigRest_2_0; enableSchedule?: boolean; frequency?: ESchedulerFrequencyRest_2_0; time?: string; numberOfRuns?: number; nextScheduledRun?: string; emailNotifications?: string[]; scenarioName?: string; runName?: string; endDate?: string; } export interface IUpdateSchedulerRestData_2_0 extends IUpdateSchedulerRestDataParams_2_0, IUpdateSchedulerRestDataBody_2_0 { projectId?: string; } export interface IUpdateSchedulerRestReturnValue_2_0 { scheduler: ISchedulerRest_2_0; } export interface IGetSchedulerRestDataParams_2_0 { simulationReference: string; } export interface IGetSchedulerRestData_2_0 extends IGetSchedulerRestDataParams_2_0 { projectId?: string; } export interface IGetSchedulerRestReturnValue_2_0 { scheduler: ISchedulerRest_2_0 | null; } /** * POST /testing/v1/transcript-request * * Create a new transcript upload session. This is the first step in the three-step workflow * for generating scenarios from transcript files. * * This endpoint: * - Creates a new request with a unique ID * - Checks rate limits per project (max active requests) * - Returns configuration details (max files, max file size, supported formats) * * The returned requestId must be passed in subsequent upload and generation calls. * * operationId: createTranscriptRequest * tags: Transcript Scenario Generation */ export interface ICreateTranscriptRequestRestData_2_0 { /** * Project identifier (can also be provided via project_id header) */ projectId?: string; /** * Alternative project reference */ projectReference?: string; } export interface ICreateTranscriptRequestRestReturnValue_2_0 { /** * Whether the request was successful */ success: boolean; /** * Unique request identifier for subsequent calls */ requestId: string; /** * When this request will expire (ISO 8601 format) */ expiresAt: string; /** * Maximum number of files that can be uploaded */ maxFiles: number; /** * Maximum file size in bytes */ maxFileSize: number; /** * Maximum total upload size in bytes */ maxTotalSize?: number; /** * Supported file formats */ supportedFormats: string[]; /** * Request status */ status: "pending"; } /** * POST /testing/v1/transcript-upload * * Upload a single transcript file for parsing and content extraction. * This is the second step in the three-step workflow. * * The file is streamed and then: * 1. Read back from storage * 2. Parsed based on file type (CSV) * 3. Analyzed for speaker labels (Agent/Customer) * 4. Stored as structured data (keyed by requestId) * * Multiple files can be uploaded by calling this endpoint multiple times with the same requestId. * * Note: This endpoint uses multipart/form-data for file uploads. * * operationId: uploadTranscriptFile * tags: Transcript Scenario Generation */ /// /// export interface IUploadTranscriptFileRestData_2_0 { /** * Request ID from the create-request step */ requestId: string; /** * Project identifier */ projectId?: string; /** * The transcript file to upload (CSV) * When using this endpoint, pass a File or Blob object */ file: File | Buffer; } export interface IUploadTranscriptFileRestReturnValue_2_0 { /** * Whether the upload was successful */ success: boolean; /** * Unique file identifier */ fileId: string; /** * Original file name */ fileName: string; /** * File size in bytes */ fileSize: number; /** * Detected file type */ fileType: "pdf" | "csv" | "docx"; /** * Length of extracted text content */ textLength: number; /** * When the file was processed (ISO 8601 format) */ processedAt: string; } /** * POST /testing/v1/generate-from-transcript * * Generate 3 distinct simulation scenarios from previously uploaded and parsed transcript files. * This is the third and final step in the three-step workflow. * * The endpoint: * 1. Retrieves all uploaded files for the given requestId * 2. Combines all transcript content * 3. Validates minimum word count * 4. Calls the LLM to generate 3 scenarios * 5. Cleans up storage data after successful generation * * Each generated scenario includes a simulationName, personaName, personaDescription, * mission, and success criteria - ready to be used for creating simulations. * * operationId: generateFromTranscript * tags: Transcript Scenario Generation */ export interface IGenerateFromTranscriptRestData_2_0 { /** * Project identifier */ projectId?: string; /** * Request ID from the create-request step (all files uploaded for this request are used) */ requestId: string; /** * Optional flow reference (MongoDB ObjectId) for context-aware generation */ flowReference?: string; /** * Number of success criteria per scenario (required, 1-10) */ numberOfSuccessCriteria: number; } export interface IGenerateFromTranscriptRestReturnValue_2_0 { /** * Whether the generation was successful */ success: boolean; /** * 3 generated simulation scenarios */ scenarios: Array<{ /** * Descriptive name for the simulation */ simulationName: string; /** * Role-based persona name */ personaName: string; /** * Detailed persona behavioral profile */ personaDescription: string; /** * Clear, testable mission objective */ mission: string; /** * Measurable success criteria */ successCriteria: Array<{ /** * Success criterion type */ type: "text" | "goalCompleted"; /** * Success criterion parameters */ params: { /** * Success criterion name */ name: string; /** * Success criterion description */ text: string; }; }>; }>; /** * Generation metadata */ metadata: { /** * Request ID used for generation */ requestId: string; /** * Number of files processed */ filesProcessed: number; /** * Total length of text content */ totalTextLength: number; /** * Model used for generation */ model: string; /** * When the scenarios were generated (ISO 8601 format) */ processedAt: string; /** * Time taken to generate scenarios in milliseconds */ generationTimeMs: number; }; } export declare type IGetSimulationTierRestData_2_0 = Record; export interface IGetSimulationTierRestReturnValue_2_0 { paidTier: boolean; quota: number; executedRuns: number; } export interface ICreateBatchRestVariant_2_0 { ordinal: number; label?: string; simulationReference: string; channel: TChannelRest_2_0; snapshotReference: string | null; localeReferenceId: string; simulationLargeLanguageModelReferenceId: string | null; runConfig: IRunConfigRest_2_0; numberOfExecutions: number; advanced?: IVariantAdvancedRest_2_0; } export interface ICreateBatchRestData_2_0 { mode: TBatchModeRest_2_0; testTitle?: string; projectReference: string; organisationReference?: string; endPointType?: string; variants: ICreateBatchRestVariant_2_0[]; } export interface ICreateBatchRestReturnValue_2_0 { batchId: string; status: "IN_PROGRESS"; createdAt: number; testTitle?: string; totalRunsScheduled: number; variants: Array<{ variantId: string; ordinal: number; status: "IN_PROGRESS"; numberOfExecutions: number; }>; _links?: { self: string; runs: string; stop: string; }; } export declare type IValidateBatchRestData_2_0 = ICreateBatchRestData_2_0; export interface IValidateBatchRestVariantError_2_0 { variantOrdinal: number; field?: string; code: string; message: string; } export interface IValidateBatchRestWarning_2_0 { variantOrdinal?: number; code: string; message: string; } export interface IValidateBatchRestQuotaPreview_2_0 { totalRunsRequested: number; quotaRemaining: number; paidTier: boolean; wouldExceed: boolean; } export interface IValidateBatchRestReturnValue_2_0 { valid: boolean; variantErrors: IValidateBatchRestVariantError_2_0[]; warnings: IValidateBatchRestWarning_2_0[]; quotaPreview: IValidateBatchRestQuotaPreview_2_0; } export interface IReadBatchRestData_2_0 { batchId: string; projectId: string; } export interface IReadBatchRestReturnValue_2_0 { batch: IBatchRest_2_0; } export interface IIndexBatchRunsRestData_2_0 { batchId: string; projectId: string; variantId?: string; limit?: number; skip?: number; sort?: string; } export interface IIndexBatchRunsRestReturnValue_2_0 { data: ISimulationRunRest_2_0[]; pagination: { total: number; limit: number; skip: number; }; } export interface IReadBatchRunRestData_2_0 { batchId: string; runId: string; projectId: string; } export interface IReadBatchRunRestReturnValue_2_0 { simulationRun: ISimulationRunRest_2_0; } /** * E6 — POST /testing/batches/{batchId}/stop * Stop any batch or one variant. See MULTIVARIATE_TEST_SPEC.md §20 E6. */ export interface IStopBatchRestData_2_0 { batchId: string; projectId: string; variantId?: string; } export interface IStopBatchRestReturnValue_2_0 { batchId: string; stoppedAt: number; stoppedScope: "variant" | "batch"; stoppedVariantId?: string; cancelledRunCount: number; } /** * E7 — DELETE /testing/batches/{batchId} * Delete batch + runs (cascade). See MULTIVARIATE_TEST_SPEC.md §20 E7. */ export interface IDeleteBatchRestData_2_0 { batchId: string; projectId: string; } export interface IDeleteBatchRestReturnValue_2_0 { batchId: string; deletedAt: number; } export interface SimulationAPIGroup_2_0 { indexSimulations: TRestAPIOperation; createSimulation: TRestAPIOperation; updateSimulation: TRestAPIOperation; deleteSimulation: TRestAPIOperation; readSimulation: TRestAPIOperation; scheduleSimulation: TRestAPIOperation; cloneSimulation: TRestAPIOperation; indexSimulationRunBatches: TRestAPIOperation; getAllSimulationRunBatches: TRestAPIOperation; readSimulationRunBatch: TRestAPIOperation; stopSimulationRunBatch: TRestAPIOperation; indexSimulationRuns: TRestAPIOperation; readSimulationRun: TRestAPIOperation; getPersonaOptions: TRestAPIOperation; generatePersona: TRestAPIOperation; regeneratePersonaField: TRestAPIOperation; generateBulkPersona: TRestAPIOperation; generatePersonaFromTranscript: TRestAPIOperation; getSimulationOverviewMetrics: TRestAPIOperation; getSuccessRateTrend: TRestAPIOperation; getUpcomingScheduledRuns: TRestAPIOperation; getScheduler: TRestAPIOperation; createScheduler: TRestAPIOperation; updateScheduler: TRestAPIOperation; createTranscriptRequest: TRestAPIOperation; uploadTranscriptFile: TRestAPIOperation; generateFromTranscript: TRestAPIOperation; getSimulationTier: TRestAPIOperation; validateBatch: TRestAPIOperation; createBatch: TRestAPIOperation; readBatch: TRestAPIOperation; indexBatchRuns: TRestAPIOperation; readBatchRun: TRestAPIOperation; stopBatch: TRestAPIOperation; deleteBatch: TRestAPIOperation; } declare function SimulationAPIGroup_2_0(instance: Base): SimulationAPIGroup_2_0; export declare type ServiceToolkitAPIGroup_2_0 = ServiceToolkitEvalProfileV2API; declare function ServiceToolkitAPIGroup_2_0(instance: Base): ServiceToolkitAPIGroup_2_0; export declare type TRestAPIGroupsTypeByConfiguration = TResourceAPIVersionType & TJWTAuthAPIVersionType & TInsightsAPIVersionType & TMetricsAPIVersionType & TSessionAPIVersionType & TExternalAPIVersionType & TAdministrationAPIVersionType & TManagementAPIVersionType & TAnalyticsAPIVersionType & TAIOpsCenterAPIVersionType & TSimulationAPIVersionType & TServiceToolkitAPIVersionType; export declare type TResourceAPIVersionType = T extends { versions: { resources: "2.0"; }; } ? ResourcesAPIGroup_2_0 : ResourcesAPIGroup_2_0; export declare type TInsightsAPIVersionType = T extends { versions: { insights: "2.0"; }; } ? InsightsAPIGroup_2_0 : InsightsAPIGroup_2_0; export declare type TJWTAuthAPIVersionType = T extends { versions: { jwt: "2.0"; }; } ? JWTAuthAPIGroup_2_0 : JWTAuthAPIGroup_2_0; export declare type TMetricsAPIVersionType = T extends { versions: { metrics: "2.1"; }; } ? MetricsAPIGroup_2_1 : MetricsAPIGroup_2_0; export declare type TSessionAPIVersionType = T extends { versions: { sessions: "1.0"; }; } ? SessionsAPIGroup_2_0 : SessionsAPIGroup_2_0; export declare type TExternalAPIVersionType = T extends { versions: { sessions: "1.0"; }; } ? ExternalAPIGroup_2_0 : ExternalAPIGroup_2_0; export declare type TManagementAPIVersionType = T extends { versions: { management: "2.0"; }; } ? ManagementAPIGroup_2_0 : {}; export declare type TAdministrationAPIVersionType = T extends { versions: { administration: "2.0"; }; } ? AdministrationAPIGroup_2_0 : AdministrationAPIGroup_2_1; export declare type TAnalyticsAPIVersionType = T extends { versions: { analytics: "2.0"; }; } ? AnalyticsAPIGroup_2_0 : AnalyticsAPIGroup_2_0; /** * Note the key is `opsCenter`, matching `IRestAPIClientVersionConfiguration`. * * This conditional previously tested `versions: { aiops: "1.0" }` — a key that appears nowhere in the * configuration interface — so it never matched. Both branches resolved to the same group, which is * why nothing surfaced: the switch was dead but harmless. Selecting `_2_1` requires it to work. */ export declare type TAIOpsCenterAPIVersionType = T extends { versions: { opsCenter: "2.1"; }; } ? AIOpsCenterAPIGroup_2_1 : AIOpsCenterAPIGroup_2_0; export declare type TSimulationAPIVersionType = T extends { versions: { simulation: "2.0"; }; } ? SimulationAPIGroup_2_0 : SimulationAPIGroup_2_0; export declare type TServiceToolkitAPIVersionType = T extends { versions: { serviceToolkit: "2.0"; }; } ? ServiceToolkitAPIGroup_2_0 : ServiceToolkitAPIGroup_2_0; export declare type TRestAPIClient = TRestAPIGroupsTypeByConfiguration & AuthenticationAPI & IRestAPIClientProperties & IHttpAdapterAPI; export interface IRestAPIClientConstructor { new (config?: T): TRestAPIClient; (config?: T): TRestAPIClient; } export interface IRestAPIClientProperties { config: T; setBaseUrl: (baseUrl: string) => void; getBaseUrl: () => string; setInterceptors: (data: ISetInterceptors) => void; } export interface ISetInterceptors { onUnauthorized?: () => void; } export interface IHttpAdapterAPI { getHttpAdapter(): IHttpAdapter; } export declare const RestAPIClient: IRestAPIClientConstructor; export declare class NumberRange { private $gte; private $lte; type: string; constructor(data: { $gte?: number; $lte?: number; }); toString(): string; toMongoQuery(): { $gte: number; $lte: number; }; static isNumberRange(variable: any): boolean; } /** * If the request fails due to a missing, invalid, or mismatching * redirection URI, or if the client identifier is missing or invalid, * the authorization server SHOULD inform the resource owner of the * error and MUST NOT automatically redirect the user-agent to the * invalid redirection URI. * * @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 */ export interface IOAuth2ErrorResponse { /** * REQUIRED. * A single ASCII [USASCII] error code from the following: */ error: TOAuth2ErrorType; /** * OPTIONAL. * Human-readable ASCII text providing * additional information, used to assist the client developer in * understanding the error that occurred. */ error_description?: string; /** * OPTIONAL. * A URI identifying a human-readable web page with * information about the error, used to provide the client * developer with additional information about the error. */ error_uri?: string; /** * OPTIONAL. * REQUIRED if a "state" parameter was present in the client * authorization request. The exact value received from the * client. */ state?: string; } export declare const OAuth2Errors: readonly [ "invalid_request", "unauthorized_client", "access_denied", "unsupported_response_type", "invalid_scope", "server_error", "temporarily_unavailable" ]; export declare type TOAuth2ErrorType = typeof OAuth2Errors[number]; /** * Hypertext Transfer Protocol (HTTP) response status codes. * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} */ export declare enum HttpStatusCode { /** * The server has received the request headers and the client should proceed to send the request body * (in the case of a request for which a body needs to be sent; for example, a POST request). * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient. * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued. */ CONTINUE = 100, /** * The requester has asked the server to switch protocols and the server has agreed to do so. */ SWITCHING_PROTOCOLS = 101, /** * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. * This code indicates that the server has received and is processing the request, but no response is available yet. * This prevents the client from timing out and assuming the request was lost. */ PROCESSING = 102, /** * Standard response for successful HTTP requests. * The actual response will depend on the request method used. * In a GET request, the response will contain an entity corresponding to the requested resource. * In a POST request, the response will contain an entity describing or containing the result of the action. */ OK = 200, /** * The request has been fulfilled, resulting in the creation of a new resource. */ CREATED = 201, /** * The request has been accepted for processing, but the processing has not been completed. * The request might or might not be eventually acted upon, and may be disallowed when processing occurs. */ ACCEPTED = 202, /** * SINCE HTTP/1.1 * The server is a transforming proxy that received a 200 OK from its origin, * but is returning a modified version of the origin's response. */ NON_AUTHORITATIVE_INFORMATION = 203, /** * The server successfully processed the request and is not returning any content. */ NO_CONTENT = 204, /** * The server successfully processed the request, but is not returning any content. * Unlike a 204 response, this response requires that the requester reset the document view. */ RESET_CONTENT = 205, /** * The server is delivering only part of the resource (byte serving) due to a range header sent by the client. * The range header is used by HTTP clients to enable resuming of interrupted downloads, * or split a download into multiple simultaneous streams. */ PARTIAL_CONTENT = 206, /** * The message body that follows is an XML message and can contain a number of separate response codes, * depending on how many sub-requests were made. */ MULTI_STATUS = 207, /** * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, * and are not being included again. */ ALREADY_REPORTED = 208, /** * The server has fulfilled a request for the resource, * and the response is a representation of the result of one or more instance-manipulations applied to the current instance. */ IM_USED = 226, /** * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation). * For example, this code could be used to present multiple video format options, * to list files with different filename extensions, or to suggest word-sense disambiguation. */ MULTIPLE_CHOICES = 300, /** * This and all future requests should be directed to the given URI. */ MOVED_PERMANENTLY = 301, /** * This is an example of industry practice contradicting the standard. * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 * to distinguish between the two behaviours. However, some Web applications and frameworks * use the 302 status code as if it were the 303. */ FOUND = 302, /** * SINCE HTTP/1.1 * The response to the request can be found under another URI using a GET method. * When received in response to a POST (or PUT/DELETE), the client should presume that * the server has received the data and should issue a redirect with a separate GET message. */ SEE_OTHER = 303, /** * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy. */ NOT_MODIFIED = 304, /** * SINCE HTTP/1.1 * The requested resource is available only through a proxy, the address for which is provided in the response. * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons. */ USE_PROXY = 305, /** * No longer used. Originally meant "Subsequent requests should use the specified proxy." */ SWITCH_PROXY = 306, /** * SINCE HTTP/1.1 * In this case, the request should be repeated with another URI; however, future requests should still use the original URI. * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. * For example, a POST request should be repeated using another POST request. */ TEMPORARY_REDIRECT = 307, /** * The request and all future requests should be repeated using another URI. * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change. * So, for example, submitting a form to a permanently redirected resource may continue smoothly. */ PERMANENT_REDIRECT = 308, /** * The server cannot or will not process the request due to an apparent client error * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing). */ BAD_REQUEST = 400, /** * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means * "unauthenticated",i.e. the user does not have the necessary credentials. */ UNAUTHORIZED = 401, /** * Reserved for future use. The original intention was that this code might be used as part of some form of digital * cash or micro payment scheme, but that has not happened, and this code is not usually used. * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. */ PAYMENT_REQUIRED = 402, /** * The request was valid, but the server is refusing action. * The user might not have the necessary permissions for a resource. */ FORBIDDEN = 403, /** * The requested resource could not be found but may be available in the future. * Subsequent requests by the client are permissible. */ NOT_FOUND = 404, /** * A request method is not supported for the requested resource; * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. */ METHOD_NOT_ALLOWED = 405, /** * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request. */ NOT_ACCEPTABLE = 406, /** * The client must first authenticate itself with the proxy. */ PROXY_AUTHENTICATION_REQUIRED = 407, /** * The server timed out waiting for the request. * According to HTTP specifications: * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time." */ REQUEST_TIMEOUT = 408, /** * Indicates that the request could not be processed because of conflict in the request, * such as an edit conflict between multiple simultaneous updates. */ CONFLICT = 409, /** * Indicates that the resource requested is no longer available and will not be available again. * This should be used when a resource has been intentionally removed and the resource should be purged. * Upon receiving a 410 status code, the client should not request the resource in the future. * Clients such as search engines should remove the resource from their indices. * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead. */ GONE = 410, /** * The request did not specify the length of its content, which is required by the requested resource. */ LENGTH_REQUIRED = 411, /** * The server does not meet one of the preconditions that the requester put on the request. */ PRECONDITION_FAILED = 412, /** * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large". */ PAYLOAD_TOO_LARGE = 413, /** * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request, * in which case it should be converted to a POST request. * Called "Request-URI Too Long" previously. */ URI_TOO_LONG = 414, /** * The request entity has a media type which the server or resource does not support. * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format. */ UNSUPPORTED_MEDIA_TYPE = 415, /** * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion. * For example, if the client asked for a part of the file that lies beyond the end of the file. * Called "Requested Range Not Satisfiable" previously. */ RANGE_NOT_SATISFIABLE = 416, /** * The server cannot meet the requirements of the Expect request-header field. */ EXPECTATION_FAILED = 417, /** * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com. */ I_AM_A_TEAPOT = 418, /** * The request was directed at a server that is not able to produce a response (for example because a connection reuse). */ MISDIRECTED_REQUEST = 421, /** * The request was well-formed but was unable to be followed due to semantic errors. */ UNPROCESSABLE_ENTITY = 422, /** * The resource that is being accessed is locked. */ LOCKED = 423, /** * The request failed due to failure of a previous request (e.g., a PROPPATCH). */ FAILED_DEPENDENCY = 424, /** * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field. */ UPGRADE_REQUIRED = 426, /** * The origin server requires the request to be conditional. * Intended to prevent "the 'lost update' problem, where a client * GETs a resource's state, modifies it, and PUTs it back to the server, * when meanwhile a third party has modified the state on the server, leading to a conflict." */ PRECONDITION_REQUIRED = 428, /** * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes. */ TOO_MANY_REQUESTS = 429, /** * The server is unwilling to process the request because either an individual header field, * or all the header fields collectively, are too large. */ REQUEST_HEADER_FIELDS_TOO_LARGE = 431, /** * A server operator has received a legal demand to deny access to a resource or to a set of resources * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451. */ UNAVAILABLE_FOR_LEGAL_REASONS = 451, /** * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. */ INTERNAL_SERVER_ERROR = 500, /** * The server either does not recognize the request method, or it lacks the ability to fulfill the request. * Usually this implies future availability (e.g., a new feature of a web-service API). */ NOT_IMPLEMENTED = 501, /** * The server was acting as a gateway or proxy and received an invalid response from the upstream server. */ BAD_GATEWAY = 502, /** * The server is currently unavailable (because it is overloaded or down for maintenance). * Generally, this is a temporary state. */ SERVICE_UNAVAILABLE = 503, /** * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. */ GATEWAY_TIMEOUT = 504, /** * The server does not support the HTTP protocol version used in the request */ HTTP_VERSION_NOT_SUPPORTED = 505, /** * Transparent content negotiation for the request results in a circular reference. */ VARIANT_ALSO_NEGOTIATES = 506, /** * The server is unable to store the representation needed to complete the request. */ INSUFFICIENT_STORAGE = 507, /** * The server detected an infinite loop while processing the request. */ LOOP_DETECTED = 508, /** * Further extensions to the request are required for the server to fulfill it. */ NOT_EXTENDED = 510, /** * The client needs to authenticate to gain network access. * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot). */ NETWORK_AUTHENTICATION_REQUIRED = 511 } export { RestAPIClient as default, }; export {};