waveterm/frontend/types/gotypes.d.ts

671 lines
15 KiB
TypeScript
Raw Normal View History

2024-06-12 02:42:10 +02:00
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
// generated by cmd/generate/main-generate.go
declare global {
2024-08-20 23:56:48 +02:00
// waveobj.Block
2024-06-12 02:42:10 +02:00
type Block = WaveObj & {
blockdef: BlockDef;
runtimeopts?: RuntimeOpts;
stickers?: StickerType[];
2024-06-12 02:42:10 +02:00
};
2024-06-24 23:34:31 +02:00
// blockcontroller.BlockControllerRuntimeStatus
type BlockControllerRuntimeStatus = {
blockid: string;
shellprocstatus?: string;
shellprocconnname?: string;
2024-06-24 23:34:31 +02:00
};
2024-08-20 23:56:48 +02:00
// waveobj.BlockDef
2024-06-12 02:42:10 +02:00
type BlockDef = {
files?: {[key: string]: FileDef};
2024-06-12 02:42:10 +02:00
meta?: MetaType;
};
// webcmd.BlockInputWSCommand
type BlockInputWSCommand = {
wscommand: "blockinput";
blockid: string;
inputdata64: string;
};
2024-08-20 23:56:48 +02:00
// waveobj.Client
2024-06-12 02:42:10 +02:00
type Client = WaveObj & {
2024-06-20 04:10:53 +02:00
windowids: string[];
tosagreed?: number;
2024-06-12 02:42:10 +02:00
};
// wshrpc.CommandAppendIJsonData
type CommandAppendIJsonData = {
zoneid: string;
filename: string;
data: {[key: string]: any};
};
2024-08-20 23:56:48 +02:00
// wshrpc.CommandAuthenticateRtnData
type CommandAuthenticateRtnData = {
routeid: string;
};
// wshrpc.CommandBlockInputData
type CommandBlockInputData = {
blockid: string;
inputdata64?: string;
signame?: string;
termsize?: TermSize;
};
// wshrpc.CommandBlockSetViewData
type CommandBlockSetViewData = {
blockid: string;
view: string;
};
// wshrpc.CommandControllerResyncData
type CommandControllerResyncData = {
forcerestart?: boolean;
tabid: string;
blockid: string;
rtopts?: RuntimeOpts;
};
// wshrpc.CommandCreateBlockData
type CommandCreateBlockData = {
2024-06-21 19:23:04 +02:00
tabid: string;
blockdef: BlockDef;
rtopts?: RuntimeOpts;
magnified?: boolean;
};
2024-07-19 03:13:59 +02:00
// wshrpc.CommandDeleteBlockData
type CommandDeleteBlockData = {
blockid: string;
};
2024-08-30 20:33:04 +02:00
// wshrpc.CommandEventReadHistoryData
type CommandEventReadHistoryData = {
event: string;
scope: string;
maxitems: number;
};
// wshrpc.CommandFileData
type CommandFileData = {
zoneid: string;
filename: string;
data64?: string;
};
// wshrpc.CommandGetMetaData
type CommandGetMetaData = {
oref: ORef;
2024-06-24 23:34:31 +02:00
};
// wshrpc.CommandMessageData
type CommandMessageData = {
oref: ORef;
message: string;
};
// wshrpc.CommandRemoteStreamFileData
type CommandRemoteStreamFileData = {
path: string;
byterange?: string;
};
// wshrpc.CommandRemoteStreamFileRtnData
type CommandRemoteStreamFileRtnData = {
fileinfo?: FileInfo[];
data64?: string;
};
2024-08-14 03:36:11 +02:00
// wshrpc.CommandRemoteWriteFileData
type CommandRemoteWriteFileData = {
path: string;
data64: string;
createmode?: number;
};
// wshrpc.CommandResolveIdsData
type CommandResolveIdsData = {
blockid: string;
ids: string[];
};
// wshrpc.CommandResolveIdsRtnData
type CommandResolveIdsRtnData = {
resolvedids: {[key: string]: ORef};
};
// wshrpc.CommandSetMetaData
type CommandSetMetaData = {
oref: ORef;
meta: MetaType;
};
2024-08-28 03:49:49 +02:00
// wconfig.ConfigError
type ConfigError = {
file: string;
err: string;
};
// wshrpc.ConnStatus
type ConnStatus = {
status: string;
connection: string;
connected: boolean;
2024-09-04 07:15:02 +02:00
hasconnected: boolean;
error?: string;
};
// wshrpc.CpuDataRequest
type CpuDataRequest = {
id: string;
2024-08-01 09:57:06 +02:00
count: number;
};
2024-08-20 23:56:48 +02:00
// waveobj.FileDef
2024-06-12 02:42:10 +02:00
type FileDef = {
filetype?: string;
path?: string;
url?: string;
content?: string;
meta?: {[key: string]: any};
2024-06-12 02:42:10 +02:00
};
// wshrpc.FileInfo
2024-06-12 02:42:10 +02:00
type FileInfo = {
path: string;
dir: string;
name: string;
2024-06-12 02:42:10 +02:00
notfound?: boolean;
size: number;
mode: number;
2024-06-24 23:34:31 +02:00
modestr: string;
2024-06-12 02:42:10 +02:00
modtime: number;
isdir?: boolean;
mimetype?: string;
readonly?: boolean;
2024-06-12 02:42:10 +02:00
};
// filestore.FileOptsType
type FileOptsType = {
maxsize?: number;
circular?: boolean;
ijson?: boolean;
ijsonbudget?: number;
};
2024-08-28 03:49:49 +02:00
// wconfig.FullConfigType
type FullConfigType = {
settings: SettingsType;
mimetypes: {[key: string]: MimeTypeConfigType};
defaultwidgets: {[key: string]: WidgetConfigType};
widgets: {[key: string]: WidgetConfigType};
presets: {[key: string]: MetaType};
termthemes: {[key: string]: TermThemeType};
configerrors: ConfigError[];
};
2024-06-12 02:42:10 +02:00
// fileservice.FullFile
type FullFile = {
info: FileInfo;
data64: string;
};
2024-08-27 00:17:37 +02:00
// waveobj.LayoutActionData
type LayoutActionData = {
actiontype: string;
blockid: string;
nodesize?: number;
indexarr?: number[];
focused: boolean;
magnified: boolean;
2024-08-27 00:17:37 +02:00
};
2024-08-20 23:56:48 +02:00
// waveobj.LayoutState
type LayoutState = WaveObj & {
rootnode?: any;
magnifiednodeid?: string;
focusednodeid?: string;
leaforder?: LeafOrderEntry[];
pendingbackendactions?: LayoutActionData[];
2024-06-12 02:42:10 +02:00
};
// waveobj.LeafOrderEntry
type LeafOrderEntry = {
nodeid: string;
blockid: string;
};
2024-08-20 23:56:48 +02:00
// waveobj.MetaTSType
type MetaType = {
view?: string;
controller?: string;
title?: string;
file?: string;
url?: string;
connection?: string;
edit?: boolean;
history?: string[];
"history:forward"?: string[];
2024-08-28 03:49:49 +02:00
"display:name"?: string;
"display:order"?: number;
icon?: string;
"icon:color"?: string;
frame?: boolean;
"frame:*"?: boolean;
"frame:bordercolor"?: string;
"frame:bordercolor:focused"?: string;
cmd?: string;
"cmd:*"?: boolean;
"cmd:interactive"?: boolean;
"cmd:login"?: boolean;
"cmd:runonstart"?: boolean;
"cmd:clearonstart"?: boolean;
"cmd:clearonrestart"?: boolean;
"cmd:env"?: {[key: string]: string};
"cmd:cwd"?: string;
"cmd:nowsh"?: boolean;
2024-08-30 20:33:04 +02:00
"graph:*"?: boolean;
"graph:numpoints"?: number;
"graph:metrics"?: string[];
bg?: string;
"bg:*"?: boolean;
"bg:opacity"?: number;
"bg:blendmode"?: string;
"term:*"?: boolean;
"term:fontsize"?: number;
"term:fontfamily"?: string;
"term:mode"?: string;
"term:theme"?: string;
2024-08-01 09:57:06 +02:00
count?: number;
};
2024-06-12 02:42:10 +02:00
// tsgenmeta.MethodMeta
2024-06-12 02:42:10 +02:00
type MethodMeta = {
Desc: string;
ArgNames: string[];
ReturnDesc: string;
};
2024-06-24 23:34:31 +02:00
// wconfig.MimeTypeConfigType
type MimeTypeConfigType = {
icon: string;
color: string;
2024-06-24 23:34:31 +02:00
};
2024-06-12 02:42:10 +02:00
// waveobj.ORef
type ORef = string;
2024-06-12 02:42:10 +02:00
// wshrpc.OpenAIOptsType
type OpenAIOptsType = {
model: string;
apitoken: string;
baseurl?: string;
maxtokens?: number;
maxchoices?: number;
timeout?: number;
};
// wshrpc.OpenAIPacketType
type OpenAIPacketType = {
type: string;
model?: string;
created?: number;
finish_reason?: string;
usage?: OpenAIUsageType;
index?: number;
text?: string;
error?: string;
};
// wshrpc.OpenAIPromptMessageType
type OpenAIPromptMessageType = {
role: string;
content: string;
name?: string;
};
// wshrpc.OpenAIUsageType
type OpenAIUsageType = {
prompt_tokens?: number;
completion_tokens?: number;
total_tokens?: number;
};
// wshrpc.OpenAiStreamRequest
type OpenAiStreamRequest = {
clientid?: string;
opts: OpenAIOptsType;
prompt: OpenAIPromptMessageType[];
};
2024-08-20 23:56:48 +02:00
// waveobj.Point
2024-06-12 02:42:10 +02:00
type Point = {
x: number;
y: number;
};
// wshutil.RpcMessage
type RpcMessage = {
command?: string;
reqid?: string;
resid?: string;
timeout?: number;
route?: string;
source?: string;
cont?: boolean;
cancel?: boolean;
error?: string;
datatype?: string;
data?: any;
};
// wshrpc.RpcOpts
type RpcOpts = {
timeout?: number;
noresponse?: boolean;
route?: string;
};
2024-08-20 23:56:48 +02:00
// waveobj.RuntimeOpts
2024-06-12 02:42:10 +02:00
type RuntimeOpts = {
termsize?: TermSize;
winsize?: WinSize;
};
// webcmd.SetBlockTermSizeWSCommand
type SetBlockTermSizeWSCommand = {
wscommand: "setblocktermsize";
blockid: string;
termsize: TermSize;
};
2024-08-28 03:49:49 +02:00
// wconfig.SettingsType
type SettingsType = {
"ai:*"?: boolean;
"ai:baseurl"?: string;
"ai:apitoken"?: string;
"ai:name"?: string;
"ai:model"?: string;
"ai:maxtokens"?: number;
"ai:timeoutms"?: number;
"term:*"?: boolean;
"term:fontsize"?: number;
"term:fontfamily"?: string;
"term:disablewebgl"?: boolean;
"editor:minimapenabled"?: boolean;
2024-09-05 08:08:56 +02:00
"editor:stickyscrollenabled"?: boolean;
2024-08-28 03:49:49 +02:00
"web:*"?: boolean;
"web:openlinksinternally"?: boolean;
"blockheader:*"?: boolean;
"blockheader:showblockids"?: boolean;
"autoupdate:*"?: boolean;
"autoupdate:enabled"?: boolean;
"autoupdate:intervalms"?: number;
"autoupdate:installonquit"?: boolean;
"widget:*"?: boolean;
"widget:showhelp"?: boolean;
"window:*"?: boolean;
"window:transparent"?: boolean;
"window:blur"?: boolean;
"window:opacity"?: number;
"window:bgcolor"?: string;
"window:reducedmotion"?: boolean;
"window:tilegapsize": number;
2024-08-28 03:49:49 +02:00
"telemetry:*"?: boolean;
"telemetry:enabled"?: boolean;
};
2024-08-20 23:56:48 +02:00
// waveobj.StickerClickOptsType
type StickerClickOptsType = {
sendinput?: string;
createblock?: BlockDef;
};
2024-08-20 23:56:48 +02:00
// waveobj.StickerDisplayOptsType
type StickerDisplayOptsType = {
icon: string;
imgsrc: string;
svgblob?: string;
};
2024-08-20 23:56:48 +02:00
// waveobj.StickerType
type StickerType = {
stickertype: string;
style: {[key: string]: any};
clickopts?: StickerClickOptsType;
display: StickerDisplayOptsType;
};
// wshrpc.SubscriptionRequest
type SubscriptionRequest = {
event: string;
scopes?: string[];
allscopes?: boolean;
};
2024-08-20 23:56:48 +02:00
// waveobj.Tab
2024-06-12 02:42:10 +02:00
type Tab = WaveObj & {
name: string;
layoutstate: string;
2024-06-12 02:42:10 +02:00
blockids: string[];
};
2024-08-09 03:24:54 +02:00
2024-08-20 23:56:48 +02:00
// waveobj.TermSize
2024-06-12 02:42:10 +02:00
type TermSize = {
rows: number;
cols: number;
};
// wconfig.TermThemeType
type TermThemeType = {
"display:name": string;
"display:order": number;
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
brightBlack: string;
brightRed: string;
brightGreen: string;
brightYellow: string;
brightBlue: string;
brightMagenta: string;
brightCyan: string;
brightWhite: string;
gray: string;
cmdtext: string;
foreground: string;
selectionBackground: string;
background: string;
cursorAccent: string;
};
2024-08-20 00:01:00 +02:00
// wshrpc.TimeSeriesData
type TimeSeriesData = {
ts: number;
values: {[key: string]: number};
};
2024-08-20 23:56:48 +02:00
// waveobj.UIContext
2024-06-12 02:42:10 +02:00
type UIContext = {
windowid: string;
activetabid: string;
};
// userinput.UserInputRequest
type UserInputRequest = {
requestid: string;
querytext: string;
responsetype: string;
title: string;
markdown: boolean;
timeoutms: number;
checkboxmsg: string;
publictext: boolean;
};
// userinput.UserInputResponse
type UserInputResponse = {
type: string;
requestid: string;
text?: string;
confirm?: boolean;
errormsg?: string;
checkboxstat?: boolean;
};
// vdom.Elem
type VDomElem = {
id?: string;
tag: string;
props?: {[key: string]: any};
children?: VDomElem[];
text?: string;
};
// vdom.VDomFuncType
type VDomFuncType = {
#func: string;
#stopPropagation?: boolean;
#preventDefault?: boolean;
#keys?: string[];
};
// vdom.VDomRefType
type VDomRefType = {
#ref: string;
current: any;
};
type WSCommandType = {
wscommand: string;
} & ( SetBlockTermSizeWSCommand | BlockInputWSCommand | WSRpcCommand );
2024-06-12 02:42:10 +02:00
// eventbus.WSEventType
type WSEventType = {
eventtype: string;
oref?: string;
data: any;
};
2024-06-14 08:54:04 +02:00
// eventbus.WSFileEventData
type WSFileEventData = {
zoneid: string;
filename: string;
fileop: string;
data64: string;
};
// webcmd.WSRpcCommand
type WSRpcCommand = {
wscommand: "rpc";
message: RpcMessage;
};
// wconfig.WatcherUpdate
type WatcherUpdate = {
2024-08-28 03:49:49 +02:00
fullconfig: FullConfigType;
};
// wshrpc.WaveEvent
type WaveEvent = {
event: string;
scopes?: string[];
sender?: string;
2024-08-30 20:33:04 +02:00
persist?: number;
data?: any;
};
// filestore.WaveFile
type WaveFile = {
zoneid: string;
name: string;
opts: FileOptsType;
createdts: number;
size: number;
modts: number;
meta: {[key: string]: any};
};
2024-06-12 02:42:10 +02:00
// waveobj.WaveObj
type WaveObj = {
otype: string;
oid: string;
version: number;
meta: MetaType;
2024-06-12 02:42:10 +02:00
};
2024-08-20 23:56:48 +02:00
// waveobj.WaveObjUpdate
2024-06-12 02:42:10 +02:00
type WaveObjUpdate = {
updatetype: string;
otype: string;
oid: string;
obj?: WaveObj;
};
2024-08-20 23:56:48 +02:00
// waveobj.Window
2024-06-20 04:10:53 +02:00
type WaveWindow = WaveObj & {
workspaceid: string;
activetabid: string;
pos: Point;
winsize: WinSize;
lastfocusts: number;
};
2024-06-12 02:42:10 +02:00
// service.WebCallType
type WebCallType = {
service: string;
method: string;
uicontext?: UIContext;
args: any[];
};
// service.WebReturnType
type WebReturnType = {
success?: boolean;
error?: string;
data?: any;
updates?: WaveObjUpdate[];
};
2024-08-28 03:49:49 +02:00
// wconfig.WidgetConfigType
type WidgetConfigType = {
"display:order"?: number;
icon?: string;
color?: string;
label?: string;
description?: string;
blockdef: BlockDef;
};
2024-08-20 23:56:48 +02:00
// waveobj.WinSize
2024-06-12 02:42:10 +02:00
type WinSize = {
width: number;
height: number;
};
2024-08-20 23:56:48 +02:00
// waveobj.Workspace
2024-06-12 02:42:10 +02:00
type Workspace = WaveObj & {
name: string;
tabids: string[];
};
// wshrpc.WshServerCommandMeta
type WshServerCommandMeta = {
commandtype: string;
};
2024-06-12 02:42:10 +02:00
}
export {}