@crewdle/web-sdk-types 1.0.24 → 1.0.26
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/core/cluster/Cluster.d.ts +1 -1
- package/dist/core/sdk/SDKCloseOptions.d.ts +1 -0
- package/dist/external-storage/ExternalStorageConnection.d.ts +1 -0
- package/dist/external-storage/ExternalStorageConnection.js +1 -0
- package/dist/generative-ai/GenerativeAIContext.d.ts +1 -1
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.d.ts +10 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptResult.d.ts +6 -0
- package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.d.ts +1 -0
- package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.js +1 -0
- package/dist/generative-ai/jobs/prompt/result/PromptTypeText.d.ts +1 -0
- package/dist/generative-ai/jobs/prompt/result/PromptTypeVector.d.ts +1 -0
- package/dist/graph-database/GraphDatabase.d.ts +10 -0
- package/dist/graph-database/GraphDatabaseConnector.d.ts +10 -0
- package/dist/graph-database/GraphDatabaseConnectorConstructor.d.ts +1 -1
- package/dist/job/JobWorkerConnector.d.ts +4 -0
- package/dist/key-value-database/DatabaseTable.d.ts +1 -1
- package/dist/object-storage/DocumentParserConnector.d.ts +4 -0
- package/dist/object-storage/DocumentParserConnectorConstructor.d.ts +4 -0
- package/dist/object-storage/ObjectStoreBucketOptions.d.ts +4 -0
- package/dist/object-storage/event/SyncCompleteEvent.d.ts +2 -2
- package/dist/object-storage/event/SyncCompleteEventPayload.d.ts +10 -0
- package/dist/object-storage/event/SyncCompleteEventPayload.js +1 -0
- package/dist/object-storage/event/index.d.ts +1 -0
- package/dist/vector-database/VectorDatabase.d.ts +10 -0
- package/dist/vector-database/VectorDatabaseConnector.d.ts +10 -0
- package/dist/vector-database/VectorDatabaseConnectorConstructor.d.ts +1 -1
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ export interface ICluster extends IClusterEventEmitter {
|
|
|
41
41
|
* @param name The name of the external storage connection.
|
|
42
42
|
* @param type The type of the external storage connection.
|
|
43
43
|
* @throws {@link SDKClientErrorCodes.ExternalStorageConnectionAlreadyExists} if the external storage connection is already open.
|
|
44
|
-
* @throws {@link SDKClientErrorCodes.
|
|
44
|
+
* @throws {@link SDKClientErrorCodes.ExternalStorageNameNotString} if the name is not a string.
|
|
45
45
|
* @returns The external storage connection.
|
|
46
46
|
*/
|
|
47
47
|
openExternalStorageConnection(name: string, type: ExternalStorageType): Promise<IExternalStorageConnection>;
|
|
@@ -26,7 +26,7 @@ export interface IGenerativeAIContext {
|
|
|
26
26
|
ratePrompt(parameters: IGenerativeAIRatingCreateJobParameters): Promise<IGenerativeAIRatingResult>;
|
|
27
27
|
/**
|
|
28
28
|
* Download a document.
|
|
29
|
-
* @param
|
|
29
|
+
* @param documentPath The path of the document to download.
|
|
30
30
|
* @returns A promise that resolves with the result containing the document as an ArrayBuffer.
|
|
31
31
|
*/
|
|
32
32
|
downloadDocument(documentPath: string): Promise<IGenerativeAIDownloadDocumentResult>;
|
|
@@ -14,10 +14,20 @@ export interface IGenerativeAIPromptOptions extends IGenerativeAIOptions {
|
|
|
14
14
|
* The instructions for the AI job.
|
|
15
15
|
*/
|
|
16
16
|
instructions?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The grammar to use for the AI job.
|
|
19
|
+
*/
|
|
20
|
+
grammar?: string;
|
|
17
21
|
/**
|
|
18
22
|
* The context for the AI job.
|
|
19
23
|
*/
|
|
20
24
|
history?: IPromptHistory[];
|
|
25
|
+
/**
|
|
26
|
+
* The internal context for the AI job.
|
|
27
|
+
*/
|
|
28
|
+
internalContext?: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
21
31
|
/**
|
|
22
32
|
* The maximum number of tokens to generate.
|
|
23
33
|
*/
|
|
@@ -20,6 +20,12 @@ export interface IGenerativeAIPromptResult extends IJobResultGenerativeAI {
|
|
|
20
20
|
* The relevant context used by the AI job.
|
|
21
21
|
*/
|
|
22
22
|
context?: ISearchResult[];
|
|
23
|
+
/**
|
|
24
|
+
* The internal context used by the AI job.
|
|
25
|
+
*/
|
|
26
|
+
internalContext?: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
23
29
|
/**
|
|
24
30
|
* The tokens used by the AI job.
|
|
25
31
|
*/
|
|
@@ -46,4 +46,14 @@ export interface IGraphDatabase extends IDataStream {
|
|
|
46
46
|
getContent(nodes: string[], maxDepth?: number, contentSize?: number): {
|
|
47
47
|
[key: string]: string[];
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Save the database to disk.
|
|
51
|
+
* @param version The version of the data collection.
|
|
52
|
+
*/
|
|
53
|
+
saveToDisk(version: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Load the database from disk.
|
|
56
|
+
* @param version The version of the data collection.
|
|
57
|
+
*/
|
|
58
|
+
loadFromDisk(version: string): void;
|
|
49
59
|
}
|
|
@@ -38,4 +38,14 @@ export interface IGraphDatabaseConnector {
|
|
|
38
38
|
* @returns The size of the database.
|
|
39
39
|
*/
|
|
40
40
|
getSize(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Save the database to disk.
|
|
43
|
+
* @param version The version of the data collection.
|
|
44
|
+
*/
|
|
45
|
+
saveToDisk(version: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Load the database from disk.
|
|
48
|
+
* @param version The version of the data collection.
|
|
49
|
+
*/
|
|
50
|
+
loadFromDisk(version: string): void;
|
|
41
51
|
}
|
|
@@ -3,4 +3,4 @@ import { IGraphDatabaseConnector } from './GraphDatabaseConnector';
|
|
|
3
3
|
* The graph database connector constructor type.
|
|
4
4
|
* @category Graph Database
|
|
5
5
|
*/
|
|
6
|
-
export type GraphDatabaseConnectorConstructor = new () => IGraphDatabaseConnector;
|
|
6
|
+
export type GraphDatabaseConnectorConstructor = new (dbKey: string) => IGraphDatabaseConnector;
|
|
@@ -52,7 +52,7 @@ export interface IDatabaseTable<T extends IValueType> {
|
|
|
52
52
|
count(query?: IDatabaseTableQuery | IQueryBuilder): Promise<number>;
|
|
53
53
|
/**
|
|
54
54
|
* Subscribe to changes in the database table.
|
|
55
|
-
* @
|
|
55
|
+
* @param callback The callback to call when the database table changes.
|
|
56
56
|
*/
|
|
57
57
|
subscribe(callback: (event: IDatabaseTableEvent<T>) => void): void;
|
|
58
58
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageEventType } from '.';
|
|
1
|
+
import { StorageEventType, ISyncCompleteEventPayload } from '.';
|
|
2
2
|
/**
|
|
3
3
|
* The sync complete event.
|
|
4
4
|
* @category Object Storage
|
|
@@ -11,5 +11,5 @@ export interface ISyncCompleteEvent {
|
|
|
11
11
|
/**
|
|
12
12
|
* The sync complete event payload.
|
|
13
13
|
*/
|
|
14
|
-
payload:
|
|
14
|
+
payload: ISyncCompleteEventPayload;
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,5 +9,6 @@ export { IFolderMoveEvent } from './FolderMoveEvent';
|
|
|
9
9
|
export { IObjectDeleteEventPayload } from './ObjectDeleteEventPayload';
|
|
10
10
|
export { IObjectMoveEventPayload } from './ObjectMoveEventPayload';
|
|
11
11
|
export { ISyncCompleteEvent } from './SyncCompleteEvent';
|
|
12
|
+
export { ISyncCompleteEventPayload } from './SyncCompleteEventPayload';
|
|
12
13
|
export { StorageEvent } from './StorageEvent';
|
|
13
14
|
export { StorageEventType } from './StorageEventType';
|
|
@@ -39,4 +39,14 @@ export interface IVectorDatabase extends IDataStream {
|
|
|
39
39
|
* @param name The name of the content.
|
|
40
40
|
*/
|
|
41
41
|
remove(name: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Save the database to disk.
|
|
44
|
+
* @param version The version of the data collection.
|
|
45
|
+
*/
|
|
46
|
+
saveToDisk(version: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Load the database from disk.
|
|
49
|
+
* @param version The version of the data collection.
|
|
50
|
+
*/
|
|
51
|
+
loadFromDisk(version: string): void;
|
|
42
52
|
}
|
|
@@ -31,4 +31,14 @@ export interface IVectorDatabaseConnector {
|
|
|
31
31
|
* @returns The content of the database.
|
|
32
32
|
*/
|
|
33
33
|
getBuffer(): ArrayBuffer;
|
|
34
|
+
/**
|
|
35
|
+
* Save the database to disk.
|
|
36
|
+
* @param version The version of the data collection.
|
|
37
|
+
*/
|
|
38
|
+
saveToDisk(version: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Load the database from disk.
|
|
41
|
+
* @param version The version of the data collection.
|
|
42
|
+
*/
|
|
43
|
+
loadFromDisk(version: string): void;
|
|
34
44
|
}
|
|
@@ -3,4 +3,4 @@ import { IVectorDatabaseConnector } from '.';
|
|
|
3
3
|
* The vector database connector constructor type.
|
|
4
4
|
* @category Vector Database
|
|
5
5
|
*/
|
|
6
|
-
export type VectorDatabaseConnectorConstructor = new () => IVectorDatabaseConnector;
|
|
6
|
+
export type VectorDatabaseConnectorConstructor = new (dbKey: string) => IVectorDatabaseConnector;
|