@squidcloud/client 1.0.421 → 1.0.423
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-knowledge-base.public-types.d.ts +1 -1
- package/dist/typescript-client/src/ai-client.d.ts +11 -4
- package/dist/typescript-client/src/index.d.ts +0 -1
- package/dist/typescript-client/src/squid.d.ts +0 -7
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/typescript-client/src/personal-storage-client.d.ts +0 -85
|
@@ -120,7 +120,7 @@ export interface AiKnowledgeBaseChatOptions {
|
|
|
120
120
|
includeMetadata?: boolean;
|
|
121
121
|
/** Which provider's reranker to use for reranking the context. Defaults to 'cohere'. */
|
|
122
122
|
rerankProvider?: AiRerankProvider;
|
|
123
|
-
/** The maximum number of results to return */
|
|
123
|
+
/** The maximum number of results to return. Defaults to 30 */
|
|
124
124
|
limit?: number;
|
|
125
125
|
/** How many chunks to look over. Defaults to 100 */
|
|
126
126
|
chunkLimit?: number;
|
|
@@ -7,7 +7,7 @@ import { AiFilesClient } from './ai-files-client';
|
|
|
7
7
|
import { AiImageClient } from './ai-image-client';
|
|
8
8
|
import { AiKnowledgeBaseReference } from './ai-knowledge-base/ai-knowledge-base-client-reference';
|
|
9
9
|
import { AiMatchMakingClient } from './ai-matchmaking-client';
|
|
10
|
-
import { AiAgent, AiAgentId, AiFileProviderType, AiKnowledgeBase, AiKnowledgeBaseId, AiProviderType, AiSessionContext, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
10
|
+
import { AiAgent, AiAgentApiIntegrationOptions, AiAgentId, AiFileProviderType, AiKnowledgeBase, AiKnowledgeBaseId, AiProviderType, AiSessionContext, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
11
11
|
/**
|
|
12
12
|
* AiClient class serves as a facade for interacting with different AI services.
|
|
13
13
|
* It provides simplified access to AI chatbot and assistant functionalities
|
|
@@ -99,10 +99,17 @@ export declare class AiClient {
|
|
|
99
99
|
*/
|
|
100
100
|
executeAiQuery(integrationId: IntegrationId, prompt: string, options?: AiQueryOptions): Promise<AiQueryResponse>;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
102
|
+
* Executes an AI-powered API call using a specific integration.
|
|
103
|
+
* The AI will select appropriate endpoints, generate request bodies,
|
|
104
|
+
* and analyze responses to answer the provided prompt.
|
|
105
|
+
*
|
|
106
|
+
* @param integrationId - The API integration to use
|
|
107
|
+
* @param prompt - Natural language description of what to accomplish
|
|
108
|
+
* @param options - Optional configuration including allowed endpoints and verbose updates
|
|
109
|
+
* @param sessionContext - Optional session context for audit trails and tracing
|
|
110
|
+
* @returns Promise resolving to the API call result with answer and execution details
|
|
104
111
|
*/
|
|
105
|
-
executeAiApiCall(integrationId: IntegrationId, prompt: string,
|
|
112
|
+
executeAiApiCall(integrationId: IntegrationId, prompt: string, options?: AiAgentApiIntegrationOptions, sessionContext?: AiSessionContext): Promise<ExecuteAiApiResponse>;
|
|
106
113
|
/**
|
|
107
114
|
* Returns name of the secret that stores API key for the given AI provider type.
|
|
108
115
|
* This API key is used for all requests to the AI provider done from the application.
|
|
@@ -37,7 +37,6 @@ export * from './mutation/mutation-sender';
|
|
|
37
37
|
export * from './native-query-manager';
|
|
38
38
|
export * from './notification-client';
|
|
39
39
|
export * from './observability-client';
|
|
40
|
-
export * from './personal-storage-client';
|
|
41
40
|
export * from './public-types';
|
|
42
41
|
export * from './public-utils';
|
|
43
42
|
export * from './query-utils';
|
|
@@ -10,7 +10,6 @@ import { ExtractionClient } from './extraction-client';
|
|
|
10
10
|
import { JobClient } from './job-client';
|
|
11
11
|
import { NotificationClient } from './notification-client';
|
|
12
12
|
import { ObservabilityClient } from './observability-client';
|
|
13
|
-
import { PersonalStorageClient } from './personal-storage-client';
|
|
14
13
|
import { ApiKey, AppId, CollectionName, DocumentData, EnvironmentId, IntegrationId, SquidDeveloperId, SquidRegion } from './public-types';
|
|
15
14
|
import { QueueManager } from './queue.manager';
|
|
16
15
|
import { SchedulerClient } from './scheduler-client';
|
|
@@ -325,12 +324,6 @@ export declare class Squid {
|
|
|
325
324
|
* @param integrationId The storage integration ID (default is 'built_in_storage').
|
|
326
325
|
*/
|
|
327
326
|
storage(integrationId?: IntegrationId): StorageClient;
|
|
328
|
-
/**
|
|
329
|
-
* Returns a client for accessing personal (user-specific) file storage.
|
|
330
|
-
*
|
|
331
|
-
* @param integrationId The storage integration ID to use.
|
|
332
|
-
*/
|
|
333
|
-
personalStorage(integrationId: IntegrationId): PersonalStorageClient;
|
|
334
327
|
/**
|
|
335
328
|
* Returns a client for managing external oauth tokens for integrations.
|
|
336
329
|
* Use this to save authorization codes and retrieve access tokens.
|
package/package.json
CHANGED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { AiContextMetadata } from './public-types';
|
|
2
|
-
/**
|
|
3
|
-
* Response to a request to get the access token for a personal storage service.
|
|
4
|
-
* @category Personal Storage
|
|
5
|
-
*/
|
|
6
|
-
export interface PsGetAccessTokenResponse {
|
|
7
|
-
/** The access token for the personal storage service. */
|
|
8
|
-
accessToken: string;
|
|
9
|
-
/** The expiration time of the access token. */
|
|
10
|
-
expirationTime: Date;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The type of a document in personal storage.
|
|
14
|
-
* @category Personal Storage
|
|
15
|
-
*/
|
|
16
|
-
export type PsDocumentType = 'file' | 'folder';
|
|
17
|
-
/**
|
|
18
|
-
* A document indexed for AI processing (as part of the personal storage connector).
|
|
19
|
-
* @category Personal Storage
|
|
20
|
-
*/
|
|
21
|
-
export interface PsIndexedDocument {
|
|
22
|
-
/** The ID of the document. */
|
|
23
|
-
id: string;
|
|
24
|
-
/** The name of the document. */
|
|
25
|
-
name: string;
|
|
26
|
-
/** The type of the document (file or folder). */
|
|
27
|
-
type: PsDocumentType;
|
|
28
|
-
/** Metadata stored about the document */
|
|
29
|
-
metadata: AiContextMetadata;
|
|
30
|
-
/** The ID of the parent folder of the document. */
|
|
31
|
-
folderDocumentId?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Client to handle personal storage integrations such as Google Drive or Microsoft OneDrive.
|
|
35
|
-
* Provides methods for saving authentication tokens, indexing documents or folders for AI processing,
|
|
36
|
-
* and unindexing documents from AI processing.
|
|
37
|
-
* @category Personal Storage
|
|
38
|
-
*/
|
|
39
|
-
export declare class PersonalStorageClient {
|
|
40
|
-
private readonly integrationId;
|
|
41
|
-
private readonly rpcManager;
|
|
42
|
-
/**
|
|
43
|
-
* Saves an authentication token for the personal storage service.
|
|
44
|
-
*
|
|
45
|
-
* @param authCode - The authorization code obtained from the OAuth flow for the personal storage service.
|
|
46
|
-
* @param identifier - A user-provided identifier (usually a user ID) that will be associated with the token.
|
|
47
|
-
* @returns A promise that resolves with the access token and expiration time.
|
|
48
|
-
*/
|
|
49
|
-
saveAuthCode(authCode: string, identifier: string): Promise<PsGetAccessTokenResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* Retrieves an access token for the personal storage service.
|
|
52
|
-
*
|
|
53
|
-
* @param identifier - A user-provided identifier (usually a user ID) that is associated with the token.
|
|
54
|
-
* @returns A promise that resolves with the access token and expiration time.
|
|
55
|
-
*/
|
|
56
|
-
getAccessToken(identifier: string): Promise<PsGetAccessTokenResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Indexes a document or folder for AI processing.
|
|
59
|
-
*
|
|
60
|
-
* @param documentOrFolderId - The ID of the document or folder to be indexed.
|
|
61
|
-
* @param identifier - A user-provided identifier (usually a user ID) that will be associated with the document.
|
|
62
|
-
* @param agentId - The agent ID for the AI processing configuration.
|
|
63
|
-
* @param metadata - Metadata to include with the index
|
|
64
|
-
* @returns A promise that resolves when the document or folder is successfully indexed.
|
|
65
|
-
*/
|
|
66
|
-
indexDocumentOrFolder(documentOrFolderId: string, identifier: string, agentId: string, metadata?: AiContextMetadata): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Lists all documents or folders that have been indexed for AI processing.
|
|
69
|
-
*
|
|
70
|
-
* @param identifier - A user-provided identifier (usually a user ID) associated with the indexed documents.
|
|
71
|
-
* @param agentId - The AI agent ID used when indexing the documents.
|
|
72
|
-
* @param type - (Optional) The type of items to list: `'file'` or `'folder'`. If omitted, returns both.
|
|
73
|
-
* @returns A promise that resolves with an array of indexed documents or folders.
|
|
74
|
-
*/
|
|
75
|
-
listIndexedDocuments(identifier: string, agentId: string, type?: PsDocumentType): Promise<Array<PsIndexedDocument>>;
|
|
76
|
-
/**
|
|
77
|
-
* Unindexes a previously indexed document, removing it from AI processing.
|
|
78
|
-
*
|
|
79
|
-
* @param documentId - The ID of the document to be unindexed.
|
|
80
|
-
* @param identifier - A user-provided identifier (usually a user ID) that was associated with the document.
|
|
81
|
-
* @param agentId - The agent ID for the AI processing configuration.
|
|
82
|
-
* @returns A promise that resolves when the document is successfully unindexed.
|
|
83
|
-
*/
|
|
84
|
-
unindexDocument(documentId: string, identifier: string, agentId: string): Promise<void>;
|
|
85
|
-
}
|