@squidcloud/client 1.0.368 → 1.0.370
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/metric-name.d.ts +9 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +18 -20
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +1 -1
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +1 -1
- package/dist/internal-common/src/public-types/job.public-types.d.ts +59 -0
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +30 -0
- package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +148 -0
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +60 -0
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +166 -0
- package/dist/internal-common/src/types/ai-agent.types.d.ts +158 -0
- package/dist/internal-common/src/types/ai-assistant.types.d.ts +1 -0
- package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +59 -0
- package/dist/internal-common/src/types/backend-function.types.d.ts +1 -0
- package/dist/internal-common/src/types/communication.types.d.ts +1 -0
- package/dist/internal-common/src/types/document.types.d.ts +1 -0
- package/dist/internal-common/src/types/file.types.d.ts +6 -0
- package/dist/internal-common/src/types/mutation.types.d.ts +1 -0
- package/dist/internal-common/src/types/observability.types.d.ts +71 -0
- package/dist/internal-common/src/types/query.types.d.ts +13 -0
- package/dist/internal-common/src/types/secret.types.d.ts +2 -0
- package/dist/internal-common/src/types/socket.types.d.ts +1 -0
- package/dist/internal-common/src/types/stage.d.ts +9 -0
- package/dist/internal-common/src/types/time-units.d.ts +1 -0
- package/dist/internal-common/src/types/url-shortener.types.d.ts +41 -0
- package/dist/internal-common/src/utils/array.d.ts +7 -0
- package/dist/internal-common/src/utils/e2e-test-utils.d.ts +2 -0
- package/dist/internal-common/src/utils/global.utils.d.ts +1 -0
- package/dist/internal-common/src/utils/http.d.ts +5 -0
- package/dist/internal-common/src/utils/lock.manager.d.ts +14 -0
- package/dist/internal-common/src/utils/metric-utils.d.ts +4 -0
- package/dist/internal-common/src/utils/metrics.types.d.ts +7 -0
- package/dist/internal-common/src/utils/object.d.ts +57 -0
- package/dist/internal-common/src/utils/serialization.d.ts +11 -0
- package/dist/internal-common/src/utils/squid.constants.d.ts +1 -0
- package/dist/internal-common/src/utils/validation.d.ts +19 -0
- package/dist/internal-common/src/websocket.impl.d.ts +26 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +33 -7
- package/dist/typescript-client/src/agent/ai-agent-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +1 -1
- package/dist/typescript-client/src/ai-client.d.ts +5 -3
- package/dist/typescript-client/src/api-client.d.ts +2 -2
- package/dist/typescript-client/src/collection-reference.d.ts +1 -1
- package/dist/typescript-client/src/document-reference.d.ts +2 -2
- package/dist/typescript-client/src/index.d.ts +20 -20
- package/dist/typescript-client/src/job-client.d.ts +21 -0
- package/dist/typescript-client/src/public-types.d.ts +7 -6
- package/dist/typescript-client/src/query/deserializer.d.ts +1 -1
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +1 -1
- package/dist/typescript-client/src/squid.d.ts +13 -9
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/dist/typescript-client/src/web-client.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { AiAgentReference } from './ai-agent-client-reference';
|
|
|
9
9
|
export declare class AiAgentClient {
|
|
10
10
|
private readonly rpcManager;
|
|
11
11
|
private readonly socketManager;
|
|
12
|
+
private readonly jobClient;
|
|
12
13
|
private readonly ongoingChatSequences;
|
|
13
14
|
private readonly statusUpdates;
|
|
14
15
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AiChatModelName, AiChatOptions } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { AiChatModelName, AiChatOptions } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
3
3
|
/**
|
|
4
4
|
* Response format for transcribing audio and generating a chat response.
|
|
5
5
|
* Contains the transcribed text and a stream of AI-generated responses.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { AiAgentReference } from './agent/ai-agent-client-reference';
|
|
1
2
|
import { AiAssistantClient } from './ai-assistant-client';
|
|
2
|
-
import { AiAgent, AiAgentId, AiProviderType, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
3
|
-
import { AiImageClient } from './ai-image-client';
|
|
4
3
|
import { AiAudioClient } from './ai-audio-client';
|
|
4
|
+
import { AiImageClient } from './ai-image-client';
|
|
5
5
|
import { AiMatchMakingClient } from './ai-matchmaking-client';
|
|
6
6
|
import { ExecuteAiApiResponse, ExecuteAiQueryMultiResponse, ExecuteAiQueryOptions, ExecuteAiQueryResponse } from './ai.types';
|
|
7
|
-
import {
|
|
7
|
+
import { AiAgent, AiAgentId, AiProviderType, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
8
8
|
/**
|
|
9
9
|
* AiClient class serves as a facade for interacting with different AI services.
|
|
10
10
|
* It provides simplified access to AI chatbot and assistant functionalities
|
|
@@ -14,6 +14,7 @@ import { AiAgentReference } from './agent/ai-agent-client-reference';
|
|
|
14
14
|
export declare class AiClient {
|
|
15
15
|
private readonly socketManager;
|
|
16
16
|
private readonly rpcManager;
|
|
17
|
+
private readonly jobClient;
|
|
17
18
|
private readonly aiAssistantClient;
|
|
18
19
|
private aiAgentClient?;
|
|
19
20
|
/**
|
|
@@ -97,4 +98,5 @@ export declare class AiClient {
|
|
|
97
98
|
* Returns the updated state of the AI application settings.
|
|
98
99
|
*/
|
|
99
100
|
setAiProviderApiKeySecret(providerType: AiProviderType, secretKey: SecretKey | undefined): Promise<ApplicationAiSettings>;
|
|
101
|
+
private getAiAgentClient;
|
|
100
102
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiOptions } from '../../internal-common/src/public-types/api-client.public-types';
|
|
2
2
|
import { ApiEndpointId, HttpMethod } from '../../internal-common/src/public-types/api.public-types';
|
|
3
|
+
import { IntegrationId } from '../../internal-common/src/public-types/communication.public-types';
|
|
3
4
|
import { HttpResponse } from './squid-http-client';
|
|
4
|
-
import { ApiOptions } from '../../internal-common/src/public-types/api-client.public-types';
|
|
5
5
|
/**
|
|
6
6
|
* ApiClient facilitates making HTTP API requests to external integrations,
|
|
7
7
|
* supporting various HTTP methods such as GET, POST, PUT, PATCH, and DELETE.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Alias, DocIdOrDocIdObj, DocumentData } from './public-types';
|
|
2
1
|
import { DocumentReference } from './document-reference';
|
|
2
|
+
import { Alias, DocIdOrDocIdObj, DocumentData } from './public-types';
|
|
3
3
|
import { JoinQueryBuilder } from './query/join-query-builder.factory';
|
|
4
4
|
import { QueryBuilder } from './query/query-builder.factory';
|
|
5
5
|
import { SnapshotEmitter } from './query/snapshot-emitter';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DocumentData } from './public-types';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { TransactionId } from './types';
|
|
4
2
|
import { DeepRecord, Paths } from '../../internal-common/src/public-types/typescript.public-types';
|
|
3
|
+
import { DocumentData } from './public-types';
|
|
4
|
+
import { TransactionId } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Holds a reference to a document. A document reference is a reference to a specific record in a collection. You can
|
|
7
7
|
* use it to read or write data to the document. A document can refer to a row in a table in a relational database or a
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './admin-client';
|
|
2
2
|
export * from './agent/ai-agent-client';
|
|
3
|
-
export * from './ai-
|
|
3
|
+
export * from './agent/ai-agent-client-reference';
|
|
4
|
+
export * from './agent/ai-agent-client.types';
|
|
5
|
+
export * from './ai-assistant-client';
|
|
4
6
|
export * from './ai-audio-client';
|
|
7
|
+
export * from './ai-client';
|
|
8
|
+
export * from './ai-image-client';
|
|
9
|
+
export * from './ai-matchmaking-client';
|
|
5
10
|
export * from './ai.types';
|
|
6
11
|
export * from './api-client';
|
|
7
12
|
export * from './auth.manager';
|
|
8
13
|
export * from './backend-function.manager';
|
|
9
14
|
export * from './client-id.service';
|
|
10
|
-
export * from './collection-reference.factory';
|
|
11
15
|
export * from './collection-reference';
|
|
16
|
+
export * from './collection-reference.factory';
|
|
12
17
|
export * from './connection-details';
|
|
18
|
+
export * from './console-utils';
|
|
13
19
|
export * from './data.manager';
|
|
14
20
|
export * from './destruct.manager';
|
|
15
21
|
export * from './distributed-lock.manager';
|
|
16
22
|
export * from './document-identity.service';
|
|
17
|
-
export * from './document-reference.factory';
|
|
18
23
|
export * from './document-reference';
|
|
24
|
+
export * from './document-reference.factory';
|
|
19
25
|
export * from './document-store';
|
|
20
26
|
export * from './execute-function-options';
|
|
27
|
+
export * from './extraction-client';
|
|
28
|
+
export * from './file-utils';
|
|
29
|
+
export * from './integration-client';
|
|
30
|
+
export * from './job-client';
|
|
21
31
|
export * from './mutation/mutation-sender';
|
|
22
32
|
export * from './native-query-manager';
|
|
33
|
+
export * from './observability-client';
|
|
34
|
+
export * from './personal-storage-client';
|
|
23
35
|
export * from './public-types';
|
|
24
36
|
export * from './public-utils';
|
|
25
37
|
export * from './query-utils';
|
|
26
38
|
export * from './query/deserializer';
|
|
27
39
|
export * from './query/join-query-builder.factory';
|
|
28
40
|
export * from './query/local-query-manager';
|
|
41
|
+
export * from './query/pagination';
|
|
29
42
|
export * from './query/query-builder.factory';
|
|
30
43
|
export * from './query/query-sender';
|
|
31
44
|
export * from './query/query-subscription.manager';
|
|
32
45
|
export * from './query/query.types';
|
|
33
|
-
export * from './query/pagination';
|
|
34
46
|
export * from './query/snapshot-emitter';
|
|
35
47
|
export * from './queue.manager';
|
|
36
48
|
export * from './rate-limiter';
|
|
37
49
|
export * from './rpc.manager';
|
|
38
|
-
export * from './observability-client';
|
|
39
|
-
export * from './secret.client';
|
|
40
50
|
export * from './scheduler-client';
|
|
41
|
-
export * from './
|
|
51
|
+
export * from './secret.client';
|
|
42
52
|
export * from './socket.manager';
|
|
43
|
-
export * from './squid-http-client';
|
|
44
53
|
export * from './squid';
|
|
45
|
-
export * from './
|
|
54
|
+
export * from './squid-http-client';
|
|
46
55
|
export * from './storage-client';
|
|
47
|
-
export * from './
|
|
48
|
-
export * from './extraction-client';
|
|
49
|
-
export * from './file-utils';
|
|
50
|
-
export * from './ai-matchmaking-client';
|
|
51
|
-
export * from './admin-client';
|
|
52
|
-
export * from './console-utils';
|
|
53
|
-
export * from './ai-client';
|
|
54
|
-
export * from './agent/ai-agent-client';
|
|
55
|
-
export * from './agent/ai-agent-client.types';
|
|
56
|
-
export * from './agent/ai-agent-client-reference';
|
|
56
|
+
export * from './types';
|
|
57
57
|
export * from './web-client';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AsyncJob, JobId } from '../../internal-common/src/public-types/job.public-types';
|
|
2
|
+
/**
|
|
3
|
+
* JobService is responsible for managing job subscriptions and notifications.
|
|
4
|
+
*/
|
|
5
|
+
export declare class JobClient {
|
|
6
|
+
private readonly socketManager;
|
|
7
|
+
private readonly rpcManager;
|
|
8
|
+
private isListening;
|
|
9
|
+
private readonly listeners;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the job with the given ID.
|
|
12
|
+
* @param jobId used to identify the job.
|
|
13
|
+
*/
|
|
14
|
+
getJob<T = any>(jobId: JobId): Promise<AsyncJob<T> | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Waits for a job to complete and returns its result or throws an error.
|
|
17
|
+
* @param jobId used to identify the job.
|
|
18
|
+
*/
|
|
19
|
+
awaitJob<T = any>(jobId: JobId): Promise<T>;
|
|
20
|
+
private maybeListenToJobs;
|
|
21
|
+
}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
export * from '../../internal-common/src/public-types/ai-agent-integrations.public-types';
|
|
2
|
-
export * from '../../internal-common/src/public-types/ai-assistant.public-types';
|
|
3
2
|
export * from '../../internal-common/src/public-types/ai-agent.public-types';
|
|
3
|
+
export * from '../../internal-common/src/public-types/ai-assistant.public-types';
|
|
4
|
+
export * from '../../internal-common/src/public-types/ai-matchmaking.public-types';
|
|
4
5
|
export * from '../../internal-common/src/public-types/api-client.public-types';
|
|
6
|
+
export * from '../../internal-common/src/public-types/api.public-types';
|
|
7
|
+
export * from '../../internal-common/src/public-types/backend.public-types';
|
|
5
8
|
export * from '../../internal-common/src/public-types/code-executor.public-types';
|
|
6
9
|
export * from '../../internal-common/src/public-types/communication.public-types';
|
|
7
10
|
export * from '../../internal-common/src/public-types/context.public-types';
|
|
8
11
|
export * from '../../internal-common/src/public-types/document.public-types';
|
|
12
|
+
export * from '../../internal-common/src/public-types/extraction.public-types';
|
|
9
13
|
export * from '../../internal-common/src/public-types/http-status.public-types';
|
|
10
14
|
export * from '../../internal-common/src/public-types/integration.public-types';
|
|
11
|
-
export * from '../../internal-common/src/public-types/
|
|
15
|
+
export * from '../../internal-common/src/public-types/job.public-types';
|
|
12
16
|
export * from '../../internal-common/src/public-types/metric.public-types';
|
|
13
17
|
export * from '../../internal-common/src/public-types/openapi.public-types';
|
|
14
18
|
export * from '../../internal-common/src/public-types/query.public-types';
|
|
15
19
|
export * from '../../internal-common/src/public-types/regions.public-types';
|
|
20
|
+
export * from '../../internal-common/src/public-types/scheduler.public-types';
|
|
16
21
|
export * from '../../internal-common/src/public-types/schema.public-types';
|
|
17
22
|
export * from '../../internal-common/src/public-types/secret.public-types';
|
|
18
23
|
export * from '../../internal-common/src/public-types/serialized-query.public-types';
|
|
19
|
-
export * from '../../internal-common/src/public-types/scheduler.public-types';
|
|
20
24
|
export * from '../../internal-common/src/public-types/socket.public-types';
|
|
21
25
|
export * from '../../internal-common/src/public-types/typescript.public-types';
|
|
22
|
-
export * from '../../internal-common/src/public-types/extraction.public-types';
|
|
23
|
-
export * from '../../internal-common/src/public-types/ai-matchmaking.public-types';
|
|
24
|
-
export * from '../../internal-common/src/public-types/backend.public-types';
|
|
25
26
|
export * from '../../internal-common/src/public-types/web.public-types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { DocumentReference } from '../document-reference';
|
|
3
|
-
import { BaseQueryBuilder, HasDereference, QueryBuilder } from './query-builder.factory';
|
|
4
3
|
import { Alias, DocumentData, FieldName, FieldSort, Operator, PrimitiveFieldType, Query, SerializedJoinQuery, SimpleCondition } from '../public-types';
|
|
5
4
|
import { Pagination, PaginationOptions } from './pagination';
|
|
5
|
+
import { BaseQueryBuilder, HasDereference, QueryBuilder } from './query-builder.factory';
|
|
6
6
|
import { SnapshotEmitter } from './snapshot-emitter';
|
|
7
7
|
/**
|
|
8
8
|
* Represents the result of a join query where each property is a document reference,
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { AdminClient } from './admin-client';
|
|
2
|
+
import { AiClient } from './ai-client';
|
|
1
3
|
import { ApiClient } from './api-client';
|
|
2
4
|
import { CollectionReference } from './collection-reference';
|
|
3
5
|
import { ConnectionDetails } from './connection-details';
|
|
4
6
|
import { DistributedLock } from './distributed-lock.manager';
|
|
7
|
+
import { ExecuteFunctionOptions } from './execute-function-options';
|
|
8
|
+
import { ExtractionClient } from './extraction-client';
|
|
9
|
+
import { JobClient } from './job-client';
|
|
10
|
+
import { ObservabilityClient } from './observability-client';
|
|
11
|
+
import { PersonalStorageClient } from './personal-storage-client';
|
|
5
12
|
import { ApiKey, AppId, CollectionName, DocumentData, EnvironmentId, IntegrationId, SquidDeveloperId, SquidRegion } from './public-types';
|
|
6
13
|
import { QueueManager } from './queue.manager';
|
|
14
|
+
import { SchedulerClient } from './scheduler-client';
|
|
7
15
|
import { StorageClient } from './storage-client';
|
|
8
16
|
import { TransactionId } from './types';
|
|
9
|
-
import { ObservabilityClient } from './observability-client';
|
|
10
|
-
import { ExtractionClient } from './extraction-client';
|
|
11
|
-
import { PersonalStorageClient } from './personal-storage-client';
|
|
12
|
-
import { SchedulerClient } from './scheduler-client';
|
|
13
|
-
import { AdminClient } from './admin-client';
|
|
14
|
-
import { AiClient } from './ai-client';
|
|
15
17
|
import { WebClient } from './web-client';
|
|
16
|
-
import { ExecuteFunctionOptions } from './execute-function-options';
|
|
17
18
|
/**
|
|
18
19
|
* The different options that can be used to initialize a Squid instance.
|
|
19
20
|
* @category Platform
|
|
@@ -108,6 +109,7 @@ export declare class Squid {
|
|
|
108
109
|
private readonly querySender;
|
|
109
110
|
private static readonly squidInstancesMap;
|
|
110
111
|
private readonly aiClient;
|
|
112
|
+
private readonly jobClient;
|
|
111
113
|
private readonly apiClient;
|
|
112
114
|
private readonly adminClient;
|
|
113
115
|
private readonly webClient;
|
|
@@ -226,10 +228,12 @@ export declare class Squid {
|
|
|
226
228
|
executeNativeElasticQuery<T = any>(integrationId: IntegrationId, index: string, body: Record<string, any>, endpoint?: string, method?: 'GET' | 'POST'): Promise<Array<T>>;
|
|
227
229
|
/**
|
|
228
230
|
* Returns a set of AI specific clients.
|
|
229
|
-
*
|
|
230
|
-
* @returns A set of AI specific clients.
|
|
231
231
|
*/
|
|
232
232
|
ai(): AiClient;
|
|
233
|
+
/**
|
|
234
|
+
* Returns a set of functionality for interacting with jobs.
|
|
235
|
+
*/
|
|
236
|
+
job(): JobClient;
|
|
233
237
|
/**
|
|
234
238
|
* Returns a set of functionality for interacting with API integrations.
|
|
235
239
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WebAiSearchResponse,
|
|
1
|
+
import { WebAiSearchResponse, WebShortUrlBulkResponse, WebShortUrlResponse } from '../../internal-common/src/public-types/web.public-types';
|
|
2
2
|
/**
|
|
3
3
|
* WebClient provides methods to interact with web-related functionalities.
|
|
4
4
|
* @category Platform
|