@squidcloud/client 1.0.145 → 1.0.146-beta
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 -53942
- package/dist/esm/index.js +1 -0
- package/dist/internal-common/src/metric-name.d.ts +9 -0
- package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +47 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +895 -0
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +31 -0
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +185 -0
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +431 -0
- package/dist/internal-common/src/public-types/ai-matchmaking.public-types.d.ts +186 -0
- package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +170 -0
- package/dist/internal-common/src/public-types/api-client.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/api.public-types.d.ts +91 -0
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +50 -0
- package/dist/{common/src/backend-function.schemas.d.ts → internal-common/src/public-types/code-executor.public-types.d.ts} +1 -1
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +30 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +83 -0
- package/dist/internal-common/src/public-types/document.public-types.d.ts +71 -0
- package/dist/internal-common/src/public-types/external-auth/external-auth.public-types.d.ts +39 -0
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +183 -0
- package/dist/internal-common/src/public-types/http-status.public-types.d.ts +415 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +51 -0
- package/dist/internal-common/src/public-types/job.public-types.d.ts +59 -0
- package/dist/internal-common/src/public-types/metric.public-types.d.ts +154 -0
- package/dist/internal-common/src/public-types/openapi.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/query.public-types.d.ts +113 -0
- package/dist/internal-common/src/public-types/regions.public-types.d.ts +4 -0
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +43 -0
- package/dist/{common/src/schema/schema.types.d.ts → internal-common/src/public-types/schema.public-types.d.ts} +54 -54
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +51 -0
- package/dist/internal-common/src/public-types/serialized-query.public-types.d.ts +60 -0
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +4 -0
- package/dist/{common/src/types.d.ts → internal-common/src/public-types/typescript.public-types.d.ts} +20 -14
- package/dist/internal-common/src/public-types/web.public-types.d.ts +93 -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 +72 -0
- package/dist/{common/src/query/query-context.d.ts → internal-common/src/public-types-backend/query.public-context.d.ts} +177 -137
- package/dist/{common/src/ai-chatbot.schemas.d.ts → internal-common/src/public-utils/context-utils.d.ts} +1 -1
- package/dist/internal-common/src/public-utils/id-utils.d.ts +44 -0
- package/dist/internal-common/src/types/ai-agent.types.d.ts +199 -0
- package/dist/{common/src/mutation.schemas.d.ts → internal-common/src/types/ai-assistant.types.d.ts} +1 -1
- package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +202 -0
- package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +59 -0
- package/dist/{common/src → internal-common/src/types}/backend-function.types.d.ts +1 -1
- 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/headers.types.d.ts +17 -0
- package/dist/internal-common/src/types/mutation.types.d.ts +1 -0
- package/dist/internal-common/src/types/notification.types.d.ts +5 -0
- package/dist/internal-common/src/types/observability.types.d.ts +78 -0
- package/dist/internal-common/src/types/query.types.d.ts +13 -0
- package/dist/internal-common/src/types/secret.types.d.ts +7 -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/{common/src → internal-common/src/types}/time-units.d.ts +1 -1
- 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/{common → internal-common}/src/utils/global.utils.d.ts +1 -1
- package/dist/internal-common/src/utils/http.d.ts +5 -0
- package/dist/{common → internal-common}/src/utils/lock.manager.d.ts +14 -14
- 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 +58 -0
- package/dist/internal-common/src/utils/serialization.d.ts +17 -0
- package/dist/internal-common/src/utils/squid.constants.d.ts +1 -0
- package/dist/internal-common/src/utils/trace-id-generator.d.ts +1 -0
- package/dist/internal-common/src/utils/validation.d.ts +19 -0
- package/dist/{common → internal-common}/src/websocket.impl.d.ts +26 -21
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/admin-client.d.ts +23 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +181 -0
- package/dist/typescript-client/src/agent/ai-agent-client.d.ts +37 -0
- package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +69 -0
- package/dist/typescript-client/src/ai-assistant-client.d.ts +72 -73
- package/dist/typescript-client/src/ai-audio-client.d.ts +25 -0
- package/dist/typescript-client/src/ai-client.d.ts +129 -0
- package/dist/typescript-client/src/ai-files-client.d.ts +33 -0
- package/dist/typescript-client/src/ai-image-client.d.ts +25 -0
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +86 -0
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client.d.ts +28 -0
- package/dist/typescript-client/src/ai-matchmaking-client.d.ts +99 -0
- package/dist/typescript-client/src/api-client.d.ts +69 -0
- package/dist/typescript-client/src/auth.manager.d.ts +11 -26
- package/dist/typescript-client/src/backend-function.manager.d.ts +1 -9
- package/dist/typescript-client/src/client-customization.utils.d.ts +1 -0
- package/dist/typescript-client/src/client-id.service.d.ts +1 -27
- package/dist/typescript-client/src/collection-reference.d.ts +105 -80
- package/dist/typescript-client/src/collection-reference.factory.d.ts +1 -13
- package/dist/typescript-client/src/connection-details.d.ts +24 -23
- package/dist/typescript-client/src/console-utils.d.ts +1 -0
- package/dist/typescript-client/src/data.manager.d.ts +1 -173
- package/dist/typescript-client/src/destruct.manager.d.ts +1 -12
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +39 -16
- package/dist/typescript-client/src/document-identity.service.d.ts +1 -12
- package/dist/typescript-client/src/document-reference.d.ts +151 -140
- package/dist/typescript-client/src/document-reference.factory.d.ts +1 -13
- package/dist/typescript-client/src/document-store.d.ts +1 -14
- package/dist/typescript-client/src/execute-function-options.d.ts +73 -0
- package/dist/typescript-client/src/external-auth-client.d.ts +36 -0
- package/dist/typescript-client/src/extraction-client.d.ts +32 -0
- package/dist/typescript-client/src/file-args-transformer.d.ts +1 -0
- package/dist/typescript-client/src/file-utils.d.ts +1 -0
- package/dist/typescript-client/src/index.d.ts +63 -9
- package/dist/typescript-client/src/integration-client.d.ts +60 -0
- package/dist/typescript-client/src/job-client.d.ts +32 -0
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +1 -10
- package/dist/typescript-client/src/native-query-manager.d.ts +1 -7
- package/dist/typescript-client/src/notification-client.d.ts +20 -0
- package/dist/typescript-client/src/observability-client.d.ts +43 -0
- package/dist/typescript-client/src/public-types.d.ts +30 -0
- package/dist/typescript-client/src/public-utils.d.ts +1 -0
- package/dist/typescript-client/src/query/deserializer.d.ts +10 -3
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +316 -161
- package/dist/typescript-client/src/query/local-query-manager.d.ts +1 -9
- package/dist/{common → typescript-client}/src/query/pagination.d.ts +65 -62
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +228 -77
- package/dist/typescript-client/src/query/query-sender.d.ts +1 -33
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +1 -130
- package/dist/typescript-client/src/query/query.types.d.ts +16 -49
- package/dist/typescript-client/src/query/snapshot-emitter.d.ts +41 -0
- package/dist/typescript-client/src/query-utils.d.ts +18 -0
- package/dist/typescript-client/src/queue.manager.d.ts +12 -0
- package/dist/typescript-client/src/rate-limiter.d.ts +1 -32
- package/dist/typescript-client/src/rpc.manager.d.ts +1 -30
- package/dist/typescript-client/src/scheduler-client.d.ts +31 -0
- package/dist/typescript-client/src/secret.client.d.ts +96 -22
- package/dist/typescript-client/src/socket.manager.d.ts +1 -43
- package/dist/typescript-client/src/squid-http-client.d.ts +11 -0
- package/dist/typescript-client/src/squid.d.ts +378 -269
- package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
- package/dist/typescript-client/src/storage-client.d.ts +145 -0
- package/dist/typescript-client/src/types.d.ts +27 -2
- package/dist/typescript-client/src/version.d.ts +5 -0
- package/dist/typescript-client/src/web-client.d.ts +63 -0
- package/dist/typescript-client/src/webhook.manager.d.ts +10 -0
- package/package.json +34 -18
- package/dist/common/src/ai-assistant.types.d.ts +0 -25
- package/dist/common/src/ai-chatbot.context.d.ts +0 -12
- package/dist/common/src/ai-chatbot.types.d.ts +0 -27
- package/dist/common/src/api-call.context.d.ts +0 -13
- package/dist/common/src/api.types.d.ts +0 -4
- package/dist/common/src/application.schemas.d.ts +0 -66
- package/dist/common/src/application.types.d.ts +0 -143
- package/dist/common/src/backend-run.types.d.ts +0 -2
- package/dist/common/src/bundle-api.types.d.ts +0 -43
- package/dist/common/src/bundle-data.types.d.ts +0 -5
- package/dist/common/src/communication.types.d.ts +0 -8
- package/dist/common/src/context.types.d.ts +0 -40
- package/dist/common/src/distributed-lock.context.d.ts +0 -4
- package/dist/common/src/document.types.d.ts +0 -22
- package/dist/common/src/graphql.context.d.ts +0 -7
- package/dist/common/src/graphql.types.d.ts +0 -9
- package/dist/common/src/heartbeat.types.d.ts +0 -1
- package/dist/common/src/http-status.enum.d.ts +0 -50
- package/dist/common/src/index.d.ts +0 -57
- package/dist/common/src/integrations/ai_chatbot.types.d.ts +0 -31
- package/dist/common/src/integrations/api.types.d.ts +0 -80
- package/dist/common/src/integrations/auth.types.d.ts +0 -47
- package/dist/common/src/integrations/database.types.d.ts +0 -274
- package/dist/common/src/integrations/index.d.ts +0 -134
- package/dist/common/src/integrations/observability.types.d.ts +0 -23
- package/dist/common/src/logger.types.d.ts +0 -21
- package/dist/common/src/metrics.types.d.ts +0 -1
- package/dist/common/src/mutation.context.d.ts +0 -14
- package/dist/common/src/mutation.types.d.ts +0 -53
- package/dist/common/src/named-query.context.d.ts +0 -4
- package/dist/common/src/named-query.schemas.d.ts +0 -1
- package/dist/common/src/named-query.types.d.ts +0 -1
- package/dist/common/src/native-query.context.d.ts +0 -7
- package/dist/common/src/native-query.types.d.ts +0 -16
- package/dist/common/src/query/base-query-builder.d.ts +0 -147
- package/dist/common/src/query/index.d.ts +0 -4
- package/dist/common/src/query/serialized-query.types.d.ts +0 -24
- package/dist/common/src/query.types.d.ts +0 -64
- package/dist/common/src/regions.d.ts +0 -1
- package/dist/common/src/secret.schemas.d.ts +0 -1
- package/dist/common/src/secret.types.d.ts +0 -22
- package/dist/common/src/security.types.d.ts +0 -1
- package/dist/common/src/socket.schemas.d.ts +0 -1
- package/dist/common/src/socket.types.d.ts +0 -5
- package/dist/common/src/trigger.types.d.ts +0 -1
- package/dist/common/src/utils/array.d.ts +0 -1
- package/dist/common/src/utils/assert.d.ts +0 -1
- package/dist/common/src/utils/error.d.ts +0 -4
- package/dist/common/src/utils/http.d.ts +0 -2
- package/dist/common/src/utils/id.d.ts +0 -2
- package/dist/common/src/utils/object.d.ts +0 -5
- package/dist/common/src/utils/serialization.d.ts +0 -6
- package/dist/common/src/utils/transforms.d.ts +0 -18
- package/dist/common/src/utils/url.d.ts +0 -1
- package/dist/common/src/utils/validation.d.ts +0 -25
- package/dist/common/src/webhook-response.d.ts +0 -1
- package/dist/typescript-client/src/ai-chatbot-client.d.ts +0 -174
- package/dist/typescript-client/src/ai-chatbot-client.factory.d.ts +0 -8
- package/dist/typescript-client/src/ai.types.d.ts +0 -61
- package/dist/typescript-client/src/api.manager.d.ts +0 -11
- package/dist/typescript-client/src/graphql-client.d.ts +0 -14
- package/dist/typescript-client/src/graphql-client.factory.d.ts +0 -11
- package/dist/typescript-client/src/named-query.manager.d.ts +0 -11
- package/dist/typescript-client/src/state/action.applier.d.ts +0 -7
- package/dist/typescript-client/src/state/actions.d.ts +0 -29
- package/dist/typescript-client/src/state/path_trie.d.ts +0 -27
- package/dist/typescript-client/src/state/state.service.d.ts +0 -22
- package/dist/typescript-client/src/testing/setup-tests.d.ts +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AiGenerateImageOptions } from './public-types';
|
|
2
|
+
/**
|
|
3
|
+
* AiImageClient provides methods for AI-powered image processing,
|
|
4
|
+
* such as generating images from text prompts and removing backgrounds.
|
|
5
|
+
* @category AI
|
|
6
|
+
*/
|
|
7
|
+
export declare class AiImageClient {
|
|
8
|
+
private readonly rpcManager;
|
|
9
|
+
/**
|
|
10
|
+
* Generates an image based on a given text prompt and options and returns a url to the generated image.
|
|
11
|
+
* The url will be valid for one hour.
|
|
12
|
+
*
|
|
13
|
+
* @param prompt - A natural language description of the desired image.
|
|
14
|
+
* @param options - Configuration options for image generation (e.g., size, style).
|
|
15
|
+
* @returns A Promise that resolves to a url with the image.
|
|
16
|
+
*/
|
|
17
|
+
generate(prompt: string, options: AiGenerateImageOptions): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Removes the background from an image file.
|
|
20
|
+
*
|
|
21
|
+
* @param file - The image file to process.
|
|
22
|
+
* @returns A Promise that resolves to a base64-encoded image string with the background removed.
|
|
23
|
+
*/
|
|
24
|
+
removeBackground(file: File): Promise<string>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
2
|
+
import { AiContextId } from '../../../internal-common/src/public-types/communication.public-types';
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for creating or updating an AI agent.
|
|
5
|
+
* Excludes the `id` field, as it is derived from the agent instance.
|
|
6
|
+
* @category AI
|
|
7
|
+
*/
|
|
8
|
+
export type UpsertKnowledgeBaseRequestParams = Omit<AiKnowledgeBase, 'id'>;
|
|
9
|
+
/**
|
|
10
|
+
* A reference to an AI knowledge base.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AiKnowledgeBaseReference {
|
|
13
|
+
private readonly knowledgeBaseId;
|
|
14
|
+
private readonly rpcManager;
|
|
15
|
+
private readonly jobClient;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the AI knowledge base.
|
|
18
|
+
* @returns A promise that resolves to the AI knowledge base or undefined if not found.
|
|
19
|
+
*/
|
|
20
|
+
getKnowledgeBase(): Promise<AiKnowledgeBase | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns all AI knowledge bases.
|
|
23
|
+
* @returns A promise that resolves to an array of AI Knowledge Bases
|
|
24
|
+
*/
|
|
25
|
+
listKnowledgeBases(): Promise<Array<AiKnowledgeBase>>;
|
|
26
|
+
/**
|
|
27
|
+
* Upserts the AI knowledge base.
|
|
28
|
+
* @param knowledgeBase
|
|
29
|
+
*/
|
|
30
|
+
upsertKnowledgeBase(knowledgeBase: Omit<AiKnowledgeBaseWithOptionalChatModel, 'id' | 'appId' | 'updatedAt'>): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Deletes the AI knowledge base.
|
|
33
|
+
* @returns A promise that resolves when the deletion is complete.
|
|
34
|
+
*/
|
|
35
|
+
delete(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Lists all contexts associated with the knowledge base.
|
|
38
|
+
*/
|
|
39
|
+
listContexts(truncateTextAfter?: number): Promise<Array<AiKnowledgeBaseContext>>;
|
|
40
|
+
/**
|
|
41
|
+
* Lists the ids for all contexts associated with the knowledge base.
|
|
42
|
+
*/
|
|
43
|
+
listContextIds(): Promise<Array<AiContextId>>;
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves a specific context by its ID.
|
|
46
|
+
*/
|
|
47
|
+
getContext(contextId: string): Promise<AiKnowledgeBaseContext | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes a specific context by its ID.
|
|
50
|
+
*/
|
|
51
|
+
deleteContext(contextId: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes multiple contexts.
|
|
54
|
+
*/
|
|
55
|
+
deleteContexts(contextIds: Array<string>): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Adds or updates a single context.
|
|
58
|
+
*/
|
|
59
|
+
upsertContext(contextRequest: AiKnowledgeBaseContextRequest, file?: File): Promise<UpsertKnowledgeBaseContextResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Adds or updates multiple contexts.
|
|
62
|
+
*/
|
|
63
|
+
upsertContexts(contextRequests: Array<AiKnowledgeBaseContextRequest>, files?: Array<File>): Promise<UpsertKnowledgeBaseContextsResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Performs a semantic search in the knowledge base and returns chunks from the different contexts.
|
|
66
|
+
*/
|
|
67
|
+
search(options: AiKnowledgeBaseChatOptions & {
|
|
68
|
+
prompt: string;
|
|
69
|
+
}): Promise<Array<AiKnowledgeBaseSearchResultChunk>>;
|
|
70
|
+
/**
|
|
71
|
+
* Performs a semantic search in the knowledge base and returns contexts with reasoning.
|
|
72
|
+
* Can be used for matchmaking or similarity search.
|
|
73
|
+
*/
|
|
74
|
+
searchContextsWithPrompt(request: Omit<AiKnowledgeBaseSearchContextsWithPromptRequest, 'knowledgeBaseId'>): Promise<Array<AiKnowledgeBaseContextWithReasoning>>;
|
|
75
|
+
/**
|
|
76
|
+
* Performs a semantic search in the knowledge base and returns contexts with reasoning.
|
|
77
|
+
* Can be used for matchmaking or similarity search.
|
|
78
|
+
*/
|
|
79
|
+
searchContextsWithContextId(request: Omit<AiKnowledgeBaseSearchContextsWithContextIdRequest, 'knowledgeBaseId'>): Promise<Array<AiKnowledgeBaseContextWithReasoning>>;
|
|
80
|
+
/**
|
|
81
|
+
* Gets the download URL for the requested context.
|
|
82
|
+
*
|
|
83
|
+
* @return Object with temporary URL to download the requested context. Will be `undefined` if file is unavailable.
|
|
84
|
+
*/
|
|
85
|
+
downloadContext(contextId: string): Promise<AiKnowledgeBaseDownloadContextResponse>;
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AiKnowledgeBase } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
2
|
+
import { AiKnowledgeBaseId } from '../../../internal-common/src/public-types/communication.public-types';
|
|
3
|
+
import { AiKnowledgeBaseReference } from './ai-knowledge-base-client-reference';
|
|
4
|
+
/**
|
|
5
|
+
* AiKnowledgeBaseClient manages AI knowledgebase interactions, including
|
|
6
|
+
* listing knowledgebases.
|
|
7
|
+
*
|
|
8
|
+
* @category AI
|
|
9
|
+
*/
|
|
10
|
+
export declare class AiKnowledgeBaseClient {
|
|
11
|
+
private readonly rpcManager;
|
|
12
|
+
private readonly jobClient;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves an instance of AiKnowledeBaseReference for a specific kb ID.
|
|
15
|
+
* This reference provides methods for interacting with the knowledgebase.
|
|
16
|
+
*/
|
|
17
|
+
knowledgeBase(id: AiKnowledgeBaseId): AiKnowledgeBaseReference;
|
|
18
|
+
/**
|
|
19
|
+
* Lists all knowledgebases available in the system.
|
|
20
|
+
* @returns A promise that resolves to an array of AiKnowledgeBase instances.
|
|
21
|
+
*/
|
|
22
|
+
listKnowledgeBases(): Promise<Array<AiKnowledgeBase>>;
|
|
23
|
+
/**
|
|
24
|
+
* Deletes the AI knowledge base.
|
|
25
|
+
* @returns A promise that resolves when the deletion is complete.
|
|
26
|
+
*/
|
|
27
|
+
delete(id: AiKnowledgeBaseId): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { MmEntity, MmEntityMatch, MmFindMatchesOptions, MmListEntitiesOptions, MmMatchMaker } from '../../internal-common/src/public-types/ai-matchmaking.public-types';
|
|
2
|
+
/**
|
|
3
|
+
* Client for the AI Matchmaking service. This service allows you to create matchmakers and insert entities into them.
|
|
4
|
+
* The service will then find matches for the entities.
|
|
5
|
+
* @category AI
|
|
6
|
+
* @deprecated - Use `knowledgebase('kbId').searchContextsWith*()` instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AiMatchMakingClient {
|
|
9
|
+
private readonly rpcManager;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new matchmaker with the given metadata.
|
|
12
|
+
*
|
|
13
|
+
* @param matchMaker - Object describing the matchmaker including ID, description (used as AI instructions), and categories.
|
|
14
|
+
* @returns A MatchMaker instance to perform entity-level operations.
|
|
15
|
+
*/
|
|
16
|
+
createMatchMaker(matchMaker: MmMatchMaker): Promise<MatchMaker>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves an existing matchmaker by its ID.
|
|
19
|
+
*
|
|
20
|
+
* @param matchMakerId - ID of the matchmaker to retrieve.
|
|
21
|
+
* @returns A MatchMaker instance if found, otherwise undefined.
|
|
22
|
+
*/
|
|
23
|
+
getMatchMaker(matchMakerId: string): Promise<MatchMaker | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Lists all existing matchmakers.
|
|
26
|
+
*/
|
|
27
|
+
listMatchMakers(): Promise<Array<MmMatchMaker>>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Represents a matchmaker. You can insert entities into the matchmaker and find matches for them.
|
|
31
|
+
*
|
|
32
|
+
* A matchmaker has one or more categories. When inserting an entity, it is assigned to a category.
|
|
33
|
+
* When finding matches, you can specify which categories to use for source and target.
|
|
34
|
+
*
|
|
35
|
+
* The matchmaker description is used as a prompt or instruction to the AI to guide the matchmaking behavior.
|
|
36
|
+
* @category AI
|
|
37
|
+
*/
|
|
38
|
+
export declare class MatchMaker {
|
|
39
|
+
private readonly matchMaker;
|
|
40
|
+
private readonly rpcManager;
|
|
41
|
+
readonly id: string;
|
|
42
|
+
/**
|
|
43
|
+
* Adds a new entity to the matchmaker, replacing existing entity with the same ID if it exists.
|
|
44
|
+
*
|
|
45
|
+
* @param entity - The entity to insert.
|
|
46
|
+
*/
|
|
47
|
+
insertEntity(entity: MmEntity): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Inserts multiple entities into the matchmaker. Replaces existing entities with matching IDs.
|
|
50
|
+
*
|
|
51
|
+
* @param entities - Array of entities to insert.
|
|
52
|
+
*/
|
|
53
|
+
insertManyEntities(entities: Array<MmEntity>): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes the matchmaker and all its associated data.
|
|
56
|
+
*/
|
|
57
|
+
delete(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a specific entity from the matchmaker.
|
|
60
|
+
*
|
|
61
|
+
* @param entityId - The ID of the entity to delete.
|
|
62
|
+
*/
|
|
63
|
+
deleteEntity(entityId: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Finds matches for an entity already inserted into the matchmaker.
|
|
66
|
+
*
|
|
67
|
+
* @param entityId - ID of the entity to match.
|
|
68
|
+
* @param options - Optional filters and controls for matching.
|
|
69
|
+
* @returns Array of entity matches.
|
|
70
|
+
*/
|
|
71
|
+
findMatches(entityId: string, options?: MmFindMatchesOptions): Promise<Array<MmEntityMatch>>;
|
|
72
|
+
/**
|
|
73
|
+
* Finds matches for an entity not yet inserted into the matchmaker.
|
|
74
|
+
*
|
|
75
|
+
* @param entity - The entity object (excluding ID and metadata).
|
|
76
|
+
* @param options - Optional filters and controls for matching.
|
|
77
|
+
* @returns Array of entity matches.
|
|
78
|
+
*/
|
|
79
|
+
findMatchesForEntity(entity: Omit<MmEntity, 'metadata' | 'id'>, options?: MmFindMatchesOptions): Promise<Array<MmEntityMatch>>;
|
|
80
|
+
/**
|
|
81
|
+
* Lists entities currently in the matchmaker that belong to the specified category.
|
|
82
|
+
*
|
|
83
|
+
* @param categoryId - The category to filter entities by.
|
|
84
|
+
* @param options - Pagination and filtering options.
|
|
85
|
+
* @returns Array of entities in the category.
|
|
86
|
+
*/
|
|
87
|
+
listEntities(categoryId: string, options?: MmListEntitiesOptions): Promise<Array<MmEntity>>;
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves a single entity from the matchmaker by its ID.
|
|
90
|
+
*
|
|
91
|
+
* @param entityId - ID of the entity to retrieve.
|
|
92
|
+
* @returns The entity if found, or undefined.
|
|
93
|
+
*/
|
|
94
|
+
getEntity(entityId: string): Promise<MmEntity | undefined>;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the matchmaker metadata including description, categories, and ID.
|
|
97
|
+
*/
|
|
98
|
+
getMatchMakerDetails(): MmMatchMaker;
|
|
99
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ApiOptions } from '../../internal-common/src/public-types/api-client.public-types';
|
|
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';
|
|
4
|
+
import { HttpResponse } from './squid-http-client';
|
|
5
|
+
/**
|
|
6
|
+
* ApiClient facilitates making HTTP API requests to external integrations,
|
|
7
|
+
* supporting various HTTP methods such as GET, POST, PUT, PATCH, and DELETE.
|
|
8
|
+
* @category Platform
|
|
9
|
+
*/
|
|
10
|
+
export declare class ApiClient {
|
|
11
|
+
private readonly rpcManager;
|
|
12
|
+
/**
|
|
13
|
+
* Sends a GET request to the specified integration endpoint.
|
|
14
|
+
*
|
|
15
|
+
* @param integrationId The integration to send the request to.
|
|
16
|
+
* @param endpointId The API endpoint to call.
|
|
17
|
+
* @param options Optional API request options (headers, query params, etc).
|
|
18
|
+
* @returns A promise resolving to the HTTP response.
|
|
19
|
+
*/
|
|
20
|
+
get<ResponseBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
|
|
21
|
+
/**
|
|
22
|
+
* Sends a POST request to the specified integration endpoint.
|
|
23
|
+
*
|
|
24
|
+
* @param integrationId The integration to send the request to.
|
|
25
|
+
* @param endpointId The API endpoint to call.
|
|
26
|
+
* @param body Optional request body to send.
|
|
27
|
+
* @param options Optional API request options (headers, query params, etc).
|
|
28
|
+
* @returns A promise resolving to the HTTP response.
|
|
29
|
+
*/
|
|
30
|
+
post<ResponseBodyType = unknown, RequestBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, body?: RequestBodyType, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
|
|
31
|
+
/**
|
|
32
|
+
* Sends a DELETE request to the specified integration endpoint.
|
|
33
|
+
*
|
|
34
|
+
* @param integrationId The integration to send the request to.
|
|
35
|
+
* @param endpointId The API endpoint to call.
|
|
36
|
+
* @param body Optional request body to send.
|
|
37
|
+
* @param options Optional API request options (headers, query params, etc).
|
|
38
|
+
* @returns A promise resolving to the HTTP response.
|
|
39
|
+
*/
|
|
40
|
+
delete<ResponseBodyType = unknown, RequestBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, body?: RequestBodyType, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
|
|
41
|
+
/**
|
|
42
|
+
* Sends a PATCH request to the specified integration endpoint.
|
|
43
|
+
*
|
|
44
|
+
* @param integrationId The integration to send the request to.
|
|
45
|
+
* @param endpointId The API endpoint to call.
|
|
46
|
+
* @param body Optional request body to send.
|
|
47
|
+
* @param options Optional API request options (headers, query params, etc).
|
|
48
|
+
* @returns A promise resolving to the HTTP response.
|
|
49
|
+
*/
|
|
50
|
+
patch<ResponseBodyType = unknown, RequestBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, body?: RequestBodyType, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
|
|
51
|
+
/**
|
|
52
|
+
* Sends a PUT request to the specified integration endpoint.
|
|
53
|
+
*
|
|
54
|
+
* @param integrationId The integration to send the request to.
|
|
55
|
+
* @param endpointId The API endpoint to call.
|
|
56
|
+
* @param body Optional request body to send.
|
|
57
|
+
* @param options Optional API request options (headers, query params, etc).
|
|
58
|
+
* @returns A promise resolving to the HTTP response.
|
|
59
|
+
*/
|
|
60
|
+
put<ResponseBodyType = unknown, RequestBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, body?: RequestBodyType, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
|
|
61
|
+
/**
|
|
62
|
+
* Performs an HTTP API request to the given integration ID and endpoint ID.
|
|
63
|
+
* The provided options will be merged with the default options.
|
|
64
|
+
* In case of error (status code >= 400 or other error), the promise will be rejected with an RpcError.
|
|
65
|
+
*/
|
|
66
|
+
request<ResponseBodyType = unknown, RequestBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, body?: RequestBodyType, options?: ApiOptions, method?: HttpMethod): Promise<HttpResponse<ResponseBodyType>>;
|
|
67
|
+
private convertOptionsToStrings;
|
|
68
|
+
private convertToStrings;
|
|
69
|
+
}
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Sets a new auth-token provider to Squid.
|
|
14
|
-
* All future squid backend requests will use this token provider.
|
|
15
|
-
* Exising in-flight requests won't be affected.
|
|
16
|
-
*/
|
|
17
|
-
setAuthProvider(authProvider: SquidAuthProvider): void;
|
|
18
|
-
getAuthData(): Promise<AuthData>;
|
|
19
|
-
getApiKey(): ApiKey | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Returns a valid AuthToken.
|
|
22
|
-
* Tries to use `apiKey` first if set up.
|
|
23
|
-
* Falls back to `await authTokenProvider()` result.
|
|
24
|
-
*/
|
|
25
|
-
getToken(): Promise<AuthToken | undefined>;
|
|
26
|
-
}
|
|
1
|
+
import { IntegrationId } from './public-types';
|
|
2
|
+
/**
|
|
3
|
+
* Holds authentication token for the specified integration.
|
|
4
|
+
* @category Auth
|
|
5
|
+
*/
|
|
6
|
+
export interface AuthData {
|
|
7
|
+
/** Authentication token for the specified integration. */
|
|
8
|
+
token: string | undefined;
|
|
9
|
+
/** Optional integration ID associated with the authentication. */
|
|
10
|
+
integrationId?: IntegrationId;
|
|
11
|
+
}
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { RpcManager } from './rpc.manager';
|
|
3
|
-
import { ClientIdService } from './client-id.service';
|
|
4
|
-
export declare class BackendFunctionManager {
|
|
5
|
-
private readonly clientIdService;
|
|
6
|
-
private readonly rpcManager;
|
|
7
|
-
constructor(clientIdService: ClientIdService, rpcManager: RpcManager);
|
|
8
|
-
executeFunctionAndSubscribe<T>(functionName: string, ...params: any[]): Observable<T>;
|
|
9
|
-
}
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ClientId } from '@squidcloud/common';
|
|
3
|
-
import { DestructManager } from './destruct.manager';
|
|
4
|
-
/**
|
|
5
|
-
* Whenever a squid client is created, it assigns itself a client id.
|
|
6
|
-
* Later on, if the squid client disconnects for a specified time interval, it will generate itself a new client id.
|
|
7
|
-
* The client id is generated before the socket is reconnected, so it is possible that the new client id is generated,
|
|
8
|
-
* but the socket has not connected yet.
|
|
9
|
-
*
|
|
10
|
-
* Short-term disconnects/reconnects of the socket do not cause the client id to be regenerated.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ClientIdService {
|
|
13
|
-
private readonly destructManager;
|
|
14
|
-
private readonly clientTooOldSubject;
|
|
15
|
-
private readonly clientIdSubject;
|
|
16
|
-
private readonly isTenant;
|
|
17
|
-
constructor(destructManager: DestructManager);
|
|
18
|
-
observeClientId(): Observable<ClientId>;
|
|
19
|
-
observeClientTooOld(): Observable<void>;
|
|
20
|
-
/** there was a long-term disconnection of the socket */
|
|
21
|
-
notifyClientTooOld(): void;
|
|
22
|
-
notifyClientReadyToBeRegenerated(): void;
|
|
23
|
-
observeClientReadyToBeRegenerated(): Observable<void>;
|
|
24
|
-
getClientId(): ClientId;
|
|
25
|
-
isClientTooOld(): boolean;
|
|
26
|
-
private generateClientId;
|
|
27
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,80 +1,105 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { JoinQueryBuilder } from './query/join-query-builder.factory';
|
|
4
|
-
import { QueryBuilder } from './query/query-builder.factory';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
*/
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
import { DocumentReference } from './document-reference';
|
|
2
|
+
import { Alias, DocIdOrDocIdObj, DocumentData } from './public-types';
|
|
3
|
+
import { JoinQueryBuilder } from './query/join-query-builder.factory';
|
|
4
|
+
import { QueryBuilder } from './query/query-builder.factory';
|
|
5
|
+
import { SnapshotEmitter } from './query/snapshot-emitter';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a docId and the data to be inserted.
|
|
8
|
+
* If the docId is not provided, it will be generated on the server in case the integration supports it.
|
|
9
|
+
* Read more about docId in the
|
|
10
|
+
* {@link https://docs.squid.cloud/docs/api-reference/client-sdk-reference/classes/CollectionReference#doc
|
|
11
|
+
* documentation}.
|
|
12
|
+
* @category Database
|
|
13
|
+
*/
|
|
14
|
+
export interface DocIdAndData<T extends DocumentData> {
|
|
15
|
+
/** Optional document ID. If not provided, it may be generated by the server. */
|
|
16
|
+
id?: DocIdOrDocIdObj;
|
|
17
|
+
/** Data associated with the document. */
|
|
18
|
+
data: T;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Holds a reference to a data collection. A collection reference is a reference to a collection in a database. You
|
|
22
|
+
* can use it to read or write data to the collection. A collection can refer to a table in a relational database or a
|
|
23
|
+
* collection in a NoSQL database.
|
|
24
|
+
*
|
|
25
|
+
* Read more about collection references in the
|
|
26
|
+
* {@link https://docs.getsquid.ai/docs/sdk/client-sdk/database/collection-reference documentation}.
|
|
27
|
+
* @typeParam T The type of the document data.
|
|
28
|
+
* @category Database
|
|
29
|
+
*/
|
|
30
|
+
export declare class CollectionReference<T extends DocumentData> {
|
|
31
|
+
private readonly collectionName;
|
|
32
|
+
private integrationId;
|
|
33
|
+
private readonly documentReferenceFactory;
|
|
34
|
+
private readonly queryBuilderFactory;
|
|
35
|
+
private readonly querySubscriptionManager;
|
|
36
|
+
private readonly dataManager;
|
|
37
|
+
/** A string that uniquely identifies this collection reference. */
|
|
38
|
+
refId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a document reference for the given document id.
|
|
41
|
+
* The document id is an object that maps the primary keys of the collection (as defined in the Squid Console)
|
|
42
|
+
* to their values. There are a few exceptions:
|
|
43
|
+
* 1 - String document id is only supported for the `built_in_db` when a schema was not defined.
|
|
44
|
+
* 2 - Not all the fields in the document id are required. If a field is not provided, it will be generated on the
|
|
45
|
+
* server once the document is created (if the integration supports it).
|
|
46
|
+
* 3 - When a document id is not provided, it will be treated as an empty object or empty string.
|
|
47
|
+
* 4 - When the document id is just a `string` and not provided (applies only for the `built_in_db`), it will be
|
|
48
|
+
* generated on the server.
|
|
49
|
+
* 5 - If the collection in the `built_in_db` does not have a schema, the document id must be provided as a string.
|
|
50
|
+
*
|
|
51
|
+
* Examples:
|
|
52
|
+
* ```typescript
|
|
53
|
+
* // For a collection in the built_in_db that does not have a schema
|
|
54
|
+
* const docRef = collectionRef.doc('my-doc-id');
|
|
55
|
+
* const docRef = collectionRef.doc({id: my-doc-id'});
|
|
56
|
+
*
|
|
57
|
+
* // For a collection with a single primary key field called "id"
|
|
58
|
+
* const docRef = collectionRef.doc({id: 'my-doc-id'});
|
|
59
|
+
*
|
|
60
|
+
* // For a collection with a composite primary key
|
|
61
|
+
* const docRef = collectionRef.doc({id1: 'my-doc-id1', id2: 'my-doc-id2'});
|
|
62
|
+
* const docRef = collectionRef.doc({id1: 'my-doc-id1'}); // id2 will be generated on the server if the integration
|
|
63
|
+
* supports it
|
|
64
|
+
*
|
|
65
|
+
* // For a collection from the `built_in_db` without a defined schema when an id is not provided
|
|
66
|
+
* const docRef = collectionRef.doc(); // The id will be generated on the server
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param docId The document id as an object for the different fields in the primary key or a string.
|
|
70
|
+
* @returns A document reference for the given document id.
|
|
71
|
+
*/
|
|
72
|
+
doc(docId?: DocIdOrDocIdObj): DocumentReference<T>;
|
|
73
|
+
/**
|
|
74
|
+
* Inserts multiple documents into the collection.
|
|
75
|
+
*/
|
|
76
|
+
insertMany(docs: Array<DocIdAndData<T>>, txId?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Deletes multiple documents from the collection.
|
|
79
|
+
*/
|
|
80
|
+
deleteMany(docIdsOrReferences: Array<DocIdOrDocIdObj | DocumentReference<T>>, txId?: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a `QueryBuilder` that can be used to query the collection.
|
|
83
|
+
*
|
|
84
|
+
* @returns A `QueryBuilder` that can be used to query the collection.
|
|
85
|
+
*/
|
|
86
|
+
query(): QueryBuilder<T>;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a `JoinQueryBuilder` that can be used to query the collection
|
|
89
|
+
* Note that when using a join query, you have to provide an alias for the query and for every other query
|
|
90
|
+
* participating in the join.
|
|
91
|
+
*
|
|
92
|
+
* @param alias The alias for the query.
|
|
93
|
+
* @returns A `JoinQueryBuilder` that can be used to query the collection and joins with other queries.
|
|
94
|
+
*/
|
|
95
|
+
joinQuery<A extends Alias>(alias: A): JoinQueryBuilder<Record<A, []>, Record<A, T>, A, A>;
|
|
96
|
+
/**
|
|
97
|
+
* Performs `or` on a list of queries. All the queries need to be on the same collection.
|
|
98
|
+
* The result will be a merge of all the queries sorted by the same sort condition of the first query.
|
|
99
|
+
* Duplicate items will be removed.
|
|
100
|
+
* @param builders The list of query builders to merge. (A query builder can be returned from the {@link query}
|
|
101
|
+
* method).
|
|
102
|
+
* @returns A query builder that can be used to perform the `or` operation.
|
|
103
|
+
*/
|
|
104
|
+
or(...builders: QueryBuilder<T>[]): SnapshotEmitter<DocumentReference<T>>;
|
|
105
|
+
}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { CollectionReference } from './collection-reference';
|
|
3
|
-
import { DocumentReferenceFactory } from './document-reference.factory';
|
|
4
|
-
import { QueryBuilderFactory } from './query/query-builder.factory';
|
|
5
|
-
import { QuerySubscriptionManager } from './query/query-subscription.manager';
|
|
6
|
-
export declare class CollectionReferenceFactory {
|
|
7
|
-
private readonly documentReferenceFactory;
|
|
8
|
-
private readonly queryBuilderFactory;
|
|
9
|
-
private readonly querySubscriptionManager;
|
|
10
|
-
private readonly collections;
|
|
11
|
-
constructor(documentReferenceFactory: DocumentReferenceFactory, queryBuilderFactory: QueryBuilderFactory, querySubscriptionManager: QuerySubscriptionManager);
|
|
12
|
-
get<T extends DocumentData>(collectionName: CollectionName, integrationId: IntegrationId): CollectionReference<T>;
|
|
13
|
-
}
|
|
1
|
+
export {};
|