kui-shell
Version:
This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool
68 lines (67 loc) • 2.41 kB
TypeScript
import { Table, MultiTable } from '../webapp/models/table';
import { CustomSpec } from '../webapp/views/sidecar';
import { SidecarMode } from '../webapp/bottom-stripe';
import { ToolbarText } from '../webapp/views/toolbar-text';
import { MultiModalResponse } from './mmr/types';
export interface EntitySpec {
type?: string;
kind?: string;
verb?: string;
viewName?: string;
isEntity?: boolean;
name?: string;
packageName?: string;
prettyName?: string;
prettyType?: string;
prettyKind?: string;
show?: string;
displayOptions?: string[];
controlHeaders?: boolean | string[];
uuid?: string;
sidecarHeader?: boolean;
modes?: SidecarMode[];
version?: string;
duration?: number;
namespace?: string;
annotations?: {
key: string;
value: any;
}[];
}
export interface MessageBearingEntity {
message: string;
}
export declare function isMessageBearingEntity(entity: Entity): entity is MessageBearingEntity;
export declare function isEntitySpec(entity: Entity): entity is EntitySpec;
export interface MetadataBearing<Content = void> {
kind?: string;
metadata?: {
name: string;
namespace?: string;
generation?: string;
creationTimestamp?: string;
};
version?: string;
prettyName?: string;
nameHash?: string;
content?: Content;
contentType?: string;
toolbarText?: ToolbarText;
spec?: {
displayName?: string;
};
}
export declare function isMetadataBearing(spec: Entity): spec is MetadataBearing;
export interface MetadataBearingByReference<Content = void> extends CustomSpec<Content> {
resource: MetadataBearing<Content>;
}
export declare function isMetadataBearingByReference(spec: Entity): spec is MetadataBearingByReference;
export declare type SimpleEntity = Error | string | number | HTMLElement | MessageBearingEntity;
export declare type MixedResponsePart = string | Table | MultiTable | HTMLElement;
export declare type MixedResponse = MixedResponsePart[];
export declare function isMixedResponse(response: Entity): response is MixedResponse;
export interface LowLevelLoop {
mode: 'prompt';
}
export declare function isLowLevelLoop(entity: Entity): entity is LowLevelLoop;
export declare type Entity = SimpleEntity | EntitySpec | CustomSpec | MixedResponse | MultiModalResponse | boolean | Table | MultiTable | LowLevelLoop;