@crewdle/web-sdk-types 1.0.18 → 1.0.19
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 +3 -1
- package/dist/core/sdk/SDK.d.ts +3 -1
- package/dist/core/sdk/SDKCloseOptions.d.ts +9 -0
- package/dist/core/sdk/SDKCloseOptions.js +1 -0
- package/dist/core/sdk/index.d.ts +1 -0
- package/dist/object-storage/DocumentParserConnector.d.ts +11 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import { IObjectStoreBucket, IObjectStoreBucketOptions } from '../../object-stor
|
|
|
7
7
|
import { IPubSubTopic } from '../../pubsub';
|
|
8
8
|
import { IVectorDatabase } from '../../vector-database';
|
|
9
9
|
import { LocalNode, Node } from '../node';
|
|
10
|
+
import { ISDKCloseOptions } from '../sdk';
|
|
10
11
|
/**
|
|
11
12
|
* The cluster interface.
|
|
12
13
|
* @category Core
|
|
@@ -14,8 +15,9 @@ import { LocalNode, Node } from '../node';
|
|
|
14
15
|
export interface ICluster extends IClusterEventEmitter {
|
|
15
16
|
/**
|
|
16
17
|
* Leave the cluster.
|
|
18
|
+
* @param options The options to close the SDK with.
|
|
17
19
|
*/
|
|
18
|
-
leave(): void;
|
|
20
|
+
leave(options?: ISDKCloseOptions): void;
|
|
19
21
|
/**
|
|
20
22
|
* Open a pub/sub topic.
|
|
21
23
|
* @param name The name of the PubSub Topic.
|
package/dist/core/sdk/SDK.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ICluster } from '../cluster';
|
|
2
2
|
import { IAgentCredentials, IAuthAgent } from '../node/agent';
|
|
3
3
|
import { IAuthUser, IUserCredentials } from '../node/user';
|
|
4
|
+
import { ISDKCloseOptions } from './SDKCloseOptions';
|
|
4
5
|
/**
|
|
5
6
|
* The SDK interface.
|
|
6
7
|
* @category Core
|
|
@@ -8,8 +9,9 @@ import { IAuthUser, IUserCredentials } from '../node/user';
|
|
|
8
9
|
export interface ISDK {
|
|
9
10
|
/**
|
|
10
11
|
* Close the SDK.
|
|
12
|
+
* @param options The options to close the SDK with.
|
|
11
13
|
*/
|
|
12
|
-
close(): Promise<void>;
|
|
14
|
+
close(options?: ISDKCloseOptions): Promise<void>;
|
|
13
15
|
/**
|
|
14
16
|
* Authenticate a user.
|
|
15
17
|
* @param credentials The credentials to authenticate the user with.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/core/sdk/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ILoggingConnector } from './LoggingConnector';
|
|
2
2
|
export { LoggingConnectorEvent } from './LoggingConnectorEvent';
|
|
3
3
|
export { ISDK } from './SDK';
|
|
4
|
+
export { ISDKCloseOptions } from './SDKCloseOptions';
|
|
4
5
|
export { ISDKOptions } from './SDKOptions';
|
|
5
6
|
export { Unsubscribe } from './Unsubscribe';
|
|
@@ -6,4 +6,15 @@ export interface IDocumentParserConnector {
|
|
|
6
6
|
* @returns A promise that resolves with the parsed document.
|
|
7
7
|
*/
|
|
8
8
|
parse(file: IFile): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Get the supported file types.
|
|
11
|
+
* @returns The supported file types.
|
|
12
|
+
*/
|
|
13
|
+
getSupportedFileTypes(): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Check if the connector supports a file.
|
|
16
|
+
* @param file The file to check.
|
|
17
|
+
* @returns Whether the connector supports the file.
|
|
18
|
+
*/
|
|
19
|
+
supports(file: IFile): boolean;
|
|
9
20
|
}
|