@squidcloud/client 1.0.424 → 1.0.426
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.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +2 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +83 -5
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +12 -15
- package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +27 -14
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +3 -3
- package/dist/internal-common/src/public-types/web.public-types.d.ts +26 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +17 -1
- package/dist/typescript-client/src/ai-client.d.ts +0 -7
- package/dist/typescript-client/src/index.d.ts +0 -2
- package/dist/typescript-client/src/public-types.d.ts +0 -1
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/dist/typescript-client/src/web-client.d.ts +9 -14
- package/package.json +1 -1
- package/dist/internal-common/src/metric-name.d.ts +0 -9
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +0 -31
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -30
- package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -148
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -72
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -177
- package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -199
- package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
- package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +0 -202
- package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -59
- package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
- package/dist/internal-common/src/types/communication.types.d.ts +0 -1
- package/dist/internal-common/src/types/document.types.d.ts +0 -1
- package/dist/internal-common/src/types/file.types.d.ts +0 -6
- package/dist/internal-common/src/types/headers.types.d.ts +0 -17
- package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
- package/dist/internal-common/src/types/notification.types.d.ts +0 -5
- package/dist/internal-common/src/types/observability.types.d.ts +0 -78
- package/dist/internal-common/src/types/query.types.d.ts +0 -13
- package/dist/internal-common/src/types/secret.types.d.ts +0 -7
- package/dist/internal-common/src/types/socket.types.d.ts +0 -1
- package/dist/internal-common/src/types/stage.d.ts +0 -9
- package/dist/internal-common/src/types/time-units.d.ts +0 -1
- package/dist/internal-common/src/types/url-shortener.types.d.ts +0 -41
- package/dist/internal-common/src/utils/array.d.ts +0 -7
- package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
- package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
- package/dist/internal-common/src/utils/http.d.ts +0 -5
- package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
- package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
- package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
- package/dist/internal-common/src/utils/object.d.ts +0 -58
- package/dist/internal-common/src/utils/serialization.d.ts +0 -17
- package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
- package/dist/internal-common/src/utils/trace-id-generator.d.ts +0 -1
- package/dist/internal-common/src/utils/validation.d.ts +0 -19
- package/dist/internal-common/src/websocket.impl.d.ts +0 -26
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +0 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +0 -72
- 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,
|
|
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';
|
|
@@ -457,6 +457,12 @@ export interface BaseAiChatOptions {
|
|
|
457
457
|
* Note: Only supported by OpenAI and Gemini models. Ignored for other providers.
|
|
458
458
|
*/
|
|
459
459
|
useCodeInterpreter?: 'none' | 'llm';
|
|
460
|
+
/**
|
|
461
|
+
* File IDs to include in the chat context.
|
|
462
|
+
* These are IDs returned from the AI provider's Files API after uploading files.
|
|
463
|
+
* Files are attached to the conversation and can be read/analyzed by the AI.
|
|
464
|
+
*/
|
|
465
|
+
fileIds?: string[];
|
|
460
466
|
}
|
|
461
467
|
/**
|
|
462
468
|
* Chat options specific to Gemini models, extending base options.
|
|
@@ -560,17 +566,14 @@ export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
|
|
|
560
566
|
auditLog?: boolean;
|
|
561
567
|
/** The default chat options for the agent, overridable by the user during use. */
|
|
562
568
|
options: AiChatOptions<T>;
|
|
563
|
-
/** The embedding model name used by the agent. */
|
|
564
|
-
embeddingModelName: AiEmbeddingsModelName;
|
|
565
569
|
/** Optional api key used specifically for operations on this agent */
|
|
566
570
|
apiKey?: string;
|
|
567
571
|
}
|
|
568
572
|
/**
|
|
569
573
|
* @category AI
|
|
570
574
|
*/
|
|
571
|
-
export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'
|
|
575
|
+
export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
|
|
572
576
|
options?: AiChatOptions;
|
|
573
|
-
embeddingModelName?: AiEmbeddingsModelName;
|
|
574
577
|
};
|
|
575
578
|
/**
|
|
576
579
|
* A status message from an AI agent operation.
|
|
@@ -892,4 +895,79 @@ export interface AiGenerateImageRequest {
|
|
|
892
895
|
/** Options for image generation */
|
|
893
896
|
options?: AiGenerateImageOptions;
|
|
894
897
|
}
|
|
898
|
+
/**
|
|
899
|
+
* Revision action types for agent history tracking.
|
|
900
|
+
* @category AI
|
|
901
|
+
*/
|
|
902
|
+
export type AiAgentRevisionAction = 'created' | 'updated' | 'deleted';
|
|
903
|
+
/**
|
|
904
|
+
* Represents a single agent revision entry.
|
|
905
|
+
* @category AI
|
|
906
|
+
*/
|
|
907
|
+
export interface AiAgentRevision {
|
|
908
|
+
/** The ID of the agent this revision belongs to. */
|
|
909
|
+
agentId: AiAgentId;
|
|
910
|
+
/** The revision number, incremented for each change to the agent. */
|
|
911
|
+
revisionNumber: number;
|
|
912
|
+
/** The action that triggered this revision (created, updated, or deleted). */
|
|
913
|
+
action: AiAgentRevisionAction;
|
|
914
|
+
/** Timestamp when this revision was created. */
|
|
915
|
+
createdAt: Date;
|
|
916
|
+
/** Snapshot of the agent data at the time of the revision. */
|
|
917
|
+
agentSnapshot: AiAgent;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Request to list all revisions for an agent.
|
|
921
|
+
* @category AI
|
|
922
|
+
*/
|
|
923
|
+
export interface ListAgentRevisionsRequest {
|
|
924
|
+
/** The ID of the agent to list revisions for. */
|
|
925
|
+
agentId: AiAgentId;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Response containing the list of agent revisions.
|
|
929
|
+
* @category AI
|
|
930
|
+
*/
|
|
931
|
+
export interface ListAgentRevisionsResponse {
|
|
932
|
+
/** The list of revisions for the agent, sorted by revision number descending. */
|
|
933
|
+
revisions: Array<AiAgentRevision>;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Request to get a specific agent revision.
|
|
937
|
+
* @category AI
|
|
938
|
+
*/
|
|
939
|
+
export interface GetAgentRevisionRequest {
|
|
940
|
+
/** The ID of the agent to get the revision for. */
|
|
941
|
+
agentId: AiAgentId;
|
|
942
|
+
/** The revision number to retrieve. */
|
|
943
|
+
revisionNumber: number;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Response containing a specific agent revision.
|
|
947
|
+
* @category AI
|
|
948
|
+
*/
|
|
949
|
+
export interface GetAgentRevisionResponse {
|
|
950
|
+
/** The requested revision, or undefined if not found. */
|
|
951
|
+
revision: AiAgentRevision | undefined;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Request to restore an agent to a specific revision.
|
|
955
|
+
* @category AI
|
|
956
|
+
*/
|
|
957
|
+
export interface RestoreAgentRevisionRequest {
|
|
958
|
+
/** The ID of the agent to restore. */
|
|
959
|
+
agentId: AiAgentId;
|
|
960
|
+
/** The revision number to restore the agent to. */
|
|
961
|
+
revisionNumber: number;
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Request to delete a specific agent revision.
|
|
965
|
+
* @category AI
|
|
966
|
+
*/
|
|
967
|
+
export interface DeleteAgentRevisionRequest {
|
|
968
|
+
/** The ID of the agent whose revision should be deleted. */
|
|
969
|
+
agentId: AiAgentId;
|
|
970
|
+
/** The revision number to delete. */
|
|
971
|
+
revisionNumber: number;
|
|
972
|
+
}
|
|
895
973
|
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 ["
|
|
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-
|
|
32
|
+
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3-pro", "gemini-3-flash", "gemini-2.5-flash-lite"];
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
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-
|
|
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-
|
|
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 ["
|
|
49
|
-
/**
|
|
50
|
-
|
|
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
|
*/
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import { AiChatOptions, AiSessionContext } from './ai-agent.public-types';
|
|
2
2
|
import { ApiOptions } from './api-client.public-types';
|
|
3
3
|
import { AiAgentId, IntegrationId } from './communication.public-types';
|
|
4
|
-
/**
|
|
5
|
-
* Request to execute an AI query using a specific integration.
|
|
6
|
-
* Supports additional query execution options.
|
|
7
|
-
* @category AI
|
|
8
|
-
*/
|
|
9
|
-
export interface AiQueryRequest {
|
|
10
|
-
/** ID of the integration to execute the AI query. */
|
|
11
|
-
integrationId: IntegrationId;
|
|
12
|
-
/** User-provided prompt for the AI query. */
|
|
13
|
-
prompt: string;
|
|
14
|
-
/** Additional options for query execution. */
|
|
15
|
-
options?: AiQueryOptions;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* Options for configuring AI query execution.
|
|
19
|
-
* Includes instructions, model overrides, and additional execution settings.
|
|
20
6
|
* @category AI
|
|
21
7
|
*/
|
|
22
8
|
export interface AiQueryOptions {
|
|
@@ -38,6 +24,19 @@ export interface AiQueryOptions {
|
|
|
38
24
|
/** Session information for the AI query execution. */
|
|
39
25
|
sessionContext?: AiSessionContext;
|
|
40
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Request to execute an AI query using a specific integration.
|
|
29
|
+
* Supports additional query execution options.
|
|
30
|
+
* @category AI
|
|
31
|
+
*/
|
|
32
|
+
export interface AiQueryRequest {
|
|
33
|
+
/** ID of the integration to execute the AI query. */
|
|
34
|
+
integrationId: IntegrationId;
|
|
35
|
+
/** User-provided prompt for the AI query. */
|
|
36
|
+
prompt: string;
|
|
37
|
+
/** Additional options for query execution. */
|
|
38
|
+
options?: AiQueryOptions;
|
|
39
|
+
}
|
|
41
40
|
/**
|
|
42
41
|
* Options for the collection selection stage.
|
|
43
42
|
*
|
|
@@ -77,6 +76,12 @@ export interface AiQueryGenerateQueryOptions {
|
|
|
77
76
|
* If provided, the AI Query process will use this agent to generate a query.
|
|
78
77
|
*/
|
|
79
78
|
agentId?: AiAgentId;
|
|
79
|
+
/**
|
|
80
|
+
* When enabled, allows the AI to ask for clarification instead of attempting to generate
|
|
81
|
+
* a query when the request is ambiguous, too complex, or impossible to answer with the
|
|
82
|
+
* available schema. Default: false.
|
|
83
|
+
*/
|
|
84
|
+
allowClarification?: boolean;
|
|
80
85
|
}
|
|
81
86
|
/** Options for the query result analysis. */
|
|
82
87
|
export interface AiQueryAnalyzeResultsOptions {
|
|
@@ -107,6 +112,14 @@ export interface AiQueryResponse {
|
|
|
107
112
|
rawResultsUrl?: string;
|
|
108
113
|
/** Indicates whether the query execution was successful. */
|
|
109
114
|
success: boolean;
|
|
115
|
+
/** Indicates whether code interpreter was used to analyze the results. */
|
|
116
|
+
usedCodeInterpreter?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* When the AI needs clarification to generate a query, this field contains the clarification question.
|
|
119
|
+
* Only populated when `generateQueryOptions.allowClarification` is enabled and the AI determines
|
|
120
|
+
* it cannot generate a valid query without more information.
|
|
121
|
+
*/
|
|
122
|
+
clarificationQuestion?: string;
|
|
110
123
|
}
|
|
111
124
|
/**
|
|
112
125
|
* Details of an executed query, including the query text and result type.
|
|
@@ -1,16 +1,16 @@
|
|
|
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", "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", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce_crm", "sap_hana", "sentry", "servicenow", "snowflake", "spanner", "xata", "zendesk", "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", "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", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce_crm", "sap_hana", "sentry", "servicenow", "snowflake", "spanner", "xata", "zendesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible"];
|
|
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"
|
|
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 { 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';
|
|
@@ -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
|
|
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
|
|
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(
|
|
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
|
|
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
|
-
*
|
|
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(
|
|
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,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names of the Squid metrics.
|
|
3
|
-
* Should be in sync with MetricName.kt.
|
|
4
|
-
* See MetricName.kt for documentation on each value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ALL_SQUID_METRIC_NAMES: readonly ["squid_functionExecution_count", "squid_functionExecution_time", "squid_aiChatbotContext_size", "squid_aiChatbotChatInputTokens_count", "squid_aiChatbotChatOutputTokens_count", "squid_aiChatbotChatOutcome_count", "squid_aiImageGeneration_count", "squid_aiImageGeneration_time", "squid_aiRemoveBackground_count", "squid_aiRemoveBackground_time", "squid_aiAudioTranscribe_count", "squid_aiAudioTranscribe_time", "squid_aiAudioCreateSpeech_count", "squid_aiAudioCreateSpeech_time", "squid_aiIntegrationData_count", "squid_aiIntegrationData_time", "squid_aiIntegrationApi_count", "squid_aiIntegrationApi_time", "squid_apiControllerCall_count", "squid_apiControllerCall_time", "squid_aiContextUpsert_count", "squid_aiContextDelete_count", "squid_codeInitialization_count", "squid_codeInitialization_time", "squid_deleteApiKey_count", "squid_deleteApiKey_time", "squid_deleteSecret_count", "squid_deleteSecret_time", "squid_discoverGraphQLConnectionSchema_count", "squid_discoverGraphQLConnectionSchema_time", "squid_discoverOpenApiSchema_count", "squid_discoverOpenApiSchema_time", "squid_discoverOpenApiSchemaFromFile_count", "squid_discoverOpenApiSchemaFromFile_time", "squid_executeBackendFunction_count", "squid_executeBackendFunction_time", "squid_getAiChatbotProfiles_count", "squid_getAiChatbotProfiles_time", "squid_getAllApiKeys_count", "squid_getAllApiKeys_time", "squid_getAllSecrets_count", "squid_getAllSecrets_time", "squid_getAppApiKey_count", "squid_getAppApiKey_time", "squid_getSecret_count", "squid_getSecret_time", "squid_graphql_count", "squid_graphql_time", "squid_graphqlQuery_count", "squid_graphqlQuery_time", "squid_integrationCount_value", "squid_acquireLock_count", "squid_releaseLock_count", "squid_mutate_count", "squid_mutate_time", "squid_metricQuery_count", "squid_metricQuery_time", "squid_metricReport_count", "squid_metricReport_time", "squid_nativeQuery_count", "squid_nativeQuery_time", "squid_openapi_count", "squid_openapi_time", "squid_produceTopicMessage_count", "squid_produceTopicMessage_time", "squid_query_count", "squid_query_time", "squid_registerQuery_count", "squid_registerQuery_time", "squid_rerankChunks_count", "squid_rerankChunks_time", "squid_schedulerJob_count", "squid_schedulerJob_time", "squid_schema_size", "squid_secrets_entries", "squid_storageDeleteFiles_count", "squid_storageDeleteFiles_time", "squid_storageGetDownloadUrl_count", "squid_storageGetDownloadUrl_time", "squid_storageGetFileMetadata_count", "squid_storageGetFileMetadata_time", "squid_storageListDirectoryContents_count", "squid_storageListDirectoryContents_time", "squid_storageUploadFile_count", "squid_storageUploadFile_time", "squid_subscribeToTopic_count", "squid_subscribeToTopic_time", "squid_testGraphQLConnection_count", "squid_testGraphQLConnection_time", "squid_testAgentProtocolConnection_count", "squid_testAgentProtocolConnection_time", "squid_trigger_count", "squid_trigger_time", "squid_upsertApiKey_count", "squid_upsertApiKey_time", "squid_upsertSecret_count", "squid_upsertSecret_time", "squid_vectorChunks_count", "squid_vectorChunks_time", "squid_webhook_count", "squid_webhook_time"];
|
|
7
|
-
export type MetricName = (typeof ALL_SQUID_METRIC_NAMES)[number];
|
|
8
|
-
/** Common prefix for all Squid metrics. */
|
|
9
|
-
export declare const SQUID_METRIC_NAME_PREFIX = "squid_";
|
|
@@ -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
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ApiOptions } from '../public-types/api-client.public-types';
|
|
2
|
-
import { ApiEndpointId, HttpMethod } from '../public-types/api.public-types';
|
|
3
|
-
import { IntegrationId } from '../public-types/communication.public-types';
|
|
4
|
-
/** The headers of an API call. */
|
|
5
|
-
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
6
|
-
/** The context of an API call. */
|
|
7
|
-
export declare class ApiCallContext {
|
|
8
|
-
readonly integrationId: IntegrationId;
|
|
9
|
-
readonly endpointId: ApiEndpointId;
|
|
10
|
-
readonly url: string;
|
|
11
|
-
readonly method: HttpMethod;
|
|
12
|
-
readonly body: unknown;
|
|
13
|
-
readonly options: ApiOptions;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents a request to call an API through a specified integration and endpoint.
|
|
17
|
-
* Includes optional method override and additional request options.
|
|
18
|
-
*/
|
|
19
|
-
export interface CallApiRequest<BodyType = any> {
|
|
20
|
-
/** The identifier of the integration through which the API is called. */
|
|
21
|
-
integrationId: IntegrationId;
|
|
22
|
-
/** Target API endpoint to invoke. */
|
|
23
|
-
endpointId: ApiEndpointId;
|
|
24
|
-
/** Optional request payload. */
|
|
25
|
-
body?: BodyType;
|
|
26
|
-
/** Optional HTTP method override. Default is POST. */
|
|
27
|
-
overrideMethod?: HttpMethod;
|
|
28
|
-
/** Additional request options. */
|
|
29
|
-
options: ApiOptions;
|
|
30
|
-
}
|