@squidcloud/client 1.0.424 → 1.0.425

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.js +1 -1
  3. package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +2 -0
  4. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +77 -5
  5. package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +12 -15
  6. package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +14 -0
  7. package/dist/internal-common/src/public-types/integration.public-types.d.ts +2 -2
  8. package/dist/internal-common/src/public-types/web.public-types.d.ts +26 -0
  9. package/dist/internal-common/src/types/ai-agent.types.d.ts +1 -5
  10. package/dist/internal-common/src/types/observability.types.d.ts +23 -0
  11. package/dist/internal-common/src/types/url-shortener.types.d.ts +4 -0
  12. package/dist/internal-common/src/utils/file-utils.d.ts +2 -0
  13. package/dist/internal-common/src/utils/object.d.ts +28 -0
  14. package/dist/internal-common/src/utils/serialization.d.ts +1 -0
  15. package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +17 -1
  16. package/dist/typescript-client/src/ai-client.d.ts +0 -7
  17. package/dist/typescript-client/src/index.d.ts +0 -2
  18. package/dist/typescript-client/src/public-types.d.ts +0 -1
  19. package/dist/typescript-client/src/version.d.ts +1 -1
  20. package/dist/typescript-client/src/web-client.d.ts +9 -14
  21. package/package.json +1 -1
  22. package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +0 -31
  23. package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
  24. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +0 -1239
  25. package/dist/typescript-client/src/ai-assistant-client.d.ts +0 -72
  26. package/dist/typescript-client/src/file-utils.d.ts +0 -1
@@ -12,6 +12,8 @@ export interface AiAgentDatabaseIntegrationOptions {
12
12
  * When this list is not provided (i.e., it is `undefined`) or is empty, the AI agent has access to all collections.
13
13
  */
14
14
  collectionsToUse?: string[];
15
+ /** If true, disables the code interpreter when analyzing query results. Default: false. */
16
+ disableCodeInterpreter?: boolean;
15
17
  /** If true, provides more detailed status updates during AI query execution. Default: false. */
16
18
  verboseStatusUpdates?: boolean;
17
19
  /** If provided, this agent will be used to generate the query. */
@@ -1,5 +1,5 @@
1
1
  import { JSONSchema } from 'json-schema-typed';
2
- import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiEmbeddingsModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat } from './ai-common.public-types';
2
+ import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat } from './ai-common.public-types';
3
3
  import { AiContextMetadata, AiContextMetadataFilter, AiKnowledgeBaseContextType, AiRagType } from './ai-knowledge-base.public-types';
4
4
  import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
5
5
  import { AiAgentId, AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
@@ -560,17 +560,14 @@ export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
560
560
  auditLog?: boolean;
561
561
  /** The default chat options for the agent, overridable by the user during use. */
562
562
  options: AiChatOptions<T>;
563
- /** The embedding model name used by the agent. */
564
- embeddingModelName: AiEmbeddingsModelName;
565
563
  /** Optional api key used specifically for operations on this agent */
566
564
  apiKey?: string;
567
565
  }
568
566
  /**
569
567
  * @category AI
570
568
  */
571
- export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options' | 'embeddingModelName'> & {
569
+ export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
572
570
  options?: AiChatOptions;
573
- embeddingModelName?: AiEmbeddingsModelName;
574
571
  };
575
572
  /**
576
573
  * A status message from an AI agent operation.
@@ -892,4 +889,79 @@ export interface AiGenerateImageRequest {
892
889
  /** Options for image generation */
893
890
  options?: AiGenerateImageOptions;
894
891
  }
892
+ /**
893
+ * Revision action types for agent history tracking.
894
+ * @category AI
895
+ */
896
+ export type AiAgentRevisionAction = 'created' | 'updated' | 'deleted';
897
+ /**
898
+ * Represents a single agent revision entry.
899
+ * @category AI
900
+ */
901
+ export interface AiAgentRevision {
902
+ /** The ID of the agent this revision belongs to. */
903
+ agentId: AiAgentId;
904
+ /** The revision number, incremented for each change to the agent. */
905
+ revisionNumber: number;
906
+ /** The action that triggered this revision (created, updated, or deleted). */
907
+ action: AiAgentRevisionAction;
908
+ /** Timestamp when this revision was created. */
909
+ createdAt: Date;
910
+ /** Snapshot of the agent data at the time of the revision. */
911
+ agentSnapshot: AiAgent;
912
+ }
913
+ /**
914
+ * Request to list all revisions for an agent.
915
+ * @category AI
916
+ */
917
+ export interface ListAgentRevisionsRequest {
918
+ /** The ID of the agent to list revisions for. */
919
+ agentId: AiAgentId;
920
+ }
921
+ /**
922
+ * Response containing the list of agent revisions.
923
+ * @category AI
924
+ */
925
+ export interface ListAgentRevisionsResponse {
926
+ /** The list of revisions for the agent, sorted by revision number descending. */
927
+ revisions: Array<AiAgentRevision>;
928
+ }
929
+ /**
930
+ * Request to get a specific agent revision.
931
+ * @category AI
932
+ */
933
+ export interface GetAgentRevisionRequest {
934
+ /** The ID of the agent to get the revision for. */
935
+ agentId: AiAgentId;
936
+ /** The revision number to retrieve. */
937
+ revisionNumber: number;
938
+ }
939
+ /**
940
+ * Response containing a specific agent revision.
941
+ * @category AI
942
+ */
943
+ export interface GetAgentRevisionResponse {
944
+ /** The requested revision, or undefined if not found. */
945
+ revision: AiAgentRevision | undefined;
946
+ }
947
+ /**
948
+ * Request to restore an agent to a specific revision.
949
+ * @category AI
950
+ */
951
+ export interface RestoreAgentRevisionRequest {
952
+ /** The ID of the agent to restore. */
953
+ agentId: AiAgentId;
954
+ /** The revision number to restore the agent to. */
955
+ revisionNumber: number;
956
+ }
957
+ /**
958
+ * Request to delete a specific agent revision.
959
+ * @category AI
960
+ */
961
+ export interface DeleteAgentRevisionRequest {
962
+ /** The ID of the agent whose revision should be deleted. */
963
+ agentId: AiAgentId;
964
+ /** The revision number to delete. */
965
+ revisionNumber: number;
966
+ }
895
967
  export {};
@@ -19,37 +19,34 @@ export type AiProviderType = (typeof AI_PROVIDER_TYPES)[number];
19
19
  * Type of AI provider that supports file upload operations.
20
20
  * Only a subset of AI providers support file management features.
21
21
  */
22
- export type AiFileProviderType = Extract<AiProviderType, 'openai' | 'gemini' | 'anthropic'>;
22
+ export type AiFileProviderType = Extract<AiProviderType, 'openai' | 'gemini' | 'anthropic' | 'grok'>;
23
23
  /**
24
+ * Public OpenAI chat model names (active models only).
24
25
  * @category AI
25
26
  */
26
- export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["o1", "o3", "o3-mini", "o4-mini", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5.1", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-4o", "gpt-4o-mini"];
27
+ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5-mini", "gpt-5-nano", "gpt-5.2", "gpt-5.2-pro"];
27
28
  /**
29
+ * Public Gemini chat model names (active models only).
28
30
  * @category AI
29
31
  */
30
- export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite"];
32
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3-pro", "gemini-3-flash", "gemini-2.5-flash-lite"];
31
33
  /**
32
- * Notes:
33
- * - 'grok-3-mini' model os ~10x less expensive than 'grok-3'.
34
- * - '*-fast' models are ~2x more expensive than non-fast variants and only marginally faster.
35
- * - 'grok-4' cost is comparable to 'grok-3-fast'.
36
- *
34
+ * Public Grok chat model names (active models only).
37
35
  * @category AI
38
36
  */
39
- export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
37
+ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
40
38
  /**
39
+ * Public Anthropic chat model names (active models only).
41
40
  * @category AI
42
41
  */
43
- export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929"];
42
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-haiku-4-5-20251001", "claude-opus-4-5-20251101", "claude-sonnet-4-5-20250929"];
44
43
  /**
45
44
  * The supported AI model names.
46
45
  * @category AI
47
46
  */
48
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["o1", "o3", "o3-mini", "o4-mini", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5.1", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-4o", "gpt-4o-mini", "claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
49
- /**
50
- * Check if the given model name is a global AI chat model name.
51
- */
52
- export declare function isVendorAiChatModelName(modelName: string): modelName is (typeof VENDOR_AI_CHAT_MODEL_NAMES)[number];
47
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5-mini", "gpt-5-nano", "gpt-5.2", "gpt-5.2-pro", "claude-haiku-4-5-20251001", "claude-opus-4-5-20251101", "claude-sonnet-4-5-20250929", "gemini-3-pro", "gemini-3-flash", "gemini-2.5-flash-lite", "grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
48
+ /** Checks if the given model name is a global AI chat model name. */
49
+ export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
53
50
  /**
54
51
  * @category AI
55
52
  */
@@ -77,6 +77,12 @@ export interface AiQueryGenerateQueryOptions {
77
77
  * If provided, the AI Query process will use this agent to generate a query.
78
78
  */
79
79
  agentId?: AiAgentId;
80
+ /**
81
+ * When enabled, allows the AI to ask for clarification instead of attempting to generate
82
+ * a query when the request is ambiguous, too complex, or impossible to answer with the
83
+ * available schema. Default: false.
84
+ */
85
+ allowClarification?: boolean;
80
86
  }
81
87
  /** Options for the query result analysis. */
82
88
  export interface AiQueryAnalyzeResultsOptions {
@@ -107,6 +113,14 @@ export interface AiQueryResponse {
107
113
  rawResultsUrl?: string;
108
114
  /** Indicates whether the query execution was successful. */
109
115
  success: boolean;
116
+ /** Indicates whether code interpreter was used to analyze the results. */
117
+ usedCodeInterpreter?: boolean;
118
+ /**
119
+ * When the AI needs clarification to generate a query, this field contains the clarification question.
120
+ * Only populated when `generateQueryOptions.allowClarification` is enabled and the AI determines
121
+ * it cannot generate a valid query without more information.
122
+ */
123
+ clarificationQuestion?: string;
110
124
  }
111
125
  /**
112
126
  * Details of an executed query, including the query text and result type.
@@ -4,13 +4,13 @@ export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents
4
4
  /**
5
5
  * @category Database
6
6
  */
7
- export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "mongo", "mssql", "databricks", "mysql", "oracledb", "postgres", "sap_hana", "snowflake", "elasticsearch", "legend"];
7
+ export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "dynamodb", "mongo", "mssql", "databricks", "mysql", "oracledb", "postgres", "sap_hana", "snowflake", "elasticsearch", "legend"];
8
8
  /**
9
9
  * @category Auth
10
10
  */
11
11
  export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "keycloak", "descope", "firebase_auth"];
12
12
  /** Supported integration types for GraphQL-based services. */
13
- export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql", "linear"];
13
+ export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql"];
14
14
  /** Supported integration types for HTTP-based services. */
15
15
  export declare const HTTP_INTEGRATION_TYPES: readonly ["api"];
16
16
  /** Represents a supported integration type identifier, such as 'postgres', 'auth0', or 's3'. */
@@ -37,6 +37,28 @@ export interface WebGetUrlContentResponse {
37
37
  /** The content fetched from the URL in Markdown format. */
38
38
  markdownText: string;
39
39
  }
40
+ /**
41
+ * Options for creating a shortened URL.
42
+ */
43
+ export interface CreateShortUrlOptions {
44
+ /** The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or https://). */
45
+ url: string;
46
+ /** Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 1 day. */
47
+ secondsToLive?: number;
48
+ /** Optional file extension to include in the shortened URL ID (e.g., 'pdf', 'html'). The extension becomes part of the ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
49
+ fileExtension?: string;
50
+ }
51
+ /**
52
+ * Options for creating multiple shortened URLs.
53
+ */
54
+ export interface CreateShortUrlsOptions {
55
+ /** The URLs to shorten. They must be valid URLs and should include the protocol (start with http:// or https://). */
56
+ urls: string[];
57
+ /** Seconds to live for all shortened URLs. If set to 0, the URLs will never expire. Defaults to 1 day. */
58
+ secondsToLive?: number;
59
+ /** Optional file extension to include in all shortened URL IDs (e.g., 'pdf', 'html'). The extension becomes part of each ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
60
+ fileExtension?: string;
61
+ }
40
62
  /**
41
63
  * Request to create a shortened URL.
42
64
  */
@@ -45,6 +67,8 @@ export interface WebShortUrlRequest {
45
67
  url: string;
46
68
  /** Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 1 day. */
47
69
  secondsToLive?: number;
70
+ /** Optional file extension to include in the shortened URL ID (e.g., 'pdf', 'html'). The extension becomes part of the ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
71
+ fileExtension?: string;
48
72
  }
49
73
  /**
50
74
  * Request to create shortened URLs.
@@ -54,6 +78,8 @@ export interface WebShortUrlBulkRequest {
54
78
  urls: string[];
55
79
  /** Seconds to live for all shortened URLs. If set to 0, the URLs will never expire. Defaults to 1 day. */
56
80
  secondsToLive?: number;
81
+ /** Optional file extension to include in all shortened URL IDs (e.g., 'pdf', 'html'). The extension becomes part of each ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
82
+ fileExtension?: string;
57
83
  }
58
84
  /**
59
85
  * Response with the newly created shortened URL.
@@ -1,5 +1,5 @@
1
1
  import { AgentContextRequest, AiAgent, AiAgentContext, AiAnnotation, AiAudioCreateSpeechOptions, AiChatMessage, AiChatOptions, AiGenerateImageOptions, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
2
- import { AiChatModelName, AiEmbeddingsModelName, AiProviderType } from '../public-types/ai-common.public-types';
2
+ import { AiProviderType } from '../public-types/ai-common.public-types';
3
3
  import { AiContextMetadata, AiContextMetadataFilter } from '../public-types/ai-knowledge-base.public-types';
4
4
  import { AiAgentId, AiKnowledgeBaseId, AppId, ClientRequestId } from '../public-types/communication.public-types';
5
5
  import { JobId } from '../public-types/job.public-types';
@@ -11,10 +11,6 @@ export type AiModelSpec = {
11
11
  /** Total context window size: input (aka prompt) + output (aka completion) tokens combined. */
12
12
  contextWindowTokens: number;
13
13
  };
14
- /** Map of AI model details by model name. */
15
- export declare const AI_VENDOR_MODEL_SPECS: Record<AiChatModelName, AiModelSpec>;
16
- /** Map of embedding AI model specs by model name. */
17
- export declare const AI_VENDOR_EMBEDDING_MODEL_SPECS: Record<AiEmbeddingsModelName, AiModelSpec>;
18
14
  export interface AiChatRequest {
19
15
  agentId: AiAgentId;
20
16
  clientRequestId: ClientRequestId;
@@ -51,6 +51,29 @@ export interface AuditLogEvent {
51
51
  };
52
52
  tags: Record<string, string>;
53
53
  }
54
+ /** Agent audit log entry - one per agent invocation */
55
+ export interface AgentAuditLogEvent {
56
+ appId: AppId;
57
+ agentId: string;
58
+ jobId: string;
59
+ prompt: string;
60
+ tags: Record<string, string>;
61
+ createdAt: Date;
62
+ }
63
+ export type AgentAuditLogUpdateType = 'statusUpdate' | 'response';
64
+ /** Agent audit log update entry - status updates and responses for agent invocations */
65
+ export interface AgentAuditLogUpdateEvent {
66
+ appId: AppId;
67
+ agentId: string;
68
+ jobId: string;
69
+ statusUpdateId: string;
70
+ title: string;
71
+ parentStatusUpdateId?: string;
72
+ tags: Record<string, string>;
73
+ body: string;
74
+ type: AgentAuditLogUpdateType;
75
+ createdAt: Date;
76
+ }
54
77
  /** Tag for metric events. Value: '0' - not an error, '1' - is an error. */
55
78
  export declare const O11Y_TAG_IS_ERROR = "isError";
56
79
  /** Tag for log events. Metrics have an explicit appId field. */
@@ -9,6 +9,8 @@ export interface ShortUrlRequest {
9
9
  appId: AppId;
10
10
  /** Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 1 day. */
11
11
  secondsToLive?: number;
12
+ /** Optional file extension to include in the shortened URL ID (e.g., 'pdf', 'html'). The extension becomes part of the ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
13
+ fileExtension?: string;
12
14
  }
13
15
  /**
14
16
  * Request to create shortened URLs.
@@ -20,6 +22,8 @@ export interface ShortUrlBulkRequest {
20
22
  appId: AppId;
21
23
  /** Seconds to live for all shortened URLs. If set to 0, the URLs will never expire. Defaults to 1 day. */
22
24
  secondsToLive?: number;
25
+ /** Optional file extension to include in all shortened URL IDs (e.g., 'pdf', 'html'). The extension becomes part of each ID, so 'abc123.pdf' and 'abc123.jpg' are distinct URLs. */
26
+ fileExtension?: string;
23
27
  }
24
28
  /**
25
29
  * Request to delete a shortened URL.
@@ -0,0 +1,2 @@
1
+ /** Gets file extension from filename. */
2
+ export declare function getFileExtension(filename: string): string | undefined;
@@ -56,3 +56,31 @@ export declare function getSortedEntries<T>(record: Record<string, T>): Array<[s
56
56
  /** Removes top level fields which are empty objects. May be used for value formatting. */
57
57
  export declare function removeEmptyTopLevelRecords<T extends object>(record: T): Partial<T>;
58
58
  export declare function removeUndefinedValues<V>(tags: Record<string, V | undefined>): Record<string, V>;
59
+ export declare function extractKey(line: string | undefined): string | null;
60
+ /** Represents a line in a diff output */
61
+ export interface DiffLine {
62
+ lineNumber: number;
63
+ text: string;
64
+ type: 'unchanged' | 'added' | 'removed' | 'changed';
65
+ }
66
+ /** Result of computing a line-by-line diff between two objects */
67
+ export interface DiffResult {
68
+ leftLines: Array<DiffLine>;
69
+ rightLines: Array<DiffLine>;
70
+ hasChanges: boolean;
71
+ }
72
+ /**
73
+ * Computes a line-by-line diff between two objects.
74
+ * Objects are serialized to JSON with sorted keys for consistent comparison.
75
+ * @param before The previous/left object (can be undefined for new objects)
76
+ * @param after The current/right object
77
+ * @returns DiffResult with left and right lines and whether there are changes
78
+ */
79
+ export declare function computeObjectDiff(before: unknown, after: unknown): DiffResult;
80
+ /**
81
+ * Formats an object as diff lines (all unchanged).
82
+ * Useful for displaying a single object without comparison.
83
+ * @param obj The object to format
84
+ * @returns Array of DiffLine with all lines marked as unchanged
85
+ */
86
+ export declare function formatObjectAsLines(obj: unknown): Array<DiffLine>;
@@ -1,3 +1,4 @@
1
+ export declare function sortKeys(json: unknown): any;
1
2
  export declare function normalizeJsonAsString(json: unknown): string;
2
3
  export declare function serializeObj(obj: unknown): string;
3
4
  export declare function deserializeObj<T = any>(str: string): T;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AiAgent, AiChatMessage, AiChatModelSelection, AiConnectedAgentMetadata, AiStatusMessage, AiTranscribeAndAskResponse, AllAiAgentChatOptions, GuardrailsOptions, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
2
+ import { AiAgent, AiChatMessage, AiChatModelSelection, AiConnectedAgentMetadata, AiStatusMessage, AiTranscribeAndAskResponse, AllAiAgentChatOptions, GuardrailsOptions, ListAgentRevisionsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
3
3
  import { AiChatModelName } from '../../../internal-common/src/public-types/ai-common.public-types';
4
4
  import { JobId } from '../../../internal-common/src/public-types/job.public-types';
5
5
  import { Paths } from '../../../internal-common/src/public-types/typescript.public-types';
@@ -72,6 +72,22 @@ export declare class AiAgentReference {
72
72
  * @returns the api key if one exists
73
73
  */
74
74
  getApiKey(): Promise<string | undefined>;
75
+ /**
76
+ * Lists all revisions (history) of the agent.
77
+ * @returns the list of revisions sorted by newest first
78
+ */
79
+ listRevisions(): Promise<ListAgentRevisionsResponse>;
80
+ /**
81
+ * Restores the agent to a previous revision.
82
+ * This will create a new revision with the current state before restoring.
83
+ * @param revisionNumber The revision number to restore to
84
+ */
85
+ restoreRevision(revisionNumber: number): Promise<void>;
86
+ /**
87
+ * Deletes a specific revision.
88
+ * @param revisionNumber The revision number to delete
89
+ */
90
+ deleteRevision(revisionNumber: number): Promise<void>;
75
91
  /**
76
92
  * Sends a prompt to the agent and receives streamed text responses.
77
93
  * @param prompt The text prompt to send to the agent.
@@ -1,7 +1,6 @@
1
1
  import { AiQueryOptions, AiQueryResponse, ExecuteAiApiResponse } from '../../internal-common/src/public-types/ai-query.public-types';
2
2
  import { AiAgentClientOptions } from './agent/ai-agent-client';
3
3
  import { AiAgentReference } from './agent/ai-agent-client-reference';
4
- import { AiAssistantClient } from './ai-assistant-client';
5
4
  import { AiAudioClient } from './ai-audio-client';
6
5
  import { AiFilesClient } from './ai-files-client';
7
6
  import { AiImageClient } from './ai-image-client';
@@ -19,7 +18,6 @@ export declare class AiClient {
19
18
  private readonly rpcManager;
20
19
  private readonly jobClient;
21
20
  private readonly backendFunctionManager;
22
- private readonly aiAssistantClient;
23
21
  private aiAgentClient?;
24
22
  private aiKnowledgeBaseClient?;
25
23
  /**
@@ -39,11 +37,6 @@ export declare class AiClient {
39
37
  * Lists all available AI agents.
40
38
  */
41
39
  listKnowledgeBases(): Promise<Array<AiKnowledgeBase>>;
42
- /**
43
- * Retrieves the AI assistant client.
44
- * @returns An instance of AiAssistantClient.
45
- */
46
- assistant(): AiAssistantClient;
47
40
  /**
48
41
  * Retrieves an AI image client.
49
42
  */
@@ -2,7 +2,6 @@ export * from './admin-client';
2
2
  export * from './agent/ai-agent-client';
3
3
  export * from './agent/ai-agent-client-reference';
4
4
  export * from './agent/ai-agent-client.types';
5
- export * from './ai-assistant-client';
6
5
  export * from './ai-audio-client';
7
6
  export * from './ai-client';
8
7
  export * from './ai-files-client';
@@ -30,7 +29,6 @@ export * from './execute-function-options';
30
29
  export * from './external-auth-client';
31
30
  export * from './extraction-client';
32
31
  export * from './file-args-transformer';
33
- export * from './file-utils';
34
32
  export * from './integration-client';
35
33
  export * from './job-client';
36
34
  export * from './mutation/mutation-sender';
@@ -1,6 +1,5 @@
1
1
  export * from '../../internal-common/src/public-types/ai-agent-integrations.public-types';
2
2
  export * from '../../internal-common/src/public-types/ai-agent.public-types';
3
- export * from '../../internal-common/src/public-types/ai-assistant.public-types';
4
3
  export * from '../../internal-common/src/public-types/ai-common.public-types';
5
4
  export * from '../../internal-common/src/public-types/ai-knowledge-base.public-types';
6
5
  export * from '../../internal-common/src/public-types/ai-matchmaking.public-types';
@@ -2,4 +2,4 @@
2
2
  * The current version of the SquidCloud client package.
3
3
  * @category Platform
4
4
  */
5
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.424";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.425";
@@ -1,4 +1,4 @@
1
- import { WebAiSearchResponse, WebShortUrlBulkResponse, WebShortUrlResponse } from '../../internal-common/src/public-types/web.public-types';
1
+ import { CreateShortUrlOptions, CreateShortUrlsOptions, WebAiSearchResponse, WebShortUrlBulkResponse, WebShortUrlResponse } from '../../internal-common/src/public-types/web.public-types';
2
2
  /**
3
3
  * WebClient provides methods to interact with web-related functionalities.
4
4
  * @category Platform
@@ -9,6 +9,8 @@ export declare class WebClient {
9
9
  private readonly appId;
10
10
  private readonly apiKey;
11
11
  private readonly consoleRegion;
12
+ /** Headers for short URL API requests. Only use after asserting apiKey is defined. */
13
+ private get shortUrlHeaders();
12
14
  /**
13
15
  * Search the web using AI. Returns a response containing Markdown text and cited URLs.
14
16
  * @param query The keywords or query string to search for.
@@ -22,28 +24,21 @@ export declare class WebClient {
22
24
  /**
23
25
  * Creates a shortened URL for the given URL.
24
26
  *
25
- * Defaults to a 1 day expiration if no expiry is provided via the `secondsToLive` field.
27
+ * Defaults to a 1-day expiration if no expiry is provided via the `secondsToLive` field.
26
28
  * If `secondsToLive` is set to 0, the URL will never expire.
27
29
  *
28
- * @param url The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or
29
- * https://).
30
- * @param secondsToLive Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 30
31
- * days.
30
+ * @param urlOrOptions - Either a URL string or an options object with url and all available options.
32
31
  */
33
- createShortUrl(url: string, secondsToLive?: number): Promise<WebShortUrlResponse>;
32
+ createShortUrl(urlOrOptions: string | CreateShortUrlOptions): Promise<WebShortUrlResponse>;
34
33
  /**
35
34
  * Creates shortened URLs for the given URLs.
36
35
  *
37
- * Defaults to a 1 day expiration if no expiry is provided via the `secondsToLive` field.
36
+ * Defaults to a 1-day expiration if no expiry is provided via the `secondsToLive` field.
38
37
  * If `secondsToLive` is set to 0, the URL will never expire.
39
38
  *
40
- * The parameter arrays should be of the same length and in the same order
41
- *
42
- * @param urls The URLs to shorten. It must be a valid URL and should include the protocol (start with http:// or
43
- * https://).
44
- * @param secondsToLive Seconds to live for each shortened URL. If set to 0, the URL will never expire.
39
+ * @param urlsOrOptions - Either an array of URL strings or an options object and all available options.
45
40
  */
46
- createShortUrls(urls: string[], secondsToLive?: number): Promise<WebShortUrlBulkResponse>;
41
+ createShortUrls(urlsOrOptions: string[] | CreateShortUrlsOptions): Promise<WebShortUrlBulkResponse>;
47
42
  /**
48
43
  * Deletes a shortened URL by its ID.
49
44
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.424",
3
+ "version": "1.0.425",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,31 +0,0 @@
1
- import { AiReasoningEffort } from './ai-agent.public-types';
2
- import { OpenAiChatModelName } from './ai-common.public-types';
3
- import { AiFunctionId } from './backend.public-types';
4
- /**
5
- * Response format for AI assistant responses.
6
- * @category AI
7
- */
8
- export type AiAssistantResponseFormat = 'text' | 'json_object';
9
- /**
10
- * The type of assistant tool.
11
- * @category AI
12
- */
13
- export type AssistantToolType = 'code_interpreter' | 'file_search';
14
- /**
15
- * The options for configuring an AI assistant's behavior and response.
16
- * @category AI
17
- */
18
- export interface QueryAssistantOptions {
19
- /** Additional context provided to all AI functions for processing. */
20
- agentContext?: Record<string, unknown>;
21
- /** Specific context provided per AI function, keyed by function ID. */
22
- functionContexts?: Record<AiFunctionId, Record<string, unknown>>;
23
- /** The desired format of the AI model's response; defaults to 'text'. */
24
- responseFormat?: AiAssistantResponseFormat;
25
- /** The OpenAI chat model to use for the assistant, if specified. */
26
- model?: OpenAiChatModelName;
27
- /** The level of reasoning effort to apply, as defined by OpenAI. */
28
- reasoningEffort?: AiReasoningEffort;
29
- /** Custom instructions to guide the assistant's behavior, if provided. */
30
- instructions?: string;
31
- }