@squidcloud/client 1.0.269 → 1.0.271
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/internal-common/src/public-types/bundle-data.public-types.d.ts +2 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +1 -0
- package/dist/typescript-client/src/index.d.ts +1 -0
- package/dist/typescript-client/src/personal-storage-client.d.ts +59 -0
- package/dist/typescript-client/src/squid.d.ts +2 -0
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delet
|
|
|
4
4
|
export type StorageActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
5
5
|
/** The different types of actions that can be performed on a topic. */
|
|
6
6
|
export type TopicActionType = 'read' | 'write' | 'all';
|
|
7
|
+
/** The different type of actions for metrics. */
|
|
8
|
+
export type MetricActionType = 'write' | 'all';
|
|
7
9
|
/** The different types of actions that can be performed on an AI chatbot. */
|
|
8
10
|
export type AiChatbotActionType = 'chat' | 'mutate' | 'all';
|
|
9
11
|
export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
|
|
@@ -26,6 +26,7 @@ export declare enum IntegrationType {
|
|
|
26
26
|
'gcs' = "gcs",
|
|
27
27
|
'built_in_s3' = "built_in_s3",
|
|
28
28
|
'built_in_gcs' = "built_in_gcs",
|
|
29
|
+
'google_drive' = "google_drive",
|
|
29
30
|
'algolia' = "algolia",
|
|
30
31
|
'elastic_observability' = "elastic_observability",
|
|
31
32
|
'elastic_search' = "elastic_search",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AiContextMetadata } from '../../internal-common/src/public-types/ai-chatbot.public-types';
|
|
2
|
+
import { DocumentTextDataResponse } from '../../internal-common/src/public-types/extraction.public-types';
|
|
3
|
+
interface PsGetAccessTokenResponse {
|
|
4
|
+
accessToken: string;
|
|
5
|
+
expirationTime: Date;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Client to handle personal storage integrations such as Google Drive or Microsoft OneDrive.
|
|
9
|
+
* Provides methods for saving authentication tokens, indexing documents or folders for AI processing,
|
|
10
|
+
* and unindexing documents from AI processing.
|
|
11
|
+
*/
|
|
12
|
+
export declare class PersonalStorageClient {
|
|
13
|
+
private readonly integrationId;
|
|
14
|
+
private readonly rpcManager;
|
|
15
|
+
/**
|
|
16
|
+
* Saves an authentication token for the personal storage service.
|
|
17
|
+
*
|
|
18
|
+
* @param authCode - The authorization code obtained from the OAuth flow for the personal storage service.
|
|
19
|
+
* @param identifier - A user-provided identifier (usually a user ID) that will be associated with the token.
|
|
20
|
+
* @returns A promise that resolves with the access token and expiration time.
|
|
21
|
+
*/
|
|
22
|
+
saveToken(authCode: string, identifier: string): Promise<PsGetAccessTokenResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves an access token for the personal storage service.
|
|
25
|
+
*
|
|
26
|
+
* @param identifier - A user-provided identifier (usually a user ID) that is associated with the token.
|
|
27
|
+
* @returns A promise that resolves with the access token and expiration time.
|
|
28
|
+
*/
|
|
29
|
+
getAccessToken(identifier: string): Promise<PsGetAccessTokenResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Extracts text data from a document.
|
|
32
|
+
* @param documentId - The ID of the document to extract text data from.
|
|
33
|
+
* @param identifier - A user-provided identifier (usually a user ID) that is associated with the document.
|
|
34
|
+
* @returns A promise that resolves with the extracted text data.
|
|
35
|
+
*/
|
|
36
|
+
extractDataFromDocument(documentId: string, identifier: string): Promise<DocumentTextDataResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Indexes a document or folder for AI processing.
|
|
39
|
+
*
|
|
40
|
+
* @param documentOrFolderId - The ID of the document or folder to be indexed.
|
|
41
|
+
* @param identifier - A user-provided identifier (usually a user ID) that will be associated with the document.
|
|
42
|
+
* @param aiProfileId - The profile ID for the AI processing configuration.
|
|
43
|
+
* @param aiIntegrationId - The integration ID for the AI processing configuration.
|
|
44
|
+
* @param metadata - Metadata to include with the index
|
|
45
|
+
* @returns A promise that resolves when the document or folder is successfully indexed.
|
|
46
|
+
*/
|
|
47
|
+
indexDocumentOrFolder(documentOrFolderId: string, identifier: string, aiProfileId: string, aiIntegrationId: string, metadata?: AiContextMetadata): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Unindexes a previously indexed document, removing it from AI processing.
|
|
50
|
+
*
|
|
51
|
+
* @param documentId - The ID of the document to be unindexed.
|
|
52
|
+
* @param identifier - A user-provided identifier (usually a user ID) that was associated with the document.
|
|
53
|
+
* @param aiProfileId - The profile ID for the AI processing configuration.
|
|
54
|
+
* @param aiIntegrationId - The integration ID for the AI processing configuration.
|
|
55
|
+
* @returns A promise that resolves when the document is successfully unindexed.
|
|
56
|
+
*/
|
|
57
|
+
unindexDocument(documentId: string, identifier: string, aiProfileId: string, aiIntegrationId: string): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -9,6 +9,7 @@ import { SecretClient } from './secret.client';
|
|
|
9
9
|
import { StorageClient } from './storage-client';
|
|
10
10
|
import { TransactionId } from './types';
|
|
11
11
|
import { ExtractionClient } from './extraction-client';
|
|
12
|
+
import { PersonalStorageClient } from './personal-storage-client';
|
|
12
13
|
/** The different options that can be used to initialize a Squid instance. */
|
|
13
14
|
export interface SquidOptions {
|
|
14
15
|
/**
|
|
@@ -201,6 +202,7 @@ export declare class Squid {
|
|
|
201
202
|
ai(): AiClient;
|
|
202
203
|
api(): ApiClient;
|
|
203
204
|
storage(integrationId?: IntegrationId): StorageClient;
|
|
205
|
+
personalStorage(integrationId: IntegrationId): PersonalStorageClient;
|
|
204
206
|
extraction(): ExtractionClient;
|
|
205
207
|
get secrets(): SecretClient;
|
|
206
208
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.271";
|