@ahoo-wang/fetcher-wow 3.17.0 → 3.18.0
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/README.md +150 -62
- package/README.zh-CN.md +133 -51
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1014 -355
- package/dist/index.es.js.map +1 -1
- package/dist/query/aggregation.d.ts +131 -0
- package/dist/query/aggregation.d.ts.map +1 -0
- package/dist/query/condition.d.ts +52 -0
- package/dist/query/condition.d.ts.map +1 -1
- package/dist/query/cursorQuery.d.ts +10 -1
- package/dist/query/cursorQuery.d.ts.map +1 -1
- package/dist/query/event/eventStreamQueryClient.d.ts +21 -21
- package/dist/query/event/eventStreamQueryClient.d.ts.map +1 -1
- package/dist/query/filter.d.ts +224 -0
- package/dist/query/filter.d.ts.map +1 -0
- package/dist/query/index.d.ts +2 -0
- package/dist/query/index.d.ts.map +1 -1
- package/dist/query/locale/en_US.cjs.js.map +1 -1
- package/dist/query/locale/en_US.d.ts +1 -0
- package/dist/query/locale/en_US.d.ts.map +1 -1
- package/dist/query/locale/en_US.es.js.map +1 -1
- package/dist/query/locale/operatorLocale.d.ts +1 -0
- package/dist/query/locale/operatorLocale.d.ts.map +1 -1
- package/dist/query/locale/zh_CN.cjs.js.map +1 -1
- package/dist/query/locale/zh_CN.d.ts +1 -0
- package/dist/query/locale/zh_CN.d.ts.map +1 -1
- package/dist/query/locale/zh_CN.es.js.map +1 -1
- package/dist/query/operator.d.ts +3 -0
- package/dist/query/operator.d.ts.map +1 -1
- package/dist/query/queryApi.d.ts +9 -8
- package/dist/query/queryApi.d.ts.map +1 -1
- package/dist/query/queryable.d.ts +34 -4
- package/dist/query/queryable.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryApi.d.ts +12 -5
- package/dist/query/snapshot/snapshotQueryApi.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryClient.d.ts +46 -42
- package/dist/query/snapshot/snapshotQueryClient.d.ts.map +1 -1
- package/package.json +9 -8
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { ConditionCapable } from './condition';
|
|
2
|
+
import { FilterCapable } from './filter';
|
|
2
3
|
import { SortCapable } from './sort';
|
|
3
4
|
import { Pagination } from './pagination';
|
|
4
5
|
import { ProjectionCapable } from './projection';
|
|
5
6
|
/**
|
|
6
7
|
* Interface for queryable objects that support conditions, projection, and sorting.
|
|
7
8
|
*/
|
|
9
|
+
/** @deprecated Use FilterQueryable instead. */
|
|
8
10
|
export interface Queryable<FIELDS extends string = string> extends ConditionCapable<FIELDS>, ProjectionCapable<FIELDS>, SortCapable<FIELDS> {
|
|
9
11
|
}
|
|
12
|
+
/** Queryable request using Wow's FilterExpression API. */
|
|
13
|
+
export interface FilterQueryable<FIELDS extends string = string> extends FilterCapable<FIELDS>, ProjectionCapable<FIELDS>, SortCapable<FIELDS> {
|
|
14
|
+
}
|
|
10
15
|
/**
|
|
11
16
|
* Interface for single query objects.
|
|
12
17
|
*/
|
|
18
|
+
/** @deprecated Use FilterSingleQuery instead. */
|
|
13
19
|
export interface SingleQuery<FIELDS extends string = string> extends Queryable<FIELDS> {
|
|
14
20
|
}
|
|
21
|
+
export interface FilterSingleQuery<FIELDS extends string = string> extends FilterQueryable<FIELDS> {
|
|
22
|
+
}
|
|
23
|
+
export type SingleQueryRequest<FIELDS extends string = string> = SingleQuery<FIELDS> | FilterSingleQuery<FIELDS>;
|
|
24
|
+
type FilterQueryOptions<Q extends {
|
|
25
|
+
filter: unknown;
|
|
26
|
+
}> = Pick<Q, 'filter'> & Partial<Omit<Q, 'filter'>>;
|
|
15
27
|
/**
|
|
16
28
|
* Creates a SingleQuery object with the provided parameters.
|
|
17
29
|
*
|
|
@@ -24,15 +36,23 @@ export interface SingleQuery<FIELDS extends string = string> extends Queryable<F
|
|
|
24
36
|
* @param sort - The sort criteria. Optional.
|
|
25
37
|
* @returns A SingleQuery object with the specified parameters
|
|
26
38
|
*/
|
|
27
|
-
export declare function singleQuery<FIELDS extends string = string>(
|
|
39
|
+
export declare function singleQuery<FIELDS extends string = string>(options: FilterQueryOptions<FilterSingleQuery<FIELDS>>): FilterSingleQuery<FIELDS>;
|
|
40
|
+
/** @deprecated Pass filter instead of condition. */
|
|
41
|
+
export declare function singleQuery<FIELDS extends string = string>(options?: Partial<SingleQuery<FIELDS>>): SingleQuery<FIELDS>;
|
|
28
42
|
/**
|
|
29
43
|
* Interface for list query objects.
|
|
30
44
|
*
|
|
31
45
|
* Limit the number of results. Default: DEFAULT_PAGINATION.size
|
|
32
46
|
*/
|
|
47
|
+
/** @deprecated Use FilterListQuery instead. */
|
|
33
48
|
export interface ListQuery<FIELDS extends string = string> extends Queryable<FIELDS> {
|
|
34
49
|
limit?: number;
|
|
35
50
|
}
|
|
51
|
+
export interface FilterListQuery<FIELDS extends string = string> extends FilterQueryable<FIELDS> {
|
|
52
|
+
/** Maximum results. Defaults to 0 (unlimited) for FilterExpression queries. */
|
|
53
|
+
limit?: number;
|
|
54
|
+
}
|
|
55
|
+
export type ListQueryRequest<FIELDS extends string = string> = ListQuery<FIELDS> | FilterListQuery<FIELDS>;
|
|
36
56
|
/**
|
|
37
57
|
* Creates a ListQuery object with the provided parameters.
|
|
38
58
|
*
|
|
@@ -44,16 +64,23 @@ export interface ListQuery<FIELDS extends string = string> extends Queryable<FIE
|
|
|
44
64
|
* @param condition - The query condition. Defaults to an 'all' condition that matches everything.
|
|
45
65
|
* @param projection - The field projection specification. Optional.
|
|
46
66
|
* @param sort - The sort criteria. Optional.
|
|
47
|
-
* @param limit - The maximum number of results
|
|
67
|
+
* @param limit - The maximum number of results. Defaults to 0 for filter queries and DEFAULT_PAGINATION.size for legacy condition queries.
|
|
48
68
|
* @returns A ListQuery object with the specified parameters
|
|
49
69
|
*/
|
|
50
|
-
export declare function listQuery<FIELDS extends string = string>(
|
|
70
|
+
export declare function listQuery<FIELDS extends string = string>(options: FilterQueryOptions<FilterListQuery<FIELDS>>): FilterListQuery<FIELDS>;
|
|
71
|
+
/** @deprecated Pass filter instead of condition. */
|
|
72
|
+
export declare function listQuery<FIELDS extends string = string>(options?: Partial<ListQuery<FIELDS>>): ListQuery<FIELDS>;
|
|
51
73
|
/**
|
|
52
74
|
* Interface for paged query objects.
|
|
53
75
|
*/
|
|
76
|
+
/** @deprecated Use FilterPagedQuery instead. */
|
|
54
77
|
export interface PagedQuery<FIELDS extends string = string> extends Queryable<FIELDS> {
|
|
55
78
|
pagination?: Pagination;
|
|
56
79
|
}
|
|
80
|
+
export interface FilterPagedQuery<FIELDS extends string = string> extends FilterQueryable<FIELDS> {
|
|
81
|
+
pagination?: Pagination;
|
|
82
|
+
}
|
|
83
|
+
export type PagedQueryRequest<FIELDS extends string = string> = PagedQuery<FIELDS> | FilterPagedQuery<FIELDS>;
|
|
57
84
|
/**
|
|
58
85
|
* Creates a PagedQuery object with the provided parameters.
|
|
59
86
|
*
|
|
@@ -69,7 +96,9 @@ export interface PagedQuery<FIELDS extends string = string> extends Queryable<FI
|
|
|
69
96
|
*
|
|
70
97
|
* @returns A PagedQuery object with the specified parameters
|
|
71
98
|
*/
|
|
72
|
-
export declare function pagedQuery<FIELDS extends string = string>(
|
|
99
|
+
export declare function pagedQuery<FIELDS extends string = string>(options: FilterQueryOptions<FilterPagedQuery<FIELDS>>): FilterPagedQuery<FIELDS>;
|
|
100
|
+
/** @deprecated Pass filter instead of condition. */
|
|
101
|
+
export declare function pagedQuery<FIELDS extends string = string>(options?: Partial<PagedQuery<FIELDS>>): PagedQuery<FIELDS>;
|
|
73
102
|
/**
|
|
74
103
|
* Interface for paged list results.
|
|
75
104
|
*/
|
|
@@ -90,4 +119,5 @@ export declare const EMPTY_PAGED_LIST: PagedList<any>;
|
|
|
90
119
|
* @returns A PagedList object with the specified parameters
|
|
91
120
|
*/
|
|
92
121
|
export declare function pagedList<T>({ total, list, }?: Partial<PagedList<T>>): PagedList<T>;
|
|
122
|
+
export {};
|
|
93
123
|
//# sourceMappingURL=queryable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryable.d.ts","sourceRoot":"","sources":["../../src/query/queryable.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"queryable.d.ts","sourceRoot":"","sources":["../../src/query/queryable.ts"],"names":[],"mappings":"AAaA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,+CAA+C;AAC/C,MAAM,WAAW,SAAS,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CACvD,SACE,gBAAgB,CAAC,MAAM,CAAC,EACxB,iBAAiB,CAAC,MAAM,CAAC,EACzB,WAAW,CAAC,MAAM,CAAC;CAAG;AAE1B,0DAA0D;AAC1D,MAAM,WAAW,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAC7D,SACE,aAAa,CAAC,MAAM,CAAC,EACrB,iBAAiB,CAAC,MAAM,CAAC,EACzB,WAAW,CAAC,MAAM,CAAC;CAAG;AAE1B;;GAEG;AACH,iDAAiD;AAEjD,MAAM,WAAW,WAAW,CAC1B,MAAM,SAAS,MAAM,GAAG,MAAM,CAC9B,SAAQ,SAAS,CAAC,MAAM,CAAC;CAAG;AAG9B,MAAM,WAAW,iBAAiB,CAChC,MAAM,SAAS,MAAM,GAAG,MAAM,CAC9B,SAAQ,eAAe,CAAC,MAAM,CAAC;CAAG;AAEpC,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAC3D,WAAW,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC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E,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAoB,GAAG,SAAS,CAAC,CAAC,CAAC,CAQzD"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { QueryApi } from '../queryApi';
|
|
2
|
+
import { AggregationQuery } from '../aggregation';
|
|
3
|
+
import { DynamicDocument } from '../types';
|
|
2
4
|
import { MaterializedSnapshot } from './snapshot';
|
|
3
|
-
import {
|
|
5
|
+
import { ListQueryRequest, PagedList, PagedQueryRequest, SingleQueryRequest } from '../queryable';
|
|
4
6
|
import { JsonServerSentEvent } from '@ahoo-wang/fetcher-eventstream';
|
|
5
7
|
/**
|
|
6
8
|
* Interface for snapshot query API operations.
|
|
@@ -9,6 +11,10 @@ import { JsonServerSentEvent } from '@ahoo-wang/fetcher-eventstream';
|
|
|
9
11
|
* @template S - The type of the snapshot state
|
|
10
12
|
*/
|
|
11
13
|
export interface SnapshotQueryApi<S, FIELDS extends string = string> extends QueryApi<MaterializedSnapshot<S>, FIELDS> {
|
|
14
|
+
/** Runs a snapshot aggregation and returns all result rows. */
|
|
15
|
+
aggregate?<Row extends DynamicDocument = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<Row[]>;
|
|
16
|
+
/** Runs a snapshot aggregation and streams result rows as SSE. */
|
|
17
|
+
aggregateStream?<Row extends DynamicDocument = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<ReadableStream<JsonServerSentEvent<Row>>>;
|
|
12
18
|
/**
|
|
13
19
|
* Retrieves a single snapshot state based on the provided query parameters.
|
|
14
20
|
* @param singleQuery - The query parameters for retrieving a single snapshot state
|
|
@@ -20,7 +26,7 @@ export interface SnapshotQueryApi<S, FIELDS extends string = string> extends Que
|
|
|
20
26
|
* which is useful for preventing race conditions and improving UX.
|
|
21
27
|
* @returns A promise that resolves to a partial snapshot state
|
|
22
28
|
*/
|
|
23
|
-
singleState<T extends Partial<S> = S>(singleQuery:
|
|
29
|
+
singleState<T extends Partial<S> = S>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T>;
|
|
24
30
|
/**
|
|
25
31
|
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
26
32
|
* @param listQuery - The query parameters for listing snapshot states
|
|
@@ -32,7 +38,7 @@ export interface SnapshotQueryApi<S, FIELDS extends string = string> extends Que
|
|
|
32
38
|
* which is useful for preventing race conditions and improving UX.
|
|
33
39
|
* @returns A promise that resolves to an array of partial snapshot states
|
|
34
40
|
*/
|
|
35
|
-
listState<T extends Partial<S> = S>(listQuery:
|
|
41
|
+
listState<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T[]>;
|
|
36
42
|
/**
|
|
37
43
|
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
38
44
|
* @param listQuery - The query parameters for listing snapshot states
|
|
@@ -44,7 +50,7 @@ export interface SnapshotQueryApi<S, FIELDS extends string = string> extends Que
|
|
|
44
50
|
* which is useful for preventing race conditions and improving UX.
|
|
45
51
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial snapshot states
|
|
46
52
|
*/
|
|
47
|
-
listStateStream<T extends Partial<S> = S>(listQuery:
|
|
53
|
+
listStateStream<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
48
54
|
/**
|
|
49
55
|
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
50
56
|
* @param pagedQuery - The query parameters for paging snapshot states
|
|
@@ -56,7 +62,7 @@ export interface SnapshotQueryApi<S, FIELDS extends string = string> extends Que
|
|
|
56
62
|
* which is useful for preventing race conditions and improving UX.
|
|
57
63
|
* @returns A promise that resolves to a paged list of partial snapshot states
|
|
58
64
|
*/
|
|
59
|
-
pagedState<T extends Partial<S> = S>(pagedQuery:
|
|
65
|
+
pagedState<T extends Partial<S> = S>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<PagedList<T>>;
|
|
60
66
|
}
|
|
61
67
|
/**
|
|
62
68
|
* Provides endpoint paths for snapshot query operations.
|
|
@@ -67,6 +73,7 @@ export interface SnapshotQueryApi<S, FIELDS extends string = string> extends Que
|
|
|
67
73
|
*/
|
|
68
74
|
export declare class SnapshotQueryEndpointPaths {
|
|
69
75
|
static readonly SNAPSHOT_RESOURCE_NAME = "snapshot";
|
|
76
|
+
static readonly AGGREGATION: string;
|
|
70
77
|
static readonly COUNT: string;
|
|
71
78
|
static readonly LIST: string;
|
|
72
79
|
static readonly LIST_STATE: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshotQueryApi.d.ts","sourceRoot":"","sources":["../../../src/query/snapshot/snapshotQueryApi.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"snapshotQueryApi.d.ts","sourceRoot":"","sources":["../../../src/query/snapshot/snapshotQueryApi.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,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|
|
2
2
|
import { Condition } from '../condition';
|
|
3
|
-
import {
|
|
3
|
+
import { AggregationQuery } from '../aggregation';
|
|
4
|
+
import { FilterExpression } from '../filter';
|
|
5
|
+
import { ListQueryRequest, PagedList, PagedQueryRequest, SingleQueryRequest } from '../queryable';
|
|
4
6
|
import { MaterializedSnapshot } from './snapshot';
|
|
7
|
+
import { DynamicDocument } from '../types';
|
|
5
8
|
import { JsonServerSentEvent } from '@ahoo-wang/fetcher-eventstream';
|
|
6
9
|
import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
7
10
|
/**
|
|
@@ -30,11 +33,11 @@ import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
|
30
33
|
* const snapshotQueryClient = new SnapshotQueryClient<CartState>(clientOptions);
|
|
31
34
|
*
|
|
32
35
|
* // Count snapshots
|
|
33
|
-
* const count = await snapshotQueryClient.count(
|
|
36
|
+
* const count = await snapshotQueryClient.count(filter.matchAll());
|
|
34
37
|
*
|
|
35
38
|
* // List snapshots
|
|
36
|
-
* const listQuery:
|
|
37
|
-
*
|
|
39
|
+
* const listQuery: FilterListQuery = {
|
|
40
|
+
* filter: filter.matchAll()
|
|
38
41
|
* };
|
|
39
42
|
* const list = await snapshotQueryClient.list(listQuery);
|
|
40
43
|
*
|
|
@@ -56,10 +59,9 @@ import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
|
56
59
|
* }
|
|
57
60
|
*
|
|
58
61
|
* // Paged snapshots
|
|
59
|
-
* const pagedQuery:
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* offset: 0
|
|
62
|
+
* const pagedQuery: FilterPagedQuery = {
|
|
63
|
+
* filter: filter.matchAll(),
|
|
64
|
+
* pagination: { index: 1, size: 10 }
|
|
63
65
|
* };
|
|
64
66
|
* const paged = await snapshotQueryClient.paged(pagedQuery);
|
|
65
67
|
*
|
|
@@ -67,8 +69,8 @@ import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
|
67
69
|
* const pagedState = await snapshotQueryClient.pagedState(pagedQuery);
|
|
68
70
|
*
|
|
69
71
|
* // Single snapshot
|
|
70
|
-
* const singleQuery:
|
|
71
|
-
*
|
|
72
|
+
* const singleQuery: FilterSingleQuery = {
|
|
73
|
+
* filter: filter.matchAll()
|
|
72
74
|
* };
|
|
73
75
|
* const single = await snapshotQueryClient.single(singleQuery);
|
|
74
76
|
*
|
|
@@ -84,10 +86,14 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
84
86
|
* Creates a new SnapshotQueryClient instance.
|
|
85
87
|
*/
|
|
86
88
|
constructor(apiMetadata?: ApiMetadata | undefined);
|
|
89
|
+
/** Runs a snapshot aggregation and returns all result rows. */
|
|
90
|
+
aggregate<Row extends DynamicDocument = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<Row[]>;
|
|
91
|
+
/** Runs a snapshot aggregation and streams result rows as SSE. */
|
|
92
|
+
aggregateStream<Row extends DynamicDocument = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<ReadableStream<JsonServerSentEvent<Row>>>;
|
|
87
93
|
/**
|
|
88
|
-
* Counts the number of snapshots that match the given
|
|
94
|
+
* Counts the number of snapshots that match the given filter.
|
|
89
95
|
*
|
|
90
|
-
* @param
|
|
96
|
+
* @param filter - The filter expression or legacy condition
|
|
91
97
|
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
92
98
|
* throughout the request lifecycle. These attributes allow passing
|
|
93
99
|
* custom data between different interceptors.
|
|
@@ -96,11 +102,11 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
96
102
|
*
|
|
97
103
|
* @example
|
|
98
104
|
* ```typescript
|
|
99
|
-
* const count = await snapshotQueryClient.count(
|
|
105
|
+
* const count = await snapshotQueryClient.count(filter.matchAll());
|
|
100
106
|
* console.log('Total snapshots:', count);
|
|
101
107
|
* ```
|
|
102
108
|
*/
|
|
103
|
-
count(
|
|
109
|
+
count(filter: FilterExpression<FIELDS> | Condition<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<number>;
|
|
104
110
|
/**
|
|
105
111
|
* Retrieves a list of materialized snapshots based on the provided query parameters.
|
|
106
112
|
*
|
|
@@ -113,8 +119,8 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
113
119
|
*
|
|
114
120
|
* @example
|
|
115
121
|
* ```typescript
|
|
116
|
-
* const listQuery:
|
|
117
|
-
*
|
|
122
|
+
* const listQuery: FilterListQuery = {
|
|
123
|
+
* filter: filter.matchAll()
|
|
118
124
|
* };
|
|
119
125
|
* const list = await snapshotQueryClient.list(listQuery);
|
|
120
126
|
* for (const snapshot of list) {
|
|
@@ -122,7 +128,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
122
128
|
* }
|
|
123
129
|
* ```
|
|
124
130
|
*/
|
|
125
|
-
list<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery:
|
|
131
|
+
list<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T[]>;
|
|
126
132
|
/**
|
|
127
133
|
* Retrieves a stream of materialized snapshots based on the provided query parameters.
|
|
128
134
|
*
|
|
@@ -135,8 +141,8 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
135
141
|
*
|
|
136
142
|
* @example
|
|
137
143
|
* ```typescript
|
|
138
|
-
* const listQuery:
|
|
139
|
-
*
|
|
144
|
+
* const listQuery: FilterListQuery = {
|
|
145
|
+
* filter: filter.matchAll()
|
|
140
146
|
* };
|
|
141
147
|
* const listStream = await snapshotQueryClient.listStream(listQuery);
|
|
142
148
|
* for await (const event of listStream) {
|
|
@@ -145,7 +151,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
145
151
|
* }
|
|
146
152
|
* ```
|
|
147
153
|
*/
|
|
148
|
-
listStream<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery:
|
|
154
|
+
listStream<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
149
155
|
/**
|
|
150
156
|
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
151
157
|
*
|
|
@@ -158,8 +164,8 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
158
164
|
*
|
|
159
165
|
* @example
|
|
160
166
|
* ```typescript
|
|
161
|
-
* const listQuery:
|
|
162
|
-
*
|
|
167
|
+
* const listQuery: FilterListQuery = {
|
|
168
|
+
* filter: filter.matchAll()
|
|
163
169
|
* };
|
|
164
170
|
* const list = await snapshotQueryClient.listState(listQuery);
|
|
165
171
|
* for (const state of list) {
|
|
@@ -167,7 +173,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
167
173
|
* }
|
|
168
174
|
* ```
|
|
169
175
|
*/
|
|
170
|
-
listState<T extends Partial<S> = S>(listQuery:
|
|
176
|
+
listState<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T[]>;
|
|
171
177
|
/**
|
|
172
178
|
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
173
179
|
*
|
|
@@ -180,8 +186,8 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
180
186
|
*
|
|
181
187
|
* @example
|
|
182
188
|
* ```typescript
|
|
183
|
-
* const listQuery:
|
|
184
|
-
*
|
|
189
|
+
* const listQuery: FilterListQuery = {
|
|
190
|
+
* filter: filter.matchAll()
|
|
185
191
|
* };
|
|
186
192
|
* const listStream = await snapshotQueryClient.listStateStream(listQuery);
|
|
187
193
|
* for await (const event of listStream) {
|
|
@@ -190,7 +196,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
190
196
|
* }
|
|
191
197
|
* ```
|
|
192
198
|
*/
|
|
193
|
-
listStateStream<T extends Partial<S> = S>(listQuery:
|
|
199
|
+
listStateStream<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
194
200
|
/**
|
|
195
201
|
* Retrieves a paged list of materialized snapshots based on the provided query parameters.
|
|
196
202
|
*
|
|
@@ -203,10 +209,9 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
203
209
|
*
|
|
204
210
|
* @example
|
|
205
211
|
* ```typescript
|
|
206
|
-
* const pagedQuery:
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* offset: 0
|
|
212
|
+
* const pagedQuery: FilterPagedQuery = {
|
|
213
|
+
* filter: filter.matchAll(),
|
|
214
|
+
* pagination: { index: 1, size: 10 }
|
|
210
215
|
* };
|
|
211
216
|
* const paged = await snapshotQueryClient.paged(pagedQuery);
|
|
212
217
|
* console.log('Total:', paged.total);
|
|
@@ -215,7 +220,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
215
220
|
* }
|
|
216
221
|
* ```
|
|
217
222
|
*/
|
|
218
|
-
paged<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(pagedQuery:
|
|
223
|
+
paged<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<PagedList<T>>;
|
|
219
224
|
/**
|
|
220
225
|
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
221
226
|
*
|
|
@@ -228,10 +233,9 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
228
233
|
*
|
|
229
234
|
* @example
|
|
230
235
|
* ```typescript
|
|
231
|
-
* const pagedQuery:
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* offset: 0
|
|
236
|
+
* const pagedQuery: FilterPagedQuery = {
|
|
237
|
+
* filter: filter.matchAll(),
|
|
238
|
+
* pagination: { index: 1, size: 10 }
|
|
235
239
|
* };
|
|
236
240
|
* const pagedState = await snapshotQueryClient.pagedState(pagedQuery);
|
|
237
241
|
* for (const state of pagedState.list) {
|
|
@@ -239,7 +243,7 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
239
243
|
* }
|
|
240
244
|
* ```
|
|
241
245
|
*/
|
|
242
|
-
pagedState<T extends Partial<S> = S>(pagedQuery:
|
|
246
|
+
pagedState<T extends Partial<S> = S>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<PagedList<T>>;
|
|
243
247
|
/**
|
|
244
248
|
* Retrieves a single materialized snapshot based on the provided query parameters.
|
|
245
249
|
*
|
|
@@ -252,14 +256,14 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
252
256
|
*
|
|
253
257
|
* @example
|
|
254
258
|
* ```typescript
|
|
255
|
-
* const singleQuery:
|
|
256
|
-
*
|
|
259
|
+
* const singleQuery: FilterSingleQuery = {
|
|
260
|
+
* filter: filter.matchAll()
|
|
257
261
|
* };
|
|
258
262
|
* const single = await snapshotQueryClient.single(singleQuery);
|
|
259
263
|
* console.log('Snapshot:', single);
|
|
260
264
|
* ```
|
|
261
265
|
*/
|
|
262
|
-
single<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(singleQuery:
|
|
266
|
+
single<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T>;
|
|
263
267
|
/**
|
|
264
268
|
* Retrieves a single snapshot state based on the provided query parameters.
|
|
265
269
|
*
|
|
@@ -272,14 +276,14 @@ export declare class SnapshotQueryClient<S, FIELDS extends string = string> impl
|
|
|
272
276
|
*
|
|
273
277
|
* @example
|
|
274
278
|
* ```typescript
|
|
275
|
-
* const singleQuery:
|
|
276
|
-
*
|
|
279
|
+
* const singleQuery: FilterSingleQuery = {
|
|
280
|
+
* filter: filter.matchAll()
|
|
277
281
|
* };
|
|
278
282
|
* const singleState = await snapshotQueryClient.singleState(singleQuery);
|
|
279
283
|
* console.log('State:', singleState);
|
|
280
284
|
* ```
|
|
281
285
|
*/
|
|
282
|
-
singleState<T extends Partial<S> = S>(singleQuery:
|
|
286
|
+
singleState<T extends Partial<S> = S>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, any>, abortController?: AbortController): Promise<T>;
|
|
283
287
|
/**
|
|
284
288
|
* Retrieves a single materialized snapshot by its ID.
|
|
285
289
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshotQueryClient.d.ts","sourceRoot":"","sources":["../../../src/query/snapshot/snapshotQueryClient.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"snapshotQueryClient.d.ts","sourceRoot":"","sources":["../../../src/query/snapshot/snapshotQueryClient.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAEL,KAAK,gBAAgB,EACrB,KA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"Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|
|
@@ -58,22 +58,23 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@eslint/js": "^10.0.1",
|
|
61
|
-
"@vitest/coverage-v8": "^4.1.
|
|
62
|
-
"@vitest/ui": "^4.1.
|
|
63
|
-
"eslint": "^10.
|
|
61
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
62
|
+
"@vitest/ui": "^4.1.11",
|
|
63
|
+
"eslint": "^10.9.1",
|
|
64
64
|
"globals": "^17.11.0",
|
|
65
65
|
"prettier": "^3.9.6",
|
|
66
66
|
"typescript": "^6.0.3",
|
|
67
|
-
"typescript-eslint": "^8.
|
|
67
|
+
"typescript-eslint": "^8.68.0",
|
|
68
68
|
"unplugin-dts": "1.0.3",
|
|
69
|
-
"vite": "^8.2.
|
|
69
|
+
"vite": "^8.2.2",
|
|
70
70
|
"vite-bundle-analyzer": "^1.3.9",
|
|
71
|
-
"vitest": "^4.1.
|
|
71
|
+
"vitest": "^4.1.11"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "vite build",
|
|
75
75
|
"test:ui": "vitest --ui",
|
|
76
|
-
"test": "vitest run --coverage",
|
|
76
|
+
"test": "vitest run --coverage && pnpm test:type",
|
|
77
|
+
"test:type": "tsc --noEmit -p test/tsconfig.types.json",
|
|
77
78
|
"lint": "eslint . --fix",
|
|
78
79
|
"clean": "rm -rf dist",
|
|
79
80
|
"analyze": "npx vite-bundle-analyzer -p auto"
|