// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Environment } from "./models.js"; import type { Folder } from "./models.js"; import type { GrpcRequest } from "./models.js"; import type { HttpRequest } from "./models.js"; import type { HttpResponse } from "./models.js"; import type { JsonValue } from "./serde_json/JsonValue.js"; import type { Workspace } from "./models.js"; export type BootRequest = { dir: string, watch: boolean, }; export type BootResponse = { name: string, version: string, }; export type CallHttpAuthenticationRequest = { config: { [key in string]?: JsonValue }, method: string, url: string, headers: Array, }; export type CallHttpAuthenticationResponse = { /** * HTTP headers to add to the request. Existing headers will be replaced, while * new headers will be added. */ setHeaders: Array, }; export type CallHttpRequestActionArgs = { httpRequest: HttpRequest, }; export type CallHttpRequestActionRequest = { key: string, pluginRefId: string, args: CallHttpRequestActionArgs, }; export type CallTemplateFunctionArgs = { purpose: RenderPurpose, values: { [key in string]?: string }, }; export type CallTemplateFunctionRequest = { name: string, args: CallTemplateFunctionArgs, }; export type CallTemplateFunctionResponse = { value: string | null, }; export type Color = "custom" | "default" | "primary" | "secondary" | "info" | "success" | "notice" | "warning" | "danger"; export type CopyTextRequest = { text: string, }; export type EditorLanguage = "text" | "javascript" | "json" | "html" | "xml" | "graphql" | "markdown"; 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, }; export type FilterRequest = { content: string, filter: string, }; export type FilterResponse = { content: string, }; export type FindHttpResponsesRequest = { requestId: string, limit?: number, }; export type FindHttpResponsesResponse = { httpResponses: Array, }; export type FormInput = { "type": "text" } & FormInputText | { "type": "editor" } & FormInputEditor | { "type": "select" } & FormInputSelect | { "type": "checkbox" } & FormInputCheckbox | { "type": "file" } & FormInputFile | { "type": "http_request" } & FormInputHttpRequest; export type FormInputBase = { name: string, /** * 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, }; export type FormInputCheckbox = { name: string, /** * 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, }; 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, name: string, /** * 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, }; export type FormInputFile = { /** * The title of the file selection window */ title: string, /** * Allow selecting multiple files */ multiple?: boolean, directory?: boolean, defaultPath?: string, filters?: Array, name: string, /** * 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, }; export type FormInputHttpRequest = { name: string, /** * 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, }; export type FormInputSelect = { /** * The options that will be available in the select input */ options: Array, name: string, /** * 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, }; export type FormInputSelectOption = { name: string, value: string, }; export type FormInputText = { /** * Placeholder for the text input */ placeholder?: string | null, /** * Placeholder for the text input */ password?: boolean, name: string, /** * 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, }; export type GetHttpAuthenticationResponse = { name: string, label: string, shortLabel: string, config: Array, }; export type GetHttpRequestActionsRequest = Record; export type GetHttpRequestActionsResponse = { actions: Array, pluginRefId: string, }; export type GetHttpRequestByIdRequest = { id: string, }; export type GetHttpRequestByIdResponse = { httpRequest: HttpRequest | null, }; export type GetTemplateFunctionsResponse = { functions: Array, pluginRefId: string, }; export type HttpHeader = { name: string, value: string, }; export type HttpRequestAction = { key: string, label: string, icon?: Icon, }; export type Icon = "copy" | "info" | "check_circle" | "alert_triangle" | "_unknown"; export type ImportRequest = { content: string, }; export type ImportResources = { workspaces: Array, environments: Array, folders: Array, httpRequests: Array, grpcRequests: Array, }; export type ImportResponse = { resources: ImportResources, }; export type InternalEvent = { id: string, pluginRefId: string, pluginName: string, replyId: string | null, windowContext: WindowContext, payload: InternalEventPayload, }; export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } & EmptyPayload | { "type": "reload_response" } & EmptyPayload | { "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": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_request" } & EmptyPayload | { "type": "get_http_authentication_response" } & GetHttpAuthenticationResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "copy_text_request" } & CopyTextRequest | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "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": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse; export type PromptTextRequest = { id: string, title: string, label: string, description?: string, defaultValue?: string, placeholder?: string, /** * Text to add to the confirmation button */ confirmText?: string, /** * 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, }; export type RenderHttpRequestRequest = { httpRequest: HttpRequest, purpose: RenderPurpose, }; export type RenderHttpRequestResponse = { httpRequest: HttpRequest, }; export type RenderPurpose = "send" | "preview"; export type SendHttpRequestRequest = { httpRequest: HttpRequest, }; export type SendHttpRequestResponse = { httpResponse: HttpResponse, }; export type ShowToastRequest = { message: string, color?: Color, icon?: Icon, }; export type TemplateFunction = { name: string, description?: string, /** * Also support alternative names. This is useful for not breaking existing * tags when changing the `name` property */ aliases?: Array, args: Array, }; export type TemplateRenderRequest = { data: JsonValue, purpose: RenderPurpose, }; export type TemplateRenderResponse = { data: JsonValue, }; export type WindowContext = { "type": "none" } | { "type": "label", label: string, };