@squidcloud/client 1.0.20 → 1.0.21
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 +17 -17
- package/dist/common/src/api.types.d.ts +10 -10
- package/dist/common/src/application.schemas.d.ts +608 -608
- package/dist/common/src/application.types.d.ts +197 -197
- 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 +60 -60
- package/dist/common/src/bundle-api.types.d.ts +66 -66
- package/dist/common/src/bundle-data.types.d.ts +47 -47
- package/dist/common/src/communication.types.d.ts +4 -4
- package/dist/common/src/context.types.d.ts +21 -21
- package/dist/common/src/document.types.d.ts +35 -35
- package/dist/common/src/executable.context.d.ts +4 -4
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.types.d.ts +8 -8
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +50 -50
- package/dist/common/src/integration.types.d.ts +249 -249
- package/dist/common/src/logger.types.d.ts +22 -22
- package/dist/common/src/metrics.schemas.d.ts +3 -3
- package/dist/common/src/metrics.types.d.ts +65 -65
- package/dist/common/src/mutation.context.d.ts +11 -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 +38 -38
- package/dist/common/src/query/simple-query-builder.d.ts +14 -14
- 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 +4 -4
- 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 +38 -38
- 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 +1 -1
- 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/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 +19 -19
- package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
- package/dist/typescript-client/src/data.manager.d.ts +164 -164
- 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 +23 -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 +9 -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 +35 -35
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +37 -37
- 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 +7 -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 +51 -51
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IntegrationId } 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 clientsMap;
|
|
7
|
-
constructor(rpcManager: RpcManager);
|
|
8
|
-
get(integrationId: IntegrationId): GraphQLClient;
|
|
9
|
-
}
|
|
1
|
+
import { IntegrationId } 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 clientsMap;
|
|
7
|
+
constructor(rpcManager: RpcManager);
|
|
8
|
+
get(integrationId: IntegrationId): GraphQLClient;
|
|
9
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { Alias, JoinCondition } from './query/query.types';
|
|
6
|
-
export { Squid, SquidOptions } from './squid';
|
|
7
|
-
export { TransactionId } from './types';
|
|
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 { Alias, JoinCondition } from './query/query.types';
|
|
6
|
+
export { Squid, SquidOptions } from './squid';
|
|
7
|
+
export { TransactionId } from './types';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ClientId, IntegrationId, LockManager, MutateResponse, Mutation } from '@squidcloud/common';
|
|
2
|
-
import { QuerySubscriptionManager } from '../query/query-subscription.manager';
|
|
3
|
-
import { RpcManager } from '../rpc.manager';
|
|
4
|
-
export declare class MutationSender {
|
|
5
|
-
private readonly clientId;
|
|
6
|
-
private readonly rpcManager;
|
|
7
|
-
private readonly lockManager;
|
|
8
|
-
private readonly querySubscriptionManager;
|
|
9
|
-
constructor(clientId: ClientId, rpcManager: RpcManager, lockManager: LockManager, querySubscriptionManager: QuerySubscriptionManager);
|
|
10
|
-
sendMutations(mutations: Array<Mutation>, integrationId: IntegrationId): Promise<MutateResponse>;
|
|
11
|
-
}
|
|
1
|
+
import { ClientId, IntegrationId, LockManager, MutateResponse, Mutation } from '@squidcloud/common';
|
|
2
|
+
import { QuerySubscriptionManager } from '../query/query-subscription.manager';
|
|
3
|
+
import { RpcManager } from '../rpc.manager';
|
|
4
|
+
export declare class MutationSender {
|
|
5
|
+
private readonly clientId;
|
|
6
|
+
private readonly rpcManager;
|
|
7
|
+
private readonly lockManager;
|
|
8
|
+
private readonly querySubscriptionManager;
|
|
9
|
+
constructor(clientId: ClientId, rpcManager: RpcManager, lockManager: LockManager, querySubscriptionManager: QuerySubscriptionManager);
|
|
10
|
+
sendMutations(mutations: Array<Mutation>, integrationId: IntegrationId): Promise<MutateResponse>;
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ClientId, IntegrationId, QueryName } from '@squidcloud/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RpcManager } from './rpc.manager';
|
|
4
|
-
import { SocketManager } from './socket.manager';
|
|
5
|
-
export declare class NamedQueryManager {
|
|
6
|
-
private readonly clientId;
|
|
7
|
-
private readonly rpcManager;
|
|
8
|
-
private readonly socketManager;
|
|
9
|
-
private readonly ongoingNamedQueryExecutions;
|
|
10
|
-
constructor(clientId: ClientId, rpcManager: RpcManager, socketManager: SocketManager);
|
|
11
|
-
executeNamedQueryAndSubscribe<T>(integrationId: IntegrationId, queryName: QueryName, params: Record<string, any>): Observable<T>;
|
|
12
|
-
private handleNamedQueryResponse;
|
|
13
|
-
}
|
|
1
|
+
import { ClientId, IntegrationId, QueryName } from '@squidcloud/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RpcManager } from './rpc.manager';
|
|
4
|
+
import { SocketManager } from './socket.manager';
|
|
5
|
+
export declare class NamedQueryManager {
|
|
6
|
+
private readonly clientId;
|
|
7
|
+
private readonly rpcManager;
|
|
8
|
+
private readonly socketManager;
|
|
9
|
+
private readonly ongoingNamedQueryExecutions;
|
|
10
|
+
constructor(clientId: ClientId, rpcManager: RpcManager, socketManager: SocketManager);
|
|
11
|
+
executeNamedQueryAndSubscribe<T>(integrationId: IntegrationId, queryName: QueryName, params: Record<string, any>): Observable<T>;
|
|
12
|
+
private handleNamedQueryResponse;
|
|
13
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { CollectionName, DocumentData, FieldName, IntegrationId, Operator, PrimitiveFieldType, Query } from '@squidcloud/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DocumentReference } from '../document-reference';
|
|
4
|
-
import { DocumentReferenceFactory } from '../document-reference.factory';
|
|
5
|
-
import { QueryBuilderFactory } from './query-builder.factory';
|
|
6
|
-
import { QuerySubscriptionManager } from './query-subscription.manager';
|
|
7
|
-
import { Alias } from './query.types';
|
|
8
|
-
export declare class JoinQueryBuilderFactory {
|
|
9
|
-
private readonly querySubscriptionManager;
|
|
10
|
-
private readonly documentReferenceFactory;
|
|
11
|
-
private readonly queryBuilderFactory;
|
|
12
|
-
constructor(querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, queryBuilderFactory: QueryBuilderFactory);
|
|
13
|
-
getForJoin<DocumentType extends DocumentData, MyAlias extends Alias, ReturnType extends Record<MyAlias, DocumentReference<DocumentType>>>(collectionName: CollectionName, integrationId: IntegrationId, alias: MyAlias): JoinQueryBuilder<DocumentType, MyAlias, ReturnType>;
|
|
14
|
-
}
|
|
15
|
-
export declare class JoinQueryBuilder<DocumentType extends DocumentData, MyAlias extends Alias, ReturnType extends Record<MyAlias, DocumentReference<DocumentType> | undefined>> {
|
|
16
|
-
private readonly collectionName;
|
|
17
|
-
private readonly integrationId;
|
|
18
|
-
private readonly querySubscriptionManager;
|
|
19
|
-
private readonly documentReferenceFactory;
|
|
20
|
-
private readonly alias;
|
|
21
|
-
private readonly joinQueryBuilderFactory;
|
|
22
|
-
private readonly queryBuilderFactory;
|
|
23
|
-
private readonly simpleQueryBuilder;
|
|
24
|
-
private readonly joins;
|
|
25
|
-
/** Record that maps the right alias to the left condition */
|
|
26
|
-
private readonly joinConditions;
|
|
27
|
-
constructor(collectionName: CollectionName, integrationId: IntegrationId, querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, alias: MyAlias, joinQueryBuilderFactory: JoinQueryBuilderFactory, queryBuilderFactory: QueryBuilderFactory);
|
|
28
|
-
where(fieldName: (keyof DocumentType & FieldName) | string, operator: Operator | 'in' | 'not in', value: PrimitiveFieldType | Array<PrimitiveFieldType>): this;
|
|
29
|
-
limit(limit: number): this;
|
|
30
|
-
sortBy(fieldName: keyof DocumentType & FieldName, asc?: boolean): this;
|
|
31
|
-
join<J extends DocumentData, RightAlias extends Alias, RightReturnType extends Record<RightAlias, DocumentReference<J> | undefined>>(queryBuilder: JoinQueryBuilder<J, RightAlias, RightReturnType>, leftFieldName: keyof DocumentType & FieldName, rightFieldName: keyof J & FieldName): JoinQueryBuilder<DocumentType, MyAlias, ReturnType & Partial<RightReturnType>>;
|
|
32
|
-
snapshot(): Promise<Array<ReturnType>>;
|
|
33
|
-
snapshots(subscribe?: boolean): Observable<Array<ReturnType>>;
|
|
34
|
-
build(): Query;
|
|
35
|
-
}
|
|
1
|
+
import { CollectionName, DocumentData, FieldName, IntegrationId, Operator, PrimitiveFieldType, Query } from '@squidcloud/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DocumentReference } from '../document-reference';
|
|
4
|
+
import { DocumentReferenceFactory } from '../document-reference.factory';
|
|
5
|
+
import { QueryBuilderFactory } from './query-builder.factory';
|
|
6
|
+
import { QuerySubscriptionManager } from './query-subscription.manager';
|
|
7
|
+
import { Alias } from './query.types';
|
|
8
|
+
export declare class JoinQueryBuilderFactory {
|
|
9
|
+
private readonly querySubscriptionManager;
|
|
10
|
+
private readonly documentReferenceFactory;
|
|
11
|
+
private readonly queryBuilderFactory;
|
|
12
|
+
constructor(querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, queryBuilderFactory: QueryBuilderFactory);
|
|
13
|
+
getForJoin<DocumentType extends DocumentData, MyAlias extends Alias, ReturnType extends Record<MyAlias, DocumentReference<DocumentType>>>(collectionName: CollectionName, integrationId: IntegrationId, alias: MyAlias): JoinQueryBuilder<DocumentType, MyAlias, ReturnType>;
|
|
14
|
+
}
|
|
15
|
+
export declare class JoinQueryBuilder<DocumentType extends DocumentData, MyAlias extends Alias, ReturnType extends Record<MyAlias, DocumentReference<DocumentType> | undefined>> {
|
|
16
|
+
private readonly collectionName;
|
|
17
|
+
private readonly integrationId;
|
|
18
|
+
private readonly querySubscriptionManager;
|
|
19
|
+
private readonly documentReferenceFactory;
|
|
20
|
+
private readonly alias;
|
|
21
|
+
private readonly joinQueryBuilderFactory;
|
|
22
|
+
private readonly queryBuilderFactory;
|
|
23
|
+
private readonly simpleQueryBuilder;
|
|
24
|
+
private readonly joins;
|
|
25
|
+
/** Record that maps the right alias to the left condition */
|
|
26
|
+
private readonly joinConditions;
|
|
27
|
+
constructor(collectionName: CollectionName, integrationId: IntegrationId, querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, alias: MyAlias, joinQueryBuilderFactory: JoinQueryBuilderFactory, queryBuilderFactory: QueryBuilderFactory);
|
|
28
|
+
where(fieldName: (keyof DocumentType & FieldName) | string, operator: Operator | 'in' | 'not in', value: PrimitiveFieldType | Array<PrimitiveFieldType>): this;
|
|
29
|
+
limit(limit: number): this;
|
|
30
|
+
sortBy(fieldName: keyof DocumentType & FieldName, asc?: boolean): this;
|
|
31
|
+
join<J extends DocumentData, RightAlias extends Alias, RightReturnType extends Record<RightAlias, DocumentReference<J> | undefined>>(queryBuilder: JoinQueryBuilder<J, RightAlias, RightReturnType>, leftFieldName: keyof DocumentType & FieldName, rightFieldName: keyof J & FieldName): JoinQueryBuilder<DocumentType, MyAlias, ReturnType & Partial<RightReturnType>>;
|
|
32
|
+
snapshot(): Promise<Array<ReturnType>>;
|
|
33
|
+
snapshots(subscribe?: boolean): Observable<Array<ReturnType>>;
|
|
34
|
+
build(): Query;
|
|
35
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { CollectionName, DocumentData, FieldName, IntegrationId, Operator, PrimitiveFieldType, Query, SquidDocId } from '@squidcloud/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import DocumentIdentityService from '../document-identity.service';
|
|
4
|
-
import { DocumentReference } from '../document-reference';
|
|
5
|
-
import { DocumentReferenceFactory } from '../document-reference.factory';
|
|
6
|
-
import { QuerySubscriptionManager } from './query-subscription.manager';
|
|
7
|
-
export declare class QueryBuilderFactory {
|
|
8
|
-
private readonly querySubscriptionManager;
|
|
9
|
-
private readonly documentReferenceFactory;
|
|
10
|
-
private readonly documentIdentityService;
|
|
11
|
-
constructor(querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, documentIdentityService: DocumentIdentityService);
|
|
12
|
-
getForDocument<DocumentType extends DocumentData>(squidDocId: SquidDocId): QueryBuilder<DocumentType>;
|
|
13
|
-
get<DocumentType extends DocumentData>(collectionName: CollectionName, integrationId: IntegrationId): QueryBuilder<DocumentType>;
|
|
14
|
-
}
|
|
15
|
-
export declare class QueryBuilder<DocumentType extends DocumentData> {
|
|
16
|
-
private readonly collectionName;
|
|
17
|
-
private readonly integrationId;
|
|
18
|
-
private readonly querySubscriptionManager;
|
|
19
|
-
private readonly documentReferenceFactory;
|
|
20
|
-
private readonly queryBuilderFactory;
|
|
21
|
-
private readonly documentIdentityService;
|
|
22
|
-
private readonly simpleQueryBuilder;
|
|
23
|
-
constructor(collectionName: CollectionName, integrationId: IntegrationId, querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, queryBuilderFactory: QueryBuilderFactory, documentIdentityService: DocumentIdentityService);
|
|
24
|
-
where(fieldName: (keyof DocumentType & FieldName) | string, operator: Operator | 'in' | 'not in', value: PrimitiveFieldType | Array<PrimitiveFieldType>): this;
|
|
25
|
-
limit(limit: number): this;
|
|
26
|
-
sortBy(fieldName: keyof DocumentType & FieldName, asc?: boolean): this;
|
|
27
|
-
snapshot(): Promise<Array<DocumentReference<DocumentType>>>;
|
|
28
|
-
snapshots(subscribe?: boolean): Observable<Array<DocumentReference<DocumentType>>>;
|
|
29
|
-
changes(): Observable<Changes<DocumentType>>;
|
|
30
|
-
build(): Query;
|
|
31
|
-
get hash(): string;
|
|
32
|
-
}
|
|
33
|
-
export interface Changes<DocumentType extends DocumentData> {
|
|
34
|
-
inserts: Array<DocumentReference<DocumentType>>;
|
|
35
|
-
updates: Array<DocumentReference<DocumentType>>;
|
|
36
|
-
deletes: Array<DocumentType>;
|
|
37
|
-
}
|
|
1
|
+
import { CollectionName, DocumentData, FieldName, IntegrationId, Operator, PrimitiveFieldType, Query, SquidDocId } from '@squidcloud/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import DocumentIdentityService from '../document-identity.service';
|
|
4
|
+
import { DocumentReference } from '../document-reference';
|
|
5
|
+
import { DocumentReferenceFactory } from '../document-reference.factory';
|
|
6
|
+
import { QuerySubscriptionManager } from './query-subscription.manager';
|
|
7
|
+
export declare class QueryBuilderFactory {
|
|
8
|
+
private readonly querySubscriptionManager;
|
|
9
|
+
private readonly documentReferenceFactory;
|
|
10
|
+
private readonly documentIdentityService;
|
|
11
|
+
constructor(querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, documentIdentityService: DocumentIdentityService);
|
|
12
|
+
getForDocument<DocumentType extends DocumentData>(squidDocId: SquidDocId): QueryBuilder<DocumentType>;
|
|
13
|
+
get<DocumentType extends DocumentData>(collectionName: CollectionName, integrationId: IntegrationId): QueryBuilder<DocumentType>;
|
|
14
|
+
}
|
|
15
|
+
export declare class QueryBuilder<DocumentType extends DocumentData> {
|
|
16
|
+
private readonly collectionName;
|
|
17
|
+
private readonly integrationId;
|
|
18
|
+
private readonly querySubscriptionManager;
|
|
19
|
+
private readonly documentReferenceFactory;
|
|
20
|
+
private readonly queryBuilderFactory;
|
|
21
|
+
private readonly documentIdentityService;
|
|
22
|
+
private readonly simpleQueryBuilder;
|
|
23
|
+
constructor(collectionName: CollectionName, integrationId: IntegrationId, querySubscriptionManager: QuerySubscriptionManager, documentReferenceFactory: DocumentReferenceFactory, queryBuilderFactory: QueryBuilderFactory, documentIdentityService: DocumentIdentityService);
|
|
24
|
+
where(fieldName: (keyof DocumentType & FieldName) | string, operator: Operator | 'in' | 'not in', value: PrimitiveFieldType | Array<PrimitiveFieldType>): this;
|
|
25
|
+
limit(limit: number): this;
|
|
26
|
+
sortBy(fieldName: keyof DocumentType & FieldName, asc?: boolean): this;
|
|
27
|
+
snapshot(): Promise<Array<DocumentReference<DocumentType>>>;
|
|
28
|
+
snapshots(subscribe?: boolean): Observable<Array<DocumentReference<DocumentType>>>;
|
|
29
|
+
changes(): Observable<Changes<DocumentType>>;
|
|
30
|
+
build(): Query;
|
|
31
|
+
get hash(): string;
|
|
32
|
+
}
|
|
33
|
+
export interface Changes<DocumentType extends DocumentData> {
|
|
34
|
+
inserts: Array<DocumentReference<DocumentType>>;
|
|
35
|
+
updates: Array<DocumentReference<DocumentType>>;
|
|
36
|
+
deletes: Array<DocumentType>;
|
|
37
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { ClientId, ClientRequestId, Query, QuerySubscriptionId, SquidDocId, SquidDocument } from '@squidcloud/common';
|
|
2
|
-
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
3
|
-
import { DestructManager } from '../destruct.manager';
|
|
4
|
-
import DocumentIdentityService from '../document-identity.service';
|
|
5
|
-
import { DocumentStore } from '../document-store';
|
|
6
|
-
import { RpcManager } from '../rpc.manager';
|
|
7
|
-
import { Alias, JoinCondition } from './query.types';
|
|
8
|
-
export declare class QuerySubscriptionManager {
|
|
9
|
-
private readonly rpcManager;
|
|
10
|
-
private readonly clientId;
|
|
11
|
-
private readonly documentStore;
|
|
12
|
-
private readonly destructManager;
|
|
13
|
-
private readonly documentIdentityService;
|
|
14
|
-
readonly safeToSendQueriesToServer: BehaviorSubject<boolean>;
|
|
15
|
-
onOrphanDocuments: Subject<string[]>;
|
|
16
|
-
private readonly ongoingQueries;
|
|
17
|
-
private readonly inflightQueriesCount;
|
|
18
|
-
/**
|
|
19
|
-
* The two maps below maintain the relation between document ids we know about locally to clientRequestIds (queries).
|
|
20
|
-
* This relation is used for determining whether a document can be safely removed.
|
|
21
|
-
*/
|
|
22
|
-
private readonly clientRequestIdToLocalDocuments;
|
|
23
|
-
private readonly localDocumentToClientRequestIds;
|
|
24
|
-
private readonly queryMappingManager;
|
|
25
|
-
constructor(rpcManager: RpcManager, clientId: ClientId, documentStore: DocumentStore, destructManager: DestructManager, documentIdentityService: DocumentIdentityService);
|
|
26
|
-
hasOngoingQuery(clientRequestId: ClientRequestId): boolean;
|
|
27
|
-
getQuery(clientRequestId: ClientRequestId): Query;
|
|
28
|
-
setGotResponseFromServer(clientRequestId: ClientRequestId): void;
|
|
29
|
-
findQueriesForDocument(doc: SquidDocument, squidDocId: SquidDocId): Array<QuerySubscriptionId>;
|
|
30
|
-
/**
|
|
31
|
-
* Given the new document's properties, finds all the queries that should be notified with the new properties and
|
|
32
|
-
* updates the internal mappings (squidDocId --> client request Ids and, clientRequestId --> squidDocIds).
|
|
33
|
-
* Returns an array with all the previous and current client request ids (basically all the client request ids that
|
|
34
|
-
* will need to be notified due to the change of properties).
|
|
35
|
-
*/
|
|
36
|
-
setClientRequestIdsForLocalDoc(squidDocId: SquidDocId, properties: SquidDocument | undefined): Array<ClientRequestId>;
|
|
37
|
-
errorOutAllQueries(squidDocId: SquidDocId, err: any): void;
|
|
38
|
-
notifyAllSubscriptions(clientRequestIds: ClientRequestId[]): void;
|
|
39
|
-
processQuery(query: Query, rootAlias: Alias, joins: Record<string, Query>, joinConditions: Record<Alias, JoinCondition>, subscribe: boolean): Observable<Array<Record<Alias, SquidDocument | undefined>>>;
|
|
40
|
-
hasOngoingQueryForDocId(squidDocId: string): boolean;
|
|
41
|
-
private removeClientRequestId;
|
|
42
|
-
waitForAllQueriesToFinish(): Promise<void>;
|
|
43
|
-
private registerQueryFinalizer;
|
|
44
|
-
/** Creates a graph of ongoing queries and returns the root of the graph. */
|
|
45
|
-
private createOngoingQueryGraph;
|
|
46
|
-
private collectAllObservables;
|
|
47
|
-
private joinResults;
|
|
48
|
-
private join;
|
|
49
|
-
private getOngoingQueriesBfs;
|
|
50
|
-
private updateOngoingQueryWithNewDataFromSupportingQuery;
|
|
51
|
-
private allOngoingQueriesGotServerResult;
|
|
52
|
-
private completeAllSupportedQueries;
|
|
53
|
-
private predestruct;
|
|
54
|
-
unsubscribe(): void;
|
|
55
|
-
hasSubscription(clientRequestId: ClientRequestId): boolean;
|
|
56
|
-
/** Sends the query request to the server and makes sure to unsubscribe once the subject completes. */
|
|
57
|
-
private sendQueryToServer;
|
|
58
|
-
private migrateDocIds;
|
|
59
|
-
}
|
|
1
|
+
import { ClientId, ClientRequestId, Query, QuerySubscriptionId, SquidDocId, SquidDocument } from '@squidcloud/common';
|
|
2
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
3
|
+
import { DestructManager } from '../destruct.manager';
|
|
4
|
+
import DocumentIdentityService from '../document-identity.service';
|
|
5
|
+
import { DocumentStore } from '../document-store';
|
|
6
|
+
import { RpcManager } from '../rpc.manager';
|
|
7
|
+
import { Alias, JoinCondition } from './query.types';
|
|
8
|
+
export declare class QuerySubscriptionManager {
|
|
9
|
+
private readonly rpcManager;
|
|
10
|
+
private readonly clientId;
|
|
11
|
+
private readonly documentStore;
|
|
12
|
+
private readonly destructManager;
|
|
13
|
+
private readonly documentIdentityService;
|
|
14
|
+
readonly safeToSendQueriesToServer: BehaviorSubject<boolean>;
|
|
15
|
+
onOrphanDocuments: Subject<string[]>;
|
|
16
|
+
private readonly ongoingQueries;
|
|
17
|
+
private readonly inflightQueriesCount;
|
|
18
|
+
/**
|
|
19
|
+
* The two maps below maintain the relation between document ids we know about locally to clientRequestIds (queries).
|
|
20
|
+
* This relation is used for determining whether a document can be safely removed.
|
|
21
|
+
*/
|
|
22
|
+
private readonly clientRequestIdToLocalDocuments;
|
|
23
|
+
private readonly localDocumentToClientRequestIds;
|
|
24
|
+
private readonly queryMappingManager;
|
|
25
|
+
constructor(rpcManager: RpcManager, clientId: ClientId, documentStore: DocumentStore, destructManager: DestructManager, documentIdentityService: DocumentIdentityService);
|
|
26
|
+
hasOngoingQuery(clientRequestId: ClientRequestId): boolean;
|
|
27
|
+
getQuery(clientRequestId: ClientRequestId): Query;
|
|
28
|
+
setGotResponseFromServer(clientRequestId: ClientRequestId): void;
|
|
29
|
+
findQueriesForDocument(doc: SquidDocument, squidDocId: SquidDocId): Array<QuerySubscriptionId>;
|
|
30
|
+
/**
|
|
31
|
+
* Given the new document's properties, finds all the queries that should be notified with the new properties and
|
|
32
|
+
* updates the internal mappings (squidDocId --> client request Ids and, clientRequestId --> squidDocIds).
|
|
33
|
+
* Returns an array with all the previous and current client request ids (basically all the client request ids that
|
|
34
|
+
* will need to be notified due to the change of properties).
|
|
35
|
+
*/
|
|
36
|
+
setClientRequestIdsForLocalDoc(squidDocId: SquidDocId, properties: SquidDocument | undefined): Array<ClientRequestId>;
|
|
37
|
+
errorOutAllQueries(squidDocId: SquidDocId, err: any): void;
|
|
38
|
+
notifyAllSubscriptions(clientRequestIds: ClientRequestId[]): void;
|
|
39
|
+
processQuery(query: Query, rootAlias: Alias, joins: Record<string, Query>, joinConditions: Record<Alias, JoinCondition>, subscribe: boolean): Observable<Array<Record<Alias, SquidDocument | undefined>>>;
|
|
40
|
+
hasOngoingQueryForDocId(squidDocId: string): boolean;
|
|
41
|
+
private removeClientRequestId;
|
|
42
|
+
waitForAllQueriesToFinish(): Promise<void>;
|
|
43
|
+
private registerQueryFinalizer;
|
|
44
|
+
/** Creates a graph of ongoing queries and returns the root of the graph. */
|
|
45
|
+
private createOngoingQueryGraph;
|
|
46
|
+
private collectAllObservables;
|
|
47
|
+
private joinResults;
|
|
48
|
+
private join;
|
|
49
|
+
private getOngoingQueriesBfs;
|
|
50
|
+
private updateOngoingQueryWithNewDataFromSupportingQuery;
|
|
51
|
+
private allOngoingQueriesGotServerResult;
|
|
52
|
+
private completeAllSupportedQueries;
|
|
53
|
+
private predestruct;
|
|
54
|
+
unsubscribe(): void;
|
|
55
|
+
hasSubscription(clientRequestId: ClientRequestId): boolean;
|
|
56
|
+
/** Sends the query request to the server and makes sure to unsubscribe once the subject completes. */
|
|
57
|
+
private sendQueryToServer;
|
|
58
|
+
private migrateDocIds;
|
|
59
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FieldName } from '@squidcloud/common';
|
|
2
|
-
export type Alias = string;
|
|
3
|
-
export interface JoinCondition {
|
|
4
|
-
leftAlias: Alias;
|
|
5
|
-
leftFieldName: FieldName;
|
|
6
|
-
rightFieldName: FieldName;
|
|
7
|
-
}
|
|
1
|
+
import { FieldName } from '@squidcloud/common';
|
|
2
|
+
export type Alias = string;
|
|
3
|
+
export interface JoinCondition {
|
|
4
|
+
leftAlias: Alias;
|
|
5
|
+
leftFieldName: FieldName;
|
|
6
|
+
rightFieldName: FieldName;
|
|
7
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ApiKey } from '@squidcloud/common';
|
|
2
|
-
import { DestructManager } from './destruct.manager';
|
|
3
|
-
import { SocketManagerInterface } from './socket.manager';
|
|
4
|
-
export declare class RpcManager {
|
|
5
|
-
private readonly rpcEndpoint;
|
|
6
|
-
private readonly socketManager;
|
|
7
|
-
private readonly staticHeaders;
|
|
8
|
-
private readonly onGoingRpcsCounter;
|
|
9
|
-
constructor(rpcEndpoint: string, socketManager: SocketManagerInterface, destructManager: DestructManager, apiKey?: ApiKey);
|
|
10
|
-
awaitAllSettled(): Promise<void>;
|
|
11
|
-
setStaticHeader(key: string, value: string): void;
|
|
12
|
-
deleteStaticHeader(key: string): void;
|
|
13
|
-
getEndpoint(): string;
|
|
14
|
-
getStaticHeaders(): Record<string, string>;
|
|
15
|
-
post<T>(path: string, message: any): Promise<T>;
|
|
16
|
-
}
|
|
17
|
-
export declare class RpcError extends Error {
|
|
18
|
-
readonly statusCode: number;
|
|
19
|
-
readonly statusText: string;
|
|
20
|
-
readonly headers: Headers;
|
|
21
|
-
readonly url: string;
|
|
22
|
-
readonly body: string;
|
|
23
|
-
constructor(statusCode: number, statusText: string, headers: Headers, url: string, body: string);
|
|
24
|
-
}
|
|
1
|
+
import { ApiKey } from '@squidcloud/common';
|
|
2
|
+
import { DestructManager } from './destruct.manager';
|
|
3
|
+
import { SocketManagerInterface } from './socket.manager';
|
|
4
|
+
export declare class RpcManager {
|
|
5
|
+
private readonly rpcEndpoint;
|
|
6
|
+
private readonly socketManager;
|
|
7
|
+
private readonly staticHeaders;
|
|
8
|
+
private readonly onGoingRpcsCounter;
|
|
9
|
+
constructor(rpcEndpoint: string, socketManager: SocketManagerInterface, destructManager: DestructManager, apiKey?: ApiKey);
|
|
10
|
+
awaitAllSettled(): Promise<void>;
|
|
11
|
+
setStaticHeader(key: string, value: string): void;
|
|
12
|
+
deleteStaticHeader(key: string): void;
|
|
13
|
+
getEndpoint(): string;
|
|
14
|
+
getStaticHeaders(): Record<string, string>;
|
|
15
|
+
post<T>(path: string, message: any): Promise<T>;
|
|
16
|
+
}
|
|
17
|
+
export declare class RpcError extends Error {
|
|
18
|
+
readonly statusCode: number;
|
|
19
|
+
readonly statusText: string;
|
|
20
|
+
readonly headers: Headers;
|
|
21
|
+
readonly url: string;
|
|
22
|
+
readonly body: string;
|
|
23
|
+
constructor(statusCode: number, statusText: string, headers: Headers, url: string, body: string);
|
|
24
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { ClientId, MessageFromClient, MessageToClient } from '@squidcloud/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DestructManager } from './destruct.manager';
|
|
4
|
-
export interface SocketManagerInterface {
|
|
5
|
-
observeNotifications(): Observable<MessageToClient>;
|
|
6
|
-
observeConnectionReady(): Observable<boolean>;
|
|
7
|
-
sendMessage(message: MessageFromClient): void;
|
|
8
|
-
}
|
|
9
|
-
export declare class SocketManager implements SocketManagerInterface {
|
|
10
|
-
private readonly clientId;
|
|
11
|
-
private readonly socketIoEndpoint;
|
|
12
|
-
private readonly messageNotificationWrapper;
|
|
13
|
-
private readonly destructManager;
|
|
14
|
-
private readonly webSocketObserver;
|
|
15
|
-
private readonly allMessagesObserver;
|
|
16
|
-
private readonly connectionReady;
|
|
17
|
-
private readonly seenMessageIds;
|
|
18
|
-
private socket;
|
|
19
|
-
private firstConnection;
|
|
20
|
-
constructor(clientId: ClientId, socketIoEndpoint: string, messageNotificationWrapper: (fn: () => any) => any, destructManager: DestructManager);
|
|
21
|
-
observeNotifications(): Observable<MessageToClient>;
|
|
22
|
-
observeConnectionReady(): Observable<boolean>;
|
|
23
|
-
sendMessage(message: MessageFromClient): void;
|
|
24
|
-
private connect;
|
|
25
|
-
private setupMessageAcknowledgments;
|
|
26
|
-
private destruct;
|
|
27
|
-
}
|
|
1
|
+
import { ClientId, MessageFromClient, MessageToClient } from '@squidcloud/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DestructManager } from './destruct.manager';
|
|
4
|
+
export interface SocketManagerInterface {
|
|
5
|
+
observeNotifications(): Observable<MessageToClient>;
|
|
6
|
+
observeConnectionReady(): Observable<boolean>;
|
|
7
|
+
sendMessage(message: MessageFromClient): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class SocketManager implements SocketManagerInterface {
|
|
10
|
+
private readonly clientId;
|
|
11
|
+
private readonly socketIoEndpoint;
|
|
12
|
+
private readonly messageNotificationWrapper;
|
|
13
|
+
private readonly destructManager;
|
|
14
|
+
private readonly webSocketObserver;
|
|
15
|
+
private readonly allMessagesObserver;
|
|
16
|
+
private readonly connectionReady;
|
|
17
|
+
private readonly seenMessageIds;
|
|
18
|
+
private socket;
|
|
19
|
+
private firstConnection;
|
|
20
|
+
constructor(clientId: ClientId, socketIoEndpoint: string, messageNotificationWrapper: (fn: () => any) => any, destructManager: DestructManager);
|
|
21
|
+
observeNotifications(): Observable<MessageToClient>;
|
|
22
|
+
observeConnectionReady(): Observable<boolean>;
|
|
23
|
+
sendMessage(message: MessageFromClient): void;
|
|
24
|
+
private connect;
|
|
25
|
+
private setupMessageAcknowledgments;
|
|
26
|
+
private destruct;
|
|
27
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { ApiEndpointId, ApiKey, AppId, CollectionName, DocumentData, IntegrationId, PartialBy, QueryName, SquidRegion } from '@squidcloud/common';
|
|
2
|
-
import { CollectionReference } from './collection-reference';
|
|
3
|
-
import { GraphQLClient } from './graphql-client';
|
|
4
|
-
import { TransactionId } from './types';
|
|
5
|
-
export interface SquidOptions {
|
|
6
|
-
messageNotificationWrapper?: (fn: () => any) => any;
|
|
7
|
-
appId: AppId;
|
|
8
|
-
apiKey?: ApiKey;
|
|
9
|
-
region: SquidRegion;
|
|
10
|
-
apiServerUrlOverrideMapping?: Record<IntegrationId, string>;
|
|
11
|
-
}
|
|
12
|
-
/** Reference to the squid db. Provides all the available actions on the DB. */
|
|
13
|
-
export declare class Squid {
|
|
14
|
-
private readonly socketManager;
|
|
15
|
-
private readonly clientId;
|
|
16
|
-
private readonly rpcManager;
|
|
17
|
-
private readonly dataManager;
|
|
18
|
-
private readonly documentReferenceFactory;
|
|
19
|
-
private readonly documentStore;
|
|
20
|
-
private readonly lockManager;
|
|
21
|
-
private readonly querySubscriptionManager;
|
|
22
|
-
private readonly queryBuilderFactory;
|
|
23
|
-
private readonly joinQueryBuilderFactory;
|
|
24
|
-
private readonly collectionReferenceFactory;
|
|
25
|
-
private readonly backendFunctionManager;
|
|
26
|
-
private readonly namedQueryManager;
|
|
27
|
-
private readonly apiManager;
|
|
28
|
-
private readonly graphqlClientFactory;
|
|
29
|
-
private readonly destructManager;
|
|
30
|
-
private readonly documentIdentityService;
|
|
31
|
-
private static readonly squidInstancesMap;
|
|
32
|
-
constructor(options: PartialBy<SquidOptions, 'region'>);
|
|
33
|
-
/**
|
|
34
|
-
* This method is a factory method for creating a Squid instance
|
|
35
|
-
*/
|
|
36
|
-
static getInstance(options: SquidOptions): Squid;
|
|
37
|
-
static getInstances(): Array<Squid>;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the auth id token (OpenId) that will be sent to the server and will be used for providing the Auth object
|
|
40
|
-
* to the security rules.
|
|
41
|
-
*/
|
|
42
|
-
setAuthIdToken(idToken: string | undefined): void;
|
|
43
|
-
collection<T extends DocumentData>(collectionName: CollectionName, integrationId?: IntegrationId): CollectionReference<T>;
|
|
44
|
-
runInTransaction(fn: (transactionId: TransactionId) => Promise<void>): Promise<void>;
|
|
45
|
-
executeFunction<T = any>(functionName: string, ...params: any[]): Promise<T>;
|
|
46
|
-
executeNamedQuery<T = any>(integrationId: IntegrationId, queryName: QueryName, params: Record<string, any>): Promise<T>;
|
|
47
|
-
callApi<T = any>(integrationId: IntegrationId, endpointId: ApiEndpointId, request?: Record<string, any>): Promise<T>;
|
|
48
|
-
graphql(integrationId: IntegrationId): GraphQLClient;
|
|
49
|
-
destruct(): Promise<void>;
|
|
50
|
-
unsubscribe(): Promise<void>;
|
|
51
|
-
}
|
|
1
|
+
import { ApiEndpointId, ApiKey, AppId, CollectionName, DocumentData, IntegrationId, PartialBy, QueryName, SquidRegion } from '@squidcloud/common';
|
|
2
|
+
import { CollectionReference } from './collection-reference';
|
|
3
|
+
import { GraphQLClient } from './graphql-client';
|
|
4
|
+
import { TransactionId } from './types';
|
|
5
|
+
export interface SquidOptions {
|
|
6
|
+
messageNotificationWrapper?: (fn: () => any) => any;
|
|
7
|
+
appId: AppId;
|
|
8
|
+
apiKey?: ApiKey;
|
|
9
|
+
region: SquidRegion;
|
|
10
|
+
apiServerUrlOverrideMapping?: Record<IntegrationId, string>;
|
|
11
|
+
}
|
|
12
|
+
/** Reference to the squid db. Provides all the available actions on the DB. */
|
|
13
|
+
export declare class Squid {
|
|
14
|
+
private readonly socketManager;
|
|
15
|
+
private readonly clientId;
|
|
16
|
+
private readonly rpcManager;
|
|
17
|
+
private readonly dataManager;
|
|
18
|
+
private readonly documentReferenceFactory;
|
|
19
|
+
private readonly documentStore;
|
|
20
|
+
private readonly lockManager;
|
|
21
|
+
private readonly querySubscriptionManager;
|
|
22
|
+
private readonly queryBuilderFactory;
|
|
23
|
+
private readonly joinQueryBuilderFactory;
|
|
24
|
+
private readonly collectionReferenceFactory;
|
|
25
|
+
private readonly backendFunctionManager;
|
|
26
|
+
private readonly namedQueryManager;
|
|
27
|
+
private readonly apiManager;
|
|
28
|
+
private readonly graphqlClientFactory;
|
|
29
|
+
private readonly destructManager;
|
|
30
|
+
private readonly documentIdentityService;
|
|
31
|
+
private static readonly squidInstancesMap;
|
|
32
|
+
constructor(options: PartialBy<SquidOptions, 'region'>);
|
|
33
|
+
/**
|
|
34
|
+
* This method is a factory method for creating a Squid instance
|
|
35
|
+
*/
|
|
36
|
+
static getInstance(options: SquidOptions): Squid;
|
|
37
|
+
static getInstances(): Array<Squid>;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the auth id token (OpenId) that will be sent to the server and will be used for providing the Auth object
|
|
40
|
+
* to the security rules.
|
|
41
|
+
*/
|
|
42
|
+
setAuthIdToken(idToken: string | undefined): void;
|
|
43
|
+
collection<T extends DocumentData>(collectionName: CollectionName, integrationId?: IntegrationId): CollectionReference<T>;
|
|
44
|
+
runInTransaction(fn: (transactionId: TransactionId) => Promise<void>): Promise<void>;
|
|
45
|
+
executeFunction<T = any>(functionName: string, ...params: any[]): Promise<T>;
|
|
46
|
+
executeNamedQuery<T = any>(integrationId: IntegrationId, queryName: QueryName, params: Record<string, any>): Promise<T>;
|
|
47
|
+
callApi<T = any>(integrationId: IntegrationId, endpointId: ApiEndpointId, request?: Record<string, any>): Promise<T>;
|
|
48
|
+
graphql(integrationId: IntegrationId): GraphQLClient;
|
|
49
|
+
destruct(): Promise<void>;
|
|
50
|
+
unsubscribe(): Promise<void>;
|
|
51
|
+
}
|
|
@@ -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;
|