@squidcloud/client 1.0.31 → 1.0.33

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 (92) hide show
  1. package/dist/common/src/api-call.context.d.ts +12 -12
  2. package/dist/common/src/api.types.d.ts +23 -23
  3. package/dist/common/src/application.schemas.d.ts +883 -896
  4. package/dist/common/src/application.types.d.ts +205 -202
  5. package/dist/common/src/backend-function.schemas.d.ts +3 -3
  6. package/dist/common/src/backend-function.types.d.ts +7 -7
  7. package/dist/common/src/backend-run.types.d.ts +66 -66
  8. package/dist/common/src/bundle-api.types.d.ts +64 -64
  9. package/dist/common/src/bundle-data.types.d.ts +46 -46
  10. package/dist/common/src/communication.types.d.ts +4 -4
  11. package/dist/common/src/context.types.d.ts +31 -31
  12. package/dist/common/src/document.types.d.ts +35 -35
  13. package/dist/common/src/graphql.context.d.ts +6 -6
  14. package/dist/common/src/graphql.types.d.ts +16 -16
  15. package/dist/common/src/http-status.enum.d.ts +50 -50
  16. package/dist/common/src/index.d.ts +49 -49
  17. package/dist/common/src/integration.types.d.ts +319 -328
  18. package/dist/common/src/logger.types.d.ts +21 -21
  19. package/dist/common/src/metrics.types.d.ts +58 -58
  20. package/dist/common/src/mutation.context.d.ts +10 -10
  21. package/dist/common/src/mutation.schemas.d.ts +5 -5
  22. package/dist/common/src/mutation.types.d.ts +72 -72
  23. package/dist/common/src/named-query.context.d.ts +4 -4
  24. package/dist/common/src/named-query.schemas.d.ts +3 -3
  25. package/dist/common/src/named-query.types.d.ts +9 -9
  26. package/dist/common/src/query/index.d.ts +2 -2
  27. package/dist/common/src/query/query-context.d.ts +37 -37
  28. package/dist/common/src/query/simple-query-builder.d.ts +90 -90
  29. package/dist/common/src/query.schemas.d.ts +5 -5
  30. package/dist/common/src/query.types.d.ts +118 -118
  31. package/dist/common/src/regions.d.ts +22 -23
  32. package/dist/common/src/schema/schema.types.d.ts +54 -54
  33. package/dist/common/src/secret.schemas.d.ts +6 -6
  34. package/dist/common/src/secret.types.d.ts +40 -40
  35. package/dist/common/src/security.types.d.ts +3 -3
  36. package/dist/common/src/socket.schemas.d.ts +3 -3
  37. package/dist/common/src/socket.types.d.ts +68 -68
  38. package/dist/common/src/time-units.d.ts +5 -5
  39. package/dist/common/src/trigger.types.d.ts +15 -15
  40. package/dist/common/src/types.d.ts +15 -15
  41. package/dist/common/src/utils/array.d.ts +8 -8
  42. package/dist/common/src/utils/assert.d.ts +8 -8
  43. package/dist/common/src/utils/error.d.ts +4 -4
  44. package/dist/common/src/utils/http.d.ts +2 -0
  45. package/dist/common/src/utils/id.d.ts +2 -2
  46. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  47. package/dist/common/src/utils/nullish.d.ts +1 -1
  48. package/dist/common/src/utils/object.d.ts +6 -6
  49. package/dist/common/src/utils/serialization.d.ts +6 -6
  50. package/dist/common/src/utils/transforms.d.ts +18 -18
  51. package/dist/common/src/utils/validation.d.ts +30 -30
  52. package/dist/common/src/webhook-response.d.ts +7 -7
  53. package/dist/index.js +2 -2
  54. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  55. package/dist/package.json +1 -1
  56. package/dist/typescript-client/src/api.manager.d.ts +14 -14
  57. package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
  58. package/dist/typescript-client/src/collection-reference.d.ts +51 -51
  59. package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
  60. package/dist/typescript-client/src/data.manager.d.ts +166 -166
  61. package/dist/typescript-client/src/destruct.manager.d.ts +12 -9
  62. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  63. package/dist/typescript-client/src/document-reference.d.ts +90 -90
  64. package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
  65. package/dist/typescript-client/src/document-store.d.ts +11 -11
  66. package/dist/typescript-client/src/graphql-client.d.ts +12 -12
  67. package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
  68. package/dist/typescript-client/src/index.d.ts +7 -7
  69. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +11 -11
  70. package/dist/typescript-client/src/mutation/mutation.spec.d.ts +1 -1
  71. package/dist/typescript-client/src/named-query.manager.d.ts +13 -13
  72. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +71 -71
  73. package/dist/typescript-client/src/query/query-builder.factory.d.ts +53 -53
  74. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +59 -59
  75. package/dist/typescript-client/src/query/query-subscription.manager.spec.d.ts +1 -1
  76. package/dist/typescript-client/src/query/query.spec.d.ts +1 -1
  77. package/dist/typescript-client/src/query/query.types.d.ts +14 -14
  78. package/dist/typescript-client/src/rpc.manager.d.ts +30 -24
  79. package/dist/typescript-client/src/socket.manager.d.ts +27 -27
  80. package/dist/typescript-client/src/squid.d.ts +173 -171
  81. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  82. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  83. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  84. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  85. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  86. package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +20 -20
  87. package/dist/typescript-client/src/testing/fake-socket.manager.d.ts +9 -9
  88. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  89. package/dist/typescript-client/src/testing/squid-env-setup.d.ts +79 -79
  90. package/dist/typescript-client/src/types.d.ts +2 -2
  91. package/package.json +1 -1
  92. package/dist/common/src/utils/url.d.ts +0 -1
@@ -1,7 +1,7 @@
1
- import { BaseAction } from './actions';
2
- export type StateLeafNode = string | boolean | number | null | undefined | object | Array<StateLeafNode> | State;
3
- export type State = {
4
- [key: string]: StateLeafNode;
5
- };
6
- export declare function apply(state: State, action: BaseAction): State;
7
- export declare function isStateObject(state: StateLeafNode): state is State;
1
+ import { BaseAction } from './actions';
2
+ export type StateLeafNode = string | boolean | number | null | undefined | object | Array<StateLeafNode> | State;
3
+ export type State = {
4
+ [key: string]: StateLeafNode;
5
+ };
6
+ export declare function apply(state: State, action: BaseAction): State;
7
+ export declare function isStateObject(state: StateLeafNode): state is State;
@@ -1,29 +1,29 @@
1
- import { StateLeafNode } from './action.applier';
2
- export declare enum ActionType {
3
- DELETE_PATH = "DELETE_PATH",
4
- SET_PATH = "SET_PATH",
5
- BATCH_ACTION = "BATCH_ACTION"
6
- }
7
- export declare interface BaseAction {
8
- type: ActionType;
9
- }
10
- export declare interface PathAction extends BaseAction {
11
- path: string[];
12
- }
13
- export type DeletePathAction = PathAction;
14
- export declare interface SetPathAction extends PathAction {
15
- payload?: StateLeafNode;
16
- }
17
- export declare interface BatchAction extends BaseAction {
18
- payload: BaseAction[];
19
- }
20
- export declare interface StateMessage {
21
- type: 'ACTIONS';
22
- payload: BaseAction[];
23
- }
24
- export declare function isPathAction(action: BaseAction): action is PathAction;
25
- export declare function isSetPathAction(action: BaseAction): action is SetPathAction;
26
- export declare function isDeletePathAction(action: BaseAction): action is DeletePathAction;
27
- export declare function isBatchAction(action: BaseAction): action is BatchAction;
28
- export declare function extractAllPathActions(action: BaseAction): PathAction[];
29
- export declare function getSingleAction(actions: BaseAction[]): BaseAction;
1
+ import { StateLeafNode } from './action.applier';
2
+ export declare enum ActionType {
3
+ DELETE_PATH = "DELETE_PATH",
4
+ SET_PATH = "SET_PATH",
5
+ BATCH_ACTION = "BATCH_ACTION"
6
+ }
7
+ export declare interface BaseAction {
8
+ type: ActionType;
9
+ }
10
+ export declare interface PathAction extends BaseAction {
11
+ path: string[];
12
+ }
13
+ export type DeletePathAction = PathAction;
14
+ export declare interface SetPathAction extends PathAction {
15
+ payload?: StateLeafNode;
16
+ }
17
+ export declare interface BatchAction extends BaseAction {
18
+ payload: BaseAction[];
19
+ }
20
+ export declare interface StateMessage {
21
+ type: 'ACTIONS';
22
+ payload: BaseAction[];
23
+ }
24
+ export declare function isPathAction(action: BaseAction): action is PathAction;
25
+ export declare function isSetPathAction(action: BaseAction): action is SetPathAction;
26
+ export declare function isDeletePathAction(action: BaseAction): action is DeletePathAction;
27
+ export declare function isBatchAction(action: BaseAction): action is BatchAction;
28
+ export declare function extractAllPathActions(action: BaseAction): PathAction[];
29
+ export declare function getSingleAction(actions: BaseAction[]): BaseAction;
@@ -1,27 +1,27 @@
1
- import { BaseAction } from './actions';
2
- export declare class PathTrie<T> {
3
- private root;
4
- getOrCreatePathTrieNode(path: string[], nodeData?: T): PathTrieNode<T>;
5
- getPathTrieNode(path: string[]): PathTrieNode<T> | undefined;
6
- getPathTrie(path: string[]): PathTrie<T> | undefined;
7
- /**
8
- * If the callback returns false, it will not iterate into the children of the current node.
9
- */
10
- iterateBfs(callback: (data: T, path: string[]) => void | boolean): void;
11
- removeNode(path: string[]): void;
12
- clearNodeData(path: string[]): void;
13
- getNodeList(path: string[]): Array<PathTrieNode<T>>;
14
- private iterateInternal;
15
- }
16
- export declare class PathTrieNode<T> {
17
- children: Map<string, PathTrieNode<T>>;
18
- nodeData: T | undefined;
19
- }
20
- /**
21
- * Returns a trie which contains all the paths affected by the action. For
22
- * example, if the action contains a path action applied on path [A, B, C], then
23
- * [A], [A, B], [A, B, C] will be in the returned trie. Moreover, if
24
- * subscriptionTree is provided and contains [A, B, C, ...], then [A, B, C, ...]
25
- * will also be included in the returned trie.
26
- */
27
- export declare function getPathTrieFromAction(action: BaseAction, subscriptionTree?: PathTrie<{}>): PathTrie<boolean>;
1
+ import { BaseAction } from './actions';
2
+ export declare class PathTrie<T> {
3
+ private root;
4
+ getOrCreatePathTrieNode(path: string[], nodeData?: T): PathTrieNode<T>;
5
+ getPathTrieNode(path: string[]): PathTrieNode<T> | undefined;
6
+ getPathTrie(path: string[]): PathTrie<T> | undefined;
7
+ /**
8
+ * If the callback returns false, it will not iterate into the children of the current node.
9
+ */
10
+ iterateBfs(callback: (data: T, path: string[]) => void | boolean): void;
11
+ removeNode(path: string[]): void;
12
+ clearNodeData(path: string[]): void;
13
+ getNodeList(path: string[]): Array<PathTrieNode<T>>;
14
+ private iterateInternal;
15
+ }
16
+ export declare class PathTrieNode<T> {
17
+ children: Map<string, PathTrieNode<T>>;
18
+ nodeData: T | undefined;
19
+ }
20
+ /**
21
+ * Returns a trie which contains all the paths affected by the action. For
22
+ * example, if the action contains a path action applied on path [A, B, C], then
23
+ * [A], [A, B], [A, B, C] will be in the returned trie. Moreover, if
24
+ * subscriptionTree is provided and contains [A, B, C, ...], then [A, B, C, ...]
25
+ * will also be included in the returned trie.
26
+ */
27
+ export declare function getPathTrieFromAction(action: BaseAction, subscriptionTree?: PathTrie<{}>): PathTrie<boolean>;
@@ -1,22 +1,22 @@
1
- import { Observable } from 'rxjs';
2
- import { State, StateLeafNode } from './action.applier';
3
- import { BaseAction } from './actions';
4
- export declare class StateService {
5
- private readonly subscriptionsTree;
6
- private state;
7
- private batchCount;
8
- private readonly batchedActions;
9
- dispatch(action: BaseAction): void;
10
- runInBatch(fn: () => unknown): void;
11
- observePath<T>(path: string[], pathsToExcludeFn?: () => Array<string[]>): Observable<T>;
12
- setKeyInPath<T extends State>(path: string[], key: keyof T & string, value: T[keyof T] & StateLeafNode, noopIfSame?: boolean): void;
13
- setPartial<T extends State>(path: string[], partialState: Partial<T>, noopIfSame?: boolean): void;
14
- setInPath(path: string[], payload: StateLeafNode, noopIfSame?: boolean): void;
15
- pushToArray(path: string[], payload: StateLeafNode): void;
16
- deletePath(path: string[]): void;
17
- getState(): State;
18
- getStateInPath<T extends StateLeafNode>(path: string[]): T;
19
- destroy(): void;
20
- private getOrCreateSubjectForPath;
21
- private dispatchSubscriptions;
22
- }
1
+ import { Observable } from 'rxjs';
2
+ import { State, StateLeafNode } from './action.applier';
3
+ import { BaseAction } from './actions';
4
+ export declare class StateService {
5
+ private readonly subscriptionsTree;
6
+ private state;
7
+ private batchCount;
8
+ private readonly batchedActions;
9
+ dispatch(action: BaseAction): void;
10
+ runInBatch(fn: () => unknown): void;
11
+ observePath<T>(path: string[], pathsToExcludeFn?: () => Array<string[]>): Observable<T>;
12
+ setKeyInPath<T extends State>(path: string[], key: keyof T & string, value: T[keyof T] & StateLeafNode, noopIfSame?: boolean): void;
13
+ setPartial<T extends State>(path: string[], partialState: Partial<T>, noopIfSame?: boolean): void;
14
+ setInPath(path: string[], payload: StateLeafNode, noopIfSame?: boolean): void;
15
+ pushToArray(path: string[], payload: StateLeafNode): void;
16
+ deletePath(path: string[]): void;
17
+ getState(): State;
18
+ getStateInPath<T extends StateLeafNode>(path: string[]): T;
19
+ destroy(): void;
20
+ private getOrCreateSubjectForPath;
21
+ private dispatchSubscriptions;
22
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,20 +1,20 @@
1
- import { ClientRequestId } from '@squidcloud/common';
2
- import { DestructManager } from '../destruct.manager';
3
- import { RpcManager } from '../rpc.manager';
4
- import { FakeSocketManager } from './fake-socket.manager';
5
- export declare class FakeRpcManager extends RpcManager {
6
- lastQueryClientRequestId: ClientRequestId | undefined;
7
- lastPostRequest?: {
8
- path: string;
9
- message: any;
10
- };
11
- allPostRequests: Array<{
12
- path: string;
13
- message: any;
14
- }>;
15
- errorResponses: Array<any>;
16
- constructor(socketManager: FakeSocketManager, destructManager: DestructManager);
17
- setStaticHeader(key: string, value: string): void;
18
- deleteStaticHeader(key: string): void;
19
- post<T>(path: string, message: any): Promise<T>;
20
- }
1
+ import { ClientRequestId } from '@squidcloud/common';
2
+ import { DestructManager } from '../destruct.manager';
3
+ import { RpcManager } from '../rpc.manager';
4
+ import { FakeSocketManager } from './fake-socket.manager';
5
+ export declare class FakeRpcManager extends RpcManager {
6
+ lastQueryClientRequestId: ClientRequestId | undefined;
7
+ lastPostRequest?: {
8
+ path: string;
9
+ message: any;
10
+ };
11
+ allPostRequests: Array<{
12
+ path: string;
13
+ message: any;
14
+ }>;
15
+ errorResponses: Array<any>;
16
+ constructor(socketManager: FakeSocketManager, destructManager: DestructManager);
17
+ setStaticHeader(key: string, value: string): void;
18
+ deleteStaticHeader(key: string): void;
19
+ post<T>(path: string, message: any): Promise<T>;
20
+ }
@@ -1,9 +1,9 @@
1
- import { MessageFromClient, MessageToClient } from '@squidcloud/common';
2
- import { Observable, Subject } from 'rxjs';
3
- import { SocketManagerInterface } from '../socket.manager';
4
- export declare class FakeSocketManager implements SocketManagerInterface {
5
- messagesToClient: Subject<MessageToClient>;
6
- observeConnectionReady(): Observable<boolean>;
7
- observeNotifications(): Observable<MessageToClient>;
8
- sendMessage(message: MessageFromClient): void;
9
- }
1
+ import { MessageFromClient, MessageToClient } from '@squidcloud/common';
2
+ import { Observable, Subject } from 'rxjs';
3
+ import { SocketManagerInterface } from '../socket.manager';
4
+ export declare class FakeSocketManager implements SocketManagerInterface {
5
+ messagesToClient: Subject<MessageToClient>;
6
+ observeConnectionReady(): Observable<boolean>;
7
+ observeNotifications(): Observable<MessageToClient>;
8
+ sendMessage(message: MessageFromClient): void;
9
+ }
@@ -1 +1 @@
1
- declare const nodeCrypto: any;
1
+ declare const nodeCrypto: any;
@@ -1,79 +1,79 @@
1
- import { ClientRequestId, CollectionName, DocId, IntegrationId, LockManager, MutationType, SquidDocument } from '@squidcloud/common';
2
- import { Subject, Subscription } from 'rxjs';
3
- import { CollectionReference } from '../collection-reference';
4
- import { CollectionReferenceFactory } from '../collection-reference.factory';
5
- import { DataManager } from '../data.manager';
6
- import { DestructManager } from '../destruct.manager';
7
- import DocumentIdentityService from '../document-identity.service';
8
- import { DocumentReferenceFactory } from '../document-reference.factory';
9
- import { DocumentStore } from '../document-store';
10
- import { MutationSender } from '../mutation/mutation-sender';
11
- import { JoinQueryBuilderFactory } from '../query/join-query-builder.factory';
12
- import { QueryBuilderFactory } from '../query/query-builder.factory';
13
- import { QuerySubscriptionManager } from '../query/query-subscription.manager';
14
- import { FakeRpcManager } from './fake-rpc.manager';
15
- import { FakeSocketManager } from './fake-socket.manager';
16
- export type TestDocTypeA = {
17
- a: number;
18
- b?: {
19
- c: number;
20
- };
21
- };
22
- export type TestDocTypeB = {
23
- b: number;
24
- c?: {
25
- d: number;
26
- };
27
- };
28
- export type QueryResponse = {
29
- resCount: number;
30
- results: Array<TestDocTypeA> | undefined;
31
- receivedSubject: Subject<void>;
32
- };
33
- export type JoinQueryResponse = {
34
- resCount: number;
35
- results: Array<{
36
- a: TestDocTypeA;
37
- b: TestDocTypeB | undefined;
38
- }> | undefined;
39
- receivedSubject: Subject<void>;
40
- subscription: Subscription;
41
- };
42
- export declare class SquidEnvSetup {
43
- readonly querySubscriptionManager: QuerySubscriptionManager;
44
- readonly socketManager: FakeSocketManager;
45
- readonly rpcManager: FakeRpcManager;
46
- readonly documentStore: DocumentStore;
47
- readonly documentReferenceFactory: DocumentReferenceFactory;
48
- readonly collectionReferenceFactory: CollectionReferenceFactory;
49
- readonly queryBuilderFactory: QueryBuilderFactory;
50
- readonly joinQueryBuilderFactory: JoinQueryBuilderFactory;
51
- readonly lockManager: LockManager;
52
- readonly mutationSender: MutationSender;
53
- readonly dataManager: DataManager;
54
- readonly clientId = "fakeClientId";
55
- readonly destructManager: DestructManager;
56
- readonly documentIdentityService: DocumentIdentityService;
57
- readonly collectionA: CollectionReference<TestDocTypeA>;
58
- readonly collectionB: CollectionReference<TestDocTypeB>;
59
- constructor();
60
- simulateQueryResponse(docs: Array<Partial<SquidDocument>>, collectionName: CollectionName, integrationId?: IntegrationId, clientRequestId?: ClientRequestId): void;
61
- simulateMutationsResponse(updates: Array<{
62
- mutationType: MutationType;
63
- collectionName: CollectionName;
64
- integrationId?: IntegrationId;
65
- clientRequestId?: ClientRequestId;
66
- doc: Partial<SquidDocument> & {
67
- __docId__: DocId;
68
- };
69
- }>, mutationsTimestamp?: number): Promise<void>;
70
- simulateErrorResponse(message: string): void;
71
- runAsync(fn: () => any): Promise<void>;
72
- getBuiltInDocId(idValue: string): string;
73
- executeQueryOnCollectionA(subscribe?: boolean): QueryResponse;
74
- executeJoinQuery(subscribe?: boolean): JoinQueryResponse;
75
- simulateResponseForCollectionA(id?: string, a?: number): void;
76
- simulateResponseForCollectionB(id: string, b: number): void;
77
- }
78
- export declare let squidEnvSetup: SquidEnvSetup;
79
- export declare function squidEnvSetupBeforeEach(): void;
1
+ import { ClientRequestId, CollectionName, DocId, IntegrationId, LockManager, MutationType, SquidDocument } from '@squidcloud/common';
2
+ import { Subject, Subscription } from 'rxjs';
3
+ import { CollectionReference } from '../collection-reference';
4
+ import { CollectionReferenceFactory } from '../collection-reference.factory';
5
+ import { DataManager } from '../data.manager';
6
+ import { DestructManager } from '../destruct.manager';
7
+ import DocumentIdentityService from '../document-identity.service';
8
+ import { DocumentReferenceFactory } from '../document-reference.factory';
9
+ import { DocumentStore } from '../document-store';
10
+ import { MutationSender } from '../mutation/mutation-sender';
11
+ import { JoinQueryBuilderFactory } from '../query/join-query-builder.factory';
12
+ import { QueryBuilderFactory } from '../query/query-builder.factory';
13
+ import { QuerySubscriptionManager } from '../query/query-subscription.manager';
14
+ import { FakeRpcManager } from './fake-rpc.manager';
15
+ import { FakeSocketManager } from './fake-socket.manager';
16
+ export type TestDocTypeA = {
17
+ a: number;
18
+ b?: {
19
+ c: number;
20
+ };
21
+ };
22
+ export type TestDocTypeB = {
23
+ b: number;
24
+ c?: {
25
+ d: number;
26
+ };
27
+ };
28
+ export type QueryResponse = {
29
+ resCount: number;
30
+ results: Array<TestDocTypeA> | undefined;
31
+ receivedSubject: Subject<void>;
32
+ };
33
+ export type JoinQueryResponse = {
34
+ resCount: number;
35
+ results: Array<{
36
+ a: TestDocTypeA;
37
+ b: TestDocTypeB | undefined;
38
+ }> | undefined;
39
+ receivedSubject: Subject<void>;
40
+ subscription: Subscription;
41
+ };
42
+ export declare class SquidEnvSetup {
43
+ readonly querySubscriptionManager: QuerySubscriptionManager;
44
+ readonly socketManager: FakeSocketManager;
45
+ readonly rpcManager: FakeRpcManager;
46
+ readonly documentStore: DocumentStore;
47
+ readonly documentReferenceFactory: DocumentReferenceFactory;
48
+ readonly collectionReferenceFactory: CollectionReferenceFactory;
49
+ readonly queryBuilderFactory: QueryBuilderFactory;
50
+ readonly joinQueryBuilderFactory: JoinQueryBuilderFactory;
51
+ readonly lockManager: LockManager;
52
+ readonly mutationSender: MutationSender;
53
+ readonly dataManager: DataManager;
54
+ readonly clientId = "fakeClientId";
55
+ readonly destructManager: DestructManager;
56
+ readonly documentIdentityService: DocumentIdentityService;
57
+ readonly collectionA: CollectionReference<TestDocTypeA>;
58
+ readonly collectionB: CollectionReference<TestDocTypeB>;
59
+ constructor();
60
+ simulateQueryResponse(docs: Array<Partial<SquidDocument>>, collectionName: CollectionName, integrationId?: IntegrationId, clientRequestId?: ClientRequestId): void;
61
+ simulateMutationsResponse(updates: Array<{
62
+ mutationType: MutationType;
63
+ collectionName: CollectionName;
64
+ integrationId?: IntegrationId;
65
+ clientRequestId?: ClientRequestId;
66
+ doc: Partial<SquidDocument> & {
67
+ __docId__: DocId;
68
+ };
69
+ }>, mutationsTimestamp?: number): Promise<void>;
70
+ simulateErrorResponse(message: string): void;
71
+ runAsync(fn: () => any): Promise<void>;
72
+ getBuiltInDocId(idValue: string): string;
73
+ executeQueryOnCollectionA(subscribe?: boolean): QueryResponse;
74
+ executeJoinQuery(subscribe?: boolean): JoinQueryResponse;
75
+ simulateResponseForCollectionA(id?: string, a?: number): void;
76
+ simulateResponseForCollectionB(id: string, b: number): void;
77
+ }
78
+ export declare let squidEnvSetup: SquidEnvSetup;
79
+ export declare function squidEnvSetupBeforeEach(): void;
@@ -1,2 +1,2 @@
1
- /** A transactionId - alias for string */
2
- export type TransactionId = string;
1
+ /** A transactionId - alias for string */
2
+ export type TransactionId = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",
@@ -1 +0,0 @@
1
- export declare function getApplicationUrl(regionPrefix: string, appId: string): string;