mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-13 12:13:42 +01:00
79 lines
2.7 KiB
TypeScript
Generated
79 lines
2.7 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 { Flow, FlowBody, ModelPayload } from "./gen_models";
|
|
|
|
export type ActionInvocation = { "scope": "global", action: GlobalAction, };
|
|
|
|
export type ActionMetadata = { label: string, defaultHotkey: string | null, };
|
|
|
|
export type CaStatus = {
|
|
/**
|
|
* macOS trusts this app's CA, so HTTPS flows can be decrypted.
|
|
*/
|
|
trusted: boolean,
|
|
/**
|
|
* A certificate named "Yaak Proxy CA" is in a keychain: this one, or an older one.
|
|
*/
|
|
installed: boolean, certPath: string, };
|
|
|
|
export type CaStatusRequest = Record<string, never>;
|
|
|
|
export type CaTrustRequest = Record<string, never>;
|
|
|
|
export type FilterBodyRequest = { flowId: string, which: FlowBody,
|
|
/**
|
|
* JSONPath, or XPath for an XML or HTML body.
|
|
*/
|
|
expression: string,
|
|
/**
|
|
* The language the viewer detected from the body. Without it, the Content-Type decides.
|
|
*/
|
|
language?: FilterLanguage, };
|
|
|
|
export type FilterBodyResponse = { content: string, error: string | null, };
|
|
|
|
export type FilterLanguage = "jsonpath" | "xpath";
|
|
|
|
export type FormatBodyRequest = { text: string, };
|
|
|
|
export type GetFlowBodyRequest = { flowId: string, which: FlowBody, };
|
|
|
|
export type GetFlowBodyResponse = {
|
|
/**
|
|
* The body decoded with its Content-Encoding, at most the capture limit of it, in base64.
|
|
*/
|
|
data: string,
|
|
/**
|
|
* The body is incomplete: cut on the wire, or decoded past the capture limit.
|
|
*/
|
|
truncated: boolean,
|
|
/**
|
|
* Bytes stored for the body, as they were on the wire.
|
|
*/
|
|
storedSize: number, };
|
|
|
|
export type GetProxyStateRequest = Record<string, never>;
|
|
|
|
export type GetProxyStateResponse = { state: ProxyState,
|
|
/**
|
|
* The port the engine is bound to, while it runs.
|
|
*/
|
|
port: number | null, };
|
|
|
|
export type GlobalAction = "proxy_start" | "proxy_stop";
|
|
|
|
export type ListActionsRequest = Record<string, never>;
|
|
|
|
export type ListActionsResponse = { actions: Array<[ActionInvocation, ActionMetadata]>, };
|
|
|
|
export type ListModelsRequest = Record<string, never>;
|
|
|
|
export type ListModelsResponse = { flows: Array<Flow>, };
|
|
|
|
export type ProxyState = "running" | "stopped";
|
|
|
|
export type ProxyStatePayload = { state: ProxyState, };
|
|
|
|
export type RpcEventSchema = { model_write: ModelPayload, proxy_state_changed: ProxyStatePayload, };
|
|
|
|
export type RpcSchema = { execute_action: [ActionInvocation, boolean], format_body: [FormatBodyRequest, string], get_proxy_state: [GetProxyStateRequest, GetProxyStateResponse], list_actions: [ListActionsRequest, ListActionsResponse], list_models: [ListModelsRequest, ListModelsResponse], ca_status: [CaStatusRequest, CaStatus], ca_trust: [CaTrustRequest, CaStatus], filter_body: [FilterBodyRequest, FilterBodyResponse], get_flow_body: [GetFlowBodyRequest, GetFlowBodyResponse], };
|