@squidcloud/client 1.0.29 → 1.0.31
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/common/src/api-call.context.d.ts +12 -17
- package/dist/common/src/api.types.d.ts +23 -10
- package/dist/common/src/application.schemas.d.ts +896 -648
- package/dist/common/src/application.types.d.ts +202 -196
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.types.d.ts +7 -7
- package/dist/common/src/backend-run.types.d.ts +66 -67
- package/dist/common/src/bundle-api.types.d.ts +64 -64
- package/dist/common/src/bundle-data.types.d.ts +46 -46
- package/dist/common/src/communication.types.d.ts +4 -4
- package/dist/common/src/context.types.d.ts +31 -21
- package/dist/common/src/document.types.d.ts +35 -35
- package/dist/common/src/graphql.context.d.ts +6 -14
- package/dist/common/src/graphql.types.d.ts +16 -8
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +49 -49
- package/dist/common/src/integration.types.d.ts +328 -265
- package/dist/common/src/logger.types.d.ts +21 -22
- package/dist/common/src/metrics.types.d.ts +58 -65
- package/dist/common/src/mutation.context.d.ts +10 -11
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.types.d.ts +72 -72
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.types.d.ts +9 -9
- package/dist/common/src/query/index.d.ts +2 -2
- package/dist/common/src/query/query-context.d.ts +37 -38
- package/dist/common/src/query/simple-query-builder.d.ts +90 -22
- package/dist/common/src/query.schemas.d.ts +5 -5
- package/dist/common/src/query.types.d.ts +118 -118
- package/dist/common/src/regions.d.ts +23 -22
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.types.d.ts +40 -38
- package/dist/common/src/security.types.d.ts +3 -0
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.types.d.ts +68 -68
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/types.d.ts +15 -15
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/error.d.ts +4 -4
- 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/nullish.d.ts +1 -1
- package/dist/common/src/utils/object.d.ts +6 -6
- package/dist/common/src/utils/serialization.d.ts +6 -6
- 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 +30 -30
- package/dist/common/src/webhook-response.d.ts +7 -7
- package/dist/index.js +2 -2
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/package.json +1 -1
- package/dist/typescript-client/src/api.manager.d.ts +14 -14
- package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
- package/dist/typescript-client/src/collection-reference.d.ts +51 -19
- package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
- package/dist/typescript-client/src/data.manager.d.ts +166 -166
- package/dist/typescript-client/src/destruct.manager.d.ts +9 -9
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +90 -23
- package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
- package/dist/typescript-client/src/document-store.d.ts +11 -11
- package/dist/typescript-client/src/graphql-client.d.ts +12 -9
- package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
- package/dist/typescript-client/src/index.d.ts +7 -7
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +11 -11
- package/dist/typescript-client/src/mutation/mutation.spec.d.ts +1 -1
- package/dist/typescript-client/src/named-query.manager.d.ts +13 -13
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +71 -35
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +53 -30
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +59 -59
- package/dist/typescript-client/src/query/query-subscription.manager.spec.d.ts +1 -1
- package/dist/typescript-client/src/query/query.spec.d.ts +1 -1
- package/dist/typescript-client/src/query/query.types.d.ts +14 -7
- package/dist/typescript-client/src/rpc.manager.d.ts +24 -24
- package/dist/typescript-client/src/socket.manager.d.ts +27 -27
- package/dist/typescript-client/src/squid.d.ts +171 -55
- package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
- package/dist/typescript-client/src/state/actions.d.ts +29 -29
- package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
- package/dist/typescript-client/src/state/state.service.d.ts +22 -22
- package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
- package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +20 -20
- package/dist/typescript-client/src/testing/fake-socket.manager.d.ts +9 -9
- package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
- package/dist/typescript-client/src/testing/squid-env-setup.d.ts +79 -79
- package/dist/typescript-client/src/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/common/src/metrics.schemas.d.ts +0 -3
|
@@ -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
|
-
|
|
2
|
-
export
|
|
1
|
+
/** A transactionId - alias for string */
|
|
2
|
+
export type TransactionId = string;
|
package/package.json
CHANGED