@squidcloud/client 1.0.425 → 1.0.427

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.
@@ -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.
@@ -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
  *
@@ -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", "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
  */
@@ -50,7 +50,7 @@ export declare function invert<K extends string | number, V extends string | num
50
50
  */
51
51
  export declare function range(start: number, end: number, step: number, maximumNumberOfItems?: number): number[];
52
52
  /** Returns count of top level properties in object. */
53
- export declare function countObjectKeys(obj: object | undefined): number;
53
+ export declare function countObjectKeys(obj: object | undefined | null): number;
54
54
  /** Returns object entries sorted by name. */
55
55
  export declare function getSortedEntries<T>(record: Record<string, T>): Array<[string, T]>;
56
56
  /** Removes top level fields which are empty objects. May be used for value formatting. */
@@ -57,4 +57,276 @@ export declare class IntegrationClient {
57
57
  * @returns A promise that resolves when the operation is complete.
58
58
  */
59
59
  upsertIntegration<ConfigurationType = Record<string, any>>(integration: IntegrationInfo<ConfigurationType>): Promise<void>;
60
+ /**
61
+ * Generates AI descriptions for the data schema of an integration.
62
+ * Uses AI to analyze the schema structure and generate meaningful descriptions
63
+ * for collections and their fields.
64
+ *
65
+ * @param integrationId - The ID of the integration.
66
+ * @param request - The request containing schema and optional parameters.
67
+ * @returns A promise that resolves with the schema containing AI-generated descriptions.
68
+ */
69
+ generateAiDescriptionsForDataSchema<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: GenerateAiDescriptionsForDataSchemaRequest<SchemaType>): Promise<GenerateAiDescriptionsForDataSchemaResponse<SchemaType>>;
70
+ /**
71
+ * Generates AI descriptions for associations (relationships) in a data schema.
72
+ * Uses AI to analyze entity relationships and generate meaningful descriptions.
73
+ *
74
+ * @param integrationId - The ID of the integration.
75
+ * @param request - The request containing schema with associations and optional parameters.
76
+ * @returns A promise that resolves with the schema containing AI-generated association descriptions.
77
+ */
78
+ generateAiDescriptionsForAssociations<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: GenerateAiDescriptionsForAssociationsRequest<SchemaType>): Promise<GenerateAiDescriptionsForSchemaResponse<SchemaType>>;
79
+ /**
80
+ * Generates AI descriptions for stored procedures in a data schema.
81
+ * Uses AI to analyze stored procedures and generate meaningful descriptions.
82
+ *
83
+ * @param integrationId - The ID of the integration.
84
+ * @param request - The request containing schema with stored procedures and optional parameters.
85
+ * @returns A promise that resolves with the schema containing AI-generated stored procedure descriptions.
86
+ */
87
+ generateAiDescriptionsForStoredProcedures<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: GenerateAiDescriptionsForStoredProceduresRequest<SchemaType>): Promise<GenerateAiDescriptionsForSchemaResponse<SchemaType>>;
88
+ /**
89
+ * Generates AI descriptions for API endpoints in an API schema.
90
+ * Uses AI to analyze endpoints and generate meaningful descriptions.
91
+ *
92
+ * @param integrationId - The ID of the integration.
93
+ * @param request - The request containing API schema with endpoints and optional parameters.
94
+ * @returns A promise that resolves with the schema containing AI-generated endpoint descriptions.
95
+ */
96
+ generateAiDescriptionsForEndpoints<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: GenerateAiDescriptionsForEndpointsRequest<SchemaType>): Promise<GenerateAiDescriptionsForSchemaResponse<SchemaType>>;
97
+ /**
98
+ * Discovers the schema of a data connection (database).
99
+ * Connects to the database and introspects its structure including tables, columns, and relationships.
100
+ *
101
+ * @param integrationId - The ID of the database integration.
102
+ * @returns A promise that resolves with the discovered schema and collection readiness information.
103
+ */
104
+ discoverDataConnectionSchema<SchemaType = Record<string, any>>(integrationId: IntegrationId): Promise<DiscoverDataConnectionSchemaResponse<SchemaType>>;
105
+ /**
106
+ * Discovers the schema of a GraphQL connection.
107
+ * Performs introspection on the GraphQL endpoint to discover types and operations.
108
+ *
109
+ * @param integrationId - The ID of the GraphQL integration.
110
+ * @param request - The request containing GraphQL connection options.
111
+ * @returns A promise that resolves with the discovered GraphQL schema.
112
+ */
113
+ discoverGraphQLConnectionSchema<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: DiscoverGraphQLConnectionSchemaRequest): Promise<DiscoverGraphQLConnectionSchemaResponse<SchemaType>>;
114
+ /**
115
+ * Discovers the schema from an OpenAPI specification URL.
116
+ * Fetches and parses the OpenAPI spec to discover endpoints and their schemas.
117
+ *
118
+ * @param integrationId - The ID of the API integration.
119
+ * @param request - The request containing OpenAPI discovery options.
120
+ * @returns A promise that resolves with the discovered API schema.
121
+ */
122
+ discoverOpenApiSchema<SchemaType = Record<string, any>>(integrationId: IntegrationId, request: DiscoverOpenApiSchemaRequest): Promise<DiscoverOpenApiSchemaResponse<SchemaType>>;
123
+ /**
124
+ * Discovers the schema from an uploaded OpenAPI specification file.
125
+ * Parses the OpenAPI spec file that was previously uploaded to the integration.
126
+ *
127
+ * @param integrationId - The ID of the API integration with the uploaded spec file.
128
+ * @returns A promise that resolves with the discovered API schema.
129
+ */
130
+ discoverOpenApiSchemaFromFile<SchemaType = Record<string, any>>(integrationId: IntegrationId): Promise<DiscoverOpenApiSchemaResponse<SchemaType>>;
131
+ }
132
+ /**
133
+ * Request for generating AI descriptions for a data schema.
134
+ * @category Platform
135
+ */
136
+ export interface GenerateAiDescriptionsForDataSchemaRequest<SchemaType = Record<string, any>> {
137
+ /**
138
+ * List of collection names to generate descriptions for.
139
+ * If not provided or empty, descriptions will be generated for all collections.
140
+ */
141
+ collections?: string[];
142
+ /**
143
+ * The current schema of the integration containing collections and their fields.
144
+ */
145
+ schema: SchemaType;
146
+ /**
147
+ * Optional instructions to guide the AI in generating descriptions.
148
+ * For example: "Focus on business context" or "Use technical terminology".
149
+ */
150
+ instructions?: string;
151
+ }
152
+ /**
153
+ * Response from generating AI descriptions for a data schema.
154
+ * @category Platform
155
+ */
156
+ export interface GenerateAiDescriptionsForDataSchemaResponse<SchemaType = Record<string, any>> {
157
+ /**
158
+ * The schema with AI-generated descriptions added to collections and fields.
159
+ */
160
+ schema: SchemaType;
161
+ }
162
+ /**
163
+ * Generic response from generating AI descriptions for a schema.
164
+ * @category Platform
165
+ */
166
+ export interface GenerateAiDescriptionsForSchemaResponse<SchemaType = Record<string, any>> {
167
+ /**
168
+ * The schema with AI-generated descriptions.
169
+ */
170
+ schema: SchemaType;
171
+ }
172
+ /**
173
+ * Request for generating AI descriptions for associations in a data schema.
174
+ * @category Platform
175
+ */
176
+ export interface GenerateAiDescriptionsForAssociationsRequest<SchemaType = Record<string, any>> {
177
+ /**
178
+ * List of association names to generate descriptions for.
179
+ * If not provided or empty, descriptions will be generated for all associations.
180
+ */
181
+ associations?: string[];
182
+ /**
183
+ * The current schema of the integration containing associations.
184
+ */
185
+ schema: SchemaType;
186
+ /**
187
+ * Optional instructions to guide the AI in generating descriptions.
188
+ */
189
+ instructions?: string;
190
+ }
191
+ /**
192
+ * Request for generating AI descriptions for stored procedures in a data schema.
193
+ * @category Platform
194
+ */
195
+ export interface GenerateAiDescriptionsForStoredProceduresRequest<SchemaType = Record<string, any>> {
196
+ /**
197
+ * List of stored procedure names to generate descriptions for.
198
+ * If not provided or empty, descriptions will be generated for all stored procedures.
199
+ */
200
+ storedProcedures?: string[];
201
+ /**
202
+ * The current schema of the integration containing stored procedures.
203
+ */
204
+ schema: SchemaType;
205
+ /**
206
+ * Optional instructions to guide the AI in generating descriptions.
207
+ */
208
+ instructions?: string;
209
+ }
210
+ /**
211
+ * Request for generating AI descriptions for API endpoints.
212
+ * @category Platform
213
+ */
214
+ export interface GenerateAiDescriptionsForEndpointsRequest<SchemaType = Record<string, any>> {
215
+ /**
216
+ * List of endpoint IDs to generate descriptions for.
217
+ * If not provided or empty, descriptions will be generated for all endpoints.
218
+ */
219
+ endpoints?: string[];
220
+ /**
221
+ * The current API schema containing endpoints.
222
+ */
223
+ schema: SchemaType;
224
+ /**
225
+ * Optional instructions to guide the AI in generating descriptions.
226
+ */
227
+ instructions?: string;
228
+ }
229
+ /**
230
+ * Response from discovering a data connection schema.
231
+ * @category Platform
232
+ */
233
+ export interface DiscoverDataConnectionSchemaResponse<SchemaType = Record<string, any>> {
234
+ /**
235
+ * The discovered schema containing collections, fields, associations, and stored procedures.
236
+ */
237
+ schema: SchemaType;
238
+ /**
239
+ * Information about collection readiness for CRUD operations and replication.
240
+ */
241
+ collectionReadiness: Record<string, CollectionReadiness>;
242
+ }
243
+ /**
244
+ * Information about a collection's readiness for operations.
245
+ * @category Platform
246
+ */
247
+ export interface CollectionReadiness {
248
+ /**
249
+ * Whether the user has permissions to perform CRUD operations on the collection.
250
+ */
251
+ hasPermissions: boolean;
252
+ /**
253
+ * Commands needed to grant the required permissions.
254
+ */
255
+ grantPermissionsCommands: string[];
256
+ /**
257
+ * Whether the collection is ready for external updates/replication.
258
+ */
259
+ replicationEnabled: boolean;
260
+ /**
261
+ * Commands needed to enable replication.
262
+ */
263
+ enableReplicationCommands: string[];
264
+ }
265
+ /**
266
+ * Request for discovering a GraphQL connection schema.
267
+ * @category Platform
268
+ */
269
+ export interface DiscoverGraphQLConnectionSchemaRequest {
270
+ /**
271
+ * GraphQL connection options including URL and authentication.
272
+ */
273
+ connectionOptions: DiscoverGraphQLConnectionOptions;
274
+ }
275
+ /**
276
+ * GraphQL connection options for schema discovery.
277
+ * @category Platform
278
+ */
279
+ export interface DiscoverGraphQLConnectionOptions {
280
+ /**
281
+ * The GraphQL endpoint URL.
282
+ */
283
+ url: string;
284
+ /**
285
+ * Optional headers to include in requests.
286
+ */
287
+ headers?: Record<string, string>;
288
+ }
289
+ /**
290
+ * Response from discovering a GraphQL connection schema.
291
+ * @category Platform
292
+ */
293
+ export interface DiscoverGraphQLConnectionSchemaResponse<SchemaType = Record<string, any>> {
294
+ /**
295
+ * The discovered GraphQL schema.
296
+ */
297
+ schema: SchemaType;
298
+ }
299
+ /**
300
+ * Request for discovering an OpenAPI schema from a URL.
301
+ * @category Platform
302
+ */
303
+ export interface DiscoverOpenApiSchemaRequest {
304
+ /**
305
+ * OpenAPI discovery options including URL and authentication.
306
+ */
307
+ discoveryOptions: DiscoverOpenApiOptions;
308
+ }
309
+ /**
310
+ * OpenAPI discovery options for schema discovery.
311
+ * @category Platform
312
+ */
313
+ export interface DiscoverOpenApiOptions {
314
+ /**
315
+ * The URL of the OpenAPI specification.
316
+ */
317
+ openApiSpecUrl?: string;
318
+ /**
319
+ * Optional headers to include when fetching the spec.
320
+ */
321
+ headers?: Record<string, string>;
322
+ }
323
+ /**
324
+ * Response from discovering an OpenAPI schema.
325
+ * @category Platform
326
+ */
327
+ export interface DiscoverOpenApiSchemaResponse<SchemaType = Record<string, any>> {
328
+ /**
329
+ * The discovered API schema containing endpoints and their definitions.
330
+ */
331
+ schema: SchemaType;
60
332
  }
@@ -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.425";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.427";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.425",
3
+ "version": "1.0.427",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",