@ahoo-wang/fetcher-wow 1.5.2 → 1.5.5
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/command/commandClient.d.ts +12 -3
- package/dist/command/commandClient.d.ts.map +1 -1
- package/dist/index.es.js +129 -74
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/query/event/eventStreamQueryClient.d.ts +16 -4
- package/dist/query/event/eventStreamQueryClient.d.ts.map +1 -1
- package/dist/query/queryApi.d.ts +24 -6
- package/dist/query/queryApi.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryApi.d.ts +16 -4
- package/dist/query/snapshot/snapshotQueryApi.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryClient.d.ts +36 -9
- package/dist/query/snapshot/snapshotQueryClient.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -55,6 +55,9 @@ export declare class EventStreamQueryClient extends QueryClient implements Event
|
|
|
55
55
|
* Counts the number of domain event streams that match the given condition.
|
|
56
56
|
*
|
|
57
57
|
* @param condition - The condition to filter event streams
|
|
58
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
59
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
60
|
+
* custom data between different interceptors.
|
|
58
61
|
* @returns A promise that resolves to the count of matching event streams
|
|
59
62
|
*
|
|
60
63
|
* @example
|
|
@@ -63,11 +66,14 @@ export declare class EventStreamQueryClient extends QueryClient implements Event
|
|
|
63
66
|
* console.log('Total event streams:', count);
|
|
64
67
|
* ```
|
|
65
68
|
*/
|
|
66
|
-
count(condition: Condition): Promise<number>;
|
|
69
|
+
count(condition: Condition, attributes?: Record<string, any>): Promise<number>;
|
|
67
70
|
/**
|
|
68
71
|
* Retrieves a list of domain event streams based on the provided query parameters.
|
|
69
72
|
*
|
|
70
73
|
* @param listQuery - The query parameters for listing event streams
|
|
74
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
75
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
76
|
+
* custom data between different interceptors.
|
|
71
77
|
* @returns A promise that resolves to an array of partial domain event streams
|
|
72
78
|
*
|
|
73
79
|
* @example
|
|
@@ -81,12 +87,15 @@ export declare class EventStreamQueryClient extends QueryClient implements Event
|
|
|
81
87
|
* }
|
|
82
88
|
* ```
|
|
83
89
|
*/
|
|
84
|
-
list<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(listQuery: ListQuery): Promise<T[]>;
|
|
90
|
+
list<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<T[]>;
|
|
85
91
|
/**
|
|
86
92
|
* Retrieves a stream of domain event streams based on the provided query parameters.
|
|
87
93
|
* Sets the Accept header to text/event-stream to indicate that the response should be streamed.
|
|
88
94
|
*
|
|
89
95
|
* @param listQuery - The query parameters for listing event streams
|
|
96
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
97
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
98
|
+
* custom data between different interceptors.
|
|
90
99
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial domain event streams
|
|
91
100
|
*
|
|
92
101
|
* @example
|
|
@@ -101,11 +110,14 @@ export declare class EventStreamQueryClient extends QueryClient implements Event
|
|
|
101
110
|
* }
|
|
102
111
|
* ```
|
|
103
112
|
*/
|
|
104
|
-
listStream<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(listQuery: ListQuery): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
113
|
+
listStream<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
105
114
|
/**
|
|
106
115
|
* Retrieves a paged list of domain event streams based on the provided query parameters.
|
|
107
116
|
*
|
|
108
117
|
* @param pagedQuery - The query parameters for paging event streams
|
|
118
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
119
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
120
|
+
* custom data between different interceptors.
|
|
109
121
|
* @returns A promise that resolves to a paged list of partial domain event streams
|
|
110
122
|
*
|
|
111
123
|
* @example
|
|
@@ -122,6 +134,6 @@ export declare class EventStreamQueryClient extends QueryClient implements Event
|
|
|
122
134
|
* }
|
|
123
135
|
* ```
|
|
124
136
|
*/
|
|
125
|
-
paged<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(pagedQuery: PagedQuery): Promise<PagedList<T>>;
|
|
137
|
+
paged<T extends Partial<DomainEventStream> = Partial<DomainEventStream>>(pagedQuery: PagedQuery, attributes?: Record<string, any>): Promise<PagedList<T>>;
|
|
126
138
|
}
|
|
127
139
|
//# sourceMappingURL=eventStreamQueryClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventStreamQueryClient.d.ts","sourceRoot":"","sources":["../../../src/query/event/eventStreamQueryClient.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAEL,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,sBACX,SAAQ,WACR,YAAW,mBAAmB;IAC9B;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC
|
|
1
|
+
{"version":3,"file":"eventStreamQuery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ACrD,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAUlD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,CAAC,SAAS,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,EACrE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACvD,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAGzB"}
|
package/dist/query/queryApi.d.ts
CHANGED
|
@@ -16,33 +16,48 @@ export interface QueryApi<R> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Retrieves a single resource based on the provided query parameters.
|
|
18
18
|
* @param singleQuery - The query parameters for retrieving a single resource
|
|
19
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
20
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
21
|
+
* custom data between different interceptors.
|
|
19
22
|
* @returns A promise that resolves to a partial resource
|
|
20
23
|
*/
|
|
21
|
-
single<T extends Partial<R> = Partial<R>>(singleQuery: SingleQuery): Promise<T>;
|
|
24
|
+
single<T extends Partial<R> = Partial<R>>(singleQuery: SingleQuery, attributes?: Record<string, any>): Promise<T>;
|
|
22
25
|
/**
|
|
23
26
|
* Retrieves a list of resources based on the provided query parameters.
|
|
24
27
|
* @param listQuery - The query parameters for listing resources
|
|
28
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
29
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
30
|
+
* custom data between different interceptors.
|
|
25
31
|
* @returns A promise that resolves to an array of partial resources
|
|
26
32
|
*/
|
|
27
|
-
list<T extends Partial<R> = Partial<R>>(listQuery: ListQuery): Promise<T[]>;
|
|
33
|
+
list<T extends Partial<R> = Partial<R>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<T[]>;
|
|
28
34
|
/**
|
|
29
35
|
* Retrieves a stream of resources based on the provided query parameters.
|
|
30
36
|
* @param listQuery - The query parameters for listing resources
|
|
37
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
38
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
39
|
+
* custom data between different interceptors.
|
|
31
40
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial resources
|
|
32
41
|
*/
|
|
33
|
-
listStream<T extends Partial<R> = Partial<R>>(listQuery: ListQuery): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
42
|
+
listStream<T extends Partial<R> = Partial<R>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
34
43
|
/**
|
|
35
44
|
* Retrieves a paged list of resources based on the provided query parameters.
|
|
36
45
|
* @param pagedQuery - The query parameters for paging resources
|
|
46
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
47
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
48
|
+
* custom data between different interceptors.
|
|
37
49
|
* @returns A promise that resolves to a paged list of partial resources
|
|
38
50
|
*/
|
|
39
|
-
paged<T extends Partial<R> = Partial<R>>(pagedQuery: PagedQuery): Promise<PagedList<T>>;
|
|
51
|
+
paged<T extends Partial<R> = Partial<R>>(pagedQuery: PagedQuery, attributes?: Record<string, any>): Promise<PagedList<T>>;
|
|
40
52
|
/**
|
|
41
53
|
* Counts the number of resources that match the given condition.
|
|
42
54
|
* @param condition - The condition to filter resources
|
|
55
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
56
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
57
|
+
* custom data between different interceptors.
|
|
43
58
|
* @returns A promise that resolves to the count of matching resources
|
|
44
59
|
*/
|
|
45
|
-
count(condition: Condition): Promise<number>;
|
|
60
|
+
count(condition: Condition, attributes?: Record<string, any>): Promise<number>;
|
|
46
61
|
}
|
|
47
62
|
/**
|
|
48
63
|
* Base client for performing query operations.
|
|
@@ -66,8 +81,11 @@ export declare class QueryClient {
|
|
|
66
81
|
* @param query - The query parameters to send
|
|
67
82
|
* @param accept - The content type to accept from the server, defaults to application/json
|
|
68
83
|
* @param extractor - Function to extract the result from the response, defaults to JSON extractor
|
|
84
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
85
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
86
|
+
* custom data between different interceptors.
|
|
69
87
|
* @returns A promise that resolves to the query result
|
|
70
88
|
*/
|
|
71
|
-
protected query<R>(path: string, query: Condition | ListQuery | PagedQuery | SingleQuery, accept?: string, extractor?: ResultExtractor<any>): Promise<R>;
|
|
89
|
+
protected query<R>(path: string, query: Condition | ListQuery | PagedQuery | SingleQuery, attributes?: Record<string, any>, accept?: string, extractor?: ResultExtractor<any>): Promise<R>;
|
|
72
90
|
}
|
|
73
91
|
//# sourceMappingURL=queryApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryApi.d.ts","sourceRoot":"","sources":["../../src/query/queryApi.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAIL,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB
|
|
1
|
+
{"version":3,"file":"queryApi.d.ts","sourceRoot":"","sources":["../../src/query/queryApi.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;A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S,EACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1D;AAED;;;;;;;GAOG;AACH,qBAAa,WAAW;IAKV,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa;IAJrD;;;OAGG;gBAC4B,OAAO,EAAE,aAAa;IAGrD;;;;;;;;;;;OAWG;cACa,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,EACvD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,MAAM,GAAE,MAA2C,EACnD,SAAS,GAAE,eAAe,CAAC,GAAG,CAAyB,GACtD,OAAO,CAAC,CAAC,CAAC;CAYd"}
|
|
@@ -12,27 +12,39 @@ export interface SnapshotQueryApi<S> extends QueryApi<MaterializedSnapshot<S>> {
|
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves a single snapshot state based on the provided query parameters.
|
|
14
14
|
* @param singleQuery - The query parameters for retrieving a single snapshot state
|
|
15
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
16
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
17
|
+
* custom data between different interceptors.
|
|
15
18
|
* @returns A promise that resolves to a partial snapshot state
|
|
16
19
|
*/
|
|
17
|
-
singleState<T extends Partial<S> = Partial<S>>(singleQuery: SingleQuery): Promise<T>;
|
|
20
|
+
singleState<T extends Partial<S> = Partial<S>>(singleQuery: SingleQuery, attributes?: Record<string, any>): Promise<T>;
|
|
18
21
|
/**
|
|
19
22
|
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
20
23
|
* @param listQuery - The query parameters for listing snapshot states
|
|
24
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
25
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
26
|
+
* custom data between different interceptors.
|
|
21
27
|
* @returns A promise that resolves to an array of partial snapshot states
|
|
22
28
|
*/
|
|
23
|
-
listState<T extends Partial<S> = Partial<S>>(listQuery: ListQuery): Promise<T[]>;
|
|
29
|
+
listState<T extends Partial<S> = Partial<S>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<T[]>;
|
|
24
30
|
/**
|
|
25
31
|
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
26
32
|
* @param listQuery - The query parameters for listing snapshot states
|
|
33
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
34
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
35
|
+
* custom data between different interceptors.
|
|
27
36
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial snapshot states
|
|
28
37
|
*/
|
|
29
|
-
listStateStream<T extends Partial<S> = Partial<S>>(listQuery: ListQuery): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
38
|
+
listStateStream<T extends Partial<S> = Partial<S>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
30
39
|
/**
|
|
31
40
|
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
32
41
|
* @param pagedQuery - The query parameters for paging snapshot states
|
|
42
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
43
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
44
|
+
* custom data between different interceptors.
|
|
33
45
|
* @returns A promise that resolves to a paged list of partial snapshot states
|
|
34
46
|
*/
|
|
35
|
-
pagedState<T extends Partial<S> = Partial<S>>(pagedQuery: PagedQuery): Promise<PagedList<T>>;
|
|
47
|
+
pagedState<T extends Partial<S> = Partial<S>>(pagedQuery: PagedQuery, attributes?: Record<string, any>): Promise<PagedList<T>>;
|
|
36
48
|
}
|
|
37
49
|
/**
|
|
38
50
|
* Provides endpoint paths for snapshot query operations.
|
|
@@ -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,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAC5E
|
|
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,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAC5E;;;;;;;OAOG;IACH,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC3C,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,CAAC,CAAC,CAAC;IAEd;;;;;;;OAOG;IACH,SAAS,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACzC,SAAS,EAAE,SAAS,EACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAEhB;;;;;;;OAOG;IACH,eAAe,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,SAAS,EACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnD;;;;;;;OAOG;IACH,UAAU,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC1C,UAAU,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,qBAAa,0BAA0B;IACrC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,cAAc;IACpD,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAgE;IACrF,MAAM,CAAC,QAAQ,CAAC,IAAI,SAA+D;IACnF,MAAM,CAAC,QAAQ,CAAC,UAAU,SAA8C;IACxE,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAgE;IACrF,MAAM,CAAC,QAAQ,CAAC,WAAW,SAA+C;IAC1E,MAAM,CAAC,QAAQ,CAAC,MAAM,SAAiE;IACvF,MAAM,CAAC,QAAQ,CAAC,YAAY,SAAgD;CAC7E"}
|
|
@@ -89,6 +89,9 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
89
89
|
* Counts the number of snapshots that match the given condition.
|
|
90
90
|
*
|
|
91
91
|
* @param condition - The condition to match snapshots against
|
|
92
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
93
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
94
|
+
* custom data between different interceptors.
|
|
92
95
|
* @returns A promise that resolves to the count of matching snapshots
|
|
93
96
|
*
|
|
94
97
|
* @example
|
|
@@ -97,11 +100,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
97
100
|
* console.log('Total snapshots:', count);
|
|
98
101
|
* ```
|
|
99
102
|
*/
|
|
100
|
-
count(condition: Condition): Promise<number>;
|
|
103
|
+
count(condition: Condition, attributes?: Record<string, any>): Promise<number>;
|
|
101
104
|
/**
|
|
102
105
|
* Retrieves a list of materialized snapshots based on the provided query parameters.
|
|
103
106
|
*
|
|
104
107
|
* @param listQuery - The query parameters for listing snapshots
|
|
108
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
109
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
110
|
+
* custom data between different interceptors.
|
|
105
111
|
* @returns A promise that resolves to an array of partial materialized snapshots
|
|
106
112
|
*
|
|
107
113
|
* @example
|
|
@@ -115,11 +121,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
115
121
|
* }
|
|
116
122
|
* ```
|
|
117
123
|
*/
|
|
118
|
-
list<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(listQuery: ListQuery): Promise<T[]>;
|
|
124
|
+
list<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<T[]>;
|
|
119
125
|
/**
|
|
120
126
|
* Retrieves a stream of materialized snapshots based on the provided query parameters.
|
|
121
127
|
*
|
|
122
128
|
* @param listQuery - The query parameters for listing snapshots
|
|
129
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
130
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
131
|
+
* custom data between different interceptors.
|
|
123
132
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial materialized snapshots
|
|
124
133
|
*
|
|
125
134
|
* @example
|
|
@@ -134,11 +143,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
134
143
|
* }
|
|
135
144
|
* ```
|
|
136
145
|
*/
|
|
137
|
-
listStream<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(listQuery: ListQuery): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
146
|
+
listStream<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
138
147
|
/**
|
|
139
148
|
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
140
149
|
*
|
|
141
150
|
* @param listQuery - The query parameters for listing snapshot states
|
|
151
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
152
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
153
|
+
* custom data between different interceptors.
|
|
142
154
|
* @returns A promise that resolves to an array of partial snapshot states
|
|
143
155
|
*
|
|
144
156
|
* @example
|
|
@@ -152,11 +164,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
152
164
|
* }
|
|
153
165
|
* ```
|
|
154
166
|
*/
|
|
155
|
-
listState<T extends Partial<S> = Partial<S>>(listQuery: ListQuery): Promise<T[]>;
|
|
167
|
+
listState<T extends Partial<S> = Partial<S>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<T[]>;
|
|
156
168
|
/**
|
|
157
169
|
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
158
170
|
*
|
|
159
171
|
* @param listQuery - The query parameters for listing snapshot states
|
|
172
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
173
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
174
|
+
* custom data between different interceptors.
|
|
160
175
|
* @returns A promise that resolves to a readable stream of JSON server-sent events containing partial snapshot states
|
|
161
176
|
*
|
|
162
177
|
* @example
|
|
@@ -171,11 +186,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
171
186
|
* }
|
|
172
187
|
* ```
|
|
173
188
|
*/
|
|
174
|
-
listStateStream<T extends Partial<S> = Partial<S>>(listQuery: ListQuery): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
189
|
+
listStateStream<T extends Partial<S> = Partial<S>>(listQuery: ListQuery, attributes?: Record<string, any>): Promise<ReadableStream<JsonServerSentEvent<T>>>;
|
|
175
190
|
/**
|
|
176
191
|
* Retrieves a paged list of materialized snapshots based on the provided query parameters.
|
|
177
192
|
*
|
|
178
193
|
* @param pagedQuery - The query parameters for paging snapshots
|
|
194
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
195
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
196
|
+
* custom data between different interceptors.
|
|
179
197
|
* @returns A promise that resolves to a paged list of partial materialized snapshots
|
|
180
198
|
*
|
|
181
199
|
* @example
|
|
@@ -192,11 +210,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
192
210
|
* }
|
|
193
211
|
* ```
|
|
194
212
|
*/
|
|
195
|
-
paged<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(pagedQuery: PagedQuery): Promise<PagedList<T>>;
|
|
213
|
+
paged<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(pagedQuery: PagedQuery, attributes?: Record<string, any>): Promise<PagedList<T>>;
|
|
196
214
|
/**
|
|
197
215
|
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
198
216
|
*
|
|
199
217
|
* @param pagedQuery - The query parameters for paging snapshot states
|
|
218
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
219
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
220
|
+
* custom data between different interceptors.
|
|
200
221
|
* @returns A promise that resolves to a paged list of partial snapshot states
|
|
201
222
|
*
|
|
202
223
|
* @example
|
|
@@ -212,11 +233,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
212
233
|
* }
|
|
213
234
|
* ```
|
|
214
235
|
*/
|
|
215
|
-
pagedState<T extends Partial<S> = Partial<S>>(pagedQuery: PagedQuery): Promise<PagedList<T>>;
|
|
236
|
+
pagedState<T extends Partial<S> = Partial<S>>(pagedQuery: PagedQuery, attributes?: Record<string, any>): Promise<PagedList<T>>;
|
|
216
237
|
/**
|
|
217
238
|
* Retrieves a single materialized snapshot based on the provided query parameters.
|
|
218
239
|
*
|
|
219
240
|
* @param singleQuery - The query parameters for retrieving a single snapshot
|
|
241
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
242
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
243
|
+
* custom data between different interceptors.
|
|
220
244
|
* @returns A promise that resolves to a partial materialized snapshot
|
|
221
245
|
*
|
|
222
246
|
* @example
|
|
@@ -228,11 +252,14 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
228
252
|
* console.log('Snapshot:', single);
|
|
229
253
|
* ```
|
|
230
254
|
*/
|
|
231
|
-
single<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(singleQuery: SingleQuery): Promise<T>;
|
|
255
|
+
single<T extends Partial<MaterializedSnapshot<S>> = Partial<MaterializedSnapshot<S>>>(singleQuery: SingleQuery, attributes?: Record<string, any>): Promise<T>;
|
|
232
256
|
/**
|
|
233
257
|
* Retrieves a single snapshot state based on the provided query parameters.
|
|
234
258
|
*
|
|
235
259
|
* @param singleQuery - The query parameters for retrieving a single snapshot state
|
|
260
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
261
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
262
|
+
* custom data between different interceptors.
|
|
236
263
|
* @returns A promise that resolves to a partial snapshot state
|
|
237
264
|
*
|
|
238
265
|
* @example
|
|
@@ -244,6 +271,6 @@ export declare class SnapshotQueryClient<S> extends QueryClient implements Snaps
|
|
|
244
271
|
* console.log('State:', singleState);
|
|
245
272
|
* ```
|
|
246
273
|
*/
|
|
247
|
-
singleState<T extends Partial<S> = Partial<S>>(singleQuery: SingleQuery): Promise<T>;
|
|
274
|
+
singleState<T extends Partial<S> = Partial<S>>(singleQuery: SingleQuery, attributes?: Record<string, any>): Promise<T>;
|
|
248
275
|
}
|
|
249
276
|
//# sourceMappingURL=snapshotQueryClient.d.ts.map
|
|
@@ -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,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAEL,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAExC,OAAO,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,qBAAa,mBAAmB,CAAC,CAAC,CAChC,SAAQ,WACR,YAAW,gBAAgB,CAAC,CAAC,CAAC;IAC9B;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC
|
|
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,OAA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O,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAClD,oBAAoB,CAAC,CAAC,CAAC,CACxB,EACD,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIzE;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC3C,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACzD,OAAO,CAAC,CAAC,CAAC;CAGd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahoo-wang/fetcher-wow",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@ahoo-wang/fetcher": "1.5.
|
|
42
|
-
"@ahoo-wang/fetcher-eventstream": "1.5.
|
|
41
|
+
"@ahoo-wang/fetcher": "1.5.5",
|
|
42
|
+
"@ahoo-wang/fetcher-eventstream": "1.5.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@vitest/coverage-v8": "^3.2.4",
|