@ahoo-wang/fetcher-wow 1.6.0 → 1.6.2
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 +8 -6
- package/dist/command/commandClient.d.ts.map +1 -1
- package/dist/index.es.js +334 -315
- 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.map +1 -1
- package/dist/query/queryApi.d.ts +10 -6
- package/dist/query/queryApi.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryClient.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientOptions } from '../types';
|
|
2
2
|
import { CommandRequest } from './commandRequest';
|
|
3
3
|
import { CommandResult, CommandResultEventStream } from './commandResult';
|
|
4
|
-
import {
|
|
4
|
+
import { RequestOptions } from '@ahoo-wang/fetcher';
|
|
5
5
|
/**
|
|
6
6
|
* Command Client for sending commands to the server.
|
|
7
7
|
*
|
|
@@ -53,13 +53,15 @@ export declare class CommandClient {
|
|
|
53
53
|
* @template R The type of the result to be returned
|
|
54
54
|
* @param path - The endpoint path to send the command to
|
|
55
55
|
* @param commandHttpRequest - The command HTTP request containing headers, method, and body
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
*
|
|
59
|
-
*
|
|
56
|
+
* @param options - Request options including result extractor and attributes
|
|
57
|
+
* @param options.resultExtractor - Function to extract the desired result from the exchange.
|
|
58
|
+
* Defaults to ExchangeResultExtractor which returns the entire exchange object.
|
|
59
|
+
* @param options.attributes - Optional shared attributes that can be accessed by interceptors
|
|
60
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
61
|
+
* custom data between different interceptors.
|
|
60
62
|
* @returns A promise that resolves to the extracted result of type R
|
|
61
63
|
*/
|
|
62
|
-
protected sendCommand<R>(path: string, commandHttpRequest: CommandRequest,
|
|
64
|
+
protected sendCommand<R>(path: string, commandHttpRequest: CommandRequest, options?: RequestOptions): Promise<R>;
|
|
63
65
|
/**
|
|
64
66
|
* Send a command to the server and wait for the result.
|
|
65
67
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandClient.d.ts","sourceRoot":"","sources":["../../src/command/commandClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"commandClient.d.ts","sourceRoot":"","sources":["../../src/command/commandClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEmC,cAAc,EACvD,MAAM,oBAAoB,CAAC;AAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,aAAa;IACZ,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa;gBAAtB,OAAO,EAAE,aAAa;IAGrD;;;;;;;;;;;;;OAaG;cACa,WAAW,CAAC,CAAC,EAC3B,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAUb;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,EAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,aAAa,CAAC;IAIzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,iBAAiB,CACrB,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,EAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,OAAO,CAAC,wBAAwB,CAAC;CAcrC"}
|