export type ApiMethod = 'get' | 'post'; export type PageKind = | 'home' | 'account' | 'article' | 'login' | 'resource' | 'form' | 'learning' | 'game' | 'product' | 'productList' | 'checkout' | 'order' | 'finance' | 'appointment' | 'courseCenter' | 'studyRecords' | 'team' | 'merchant' | 'webview' | 'support' | 'supportFeedback'; export interface ApiEnvelope { retcode: number; retmsg?: string; result: T; addon?: unknown; page?: { itemCount?: number; pageCount?: number; pageIndex?: number; pageSize?: number; [key: string]: unknown; }; } export interface AppUser { userId: number; userName?: string; honeyName?: string; userFace?: string; mobile?: string; groupId?: number; groupName?: string; purse?: number; point?: number; silverCoin?: number; [key: string]: unknown; } export interface ApiBinding { action: string; method?: ApiMethod; params?: Record; resultPath?: string; queryMap?: Record; } export interface FormField { key: string; label: string; type?: 'text' | 'password' | 'tel' | 'number' | 'email' | 'textarea' | 'select' | 'date' | 'file' | 'checkbox'; required?: boolean; placeholder?: string; options?: Array<{ label: string; value: string | number }>; } export interface PageAction { key?: string; label: string; action: string; method?: ApiMethod; tone?: 'primary' | 'danger' | 'quiet'; confirm?: string; fields?: FormField[]; scope?: 'page' | 'item'; params?: Record; when?: Record; success?: 'reload' | 'remove-item' | 'none'; } export interface PageMeta { path: string; title: string; domain: 'home' | 'shop' | 'learn' | 'history' | 'member' | 'support' | 'game' | 'system'; kind: PageKind; auth?: boolean; hideHeader?: boolean; hideBack?: boolean; hideTabbar?: boolean; api?: ApiBinding; fields?: FormField[]; saveAction?: string; deleteAction?: string; itemRoute?: string; queryKey?: string; emptyText?: string; description?: string; actions?: PageAction[]; tabs?: string[]; tabActions?: string[]; tabParams?: Array>; onLoadActions?: ApiBinding[]; } export interface NavItem { path: string; label: string; icon: string; roles?: number[]; }