@ahoo-wang/fetcher-wow 1.5.1 → 1.5.3

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.
@@ -54,14 +54,20 @@ export declare class CommandClient {
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
56
  * @param extractor - Function to extract the result from the response, defaults to JSON extractor
57
+ * @param attributes - Optional shared attributes that can be accessed by interceptors
58
+ * throughout the request lifecycle. These attributes allow passing
59
+ * custom data between different interceptors.
57
60
  * @returns A promise that resolves to the extracted result of type R
58
61
  */
59
- protected sendCommand<R>(path: string, commandHttpRequest: CommandRequest, extractor?: ResultExtractor<any>): Promise<R>;
62
+ protected sendCommand<R>(path: string, commandHttpRequest: CommandRequest, extractor?: ResultExtractor<any>, attributes?: Record<string, any>): Promise<R>;
60
63
  /**
61
64
  * Send a command to the server and wait for the result.
62
65
  *
63
66
  * @param path - The endpoint path to send the command to
64
67
  * @param commandHttpRequest - The command request to send
68
+ * @param attributes - Optional shared attributes that can be accessed by interceptors
69
+ * throughout the request lifecycle. These attributes allow passing
70
+ * custom data between different interceptors.
65
71
  * @returns A promise that resolves to the command execution result
66
72
  *
67
73
  * @example
@@ -75,13 +81,16 @@ export declare class CommandClient {
75
81
  * });
76
82
  * ```
77
83
  */
78
- send(path: string, commandHttpRequest: CommandRequest): Promise<CommandResult>;
84
+ send(path: string, commandHttpRequest: CommandRequest, attributes?: Record<string, any>): Promise<CommandResult>;
79
85
  /**
80
86
  * Send a command to the server and wait for the result as a stream.
81
87
  * This is useful for long-running commands that produce multiple events.
82
88
  *
83
89
  * @param path - The endpoint path to send the command to
84
90
  * @param commandHttpRequest - The command request to send
91
+ * @param attributes - Optional shared attributes that can be accessed by interceptors
92
+ * throughout the request lifecycle. These attributes allow passing
93
+ * custom data between different interceptors.
85
94
  * @returns A promise that resolves to a stream of command execution results
86
95
  *
87
96
  * @example
@@ -102,6 +111,6 @@ export declare class CommandClient {
102
111
  * }
103
112
  * ```
104
113
  */
105
- sendAndWaitStream(path: string, commandHttpRequest: CommandRequest): Promise<CommandResultEventStream>;
114
+ sendAndWaitStream(path: string, commandHttpRequest: CommandRequest, attributes?: Record<string, any>): Promise<CommandResultEventStream>;
106
115
  }
107
116
  //# sourceMappingURL=commandClient.d.ts.map
@@ -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,EAGL,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,aAAa;IACZ,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa;gBAAtB,OAAO,EAAE,aAAa;IAGrD;;;;;;;;OAQG;cACa,WAAW,CAAC,CAAC,EAC3B,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,EAClC,SAAS,GAAE,eAAe,CAAC,GAAG,CAAyB,GACtD,OAAO,CAAC,CAAC,CAAC;IAUb;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,GACjC,OAAO,CAAC,aAAa,CAAC;IAIzB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,iBAAiB,CACrB,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,cAAc,GACjC,OAAO,CAAC,wBAAwB,CAAC;CAWrC"}
1
+ {"version":3,"file":"commandClient.d.ts","sourceRoot":"","sources":["../../src/command/commandClient.ts"],"names":[],"mappings":"AAaA,OAAO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