@squidcloud/client 1.0.148 → 1.0.150

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.
Files changed (110) hide show
  1. package/dist/cjs/index.js +8793 -8818
  2. package/dist/common/src/ai-assistant.types.d.ts +25 -25
  3. package/dist/common/src/ai-chatbot.context.d.ts +12 -12
  4. package/dist/common/src/ai-chatbot.schemas.d.ts +1 -1
  5. package/dist/common/src/ai-chatbot.types.d.ts +27 -27
  6. package/dist/common/src/api-call.context.d.ts +13 -13
  7. package/dist/common/src/api.types.d.ts +4 -4
  8. package/dist/common/src/application.schemas.d.ts +66 -66
  9. package/dist/common/src/application.types.d.ts +141 -143
  10. package/dist/common/src/backend-function.schemas.d.ts +1 -1
  11. package/dist/common/src/backend-function.types.d.ts +1 -1
  12. package/dist/common/src/backend-run.types.d.ts +2 -2
  13. package/dist/common/src/bundle-api.types.d.ts +41 -43
  14. package/dist/common/src/bundle-data.types.d.ts +5 -5
  15. package/dist/common/src/communication.types.d.ts +10 -8
  16. package/dist/common/src/context.types.d.ts +40 -40
  17. package/dist/common/src/distributed-lock.context.d.ts +4 -4
  18. package/dist/common/src/document.types.d.ts +22 -22
  19. package/dist/common/src/graphql.context.d.ts +7 -7
  20. package/dist/common/src/graphql.types.d.ts +9 -9
  21. package/dist/common/src/heartbeat.types.d.ts +1 -1
  22. package/dist/common/src/http-status.enum.d.ts +50 -50
  23. package/dist/common/src/index.d.ts +54 -57
  24. package/dist/common/src/integrations/ai_chatbot.types.d.ts +31 -31
  25. package/dist/common/src/integrations/api.types.d.ts +80 -80
  26. package/dist/common/src/integrations/auth.types.d.ts +47 -47
  27. package/dist/common/src/integrations/database.types.d.ts +274 -274
  28. package/dist/common/src/integrations/index.d.ts +134 -134
  29. package/dist/common/src/integrations/observability.types.d.ts +23 -23
  30. package/dist/common/src/logger.types.d.ts +21 -21
  31. package/dist/common/src/metrics.types.d.ts +1 -1
  32. package/dist/common/src/mutation.context.d.ts +14 -14
  33. package/dist/common/src/mutation.schemas.d.ts +1 -1
  34. package/dist/common/src/mutation.types.d.ts +53 -53
  35. package/dist/common/src/native-query.context.d.ts +7 -7
  36. package/dist/common/src/native-query.types.d.ts +16 -16
  37. package/dist/common/src/query/base-query-builder.d.ts +147 -147
  38. package/dist/common/src/query/index.d.ts +4 -4
  39. package/dist/common/src/query/pagination.d.ts +62 -62
  40. package/dist/common/src/query/query-context.d.ts +137 -137
  41. package/dist/common/src/query/serialized-query.types.d.ts +24 -24
  42. package/dist/common/src/query.types.d.ts +64 -64
  43. package/dist/common/src/regions.d.ts +1 -1
  44. package/dist/common/src/schema/schema.types.d.ts +54 -54
  45. package/dist/common/src/secret.schemas.d.ts +1 -1
  46. package/dist/common/src/secret.types.d.ts +22 -22
  47. package/dist/common/src/security.types.d.ts +1 -1
  48. package/dist/common/src/socket.schemas.d.ts +1 -1
  49. package/dist/common/src/socket.types.d.ts +5 -5
  50. package/dist/common/src/time-units.d.ts +1 -1
  51. package/dist/common/src/trigger.types.d.ts +1 -1
  52. package/dist/common/src/types.d.ts +14 -14
  53. package/dist/common/src/utils/array.d.ts +1 -1
  54. package/dist/common/src/utils/assert.d.ts +1 -1
  55. package/dist/common/src/utils/error.d.ts +4 -4
  56. package/dist/common/src/utils/global.utils.d.ts +1 -1
  57. package/dist/common/src/utils/http.d.ts +2 -2
  58. package/dist/common/src/utils/id.d.ts +2 -2
  59. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  60. package/dist/common/src/utils/object.d.ts +5 -5
  61. package/dist/common/src/utils/serialization.d.ts +5 -5
  62. package/dist/common/src/utils/transforms.d.ts +18 -18
  63. package/dist/common/src/utils/url.d.ts +1 -1
  64. package/dist/common/src/utils/validation.d.ts +25 -25
  65. package/dist/common/src/webhook-response.d.ts +1 -1
  66. package/dist/common/src/websocket.impl.d.ts +21 -21
  67. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  68. package/dist/typescript-client/src/ai-assistant-client.d.ts +73 -73
  69. package/dist/typescript-client/src/ai-chatbot-client.d.ts +174 -174
  70. package/dist/typescript-client/src/ai-chatbot-client.factory.d.ts +8 -8
  71. package/dist/typescript-client/src/ai.types.d.ts +61 -61
  72. package/dist/typescript-client/src/api.manager.d.ts +11 -11
  73. package/dist/typescript-client/src/auth.manager.d.ts +26 -26
  74. package/dist/typescript-client/src/backend-function.manager.d.ts +9 -9
  75. package/dist/typescript-client/src/client-id.service.d.ts +27 -27
  76. package/dist/typescript-client/src/collection-reference.d.ts +80 -80
  77. package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
  78. package/dist/typescript-client/src/connection-details.d.ts +23 -23
  79. package/dist/typescript-client/src/data.manager.d.ts +174 -174
  80. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  81. package/dist/typescript-client/src/distributed-lock.manager.d.ts +16 -16
  82. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  83. package/dist/typescript-client/src/document-reference.d.ts +140 -140
  84. package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
  85. package/dist/typescript-client/src/document-store.d.ts +14 -14
  86. package/dist/typescript-client/src/graphql-client.d.ts +14 -14
  87. package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
  88. package/dist/typescript-client/src/index.d.ts +9 -9
  89. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
  90. package/dist/typescript-client/src/native-query-manager.d.ts +7 -7
  91. package/dist/typescript-client/src/query/deserializer.d.ts +3 -3
  92. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -161
  93. package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
  94. package/dist/typescript-client/src/query/query-builder.factory.d.ts +77 -77
  95. package/dist/typescript-client/src/query/query-sender.d.ts +33 -33
  96. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +131 -131
  97. package/dist/typescript-client/src/query/query.types.d.ts +49 -49
  98. package/dist/typescript-client/src/rate-limiter.d.ts +32 -32
  99. package/dist/typescript-client/src/rpc.manager.d.ts +30 -30
  100. package/dist/typescript-client/src/secret.client.d.ts +22 -22
  101. package/dist/typescript-client/src/socket.manager.d.ts +43 -43
  102. package/dist/typescript-client/src/squid.d.ts +238 -269
  103. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  104. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  105. package/dist/typescript-client/src/types.d.ts +2 -2
  106. package/package.json +2 -2
  107. package/dist/common/src/named-query.context.d.ts +0 -4
  108. package/dist/common/src/named-query.schemas.d.ts +0 -1
  109. package/dist/common/src/named-query.types.d.ts +0 -1
  110. package/dist/typescript-client/src/named-query.manager.d.ts +0 -11
@@ -1,11 +1,11 @@
1
- import { ApiEndpointId, IntegrationId } from '@squidcloud/common';
2
- import { Observable } from 'rxjs';
3
- import { RpcManager } from './rpc.manager';
4
- import { ClientIdService } from './client-id.service';
5
- export declare class ApiManager {
6
- private readonly clientIdService;
7
- private readonly rpcManager;
8
- private readonly apiServerUrlOverrideMapping;
9
- constructor(clientIdService: ClientIdService, rpcManager: RpcManager, apiServerUrlOverrideMapping?: Record<IntegrationId, string>);
10
- callApiAndSubscribe<T>(integrationId: IntegrationId, endpointId: ApiEndpointId, request: Record<string, any>): Observable<T>;
11
- }
1
+ import { ApiEndpointId, IntegrationId } from '@squidcloud/common';
2
+ import { Observable } from 'rxjs';
3
+ import { RpcManager } from './rpc.manager';
4
+ import { ClientIdService } from './client-id.service';
5
+ export declare class ApiManager {
6
+ private readonly clientIdService;
7
+ private readonly rpcManager;
8
+ private readonly apiServerUrlOverrideMapping;
9
+ constructor(clientIdService: ClientIdService, rpcManager: RpcManager, apiServerUrlOverrideMapping?: Record<IntegrationId, string>);
10
+ callApiAndSubscribe<T>(integrationId: IntegrationId, endpointId: ApiEndpointId, request: Record<string, any>): Observable<T>;
11
+ }
@@ -1,26 +1,26 @@
1
- import { ApiKey, AuthToken, IntegrationId } from '@squidcloud/common';
2
- import { SquidAuthProvider } from './squid';
3
- /** Holds authentication token for the specified integration. */
4
- export interface AuthData {
5
- token: string | undefined;
6
- integrationId?: IntegrationId;
7
- }
8
- export declare class AuthManager {
9
- private readonly apiKey;
10
- private authProvider?;
11
- constructor(apiKey: ApiKey | undefined, authProvider?: SquidAuthProvider | undefined);
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 { ApiKey, AuthToken, IntegrationId } from '@squidcloud/common';
2
+ import { SquidAuthProvider } from './squid';
3
+ /** Holds authentication token for the specified integration. */
4
+ export interface AuthData {
5
+ token: string | undefined;
6
+ integrationId?: IntegrationId;
7
+ }
8
+ export declare class AuthManager {
9
+ private readonly apiKey;
10
+ private authProvider?;
11
+ constructor(apiKey: ApiKey | undefined, authProvider?: SquidAuthProvider | undefined);
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,9 +1,9 @@
1
- import { Observable } from 'rxjs';
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: unknown[]): Observable<T>;
9
- }
1
+ import { Observable } from 'rxjs';
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: unknown[]): Observable<T>;
9
+ }
@@ -1,27 +1,27 @@
1
- import { Observable } from 'rxjs';
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
+ import { Observable } from 'rxjs';
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,80 +1,80 @@
1
- import { Alias, DocId, DocIdObj, DocumentData, SnapshotEmitter } from '@squidcloud/common';
2
- import { DocumentReference } from './document-reference';
3
- import { JoinQueryBuilder } from './query/join-query-builder.factory';
4
- import { QueryBuilder } from './query/query-builder.factory';
5
- /**
6
- * Holds a reference to a data collection. A collection reference is a reference to a collection in a database. You
7
- * can use it to read or write data to the collection. A collection can refer to a table in a relational database or a
8
- * collection in a NoSQL database.
9
- *
10
- * Read more about collection references in the
11
- * {@link https://docs.squid.cloud/docs/development-tools/client-sdk/collection-reference documentation}.
12
- * @typeParam T The type of the document data.
13
- */
14
- export declare class CollectionReference<T extends DocumentData> {
15
- private readonly collectionName;
16
- private integrationId;
17
- private readonly documentReferenceFactory;
18
- private readonly queryBuilderFactory;
19
- private readonly querySubscriptionManager;
20
- /** A string that uniquely identifies this collection reference. */
21
- refId: string;
22
- /**
23
- * Returns a document reference for the given document id.
24
- * The document id is an object that maps the primary keys of the collection (as defined in the Squid Cloud Console)
25
- * to their values. There are a few exceptions:
26
- * 1 - String document id is only supported for the `built_in_db` when a schema was not defined.
27
- * 2 - Not all the fields in the document id are required. If a field is not provided, it will be generated on the
28
- * server once the document is created (if the integration supports it).
29
- * 3 - When a document id is not provided, it will be treated as an empty object or empty string.
30
- * 4 - When the document id is just a `string` and not provided (applies only for the `built_in_db`), it will be
31
- * generated on the server.
32
- * 5 - If the collection in the `built_in_db` does not have a schema, the document id must be provided as a string.
33
- *
34
- * Examples:
35
- * ```typescript
36
- * // For a collection in the built_in_db that does not have a schema
37
- * const docRef = collectionRef.doc('my-doc-id');
38
- * const docRef = collectionRef.doc({id: my-doc-id'});
39
- *
40
- * // For a collection with a single primary key field called "id"
41
- * const docRef = collectionRef.doc({id: 'my-doc-id'});
42
- *
43
- * // For a collection with a composite primary key
44
- * const docRef = collectionRef.doc({id1: 'my-doc-id1', id2: 'my-doc-id2'});
45
- * const docRef = collectionRef.doc({id1: 'my-doc-id1'}); // id2 will be generated on the server if the integration
46
- * supports it
47
- *
48
- * // For a collection from the `built_in_db` without a defined schema when an id is not provided
49
- * const docRef = collectionRef.doc(); // The id will be generated on the server
50
- * ```
51
- *
52
- * @param docId The document id as an object for the different fields in the primary key or a string.
53
- * @returns A document reference for the given document id.
54
- */
55
- doc(docId?: DocId | DocIdObj): DocumentReference<T>;
56
- /**
57
- * Creates a `QueryBuilder` that can be used to query the collection.
58
- *
59
- * @returns A `QueryBuilder` that can be used to query the collection.
60
- */
61
- query(): QueryBuilder<T>;
62
- /**
63
- * Creates a `JoinQueryBuilder` that can be used to query the collection
64
- * Note that when using a join query, you have to provide an alias for the query and for every other query
65
- * participating in the join.
66
- *
67
- * @param alias The alias for the query.
68
- * @returns A `JoinQueryBuilder` that can be used to query the collection and joins with other queries.
69
- */
70
- joinQuery<A extends Alias>(alias: A): JoinQueryBuilder<Record<A, []>, Record<A, T>, A, A>;
71
- /**
72
- * Performs `or` on a list of queries. All the queries need to be on the same collection.
73
- * The result will be a merge of all the queries sorted by the same sort condition of the first query.
74
- * Duplicate items will be removed.
75
- * @param builders The list of query builders to merge. (A query builder can be returned from the {@link query}
76
- * method).
77
- * @returns A query builder that can be used to perform the `or` operation.
78
- */
79
- or(...builders: QueryBuilder<T>[]): SnapshotEmitter<DocumentReference<T>>;
80
- }
1
+ import { Alias, DocId, DocIdObj, DocumentData, SnapshotEmitter } from '@squidcloud/common';
2
+ import { DocumentReference } from './document-reference';
3
+ import { JoinQueryBuilder } from './query/join-query-builder.factory';
4
+ import { QueryBuilder } from './query/query-builder.factory';
5
+ /**
6
+ * Holds a reference to a data collection. A collection reference is a reference to a collection in a database. You
7
+ * can use it to read or write data to the collection. A collection can refer to a table in a relational database or a
8
+ * collection in a NoSQL database.
9
+ *
10
+ * Read more about collection references in the
11
+ * {@link https://docs.squid.cloud/docs/development-tools/client-sdk/collection-reference documentation}.
12
+ * @typeParam T The type of the document data.
13
+ */
14
+ export declare class CollectionReference<T extends DocumentData> {
15
+ private readonly collectionName;
16
+ private integrationId;
17
+ private readonly documentReferenceFactory;
18
+ private readonly queryBuilderFactory;
19
+ private readonly querySubscriptionManager;
20
+ /** A string that uniquely identifies this collection reference. */
21
+ refId: string;
22
+ /**
23
+ * Returns a document reference for the given document id.
24
+ * The document id is an object that maps the primary keys of the collection (as defined in the Squid Cloud Console)
25
+ * to their values. There are a few exceptions:
26
+ * 1 - String document id is only supported for the `built_in_db` when a schema was not defined.
27
+ * 2 - Not all the fields in the document id are required. If a field is not provided, it will be generated on the
28
+ * server once the document is created (if the integration supports it).
29
+ * 3 - When a document id is not provided, it will be treated as an empty object or empty string.
30
+ * 4 - When the document id is just a `string` and not provided (applies only for the `built_in_db`), it will be
31
+ * generated on the server.
32
+ * 5 - If the collection in the `built_in_db` does not have a schema, the document id must be provided as a string.
33
+ *
34
+ * Examples:
35
+ * ```typescript
36
+ * // For a collection in the built_in_db that does not have a schema
37
+ * const docRef = collectionRef.doc('my-doc-id');
38
+ * const docRef = collectionRef.doc({id: my-doc-id'});
39
+ *
40
+ * // For a collection with a single primary key field called "id"
41
+ * const docRef = collectionRef.doc({id: 'my-doc-id'});
42
+ *
43
+ * // For a collection with a composite primary key
44
+ * const docRef = collectionRef.doc({id1: 'my-doc-id1', id2: 'my-doc-id2'});
45
+ * const docRef = collectionRef.doc({id1: 'my-doc-id1'}); // id2 will be generated on the server if the integration
46
+ * supports it
47
+ *
48
+ * // For a collection from the `built_in_db` without a defined schema when an id is not provided
49
+ * const docRef = collectionRef.doc(); // The id will be generated on the server
50
+ * ```
51
+ *
52
+ * @param docId The document id as an object for the different fields in the primary key or a string.
53
+ * @returns A document reference for the given document id.
54
+ */
55
+ doc(docId?: DocId | DocIdObj): DocumentReference<T>;
56
+ /**
57
+ * Creates a `QueryBuilder` that can be used to query the collection.
58
+ *
59
+ * @returns A `QueryBuilder` that can be used to query the collection.
60
+ */
61
+ query(): QueryBuilder<T>;
62
+ /**
63
+ * Creates a `JoinQueryBuilder` that can be used to query the collection
64
+ * Note that when using a join query, you have to provide an alias for the query and for every other query
65
+ * participating in the join.
66
+ *
67
+ * @param alias The alias for the query.
68
+ * @returns A `JoinQueryBuilder` that can be used to query the collection and joins with other queries.
69
+ */
70
+ joinQuery<A extends Alias>(alias: A): JoinQueryBuilder<Record<A, []>, Record<A, T>, A, A>;
71
+ /**
72
+ * Performs `or` on a list of queries. All the queries need to be on the same collection.
73
+ * The result will be a merge of all the queries sorted by the same sort condition of the first query.
74
+ * Duplicate items will be removed.
75
+ * @param builders The list of query builders to merge. (A query builder can be returned from the {@link query}
76
+ * method).
77
+ * @returns A query builder that can be used to perform the `or` operation.
78
+ */
79
+ or(...builders: QueryBuilder<T>[]): SnapshotEmitter<DocumentReference<T>>;
80
+ }
@@ -1,13 +1,13 @@
1
- import { CollectionName, DocumentData, IntegrationId } from '@squidcloud/common';
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
+ import { CollectionName, DocumentData, IntegrationId } from '@squidcloud/common';
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,23 +1,23 @@
1
- import { ClientId } from '@squidcloud/common';
2
- import { Observable } from 'rxjs';
3
- /**
4
- * Provides information about the connection to the Squid Server.
5
- */
6
- export declare class ConnectionDetails {
7
- private readonly clientIdService;
8
- private readonly socketManager;
9
- private isConnected;
10
- /** Whether the Squid Client SDK is currently connected to the Squid Server. */
11
- get connected(): boolean;
12
- /**
13
- * A unique client ID that is assigned to the client. This client ID is also available to the different backend
14
- * function in the context object.
15
- * Note: The client ID may change after a long disconnect.
16
- */
17
- get clientId(): ClientId;
18
- /**
19
- * Returns an observable that emits true when the client is connected to the server and false when the client is
20
- * disconnected from the server.
21
- */
22
- observeConnected(): Observable<boolean>;
23
- }
1
+ import { ClientId } from '@squidcloud/common';
2
+ import { Observable } from 'rxjs';
3
+ /**
4
+ * Provides information about the connection to the Squid Server.
5
+ */
6
+ export declare class ConnectionDetails {
7
+ private readonly clientIdService;
8
+ private readonly socketManager;
9
+ private isConnected;
10
+ /** Whether the Squid Client SDK is currently connected to the Squid Server. */
11
+ get connected(): boolean;
12
+ /**
13
+ * A unique client ID that is assigned to the client. This client ID is also available to the different backend
14
+ * function in the context object.
15
+ * Note: The client ID may change after a long disconnect.
16
+ */
17
+ get clientId(): ClientId;
18
+ /**
19
+ * Returns an observable that emits true when the client is connected to the server and false when the client is
20
+ * disconnected from the server.
21
+ */
22
+ observeConnected(): Observable<boolean>;
23
+ }