mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-24 20:34:05 +02:00
Replaces the response-directory fallback with what the frontend already does for ephemeral sends: the engine hands the body back, because it is the only copy. Guessing at a file named for an id was the store reaching around its own abstraction, and it is exactly what must not survive the move to blob storage. The send reply carries the bytes when the engine returned them, and the runtime holds them for the rest of the call that sent them, so ctx.httpResponse.body() answers for a saved and an unsaved response the same way. Unsaved ones now report a real contentType too, taken from the response the send already handed back.
642 lines
26 KiB
TypeScript
Generated
642 lines
26 KiB
TypeScript
Generated
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { AnyModel, Environment, Folder, GrpcRequest, HttpRequest, HttpResponse, WebsocketRequest, Workspace } from "./gen_models";
|
|
import type { JsonValue } from "./serde_json/JsonValue";
|
|
|
|
export type BootRequest = { dir: string, watch: boolean, };
|
|
|
|
export type CallFolderActionArgs = { folder: Folder, };
|
|
|
|
export type CallFolderActionRequest = { index: number, pluginRefId: string, args: CallFolderActionArgs, };
|
|
|
|
export type CallGrpcRequestActionArgs = { grpcRequest: GrpcRequest, protoFiles: Array<string>, };
|
|
|
|
export type CallGrpcRequestActionRequest = { index: number, pluginRefId: string, args: CallGrpcRequestActionArgs, };
|
|
|
|
export type CallHttpAuthenticationActionArgs = { contextId: string, values: { [key in string]?: JsonPrimitive }, };
|
|
|
|
export type CallHttpAuthenticationActionRequest = { index: number, pluginRefId: string, args: CallHttpAuthenticationActionArgs, };
|
|
|
|
export type CallHttpAuthenticationRequest = { contextId: string, values: { [key in string]?: JsonPrimitive }, method: string, url: string, headers: Array<HttpHeader>, body: string | null, };
|
|
|
|
export type CallHttpAuthenticationResponse = {
|
|
/**
|
|
* HTTP headers to add to the request. Existing headers will be replaced, while
|
|
* new headers will be added.
|
|
*/
|
|
setHeaders?: Array<HttpHeader>,
|
|
/**
|
|
* Query parameters to add to the request. Existing params will be replaced, while
|
|
* new params will be added.
|
|
*/
|
|
setQueryParameters?: Array<HttpHeader>, };
|
|
|
|
export type CallHttpRequestActionArgs = { httpRequest: HttpRequest, };
|
|
|
|
export type CallHttpRequestActionRequest = { index: number, pluginRefId: string, args: CallHttpRequestActionArgs, };
|
|
|
|
export type CallTemplateFunctionArgs = { purpose: RenderPurpose, values: { [key in string]?: JsonPrimitive }, };
|
|
|
|
export type CallTemplateFunctionRequest = { name: string, args: CallTemplateFunctionArgs, };
|
|
|
|
export type CallTemplateFunctionResponse = { value: string | null, error?: string, };
|
|
|
|
export type CallWebsocketRequestActionArgs = { websocketRequest: WebsocketRequest, };
|
|
|
|
export type CallWebsocketRequestActionRequest = { index: number, pluginRefId: string, args: CallWebsocketRequestActionArgs, };
|
|
|
|
export type CallWorkspaceActionArgs = { workspace: Workspace, };
|
|
|
|
export type CallWorkspaceActionRequest = { index: number, pluginRefId: string, args: CallWorkspaceActionArgs, };
|
|
|
|
export type CloseWindowRequest = { label: string, };
|
|
|
|
export type Color = "primary" | "secondary" | "info" | "success" | "notice" | "warning" | "danger";
|
|
|
|
export type CompletionOptionType = "constant" | "variable";
|
|
|
|
export type Content = { "type": "text", content: string, } | { "type": "markdown", content: string, };
|
|
|
|
export type CopyTextRequest = { text: string, };
|
|
|
|
export type DeleteKeyValueRequest = { key: string, };
|
|
|
|
export type DeleteKeyValueResponse = { deleted: boolean, };
|
|
|
|
export type DeleteModelRequest = { model: string, id: string, };
|
|
|
|
export type DeleteModelResponse = { model: AnyModel, };
|
|
|
|
export type DialogSize = "sm" | "md" | "lg" | "full" | "dynamic";
|
|
|
|
export type EditorLanguage = "text" | "javascript" | "json" | "html" | "xml" | "graphql" | "markdown" | "c" | "clojure" | "csharp" | "go" | "http" | "java" | "kotlin" | "objective_c" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift";
|
|
|
|
export type EmptyPayload = {};
|
|
|
|
export type ErrorResponse = { error: string, };
|
|
|
|
export type ExportHttpRequestRequest = { httpRequest: HttpRequest, };
|
|
|
|
export type ExportHttpRequestResponse = { content: string, };
|
|
|
|
export type FileFilter = { name: string,
|
|
/**
|
|
* File extensions to require
|
|
*/
|
|
extensions: Array<string>, };
|
|
|
|
export type FilterRequest = { content: string, filter: string, };
|
|
|
|
export type FilterResponse = { content: string, error?: string, };
|
|
|
|
export type FindHttpResponsesRequest = { requestId: string, limit?: number, };
|
|
|
|
export type FindHttpResponsesResponse = { httpResponses: Array<HttpResponse>, };
|
|
|
|
export type FolderAction = { label: string, icon?: Icon, };
|
|
|
|
export type FormInput = { "type": "text" } & FormInputText | { "type": "editor" } & FormInputEditor | { "type": "select" } & FormInputSelect | { "type": "checkbox" } & FormInputCheckbox | { "type": "file" } & FormInputFile | { "type": "http_request" } & FormInputHttpRequest | { "type": "accordion" } & FormInputAccordion | { "type": "h_stack" } & FormInputHStack | { "type": "banner" } & FormInputBanner | { "type": "markdown" } & FormInputMarkdown | { "type": "key_value" } & FormInputKeyValue;
|
|
|
|
export type FormInputAccordion = { label: string, inputs?: Array<FormInput>, hidden?: boolean, };
|
|
|
|
export type FormInputBanner = { inputs?: Array<FormInput>, hidden?: boolean, color?: Color, };
|
|
|
|
export type FormInputBase = {
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputCheckbox = {
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputEditor = {
|
|
/**
|
|
* Placeholder for the text input
|
|
*/
|
|
placeholder?: string | null,
|
|
/**
|
|
* Don't show the editor gutter (line numbers, folds, etc.)
|
|
*/
|
|
hideGutter?: boolean,
|
|
/**
|
|
* Language for syntax highlighting
|
|
*/
|
|
language?: EditorLanguage, readOnly?: boolean,
|
|
/**
|
|
* Fixed number of visible rows
|
|
*/
|
|
rows?: number, completionOptions?: Array<GenericCompletionOption>,
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputFile = {
|
|
/**
|
|
* The title of the file selection window
|
|
*/
|
|
title: string,
|
|
/**
|
|
* Allow selecting multiple files
|
|
*/
|
|
multiple?: boolean, directory?: boolean, defaultPath?: string, filters?: Array<FileFilter>,
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputHStack = { inputs?: Array<FormInput>, hidden?: boolean, };
|
|
|
|
export type FormInputHttpRequest = {
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputKeyValue = {
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputMarkdown = { content: string, hidden?: boolean, };
|
|
|
|
export type FormInputSelect = {
|
|
/**
|
|
* The options that will be available in the select input
|
|
*/
|
|
options: Array<FormInputSelectOption>,
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type FormInputSelectOption = { label: string, value: string, };
|
|
|
|
export type FormInputText = {
|
|
/**
|
|
* Placeholder for the text input
|
|
*/
|
|
placeholder?: string | null,
|
|
/**
|
|
* Placeholder for the text input
|
|
*/
|
|
password?: boolean,
|
|
/**
|
|
* Whether to allow newlines in the input, like a <textarea/>
|
|
*/
|
|
multiLine?: boolean, completionOptions?: Array<GenericCompletionOption>,
|
|
/**
|
|
* The name of the input. The value will be stored at this object attribute in the resulting data
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Whether this input is visible for the given configuration. Use this to
|
|
* make branching forms.
|
|
*/
|
|
hidden?: boolean,
|
|
/**
|
|
* Whether the user must fill in the argument
|
|
*/
|
|
optional?: boolean,
|
|
/**
|
|
* The label of the input
|
|
*/
|
|
label?: string,
|
|
/**
|
|
* Visually hide the label of the input
|
|
*/
|
|
hideLabel?: boolean,
|
|
/**
|
|
* The default value
|
|
*/
|
|
defaultValue?: string, disabled?: boolean,
|
|
/**
|
|
* Longer description of the input, likely shown in a tooltip
|
|
*/
|
|
description?: string, };
|
|
|
|
export type GenericCompletionOption = { label: string, detail?: string, info?: string, type?: CompletionOptionType, boost?: number, };
|
|
|
|
export type GetCookieValueRequest = { name: string, domain?: string | null, };
|
|
|
|
export type GetCookieValueResponse = { value: string | null, };
|
|
|
|
export type GetFolderActionsResponse = { actions: Array<FolderAction>, pluginRefId: string, };
|
|
|
|
export type GetGrpcRequestActionsResponse = { actions: Array<GrpcRequestAction>, pluginRefId: string, };
|
|
|
|
export type GetHttpAuthenticationConfigRequest = { contextId: string, values: { [key in string]?: JsonPrimitive }, };
|
|
|
|
export type GetHttpAuthenticationConfigResponse = { args: Array<FormInput>, pluginRefId: string, actions?: Array<HttpAuthenticationAction>, };
|
|
|
|
export type GetHttpAuthenticationSummaryResponse = { name: string, label: string, shortLabel: string, };
|
|
|
|
export type GetHttpRequestActionsResponse = { actions: Array<HttpRequestAction>, pluginRefId: string, };
|
|
|
|
export type GetHttpRequestByIdRequest = { id: string, };
|
|
|
|
export type GetHttpRequestByIdResponse = { httpRequest: HttpRequest | null, };
|
|
|
|
/**
|
|
* Ask what a response's body is, before deciding whether to pull it.
|
|
*
|
|
* Bodies are addressed by response id and never by path, so where the host
|
|
* keeps the bytes is its own business.
|
|
*/
|
|
export type GetHttpResponseBodyInfoRequest = { responseId: string, };
|
|
|
|
export type GetHttpResponseBodyInfoResponse = {
|
|
/**
|
|
* How many bytes are actually stored, which is not necessarily what the
|
|
* `Content-Length` header claimed. Zero when the response has no body.
|
|
*/
|
|
contentLength: number,
|
|
/**
|
|
* The response's `Content-Type` header, verbatim, so the reader can pick a
|
|
* charset.
|
|
*/
|
|
contentType?: string | null, };
|
|
|
|
export type GetKeyValueRequest = { key: string, };
|
|
|
|
export type GetKeyValueResponse = { value?: string, };
|
|
|
|
export type GetTemplateFunctionConfigRequest = { contextId: string, name: string, values: { [key in string]?: JsonPrimitive }, };
|
|
|
|
export type GetTemplateFunctionConfigResponse = { function: TemplateFunction, pluginRefId: string, };
|
|
|
|
export type GetTemplateFunctionSummaryResponse = { functions: Array<TemplateFunction>, pluginRefId: string, };
|
|
|
|
export type GetThemesRequest = Record<string, never>;
|
|
|
|
export type GetThemesResponse = { themes: Array<Theme>, };
|
|
|
|
export type GetWebsocketRequestActionsResponse = { actions: Array<WebsocketRequestAction>, pluginRefId: string, };
|
|
|
|
export type GetWorkspaceActionsResponse = { actions: Array<WorkspaceAction>, pluginRefId: string, };
|
|
|
|
export type GrpcRequestAction = { label: string, icon?: Icon, };
|
|
|
|
export type HttpAuthenticationAction = { label: string, icon?: Icon, };
|
|
|
|
export type HttpHeader = { name: string, value: string, };
|
|
|
|
export type HttpRequestAction = { label: string, icon?: Icon, };
|
|
|
|
export type Icon = "alert_triangle" | "check" | "check_circle" | "chevron_down" | "copy" | "info" | "pin" | "search" | "trash" | "_unknown";
|
|
|
|
export type ImportRequest = { content: string, };
|
|
|
|
export type ImportResources = { workspaces: Array<Workspace>, environments: Array<Environment>, folders: Array<Folder>, httpRequests: Array<HttpRequest>, grpcRequests: Array<GrpcRequest>, websocketRequests: Array<WebsocketRequest>, };
|
|
|
|
export type ImportResponse = { resources: ImportResources, };
|
|
|
|
export type InternalEvent = { id: string, pluginRefId: string, pluginName: string, replyId: string | null, context: PluginContext, payload: InternalEventPayload, };
|
|
|
|
export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } | { "type": "reload_response" } & ReloadResponse | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "list_cookie_names_request" } & ListCookieNamesRequest | { "type": "list_cookie_names_response" } & ListCookieNamesResponse | { "type": "get_cookie_value_request" } & GetCookieValueRequest | { "type": "get_cookie_value_response" } & GetCookieValueResponse | { "type": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_websocket_request_actions_request" } & EmptyPayload | { "type": "get_websocket_request_actions_response" } & GetWebsocketRequestActionsResponse | { "type": "call_websocket_request_action_request" } & CallWebsocketRequestActionRequest | { "type": "get_workspace_actions_request" } & EmptyPayload | { "type": "get_workspace_actions_response" } & GetWorkspaceActionsResponse | { "type": "call_workspace_action_request" } & CallWorkspaceActionRequest | { "type": "get_folder_actions_request" } & EmptyPayload | { "type": "get_folder_actions_response" } & GetFolderActionsResponse | { "type": "call_folder_action_request" } & CallFolderActionRequest | { "type": "get_grpc_request_actions_request" } & EmptyPayload | { "type": "get_grpc_request_actions_response" } & GetGrpcRequestActionsResponse | { "type": "call_grpc_request_action_request" } & CallGrpcRequestActionRequest | { "type": "get_template_function_summary_request" } & EmptyPayload | { "type": "get_template_function_summary_response" } & GetTemplateFunctionSummaryResponse | { "type": "get_template_function_config_request" } & GetTemplateFunctionConfigRequest | { "type": "get_template_function_config_response" } & GetTemplateFunctionConfigResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_summary_request" } & EmptyPayload | { "type": "get_http_authentication_summary_response" } & GetHttpAuthenticationSummaryResponse | { "type": "get_http_authentication_config_request" } & GetHttpAuthenticationConfigRequest | { "type": "get_http_authentication_config_response" } & GetHttpAuthenticationConfigResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "call_http_authentication_action_request" } & CallHttpAuthenticationActionRequest | { "type": "call_http_authentication_action_response" } & EmptyPayload | { "type": "copy_text_request" } & CopyTextRequest | { "type": "copy_text_response" } & EmptyPayload | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "render_grpc_request_request" } & RenderGrpcRequestRequest | { "type": "render_grpc_request_response" } & RenderGrpcRequestResponse | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "get_key_value_request" } & GetKeyValueRequest | { "type": "get_key_value_response" } & GetKeyValueResponse | { "type": "set_key_value_request" } & SetKeyValueRequest | { "type": "set_key_value_response" } & SetKeyValueResponse | { "type": "delete_key_value_request" } & DeleteKeyValueRequest | { "type": "delete_key_value_response" } & DeleteKeyValueResponse | { "type": "open_window_request" } & OpenWindowRequest | { "type": "window_navigate_event" } & WindowNavigateEvent | { "type": "window_close_event" } | { "type": "close_window_request" } & CloseWindowRequest | { "type": "open_external_url_request" } & OpenExternalUrlRequest | { "type": "open_external_url_response" } & EmptyPayload | { "type": "show_toast_request" } & ShowToastRequest | { "type": "show_toast_response" } & EmptyPayload | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "type": "prompt_form_request" } & PromptFormRequest | { "type": "prompt_form_response" } & PromptFormResponse | { "type": "window_info_request" } & WindowInfoRequest | { "type": "window_info_response" } & WindowInfoResponse | { "type": "list_open_workspaces_request" } & ListOpenWorkspacesRequest | { "type": "list_open_workspaces_response" } & ListOpenWorkspacesResponse | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "get_http_response_body_info_request" } & GetHttpResponseBodyInfoRequest | { "type": "get_http_response_body_info_response" } & GetHttpResponseBodyInfoResponse | { "type": "read_http_response_body_chunk_request" } & ReadHttpResponseBodyChunkRequest | { "type": "read_http_response_body_chunk_response" } & ReadHttpResponseBodyChunkResponse | { "type": "list_http_requests_request" } & ListHttpRequestsRequest | { "type": "list_http_requests_response" } & ListHttpRequestsResponse | { "type": "list_folders_request" } & ListFoldersRequest | { "type": "list_folders_response" } & ListFoldersResponse | { "type": "upsert_model_request" } & UpsertModelRequest | { "type": "upsert_model_response" } & UpsertModelResponse | { "type": "delete_model_request" } & DeleteModelRequest | { "type": "delete_model_response" } & DeleteModelResponse | { "type": "get_themes_request" } & GetThemesRequest | { "type": "get_themes_response" } & GetThemesResponse | { "type": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse;
|
|
|
|
export type JsonPrimitive = string | number | boolean | null;
|
|
|
|
export type ListCookieNamesRequest = {};
|
|
|
|
export type ListCookieNamesResponse = { names: Array<string>, };
|
|
|
|
export type ListFoldersRequest = {};
|
|
|
|
export type ListFoldersResponse = { folders: Array<Folder>, };
|
|
|
|
export type ListHttpRequestsRequest = { folderId?: string, };
|
|
|
|
export type ListHttpRequestsResponse = { httpRequests: Array<HttpRequest>, };
|
|
|
|
export type ListOpenWorkspacesRequest = Record<string, never>;
|
|
|
|
export type ListOpenWorkspacesResponse = { workspaces: Array<WorkspaceInfo>, };
|
|
|
|
export type OpenExternalUrlRequest = { url: string, };
|
|
|
|
export type OpenWindowRequest = { url: string,
|
|
/**
|
|
* Label for the window. If not provided, a random one will be generated.
|
|
*/
|
|
label: string, title?: string, size?: WindowSize, dataDirKey?: string, };
|
|
|
|
export type PluginContext = { id: string, label: string | null, workspaceId: string | null, };
|
|
|
|
export type PromptFormRequest = { id: string, title: string, description?: string, inputs: Array<FormInput>, confirmText?: string, cancelText?: string, size?: DialogSize, };
|
|
|
|
export type PromptFormResponse = { values: { [key in string]?: JsonPrimitive } | null, done?: boolean, };
|
|
|
|
export type PromptTextRequest = { id: string, title: string, label: string, description?: string, defaultValue?: string, placeholder?: string,
|
|
/**
|
|
* Text to add to the confirmation button
|
|
*/
|
|
confirmText?: string, password?: boolean,
|
|
/**
|
|
* Text to add to the cancel button
|
|
*/
|
|
cancelText?: string,
|
|
/**
|
|
* Require the user to enter a non-empty value
|
|
*/
|
|
required?: boolean, };
|
|
|
|
export type PromptTextResponse = { value: string | null, };
|
|
|
|
/**
|
|
* Pull one window of a response body.
|
|
*
|
|
* Reads are idempotent: the bytes live in durable storage, so the same window
|
|
* can be asked for as many times as the plugin likes.
|
|
*/
|
|
export type ReadHttpResponseBodyChunkRequest = { responseId: string, offset: number, length: number, };
|
|
|
|
export type ReadHttpResponseBodyChunkResponse = {
|
|
/**
|
|
* Base64, because the desktop transport is a WebSocket that only sends
|
|
* text frames today. A host that can carry binary sends the bytes as they
|
|
* are and fills this in from them.
|
|
*/
|
|
data: string,
|
|
/**
|
|
* Bytes decoded from `data`. Short of the requested length means the body
|
|
* ended here.
|
|
*/
|
|
length: number, };
|
|
|
|
export type ReloadResponse = { silent: boolean, };
|
|
|
|
export type RenderGrpcRequestRequest = { grpcRequest: GrpcRequest, purpose: RenderPurpose, };
|
|
|
|
export type RenderGrpcRequestResponse = { grpcRequest: GrpcRequest, };
|
|
|
|
export type RenderHttpRequestRequest = { httpRequest: HttpRequest, purpose: RenderPurpose, };
|
|
|
|
export type RenderHttpRequestResponse = { httpRequest: HttpRequest, };
|
|
|
|
export type RenderPurpose = "send" | "preview";
|
|
|
|
export type SendHttpRequestRequest = { httpRequest: Partial<HttpRequest>, };
|
|
|
|
export type SendHttpRequestResponse = { httpResponse: HttpResponse,
|
|
/**
|
|
* The body, base64, when the send saved nothing.
|
|
*
|
|
* A request with no id behind it produces a response the model store never
|
|
* sees, so it cannot be read back by id later the way a saved one can.
|
|
* This is the only copy of it. `None` means the body was stored and should
|
|
* be read with `read_http_response_body_chunk_request`.
|
|
*/
|
|
body?: string | null, };
|
|
|
|
export type SetKeyValueRequest = { key: string, value: string, };
|
|
|
|
export type SetKeyValueResponse = {};
|
|
|
|
export type ShowToastRequest = { message: string, color?: Color, icon?: Icon, timeout?: number, };
|
|
|
|
export type TemplateFunction = { name: string, previewType?: TemplateFunctionPreviewType, description?: string,
|
|
/**
|
|
* Also support alternative names. This is useful for not breaking existing
|
|
* tags when changing the `name` property
|
|
*/
|
|
aliases?: Array<string>, args: Array<TemplateFunctionArg>,
|
|
/**
|
|
* A list of arg names to show in the inline preview. If not provided, none will be shown (for privacy reasons).
|
|
*/
|
|
previewArgs?: Array<string>, };
|
|
|
|
/**
|
|
* Similar to FormInput, but contains
|
|
*/
|
|
export type TemplateFunctionArg = FormInput;
|
|
|
|
export type TemplateFunctionPreviewType = "live" | "click" | "none";
|
|
|
|
export type TemplateRenderRequest = { data: JsonValue, purpose: RenderPurpose, };
|
|
|
|
export type TemplateRenderResponse = { data: JsonValue, };
|
|
|
|
export type Theme = {
|
|
/**
|
|
* How the theme is identified. This should never be changed
|
|
*/
|
|
id: string,
|
|
/**
|
|
* The friendly name of the theme to be displayed to the user
|
|
*/
|
|
label: string,
|
|
/**
|
|
* Whether the theme will be used for dark or light appearance
|
|
*/
|
|
dark: boolean,
|
|
/**
|
|
* The default top-level colors for the theme
|
|
*/
|
|
base: ThemeComponentColors,
|
|
/**
|
|
* Optionally override theme for individual UI components for more control
|
|
*/
|
|
components?: ThemeComponents, };
|
|
|
|
export type ThemeComponentColors = { surface?: string, surfaceHighlight?: string, surfaceActive?: string, text?: string, textSubtle?: string, textSubtlest?: string, border?: string, borderSubtle?: string, borderFocus?: string, shadow?: string, backdrop?: string, selection?: string, primary?: string, secondary?: string, info?: string, success?: string, notice?: string, warning?: string, danger?: string, };
|
|
|
|
export type ThemeComponents = { dialog?: ThemeComponentColors, menu?: ThemeComponentColors, toast?: ThemeComponentColors, sidebar?: ThemeComponentColors, responsePane?: ThemeComponentColors, appHeader?: ThemeComponentColors, button?: ThemeComponentColors, banner?: ThemeComponentColors, templateTag?: ThemeComponentColors, urlBar?: ThemeComponentColors, editor?: ThemeComponentColors, input?: ThemeComponentColors, };
|
|
|
|
export type UpsertModelRequest = { model: AnyModel, };
|
|
|
|
export type UpsertModelResponse = { model: AnyModel, };
|
|
|
|
export type WebsocketRequestAction = { label: string, icon?: Icon, };
|
|
|
|
export type WindowInfoRequest = { label: string, };
|
|
|
|
export type WindowInfoResponse = { requestId: string | null, environmentId: string | null, workspaceId: string | null, label: string, };
|
|
|
|
export type WindowNavigateEvent = { url: string, };
|
|
|
|
export type WindowSize = { width: number, height: number, };
|
|
|
|
export type WorkspaceAction = { label: string, icon?: Icon, };
|
|
|
|
export type WorkspaceInfo = { id: string, name: string, };
|