@squidcloud/client 1.0.449 → 1.0.451

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.
@@ -24,7 +24,7 @@ export type AiFileProviderType = Extract<AiProviderType, 'openai' | 'gemini' | '
24
24
  * Public OpenAI chat model names (active models only).
25
25
  * @category AI
26
26
  */
27
- export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5-mini", "gpt-5-nano", "gpt-5.2", "gpt-5.2-pro"];
27
+ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5-mini", "gpt-5-nano", "gpt-5.2", "gpt-5.2-pro", "gpt-5.4"];
28
28
  /**
29
29
  * Public Gemini chat model names (active models only).
30
30
  * @category AI
@@ -44,7 +44,7 @@ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-haiku-4-5-202
44
44
  * The supported AI model names.
45
45
  * @category AI
46
46
  */
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-6", "claude-sonnet-4-6", "gemini-3-pro", "gemini-3-flash", "grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
47
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5-mini", "gpt-5-nano", "gpt-5.2", "gpt-5.2-pro", "gpt-5.4", "claude-haiku-4-5-20251001", "claude-opus-4-6", "claude-sonnet-4-6", "gemini-3-pro", "gemini-3-flash", "grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
48
48
  /** Checks if the given model name is a global AI chat model name. */
49
49
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
50
50
  /**
@@ -68,6 +68,31 @@ export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-smal
68
68
  * @category AI
69
69
  */
70
70
  export declare function isAiEmbeddingsModelName(modelName: unknown): modelName is AiEmbeddingsModelName;
71
+ /**
72
+ * Represents an embedding model provided by an OpenAI-compatible integration.
73
+ * Unlike chat's `IntegrationModelSpec`, this includes `dimensions` because the same
74
+ * embedding model can be configured with different output dimensions.
75
+ * @category AI
76
+ */
77
+ export interface IntegrationEmbeddingModelSpec {
78
+ /** The ID of the integration providing the embedding model. */
79
+ integrationId: string;
80
+ /** The model name as recognized by the provider. */
81
+ model: string;
82
+ /** The number of dimensions in the embedding vector output. */
83
+ dimensions: number;
84
+ }
85
+ /**
86
+ * Type guard for `IntegrationEmbeddingModelSpec`.
87
+ * @category AI
88
+ */
89
+ export declare function isIntegrationEmbeddingModelSpec(model: unknown): model is IntegrationEmbeddingModelSpec;
90
+ /**
91
+ * Type for specifying which embedding model to use.
92
+ * Can be either a vendor model name (string) or an integration-based embedding model (object).
93
+ * @category AI
94
+ */
95
+ export type AiEmbeddingsModelSelection = AiEmbeddingsModelName | IntegrationEmbeddingModelSpec;
71
96
  /**
72
97
  * The supported AI image generation model names.
73
98
  * @category AI
@@ -1,5 +1,5 @@
1
1
  import { AgentContextRequest, AiChatModelSelection, UpsertContextStatusError } from './ai-agent.public-types';
2
- import { AiEmbeddingsModelName, AiRerankProvider } from './ai-common.public-types';
2
+ import { AiEmbeddingsModelSelection, AiRerankProvider } from './ai-common.public-types';
3
3
  import { AiContextId, AiKnowledgeBaseId, AppId } from './communication.public-types';
4
4
  import { DocumentExtractionMethod } from './extraction.public-types';
5
5
  /**
@@ -15,8 +15,8 @@ export interface AiKnowledgeBase {
15
15
  description: string;
16
16
  /** A set of predefined metadata fields for the knowledge base that can be used for filtering.*/
17
17
  metadataFields: Array<AiKnowledgeBaseMetadataField>;
18
- /** The embedding model name that should be used for this knowledge base.*/
19
- embeddingModel: AiEmbeddingsModelName;
18
+ /** The embedding model that should be used for this knowledge base.*/
19
+ embeddingModel: AiEmbeddingsModelSelection;
20
20
  /** The model name that should be used when asking questions of this knowledge base. */
21
21
  chatModel: AiChatModelSelection;
22
22
  /** The timestamp the knowledge base was last updated */
@@ -379,12 +379,13 @@ export interface AiKnowledgeBaseDownloadContextResponse {
379
379
  url?: string;
380
380
  }
381
381
  /**
382
- * KnowledgeBase with optional chatModel param, used during upsert
382
+ * KnowledgeBase with optional fields, used during upsert
383
383
  * @category AI
384
384
  */
385
- export type AiKnowledgeBaseWithOptionalChatModel = Omit<AiKnowledgeBase, 'chatModel'> & {
385
+ export type AiEmbeddingsModelWithOptionalFields = Omit<AiKnowledgeBase, 'chatModel' | 'embeddingModel'> & {
386
386
  chatModel?: AiKnowledgeBase['chatModel'];
387
387
  name?: string;
388
+ embeddingModel?: AiEmbeddingsModelSelection;
388
389
  };
389
390
  /**
390
391
  * API request for deleting an AiKnowledgeBase
@@ -400,7 +401,7 @@ export interface DeleteAiKnowledgeBaseRequest {
400
401
  */
401
402
  export interface UpsertAiKnowledgeBaseRequest {
402
403
  /** The AiKnowledgeBase to upsert */
403
- knowledgeBase: Omit<AiKnowledgeBaseWithOptionalChatModel, 'appId' | 'updatedAt'>;
404
+ knowledgeBase: Omit<AiEmbeddingsModelWithOptionalFields, 'appId' | 'updatedAt'>;
404
405
  }
405
406
  /**
406
407
  * API request for deleting AiKnowledgeBaseContexts
@@ -33,6 +33,10 @@ export interface AiQueryOptions {
33
33
  sessionContext?: PartialBy<AiSessionContext, 'agentId'>;
34
34
  /** memory options */
35
35
  memoryOptions?: AiAgentMemoryOptions;
36
+ /** When true, returns generated queries without executing or analyzing them. Default: false. */
37
+ generateQueriesOnly?: boolean;
38
+ /** Optional AI validation of generated queries. Can be used independently or with generateQueriesOnly. */
39
+ validateWithAiOptions?: AiQueryValidateWithAiOptions;
36
40
  }
37
41
  /**
38
42
  * Request to execute an AI query using a specific integration.
@@ -110,6 +114,16 @@ export interface AiQueryAnalyzeResultsOptions {
110
114
  */
111
115
  agentId?: AiAgentId;
112
116
  }
117
+ /**
118
+ * Options for AI-based validation of generated queries.
119
+ * @category AI
120
+ */
121
+ export interface AiQueryValidateWithAiOptions {
122
+ /** Whether AI validation is enabled. */
123
+ enabled: boolean;
124
+ /** Defaults to the same model used for query generation. */
125
+ aiOptions?: AiChatOptions;
126
+ }
113
127
  /**
114
128
  * Information about an executed query.
115
129
  * @category AI
@@ -48,3 +48,14 @@ export type LlmModelMetadata = {
48
48
  /** Total context window size: input (aka prompt) + output (aka completion) tokens combined. */
49
49
  contextWindowTokens: number;
50
50
  };
51
+ /**
52
+ * Stats about a given embedding model.
53
+ */
54
+ export type EmbeddingModelMetadata = {
55
+ /** A friendly name for the model, to display in UIs. */
56
+ displayName: string;
57
+ /** The number of dimensions produced by this embedding model. */
58
+ dimensions: number;
59
+ /** Maximum input tokens per request. */
60
+ maxTokens: number;
61
+ };
@@ -1,6 +1,6 @@
1
1
  import { IntegrationId } from './communication.public-types';
2
2
  /** List of all integration types supported by Squid. */
3
- export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible"];
3
+ export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding"];
4
4
  /**
5
5
  * @category Database
6
6
  */
@@ -36,7 +36,7 @@ export declare class AiClient {
36
36
  */
37
37
  listAgents(): Promise<Array<AiAgent>>;
38
38
  /**
39
- * Lists all available AI agents.
39
+ * Lists all available AI Knowledge Bases.
40
40
  */
41
41
  listKnowledgeBases(): Promise<Array<AiKnowledgeBase>>;
42
42
  /**
@@ -1,4 +1,4 @@
1
- import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
1
+ import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
2
2
  import { AiContextId } from '../../../internal-common/src/public-types/communication.public-types';
3
3
  /**
4
4
  * Parameters for creating or updating an AI agent.
@@ -27,7 +27,7 @@ export declare class AiKnowledgeBaseReference {
27
27
  * Upserts the AI knowledge base.
28
28
  * @param knowledgeBase
29
29
  */
30
- upsertKnowledgeBase(knowledgeBase: Omit<AiKnowledgeBaseWithOptionalChatModel, 'id' | 'appId' | 'updatedAt'>): Promise<void>;
30
+ upsertKnowledgeBase(knowledgeBase: Omit<AiEmbeddingsModelWithOptionalFields, 'id' | 'appId' | 'updatedAt'>): Promise<void>;
31
31
  /**
32
32
  * Deletes the AI knowledge base.
33
33
  * @returns A promise that resolves when the deletion is complete.
@@ -4,6 +4,11 @@ import { Observable } from 'rxjs';
4
4
  * @category Platform
5
5
  */
6
6
  export interface DistributedLockOptions {
7
+ /**
8
+ * The maximum time to wait for the lock to be acquired on the server.
9
+ * @default 2000.
10
+ */
11
+ acquisitionTimeoutMillis?: number;
7
12
  /**
8
13
  * The maximum time the lock can be held before it is automatically released.
9
14
  * If not specified, the lock will be held until explicitly released or the connection is lost.
@@ -1,4 +1,6 @@
1
1
  import { Alias, SquidDocument } from '../public-types';
2
+ /** Two transactions cannot run in parallel - this mutex is used for blocking a second transaction. */
3
+ export declare const RUN_IN_TRANSACTION_MUTEX = "dataManager_runInTransaction";
2
4
  /**
3
5
  * Represents a collection of documents associated with a specific alias
4
6
  * in a query, typically used in joined query results.
@@ -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.449";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.451";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.449",
3
+ "version": "1.0.451",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,11 +19,9 @@
19
19
  "keep-only-public-types": "del-cli 'dist/internal-common/src/**' '!dist/internal-common/src/public-types' '!dist/internal-common/src/public-utils'",
20
20
  "check-public-types": "tsc -p tsconfig.types.json",
21
21
  "check-bundle-size": "node check-bundle-size.js",
22
- "test": "jest --detectOpenHandles",
23
- "test:watch": "jest --watch",
24
- "test:cov": "jest --coverage",
25
- "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
26
- "test:e2e": "jest --config ./test/jest-e2e.json",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest watch",
24
+ "test:cov": "vitest run --coverage",
27
25
  "publish:public": "npm run build && npm publish --access public",
28
26
  "full-bundle-size-report": "cross-env BUILD_FULL_BUNDLE_SIZE_REPORT=1 webpack --mode=production",
29
27
  "generate-docs-html": "typedoc",