@tinywork/glass 1.0.22 → 1.0.24
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/index.d.ts +7 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OutgoingHttpHeaders } from "node:http";
|
|
1
|
+
import type { OutgoingHttpHeaders, IncomingHttpHeaders } from "node:http";
|
|
2
2
|
|
|
3
3
|
type IGlassExtensionEvent<T> = (params: T) => Promise<T>;
|
|
4
4
|
type IGlassExtensionInvokeResponse<T> = Promise<{
|
|
@@ -295,6 +295,10 @@ declare global {
|
|
|
295
295
|
resourceType?: ResourceType;
|
|
296
296
|
response?: any;
|
|
297
297
|
rule?: RuleSchema;
|
|
298
|
+
otherRules?: { id: string; name: string }[];
|
|
299
|
+
defaultRule?: RuleSchema;
|
|
300
|
+
isImportant?: boolean;
|
|
301
|
+
duration?: number;
|
|
298
302
|
};
|
|
299
303
|
|
|
300
304
|
interface IGlassExtension {
|
|
@@ -313,6 +317,8 @@ declare global {
|
|
|
313
317
|
body?: any;
|
|
314
318
|
};
|
|
315
319
|
isLocal?: boolean;
|
|
320
|
+
headers?: IncomingHttpHeaders;
|
|
321
|
+
rule?: RuleSchema;
|
|
316
322
|
}>;
|
|
317
323
|
/** 在执行请求用例时触发,用于修改config */
|
|
318
324
|
onRequestExec?: IGlassExtensionEvent<{
|