@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.
- package/dist/cjs/index.js +8793 -8818
- package/dist/common/src/ai-assistant.types.d.ts +25 -25
- package/dist/common/src/ai-chatbot.context.d.ts +12 -12
- package/dist/common/src/ai-chatbot.schemas.d.ts +1 -1
- package/dist/common/src/ai-chatbot.types.d.ts +27 -27
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api.types.d.ts +4 -4
- package/dist/common/src/application.schemas.d.ts +66 -66
- package/dist/common/src/application.types.d.ts +141 -143
- package/dist/common/src/backend-function.schemas.d.ts +1 -1
- package/dist/common/src/backend-function.types.d.ts +1 -1
- package/dist/common/src/backend-run.types.d.ts +2 -2
- package/dist/common/src/bundle-api.types.d.ts +41 -43
- package/dist/common/src/bundle-data.types.d.ts +5 -5
- package/dist/common/src/communication.types.d.ts +10 -8
- package/dist/common/src/context.types.d.ts +40 -40
- package/dist/common/src/distributed-lock.context.d.ts +4 -4
- package/dist/common/src/document.types.d.ts +22 -22
- package/dist/common/src/graphql.context.d.ts +7 -7
- package/dist/common/src/graphql.types.d.ts +9 -9
- package/dist/common/src/heartbeat.types.d.ts +1 -1
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +54 -57
- package/dist/common/src/integrations/ai_chatbot.types.d.ts +31 -31
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/auth.types.d.ts +47 -47
- package/dist/common/src/integrations/database.types.d.ts +274 -274
- package/dist/common/src/integrations/index.d.ts +134 -134
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/metrics.types.d.ts +1 -1
- package/dist/common/src/mutation.context.d.ts +14 -14
- package/dist/common/src/mutation.schemas.d.ts +1 -1
- package/dist/common/src/mutation.types.d.ts +53 -53
- package/dist/common/src/native-query.context.d.ts +7 -7
- package/dist/common/src/native-query.types.d.ts +16 -16
- package/dist/common/src/query/base-query-builder.d.ts +147 -147
- package/dist/common/src/query/index.d.ts +4 -4
- package/dist/common/src/query/pagination.d.ts +62 -62
- package/dist/common/src/query/query-context.d.ts +137 -137
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query.types.d.ts +64 -64
- package/dist/common/src/regions.d.ts +1 -1
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +1 -1
- package/dist/common/src/secret.types.d.ts +22 -22
- package/dist/common/src/security.types.d.ts +1 -1
- package/dist/common/src/socket.schemas.d.ts +1 -1
- package/dist/common/src/socket.types.d.ts +5 -5
- package/dist/common/src/time-units.d.ts +1 -1
- package/dist/common/src/trigger.types.d.ts +1 -1
- package/dist/common/src/types.d.ts +14 -14
- package/dist/common/src/utils/array.d.ts +1 -1
- package/dist/common/src/utils/assert.d.ts +1 -1
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/global.utils.d.ts +1 -1
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/lock.manager.d.ts +14 -14
- package/dist/common/src/utils/object.d.ts +5 -5
- package/dist/common/src/utils/serialization.d.ts +5 -5
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/validation.d.ts +25 -25
- package/dist/common/src/webhook-response.d.ts +1 -1
- package/dist/common/src/websocket.impl.d.ts +21 -21
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +73 -73
- package/dist/typescript-client/src/ai-chatbot-client.d.ts +174 -174
- package/dist/typescript-client/src/ai-chatbot-client.factory.d.ts +8 -8
- package/dist/typescript-client/src/ai.types.d.ts +61 -61
- package/dist/typescript-client/src/api.manager.d.ts +11 -11
- package/dist/typescript-client/src/auth.manager.d.ts +26 -26
- package/dist/typescript-client/src/backend-function.manager.d.ts +9 -9
- package/dist/typescript-client/src/client-id.service.d.ts +27 -27
- package/dist/typescript-client/src/collection-reference.d.ts +80 -80
- package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
- package/dist/typescript-client/src/connection-details.d.ts +23 -23
- package/dist/typescript-client/src/data.manager.d.ts +174 -174
- package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +16 -16
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +140 -140
- package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
- package/dist/typescript-client/src/document-store.d.ts +14 -14
- package/dist/typescript-client/src/graphql-client.d.ts +14 -14
- package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
- package/dist/typescript-client/src/index.d.ts +9 -9
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
- package/dist/typescript-client/src/native-query-manager.d.ts +7 -7
- package/dist/typescript-client/src/query/deserializer.d.ts +3 -3
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -161
- package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +77 -77
- package/dist/typescript-client/src/query/query-sender.d.ts +33 -33
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +131 -131
- package/dist/typescript-client/src/query/query.types.d.ts +49 -49
- package/dist/typescript-client/src/rate-limiter.d.ts +32 -32
- package/dist/typescript-client/src/rpc.manager.d.ts +30 -30
- package/dist/typescript-client/src/secret.client.d.ts +22 -22
- package/dist/typescript-client/src/socket.manager.d.ts +43 -43
- package/dist/typescript-client/src/squid.d.ts +238 -269
- package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
- package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
- package/dist/typescript-client/src/types.d.ts +2 -2
- package/package.json +2 -2
- 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/typescript-client/src/named-query.manager.d.ts +0 -11
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { DeepRecord, DocumentData, Paths } from '@squidcloud/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { TransactionId } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Holds a reference to a document. A document reference is a reference to a specific record in a collection. You can
|
|
6
|
-
* 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
|
|
7
|
-
* document in a NoSQL database. Additionally, a document reference can refer to a non-existent document, which you can
|
|
8
|
-
* use to create a new document.
|
|
9
|
-
*
|
|
10
|
-
* Read more about document references in the
|
|
11
|
-
* {@link https://docs.squid.cloud/docs/development-tools/client-sdk/document-reference documentation}.
|
|
12
|
-
* @typeParam T The type of the document data.
|
|
13
|
-
*/
|
|
14
|
-
export declare class DocumentReference<T extends DocumentData = any> {
|
|
15
|
-
private _squidDocId;
|
|
16
|
-
private readonly dataManager;
|
|
17
|
-
private readonly queryBuilderFactory;
|
|
18
|
-
/** A string that uniquely identifies this document reference. */
|
|
19
|
-
refId: string;
|
|
20
|
-
/**
|
|
21
|
-
* Returns the document data. Throws an error if the document does not exist.
|
|
22
|
-
*
|
|
23
|
-
* @returns The document data.
|
|
24
|
-
* @throws Error if the document does not exist.
|
|
25
|
-
*/
|
|
26
|
-
get data(): T;
|
|
27
|
-
/**
|
|
28
|
-
* Returns whether data has been populated for this document reference. Data
|
|
29
|
-
* will not present if a document has not been queried, does not exist, or
|
|
30
|
-
* has been deleted.
|
|
31
|
-
*
|
|
32
|
-
* @returns Whether the document has data.
|
|
33
|
-
*/
|
|
34
|
-
get hasData(): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* A promise that resolves with the latest data from the server or undefined if the document does not exist on the
|
|
37
|
-
* server.
|
|
38
|
-
*
|
|
39
|
-
* @returns A promise that resolves with latest data from the server or undefined if the document does not exist on
|
|
40
|
-
* the server.
|
|
41
|
-
*/
|
|
42
|
-
snapshot(): Promise<T | undefined>;
|
|
43
|
-
/**
|
|
44
|
-
* Returns an observable that emits the latest data from the server or undefined if the document is deleted or does
|
|
45
|
-
* not exist on the server.
|
|
46
|
-
*
|
|
47
|
-
* @returns An observable that emits the latest data from the server or undefined if the document is deleted or does
|
|
48
|
-
* not exist on the server.
|
|
49
|
-
*/
|
|
50
|
-
snapshots(): Observable<T | undefined>;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the data that is currently available on the client or undefined if data has not yet been populated.
|
|
53
|
-
*
|
|
54
|
-
* @returns The data that is currently available on the client or undefined if data has not yet been populated.
|
|
55
|
-
*/
|
|
56
|
-
peek(): T | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Returns whether the locally available version of the document may not be the latest version on the server.
|
|
59
|
-
*
|
|
60
|
-
* @returns Whether the locally available version of the document may not be the latest version on the server.
|
|
61
|
-
*/
|
|
62
|
-
isDirty(): boolean;
|
|
63
|
-
private isTracked;
|
|
64
|
-
/**
|
|
65
|
-
* Updates the document with the given data.
|
|
66
|
-
* The `update` will be reflected optimistically locally and will be applied to the server later.
|
|
67
|
-
* If a transactionId is provided, the `update` will be applied to the server as an atomic operation together with
|
|
68
|
-
* the rest of the operations in the transaction and the `update` will not reflect locally until the transaction is
|
|
69
|
-
* completed locally.
|
|
70
|
-
*
|
|
71
|
-
* The returned promise will resolve once the `update` has been applied to the server or immediately if the `update`
|
|
72
|
-
* is part of a transaction.
|
|
73
|
-
*
|
|
74
|
-
* @param data The data to update - can be partial.
|
|
75
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
76
|
-
* immediately.
|
|
77
|
-
*/
|
|
78
|
-
update(data: Partial<DeepRecord<T>>, transactionId?: TransactionId): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Similar to {@link update}, but only updates the given path.
|
|
81
|
-
* @param path The path to update.
|
|
82
|
-
* @param value The value to set at the given path.
|
|
83
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
84
|
-
* immediately.
|
|
85
|
-
*/
|
|
86
|
-
setInPath<K extends Paths<T>>(path: K, value: DeepRecord<T>[K], transactionId?: TransactionId): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* Similar to `update`, but only deletes the given path.
|
|
89
|
-
* @param path The path to delete.
|
|
90
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
91
|
-
* immediately.
|
|
92
|
-
*/
|
|
93
|
-
deleteInPath(path: Paths<T>, transactionId?: TransactionId): Promise<void>;
|
|
94
|
-
/**
|
|
95
|
-
* Increments the value at the given path by the given value. The value may be both positive and negative.
|
|
96
|
-
* @param path The path to the value to increment.
|
|
97
|
-
* @param value The value to increment by.
|
|
98
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
99
|
-
* immediately.
|
|
100
|
-
*/
|
|
101
|
-
incrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Decrements the value at the given path by the given value. The value may be both positive and negative.
|
|
104
|
-
* @param path The path to the value to decrement.
|
|
105
|
-
* @param value The value to decrement by.
|
|
106
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
107
|
-
* immediately.
|
|
108
|
-
*/
|
|
109
|
-
decrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
110
|
-
/**
|
|
111
|
-
* Inserts the document with the given data. If the document already exists, the operation will be treated as
|
|
112
|
-
* `upsert`. The `insert` will be reflected optimistically locally and will be applied to the server later. If a
|
|
113
|
-
* transactionId is provided, the `insert` will be applied to the server as an atomic operation together with the
|
|
114
|
-
* rest
|
|
115
|
-
* of the operations in the transaction and the `insert` will not reflect locally until the transaction is completed
|
|
116
|
-
* locally.
|
|
117
|
-
*
|
|
118
|
-
* The returned promise will resolve once the `insert` has been applied to the server or immediately if the `insert`
|
|
119
|
-
* is part of a transaction.
|
|
120
|
-
*
|
|
121
|
-
* @param data The data to insert.
|
|
122
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
123
|
-
* immediately.
|
|
124
|
-
*/
|
|
125
|
-
insert(data: T, transactionId?: TransactionId): Promise<void>;
|
|
126
|
-
/**
|
|
127
|
-
* Deletes the document.
|
|
128
|
-
* The `delete` will be reflected optimistically locally and will be applied to the server later.
|
|
129
|
-
* If a transactionId is provided, the `delete` will be applied to the server as an atomic operation together with
|
|
130
|
-
* the rest of the operations in the transaction and the `delete` will not reflect locally until the transaction is
|
|
131
|
-
* completed locally.
|
|
132
|
-
*
|
|
133
|
-
* The returned promise will resolve once the `delete` has been applied to the server or immediately if the `delete`
|
|
134
|
-
* is part of a transaction.
|
|
135
|
-
*
|
|
136
|
-
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
137
|
-
* immediately.
|
|
138
|
-
*/
|
|
139
|
-
delete(transactionId?: TransactionId): Promise<void>;
|
|
140
|
-
}
|
|
1
|
+
import { DeepRecord, DocumentData, Paths } from '@squidcloud/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { TransactionId } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Holds a reference to a document. A document reference is a reference to a specific record in a collection. You can
|
|
6
|
+
* 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
|
|
7
|
+
* document in a NoSQL database. Additionally, a document reference can refer to a non-existent document, which you can
|
|
8
|
+
* use to create a new document.
|
|
9
|
+
*
|
|
10
|
+
* Read more about document references in the
|
|
11
|
+
* {@link https://docs.squid.cloud/docs/development-tools/client-sdk/document-reference documentation}.
|
|
12
|
+
* @typeParam T The type of the document data.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DocumentReference<T extends DocumentData = any> {
|
|
15
|
+
private _squidDocId;
|
|
16
|
+
private readonly dataManager;
|
|
17
|
+
private readonly queryBuilderFactory;
|
|
18
|
+
/** A string that uniquely identifies this document reference. */
|
|
19
|
+
refId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the document data. Throws an error if the document does not exist.
|
|
22
|
+
*
|
|
23
|
+
* @returns The document data.
|
|
24
|
+
* @throws Error if the document does not exist.
|
|
25
|
+
*/
|
|
26
|
+
get data(): T;
|
|
27
|
+
/**
|
|
28
|
+
* Returns whether data has been populated for this document reference. Data
|
|
29
|
+
* will not present if a document has not been queried, does not exist, or
|
|
30
|
+
* has been deleted.
|
|
31
|
+
*
|
|
32
|
+
* @returns Whether the document has data.
|
|
33
|
+
*/
|
|
34
|
+
get hasData(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A promise that resolves with the latest data from the server or undefined if the document does not exist on the
|
|
37
|
+
* server.
|
|
38
|
+
*
|
|
39
|
+
* @returns A promise that resolves with latest data from the server or undefined if the document does not exist on
|
|
40
|
+
* the server.
|
|
41
|
+
*/
|
|
42
|
+
snapshot(): Promise<T | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns an observable that emits the latest data from the server or undefined if the document is deleted or does
|
|
45
|
+
* not exist on the server.
|
|
46
|
+
*
|
|
47
|
+
* @returns An observable that emits the latest data from the server or undefined if the document is deleted or does
|
|
48
|
+
* not exist on the server.
|
|
49
|
+
*/
|
|
50
|
+
snapshots(): Observable<T | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Returns the data that is currently available on the client or undefined if data has not yet been populated.
|
|
53
|
+
*
|
|
54
|
+
* @returns The data that is currently available on the client or undefined if data has not yet been populated.
|
|
55
|
+
*/
|
|
56
|
+
peek(): T | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Returns whether the locally available version of the document may not be the latest version on the server.
|
|
59
|
+
*
|
|
60
|
+
* @returns Whether the locally available version of the document may not be the latest version on the server.
|
|
61
|
+
*/
|
|
62
|
+
isDirty(): boolean;
|
|
63
|
+
private isTracked;
|
|
64
|
+
/**
|
|
65
|
+
* Updates the document with the given data.
|
|
66
|
+
* The `update` will be reflected optimistically locally and will be applied to the server later.
|
|
67
|
+
* If a transactionId is provided, the `update` will be applied to the server as an atomic operation together with
|
|
68
|
+
* the rest of the operations in the transaction and the `update` will not reflect locally until the transaction is
|
|
69
|
+
* completed locally.
|
|
70
|
+
*
|
|
71
|
+
* The returned promise will resolve once the `update` has been applied to the server or immediately if the `update`
|
|
72
|
+
* is part of a transaction.
|
|
73
|
+
*
|
|
74
|
+
* @param data The data to update - can be partial.
|
|
75
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
76
|
+
* immediately.
|
|
77
|
+
*/
|
|
78
|
+
update(data: Partial<DeepRecord<T>>, transactionId?: TransactionId): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Similar to {@link update}, but only updates the given path.
|
|
81
|
+
* @param path The path to update.
|
|
82
|
+
* @param value The value to set at the given path.
|
|
83
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
84
|
+
* immediately.
|
|
85
|
+
*/
|
|
86
|
+
setInPath<K extends Paths<T>>(path: K, value: DeepRecord<T>[K], transactionId?: TransactionId): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Similar to `update`, but only deletes the given path.
|
|
89
|
+
* @param path The path to delete.
|
|
90
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
91
|
+
* immediately.
|
|
92
|
+
*/
|
|
93
|
+
deleteInPath(path: Paths<T>, transactionId?: TransactionId): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Increments the value at the given path by the given value. The value may be both positive and negative.
|
|
96
|
+
* @param path The path to the value to increment.
|
|
97
|
+
* @param value The value to increment by.
|
|
98
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
99
|
+
* immediately.
|
|
100
|
+
*/
|
|
101
|
+
incrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Decrements the value at the given path by the given value. The value may be both positive and negative.
|
|
104
|
+
* @param path The path to the value to decrement.
|
|
105
|
+
* @param value The value to decrement by.
|
|
106
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
107
|
+
* immediately.
|
|
108
|
+
*/
|
|
109
|
+
decrementInPath(path: Paths<T>, value: number, transactionId?: TransactionId): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Inserts the document with the given data. If the document already exists, the operation will be treated as
|
|
112
|
+
* `upsert`. The `insert` will be reflected optimistically locally and will be applied to the server later. If a
|
|
113
|
+
* transactionId is provided, the `insert` will be applied to the server as an atomic operation together with the
|
|
114
|
+
* rest
|
|
115
|
+
* of the operations in the transaction and the `insert` will not reflect locally until the transaction is completed
|
|
116
|
+
* locally.
|
|
117
|
+
*
|
|
118
|
+
* The returned promise will resolve once the `insert` has been applied to the server or immediately if the `insert`
|
|
119
|
+
* is part of a transaction.
|
|
120
|
+
*
|
|
121
|
+
* @param data The data to insert.
|
|
122
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
123
|
+
* immediately.
|
|
124
|
+
*/
|
|
125
|
+
insert(data: T, transactionId?: TransactionId): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Deletes the document.
|
|
128
|
+
* The `delete` will be reflected optimistically locally and will be applied to the server later.
|
|
129
|
+
* If a transactionId is provided, the `delete` will be applied to the server as an atomic operation together with
|
|
130
|
+
* the rest of the operations in the transaction and the `delete` will not reflect locally until the transaction is
|
|
131
|
+
* completed locally.
|
|
132
|
+
*
|
|
133
|
+
* The returned promise will resolve once the `delete` has been applied to the server or immediately if the `delete`
|
|
134
|
+
* is part of a transaction.
|
|
135
|
+
*
|
|
136
|
+
* @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
|
|
137
|
+
* immediately.
|
|
138
|
+
*/
|
|
139
|
+
delete(transactionId?: TransactionId): Promise<void>;
|
|
140
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SquidDocId } from '@squidcloud/common';
|
|
2
|
-
import { DataManager } from './data.manager';
|
|
3
|
-
import DocumentIdentityService from './document-identity.service';
|
|
4
|
-
import { DocumentReference } from './document-reference';
|
|
5
|
-
import { QueryBuilderFactory } from './query/query-builder.factory';
|
|
6
|
-
export declare class DocumentReferenceFactory {
|
|
7
|
-
private readonly documentIdentityService;
|
|
8
|
-
private dataManager;
|
|
9
|
-
constructor(documentIdentityService: DocumentIdentityService);
|
|
10
|
-
create(squidDocId: SquidDocId, queryBuilderFactory: QueryBuilderFactory): DocumentReference;
|
|
11
|
-
setDataManager(dataManager: DataManager): void;
|
|
12
|
-
private getCollectionKey;
|
|
13
|
-
}
|
|
1
|
+
import { SquidDocId } from '@squidcloud/common';
|
|
2
|
+
import { DataManager } from './data.manager';
|
|
3
|
+
import DocumentIdentityService from './document-identity.service';
|
|
4
|
+
import { DocumentReference } from './document-reference';
|
|
5
|
+
import { QueryBuilderFactory } from './query/query-builder.factory';
|
|
6
|
+
export declare class DocumentReferenceFactory {
|
|
7
|
+
private readonly documentIdentityService;
|
|
8
|
+
private dataManager;
|
|
9
|
+
constructor(documentIdentityService: DocumentIdentityService);
|
|
10
|
+
create(squidDocId: SquidDocId, queryBuilderFactory: QueryBuilderFactory): DocumentReference;
|
|
11
|
+
setDataManager(dataManager: DataManager): void;
|
|
12
|
+
private getCollectionKey;
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { FieldType, Query, SquidDocId, SquidDocument } from '@squidcloud/common';
|
|
2
|
-
export declare class DocumentStore {
|
|
3
|
-
private readonly squidDocIdToDoc;
|
|
4
|
-
saveDocument(squidDocId: SquidDocId, properties: SquidDocument | undefined): SquidDocument | undefined;
|
|
5
|
-
hasData(squidDocId: SquidDocId): boolean;
|
|
6
|
-
getDocument(squidDocId: SquidDocId): SquidDocument;
|
|
7
|
-
getDocumentOrUndefined(squidDocId: SquidDocId): SquidDocument | undefined;
|
|
8
|
-
compareValues(a: FieldType | undefined, b: FieldType | undefined): number;
|
|
9
|
-
compareSquidDocs(a: SquidDocument, b: SquidDocument, sortFieldNames: string[], sortOrders: ('asc' | 'desc')[]): number;
|
|
10
|
-
group(sortedDocs: SquidDocument[], sortFieldNames: string[]): SquidDocument[][];
|
|
11
|
-
sortAndLimitDocs(docIdSet: Set<SquidDocId>, query: Query): Array<SquidDocument>;
|
|
12
|
-
private removeInternalProperties;
|
|
13
|
-
migrateDocId(squidDocId: SquidDocId, newSquidDocId: SquidDocId): void;
|
|
14
|
-
}
|
|
1
|
+
import { FieldType, Query, SquidDocId, SquidDocument } from '@squidcloud/common';
|
|
2
|
+
export declare class DocumentStore {
|
|
3
|
+
private readonly squidDocIdToDoc;
|
|
4
|
+
saveDocument(squidDocId: SquidDocId, properties: SquidDocument | undefined): SquidDocument | undefined;
|
|
5
|
+
hasData(squidDocId: SquidDocId): boolean;
|
|
6
|
+
getDocument(squidDocId: SquidDocId): SquidDocument;
|
|
7
|
+
getDocumentOrUndefined(squidDocId: SquidDocId): SquidDocument | undefined;
|
|
8
|
+
compareValues(a: FieldType | undefined, b: FieldType | undefined): number;
|
|
9
|
+
compareSquidDocs(a: SquidDocument, b: SquidDocument, sortFieldNames: string[], sortOrders: ('asc' | 'desc')[]): number;
|
|
10
|
+
group(sortedDocs: SquidDocument[], sortFieldNames: string[]): SquidDocument[][];
|
|
11
|
+
sortAndLimitDocs(docIdSet: Set<SquidDocId>, query: Query): Array<SquidDocument>;
|
|
12
|
+
private removeInternalProperties;
|
|
13
|
+
migrateDocId(squidDocId: SquidDocId, newSquidDocId: SquidDocId): void;
|
|
14
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { GraphQLRequest, IntegrationId, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
-
import { RpcManager } from './rpc.manager';
|
|
3
|
-
/** A GraphQL client that can be used to query and mutate data. */
|
|
4
|
-
export declare class GraphQLClient {
|
|
5
|
-
private readonly rpcManager;
|
|
6
|
-
private readonly region;
|
|
7
|
-
private readonly appId;
|
|
8
|
-
private readonly client;
|
|
9
|
-
constructor(rpcManager: RpcManager, integrationId: IntegrationId, region: SupportedSquidRegion, appId: string);
|
|
10
|
-
/** Executes a GraphQL query and returns a promise with the result. */
|
|
11
|
-
query<T = any>(request: GraphQLRequest): Promise<T>;
|
|
12
|
-
/** Executes a GraphQL mutation and returns a promise with the result. */
|
|
13
|
-
mutate<T = Record<string, any>>(request: GraphQLRequest): Promise<T | null | undefined>;
|
|
14
|
-
}
|
|
1
|
+
import { GraphQLRequest, IntegrationId, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
+
import { RpcManager } from './rpc.manager';
|
|
3
|
+
/** A GraphQL client that can be used to query and mutate data. */
|
|
4
|
+
export declare class GraphQLClient {
|
|
5
|
+
private readonly rpcManager;
|
|
6
|
+
private readonly region;
|
|
7
|
+
private readonly appId;
|
|
8
|
+
private readonly client;
|
|
9
|
+
constructor(rpcManager: RpcManager, integrationId: IntegrationId, region: SupportedSquidRegion, appId: string);
|
|
10
|
+
/** Executes a GraphQL query and returns a promise with the result. */
|
|
11
|
+
query<T = any>(request: GraphQLRequest): Promise<T>;
|
|
12
|
+
/** Executes a GraphQL mutation and returns a promise with the result. */
|
|
13
|
+
mutate<T = Record<string, any>>(request: GraphQLRequest): Promise<T | null | undefined>;
|
|
14
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IntegrationId, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
-
import { GraphQLClient } from './graphql-client';
|
|
3
|
-
import { RpcManager } from './rpc.manager';
|
|
4
|
-
export declare class GraphQLClientFactory {
|
|
5
|
-
private readonly rpcManager;
|
|
6
|
-
private readonly region;
|
|
7
|
-
private readonly appId;
|
|
8
|
-
private readonly clientsMap;
|
|
9
|
-
constructor(rpcManager: RpcManager, region: SupportedSquidRegion, appId: string);
|
|
10
|
-
get(integrationId: IntegrationId): GraphQLClient;
|
|
11
|
-
}
|
|
1
|
+
import { IntegrationId, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
+
import { GraphQLClient } from './graphql-client';
|
|
3
|
+
import { RpcManager } from './rpc.manager';
|
|
4
|
+
export declare class GraphQLClientFactory {
|
|
5
|
+
private readonly rpcManager;
|
|
6
|
+
private readonly region;
|
|
7
|
+
private readonly appId;
|
|
8
|
+
private readonly clientsMap;
|
|
9
|
+
constructor(rpcManager: RpcManager, region: SupportedSquidRegion, appId: string);
|
|
10
|
+
get(integrationId: IntegrationId): GraphQLClient;
|
|
11
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { CollectionReference } from './collection-reference';
|
|
2
|
-
export { DocumentReference } from './document-reference';
|
|
3
|
-
export { JoinQueryBuilder } from './query/join-query-builder.factory';
|
|
4
|
-
export { Changes, QueryBuilder } from './query/query-builder.factory';
|
|
5
|
-
export { deserializeQuery } from './query/deserializer';
|
|
6
|
-
export { Squid, SquidOptions } from './squid';
|
|
7
|
-
export { TransactionId } from './types';
|
|
8
|
-
export { GraphQLClient } from './graphql-client';
|
|
9
|
-
export { AiChatbotProfileReference } from './ai-chatbot-client';
|
|
1
|
+
export { CollectionReference } from './collection-reference';
|
|
2
|
+
export { DocumentReference } from './document-reference';
|
|
3
|
+
export { JoinQueryBuilder } from './query/join-query-builder.factory';
|
|
4
|
+
export { Changes, QueryBuilder } from './query/query-builder.factory';
|
|
5
|
+
export { deserializeQuery } from './query/deserializer';
|
|
6
|
+
export { Squid, SquidOptions } from './squid';
|
|
7
|
+
export { TransactionId } from './types';
|
|
8
|
+
export { GraphQLClient } from './graphql-client';
|
|
9
|
+
export { AiChatbotProfileReference } from './ai-chatbot-client';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IntegrationId, LockManager, MutateResponse, Mutation } from '@squidcloud/common';
|
|
2
|
-
import { RpcManager } from '../rpc.manager';
|
|
3
|
-
import { QuerySender } from '../query/query-sender';
|
|
4
|
-
export declare class MutationSender {
|
|
5
|
-
private readonly rpcManager;
|
|
6
|
-
private readonly lockManager;
|
|
7
|
-
private readonly querySender;
|
|
8
|
-
constructor(rpcManager: RpcManager, lockManager: LockManager, querySender: QuerySender);
|
|
9
|
-
sendMutations(mutations: Array<Mutation>, integrationId: IntegrationId): Promise<MutateResponse>;
|
|
10
|
-
}
|
|
1
|
+
import { IntegrationId, LockManager, MutateResponse, Mutation } from '@squidcloud/common';
|
|
2
|
+
import { RpcManager } from '../rpc.manager';
|
|
3
|
+
import { QuerySender } from '../query/query-sender';
|
|
4
|
+
export declare class MutationSender {
|
|
5
|
+
private readonly rpcManager;
|
|
6
|
+
private readonly lockManager;
|
|
7
|
+
private readonly querySender;
|
|
8
|
+
constructor(rpcManager: RpcManager, lockManager: LockManager, querySender: QuerySender);
|
|
9
|
+
sendMutations(mutations: Array<Mutation>, integrationId: IntegrationId): Promise<MutateResponse>;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IntegrationId, NativeQueryRequest } from '@squidcloud/common';
|
|
2
|
-
import { RpcManager } from './rpc.manager';
|
|
3
|
-
export declare class NativeQueryManager {
|
|
4
|
-
private readonly rpcManager;
|
|
5
|
-
constructor(rpcManager: RpcManager);
|
|
6
|
-
executeNativeQuery<T>(integrationId: IntegrationId, request: NativeQueryRequest): Promise<T>;
|
|
7
|
-
}
|
|
1
|
+
import { IntegrationId, NativeQueryRequest } from '@squidcloud/common';
|
|
2
|
+
import { RpcManager } from './rpc.manager';
|
|
3
|
+
export declare class NativeQueryManager {
|
|
4
|
+
private readonly rpcManager;
|
|
5
|
+
constructor(rpcManager: RpcManager);
|
|
6
|
+
executeNativeQuery<T>(integrationId: IntegrationId, request: NativeQueryRequest): Promise<T>;
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SerializedQuery, SnapshotEmitter } from '@squidcloud/common';
|
|
2
|
-
import { Squid } from '../squid';
|
|
3
|
-
export declare function deserializeQuery<ReturnType = any>(squid: Squid, serializedQuery: SerializedQuery): SnapshotEmitter<ReturnType>;
|
|
1
|
+
import { SerializedQuery, SnapshotEmitter } from '@squidcloud/common';
|
|
2
|
+
import { Squid } from '../squid';
|
|
3
|
+
export declare function deserializeQuery<ReturnType = any>(squid: Squid, serializedQuery: SerializedQuery): SnapshotEmitter<ReturnType>;
|