waveterm/frontend/types/gotypes.d.ts

557 lines
12 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 {
// wconfig.AiConfigType
type AiConfigType = {
baseurl: string;
apitoken: string;
name: string;
model: string;
maxtokens: number;
timeoutms: number;
};
// wconfig.AutoUpdateOpts
type AutoUpdateOpts = {
enabled: boolean;
intervalms: number;
};
2024-06-12 02:42:10 +02:00
// wstore.Block
type Block = WaveObj & {
blockdef: BlockDef;
controller: string;
view: string;
runtimeopts?: RuntimeOpts;
stickers?: StickerType[];
2024-06-12 02:42:10 +02:00
meta: MetaType;
};
2024-06-24 23:34:31 +02:00
// blockcontroller.BlockControllerRuntimeStatus
type BlockControllerRuntimeStatus = {
blockid: string;
status: string;
shellprocstatus?: string;
};
2024-06-12 02:42:10 +02:00
// wstore.BlockDef
type BlockDef = {
controller?: string;
view?: string;
files?: {[key: string]: FileDef};
2024-06-12 02:42:10 +02:00
meta?: MetaType;
};
// wconfig.BlockHeaderOpts
type BlockHeaderOpts = {
showblockids: boolean;
};
// webcmd.BlockInputWSCommand
type BlockInputWSCommand = {
wscommand: "blockinput";
blockid: string;
inputdata64: string;
};
2024-06-12 02:42:10 +02:00
// wstore.Client
type Client = WaveObj & {
mainwindowid: string;
2024-06-20 04:10:53 +02:00
windowids: string[];
2024-06-12 02:42:10 +02:00
meta: MetaType;
};
// wshrpc.CommandAppendIJsonData
type CommandAppendIJsonData = {
zoneid: string;
filename: string;
data: MetaType;
};
// wshrpc.CommandBlockInputData
type CommandBlockInputData = {
blockid: string;
inputdata64?: string;
signame?: string;
termsize?: TermSize;
};
// wshrpc.CommandBlockRestartData
type CommandBlockRestartData = {
blockid: string;
};
// wshrpc.CommandBlockSetViewData
type CommandBlockSetViewData = {
blockid: string;
view: string;
};
// wshrpc.CommandCreateBlockData
type CommandCreateBlockData = {
2024-06-21 19:23:04 +02:00
tabid: string;
blockdef: BlockDef;
rtopts: RuntimeOpts;
};
2024-07-19 03:13:59 +02:00
// wshrpc.CommandDeleteBlockData
type CommandDeleteBlockData = {
blockid: string;
};
// 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.CommandResolveIdsData
type CommandResolveIdsData = {
ids: string[];
};
// wshrpc.CommandResolveIdsRtnData
type CommandResolveIdsRtnData = {
resolvedids: {[key: string]: ORef};
};
// wshrpc.CommandSetMetaData
type CommandSetMetaData = {
oref: ORef;
meta: MetaType;
};
2024-06-12 02:42:10 +02:00
// wstore.FileDef
type FileDef = {
filetype?: string;
path?: string;
url?: string;
content?: string;
meta?: MetaType;
};
// fileservice.FileInfo
type FileInfo = {
path: 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;
};
// filestore.FileOptsType
type FileOptsType = {
maxsize?: number;
circular?: boolean;
ijson?: boolean;
ijsonbudget?: number;
};
2024-06-12 02:42:10 +02:00
// fileservice.FullFile
type FullFile = {
info: FileInfo;
data64: string;
};
// wstore.LayoutNode
type LayoutNode = WaveObj & {
node?: any;
magnifiednodeid?: string;
2024-06-12 02:42:10 +02:00
meta?: MetaType;
};
type MetaType = {[key: string]: any}
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-06-12 02:42:10 +02:00
// wstore.Point
type Point = {
x: number;
y: number;
};
// wshutil.RpcMessage
type RpcMessage = {
command?: string;
reqid?: string;
resid?: string;
timeout?: number;
cont?: boolean;
cancel?: boolean;
error?: string;
datatype?: string;
data?: any;
};
2024-06-12 02:42:10 +02:00
// wstore.RuntimeOpts
type RuntimeOpts = {
termsize?: TermSize;
winsize?: WinSize;
};
// webcmd.SetBlockTermSizeWSCommand
type SetBlockTermSizeWSCommand = {
wscommand: "setblocktermsize";
blockid: string;
termsize: TermSize;
};
// wconfig.SettingsConfigType
type SettingsConfigType = {
2024-06-24 23:34:31 +02:00
mimetypes: {[key: string]: MimeTypeConfigType};
term: TerminalConfigType;
ai: AiConfigType;
2024-06-24 23:34:31 +02:00
widgets: WidgetsConfigType[];
blockheader: BlockHeaderOpts;
autoupdate: AutoUpdateOpts;
termthemes: {[key: string]: TermThemeType};
window: WindowSettingsType;
};
// wstore.StickerClickOptsType
type StickerClickOptsType = {
sendinput?: string;
createblock?: BlockDef;
};
// wstore.StickerDisplayOptsType
type StickerDisplayOptsType = {
icon: string;
imgsrc: string;
svgblob?: string;
};
// wstore.StickerType
type StickerType = {
stickertype: string;
style: MetaType;
clickopts?: StickerClickOptsType;
display: StickerDisplayOptsType;
};
// wshrpc.SubscriptionRequest
type SubscriptionRequest = {
event: string;
scopes?: string[];
allscopes?: boolean;
};
2024-06-12 02:42:10 +02:00
// wstore.Tab
type Tab = WaveObj & {
name: string;
layoutnode: string;
2024-06-12 02:42:10 +02:00
blockids: string[];
meta: MetaType;
};
// shellexec.TermSize
type TermSize = {
rows: number;
cols: number;
};
// wconfig.TermThemeType
type TermThemeType = {
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;
};
// wconfig.TerminalConfigType
type TerminalConfigType = {
fontsize?: number;
fontfamily?: string;
};
2024-06-12 02:42:10 +02:00
// wstore.UIContext
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?: MetaType;
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;
};
// eventbus.WSLayoutActionData
type WSLayoutActionData = {
tabid: string;
actiontype: string;
blockid: string;
};
// webcmd.WSRpcCommand
type WSRpcCommand = {
wscommand: "rpc";
message: RpcMessage;
};
// wconfig.WatcherUpdate
type WatcherUpdate = {
settings: SettingsConfigType;
error: string;
};
// wshrpc.WaveEvent
type WaveEvent = {
event: string;
scopes?: string[];
sender?: string;
data?: any;
};
// filestore.WaveFile
type WaveFile = {
zoneid: string;
name: string;
opts: FileOptsType;
createdts: number;
size: number;
modts: number;
meta: MetaType;
};
2024-06-12 02:42:10 +02:00
// waveobj.WaveObj
type WaveObj = {
otype: string;
oid: string;
version: number;
};
// wstore.WaveObjUpdate
type WaveObjUpdate = {
updatetype: string;
otype: string;
oid: string;
obj?: WaveObj;
};
2024-06-20 04:10:53 +02:00
// wstore.Window
type WaveWindow = WaveObj & {
workspaceid: string;
activetabid: string;
activeblockid?: string;
activeblockmap: {[key: string]: string};
pos: Point;
winsize: WinSize;
lastfocusts: number;
meta: MetaType;
};
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[];
};
// wconfig.WidgetsConfigType
type WidgetsConfigType = {
icon: string;
color?: string;
label?: string;
description?: string;
blockdef: BlockDef;
};
2024-06-12 02:42:10 +02:00
// wstore.WinSize
type WinSize = {
width: number;
height: number;
};
// wconfig.WindowSettingsType
type WindowSettingsType = {
transparent: boolean;
blur: boolean;
opacity: number;
bgcolor: string;
};
2024-06-12 02:42:10 +02:00
// wstore.Workspace
type Workspace = WaveObj & {
name: string;
tabids: string[];
meta: MetaType;
};
// wshrpc.WshRpcCommandOpts
type WshRpcCommandOpts = {
timeout: number;
noresponse: boolean;
};
// wshrpc.WshServerCommandMeta
type WshServerCommandMeta = {
commandtype: string;
};
2024-06-12 02:42:10 +02:00
}
export {}