/// /// import type { BinaryToTextEncoding } from "crypto"; interface Asset extends MimeTypeAction { uri?: string; } interface TextAsset extends Asset, LocationUri { content?: string; } interface ResourceAction extends TaskAction, WatchAction { wbnUri?: string; } interface MultipartAction { formData?: BlobValue; } interface BlobValue extends KeyValue { filename?: string; } interface BoxRect { top: T; right: T; bottom: T; left: T; } interface BoxRectDimension extends BoxRect, Dimension { numberOfLines?: number; overflow?: boolean; } export interface FileAsset extends TextAsset, OutputAction, DocumentAction, MultipartAction, ResourceAction, IncrementalAction, ChecksumAction { format?: StringOfArray; dataView?: NodeJS.ArrayBufferView; base64?: string; imported?: boolean | string[]; flags?: number; } export interface DataSource extends DocumentAction { source: string; uri?: string; index?: number; limit?: number; query?: T; postQuery?: string | FunctionType; preRender?: string | FunctionType; whenEmpty?: string | FunctionType; removeEmpty?: boolean; ignoreCache?: boolean | 0 | 1 | [number, number?, number?]; transactionState?: number; transactionFail?: boolean; } export interface DbDataSource extends DataSource { name?: string; table?: string; credential?: W; options?: U; update?: V; withCommand?: string | [string, string]; parallel?: boolean; willAbort?: boolean; streamRow?: Null Undef)>; usePool?: boolean | X; } export interface OutputAction { moveTo?: string; commands?: string[]; compress?: CompressFormat[]; willChange?: boolean; } export interface MimeTypeAction { mimeType?: string; } export interface TaskAction { tasks?: TaskCommand[]; } export interface WatchAction { watch?: WatchValue; } export interface BundleAction { bundleId?: NumString; bundleIndex?: number; bundleReplace?: T; bundleQueue?: Promise[]; trailingContent?: StringOfArray; exported?: boolean; } export interface ChecksumAction { checksum?: ChecksumValue; checksumOutput?: ChecksumValue; } export interface DocumentAction { document?: StringOfArray; encoding?: BufferEncoding; } export interface AttributeAction { attributes?: T; } export interface HashAction { hash?: string; } export interface TextAction { textContent?: string; } export interface ExcludeAction { exclude?: boolean; } export interface StorageAction { cloudStorage?: T[]; } export interface ElementAction { element?: T; } export interface MetadataAction { metadata?: T; } export interface ImportAction { imports?: T; } export interface IncrementalAction { incremental?: boolean | IncrementalMatch; } export interface FromAction { from?: string[]; } export interface TaskCommand { handler?: string; task?: string | T; preceding?: boolean; } export interface TagData { tagName: string; tagCount?: number; tagIndex?: number; } export interface TagAppend extends TagData, TextAction { order: number; id?: string; prepend?: boolean; nextSibling?: number; } export interface TagLocator { id: string; index?: number; count?: number; } export interface XmlNode extends AttributeAction { index?: number; outerXml?: string; innerXml?: string; dynamic?: string; ignoreCase?: boolean; } export interface XmlTagNode extends XmlNode, TagData, TextAction { id?: StringMap; locator?: TagLocator; append?: TagAppend; removed?: boolean; } export interface WebSocketClient { socketId?: string; port?: number; secure?: boolean; } export interface WebSocketConnection extends Required { expired: number; } export interface LocationUri { pathname: string; filename: string; } export interface ViewEngine { name?: string; singleRow?: boolean; outputEmpty?: boolean; options?: { compile?: PlainObject; output?: PlainObject; }; } export interface CompressLevel extends MimeTypeAction { algorithm?: string; level?: number; chunkSize?: number; } export interface CompressFormat extends CompressLevel { format?: string; condition?: string; plugin?: string; timeout?: number; options?: PlainObject & { apiKey?: string }; } export interface WatchInterval extends TaskBase { id?: string; main?: boolean; reload?: WatchReload; assets?: T[]; } export interface WatchReload extends WebSocketClient { module?: boolean; always?: boolean; } export interface WebSocketResponse { event?: string; socketId?: StringOfArray; type?: string; encoding?: BufferEncoding; value?: unknown; timeStamp?: number; status?: LogStatus[]; errors?: string[]; } export interface WatchResponse extends WebSocketResponse { event: "modified" | "broadcast" | WebSocketEvent; action?: string; url?: { pathname: string; search?: string; }; always?: boolean; } export interface BroadcastResponse extends WebSocketResponse { event: "broadcast" | WebSocketEvent; options?: unknown; } export interface FileInfo { name: string; size: NumString; } export interface RequestBase { baseUrl?: string; priority?: number; broadcastId?: StringOfArray; log?: boolean | StringOfArray | T; error?: { abort?: boolean | StringOfArray; fatal?: boolean }; ignoreExtensions?: boolean | StringOfArray; } export interface RequestData extends RequestBase, ImportAction, IncrementalAction { assets?: FileAsset[]; dataSource?: DataSource[]; document?: string[]; task?: string[]; modules?: string[]; update?: WatchInterval; checksum?: string | boolean | 1 | ChecksumOutput; cache?: boolean | AnyObject; } export interface LogStatus { name: string; type: T; value: string; timeStamp: number; from: string; sessionId: string; duration?: number; source?: string; } export interface ResponseData { success: boolean; data?: T; filename?: string; downloadKey?: string; downloadUrl?: string; bytes?: number; files?: FileInfo[] | string[]; status?: LogStatus[]; error?: ResponseError; } export interface ResponseError { message: string; hint?: string; } export interface RequestObserve extends WebSocketClient { action?: string; expires?: NumString; } export interface FinalizedElement { documentId: string; bounds: BoxRectDimension; css: PlainObject; outerWrapperIds?: string[]; } export interface ConditionProperty { conditionText: string; } export interface CssConditionData extends ConditionProperty { name?: string; conditionText: string; } export interface ControllerSettingsDirectoryUI { layout: string; string: string; font: string; image: string; video: string; audio: string; } export interface ChecksumBase { algorithm?: string; digest?: T; } export interface ChecksumOutput extends ChecksumBase { filename?: string; include?: StringOfArray; exclude?: StringOfArray; recursive?: boolean | 1; } export interface TaskBase { interval?: NumString; start?: NumString; expires?: NumString; } export type WebSocketEvent = "close" | "error"; export type IncrementalMatch = "none" | "staging" | "etag" | "exists"; export type TextEncoding = "utf-8" | "utf-16" | "utf-16be" | "utf-16le" | "latin1"; export type AttributeMap = ObjectMap; export type WatchValue = boolean | WatchInterval; export type ChecksumValue = string | ChecksumBase & { value?: string };