polyv-live-cli
Version:
CLI tool for managing PolyV live streaming services.
234 lines • 5.4 kB
TypeScript
import { OutputFormat } from '../handlers/base.handler';
export interface KeyboardEvent {
key: string;
shift: boolean;
ctrl: boolean;
alt: boolean;
meta: boolean;
full?: string;
ch?: string;
}
export interface MouseEvent {
action: 'mousedown' | 'mouseup' | 'mousemove' | 'wheelup' | 'wheeldown';
x: number;
y: number;
button: 'left' | 'right' | 'middle';
shift: boolean;
ctrl: boolean;
}
export interface FocusState {
focused: boolean;
focusable: boolean;
tabIndex: number;
showFocusRing: boolean;
}
export interface FocusableComponent {
getId(): string;
getType(): string;
canFocus(): boolean;
focus(): void;
blur(): void;
getFocusState(): FocusState;
handleKeyboard(event: KeyboardEvent): boolean;
handleMouse(event: MouseEvent): boolean;
}
export interface ShortcutConfig {
key: string;
description: string;
action: string;
global: boolean;
context?: string;
}
export interface ContextMenuItem {
id: string;
label: string;
shortcut?: string;
enabled: boolean;
visible: boolean;
action: string;
submenu?: ContextMenuItem[];
separator?: boolean;
}
export interface SearchConfig {
placeholder: string;
caseSensitive: boolean;
mode: 'fuzzy' | 'exact' | 'contains';
searchFields: string[];
maxHistory: number;
showSuggestions: boolean;
}
export interface SearchResult {
id: string;
text: string;
score: number;
highlighted: string;
data?: any;
}
export interface PanelLayout {
name: string;
description: string;
default: boolean;
minTerminalSize: {
width: number;
height: number;
};
panels: PanelConfig[];
}
export interface PanelConfig {
id: string;
type: string;
position: {
x: number;
y: number;
width: number;
height: number;
};
visible: boolean;
minimizable: boolean;
maximizable: boolean;
movable: boolean;
resizable: boolean;
}
export interface StatusInfo {
connection: 'connected' | 'disconnected' | 'connecting' | 'error';
lastUpdate: Date;
memoryUsage: number;
cpuUsage: number;
currentOperation: string;
availableShortcuts: string[];
messages: Array<{
level: 'info' | 'warning' | 'error';
text: string;
}>;
}
export interface InteractionEvents {
'keyboard:event': KeyboardEvent;
'mouse:event': MouseEvent;
'focus:changed': {
previous?: string;
current?: string;
};
'shortcut:activated': {
key: string;
action: string;
};
'contextmenu:requested': {
x: number;
y: number;
context: string;
};
'search:query': {
query: string;
results: SearchResult[];
};
'layout:changed': {
previous: string;
current: string;
};
'panel:state': {
panelId: string;
state: 'minimized' | 'maximized' | 'normal';
};
}
export interface InteractionConfig {
mouseEnabled: boolean;
keyboardEnabled: boolean;
focusRing: {
enabled: boolean;
style: any;
};
shortcuts: ShortcutConfig[];
search: SearchConfig;
statusBar: {
enabled: boolean;
position: 'top' | 'bottom';
height: number;
};
}
export interface InteractionServiceConfig {
baseUrl: string;
timeout: number;
debug: boolean;
}
export interface InteractionFavorOptions {
channelId: string;
viewerId: string;
times?: number;
force?: boolean;
output?: OutputFormat;
}
export interface InteractionRewardOptions {
channelId: string;
nickname: string;
avatar: string;
viewerId: string;
donateType: string;
content: string;
goodImage?: string;
sessionId?: string;
goodNum?: string;
needUserImage?: 'Y' | 'N';
force?: boolean;
output?: OutputFormat;
}
export interface StudentQuestionWebhookGetOptions {
roomId?: string;
output?: OutputFormat;
}
export interface StudentQuestionWebhookSetOptions {
roomId: string;
callbackUrl: string;
force?: boolean;
output?: OutputFormat;
}
export interface StudentQuestionWebhookDeleteOptions {
roomId: string;
force?: boolean;
output?: OutputFormat;
}
export interface TeacherAnswerOptions {
roomId: string;
content: string;
viewerUserId: string;
teacherNick?: string;
teacherPic?: string;
msgType?: string;
force?: boolean;
output?: OutputFormat;
}
export interface SendFavorParams {
channelId: string;
viewerId: string;
times?: number;
}
export interface SendRewardMsgParams {
channelId: string;
nickname: string;
avatar: string;
viewerId: string;
donateType: string;
content: string;
goodImage?: string;
sessionId?: string;
goodNum?: string;
needUserImage?: 'Y' | 'N';
}
export interface GetStudentQuestionWebhookParams {
roomId?: string;
}
export interface SetStudentQuestionWebhookParams {
roomId: string;
callbackUrl: string;
}
export interface DeleteStudentQuestionWebhookParams {
roomId: string;
}
export interface SendTeacherAnswerParams {
roomId: string;
content: string;
viewerUserId: string;
teacherNick?: string;
teacherPic?: string;
msgType?: string;
}
//# sourceMappingURL=interaction.d.ts.map