@caido/sdk-frontend 0.54.2-beta.17 → 0.54.2-beta.18
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/package.json
CHANGED
|
@@ -51,4 +51,8 @@ export type RequestViewModeOptions = {
|
|
|
51
51
|
* The component to render when the view mode is selected.
|
|
52
52
|
*/
|
|
53
53
|
view: ComponentDefinition;
|
|
54
|
+
/**
|
|
55
|
+
* A function that determines if the view mode should be shown for a given request.
|
|
56
|
+
*/
|
|
57
|
+
when?: (request: RequestFull | RequestDraft) => boolean;
|
|
54
58
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequestFull, RequestMeta } from "./request";
|
|
1
2
|
import type { As, ComponentDefinition, ID, Prettify } from "./utils";
|
|
2
3
|
/**
|
|
3
4
|
* A complete response with all metadata and raw content.
|
|
@@ -24,4 +25,8 @@ export type ResponseViewModeOptions = {
|
|
|
24
25
|
* The component to render when the view mode is selected.
|
|
25
26
|
*/
|
|
26
27
|
view: ComponentDefinition;
|
|
28
|
+
/**
|
|
29
|
+
* A function that determines if the view mode should be shown for a given response.
|
|
30
|
+
*/
|
|
31
|
+
when?: (response: ResponseFull, request: RequestMeta | RequestFull) => boolean;
|
|
27
32
|
};
|