import { DeclFrontendApp, DeclComponent } from "../ir/decl/frontend.raw.schema.js"; export type RuntimeComponent = Omit & { field: (fieldName: string, type: string, label?: string, validators?: Record, config?: any) => void; prop: (key: string, value: string) => void; agentChat: (data: { title?: string; messages: Array<{ role: "user" | "agent"; label?: string; content: string; }>; }) => void; cliUsage: (data: { title?: string; command: string; options?: Array<{ flag: string; description: string; }>; }) => void; hero: (data: any) => void; features: (items: any[], opts?: any) => void; testimonials: (items: any[], opts?: any) => void; faq: (items: any[], opts?: any) => void; logos: (items: any[], opts?: any) => void; cta: (title: string, subtitle?: string, actions?: any[]) => void; stats: (items: any[], opts?: any) => void; timeline: (items: any[], opts?: any) => void; enableThemeToggle: () => void; code: (snippet: string, language?: string, options?: { showLineNumbers?: boolean; }) => void; table: (data: { resourceId?: string; operationId?: string; columns?: Array<{ header: string; accessor: string; render?: string; }>; }) => void; useMacro: (type: string, props?: Record) => void; }; type FrontendOptions = { basePath?: string; pwa?: DeclFrontendApp["pwa"]; auth?: DeclFrontendApp["auth"]; meta?: Record; policies?: Record; datasources?: DeclFrontendApp["datasources"]; operations?: DeclFrontendApp["operations"]; resources?: DeclFrontendApp["resources"]; requiredComponentKeys?: string[]; }; export declare function datasource(id: string, config: any): void; export declare function operation(id: string, config: any): void; export declare function resource(id: string, config: any): void; export declare function meta(key: string, value: unknown): void; export declare function policy(target: string, value: Record): void; export declare function requiredComponents(keys: string[]): void; export declare function page(pName: string, opts: { path: string; hideHeader?: boolean; description?: string; docsLayout?: boolean; docsGroupLabel?: string; }, cb?: (p: { component: (name: string, cb?: (c: RuntimeComponent) => void) => void; }) => void): void; export declare function component(name: string, cb: (c: RuntimeComponent) => void): void; type FrontendCallbackArgs = { page: typeof page; component: typeof component; datasource: typeof datasource; operation: typeof operation; resource: typeof resource; meta: typeof meta; policy: typeof policy; requiredComponents: typeof requiredComponents; }; export declare function frontend(name: string, optsOrFn: FrontendOptions | ((a: FrontendCallbackArgs) => void), maybeFn?: (a: FrontendCallbackArgs) => void): { type: "frontend"; name: string; operations: { path: string; id: string; method: "POST" | "PUT" | "PATCH" | "GET" | "DELETE" | "HEAD" | "OPTIONS"; datasourceId: string; response: { type: "text" | "json" | "html" | "blob"; envelopeAdapterId?: string | undefined; paginationAdapterId?: string | undefined; filenameHint?: string | undefined; }; pathParams?: any; query?: any; headers?: any; body?: { type: "text" | "none" | "json" | "multipart" | "formUrlEncoded"; accept?: string | undefined; build?: any; contentType?: string | undefined; } | undefined; resultHandling?: { invalidate?: ({ kind: "resourceList"; resourceId: string; } | { kind: "resourceDetail"; id: string; resourceId: string; } | { kind: "operation"; operationId: string; } | { kind: "custom"; key?: any; })[] | undefined; redirectTo?: any; openUrl?: any; downloadAs?: any; toastOnSuccess?: { kind: "success" | "info" | "warning" | "error"; message: string; } | undefined; toastOnError?: { kind: "success" | "info" | "warning" | "error"; message: string; } | undefined; } | undefined; requiresAuth?: boolean | undefined; requiredRoles?: string[] | undefined; }[]; meta: Record; components: { type: "component"; name: string; props?: Record | undefined; form?: { fields: { type: "number" | "date" | "text" | "select" | "textarea" | "checkbox" | "radio" | "datetime" | "time" | "url" | "phone" | "file" | "slider" | "currency" | "tags" | "signature" | "daterange" | "email" | "password"; name: string; options?: { value: string; label: string; }[] | undefined; label?: string | undefined; validators?: { custom?: { message?: string | undefined; logic?: any; }[] | undefined; required?: boolean | undefined; requiredIf?: any; min?: number | undefined; max?: number | undefined; minDate?: string | undefined; maxDate?: string | undefined; minLength?: number | undefined; maxLength?: number | undefined; pattern?: string | undefined; format?: "url" | "email" | undefined; equalsField?: string | undefined; notEqualsField?: string | undefined; greaterThanField?: string | undefined; lessThanField?: string | undefined; uniqueIn?: string[] | undefined; } | undefined; placeholder?: string | undefined; description?: string | undefined; icon?: string | undefined; dataSource?: { url: string; labelKey: string; valueKey: string; searchParam?: string | undefined; pageParam?: string | undefined; pageSizeParam?: string | undefined; pageSize?: number | undefined; debounceMs?: number | undefined; } | undefined; visibleIf?: any; disabledIf?: any; defaultValue?: any; computeValue?: any; multiple?: boolean | undefined; prefix?: string | undefined; suffix?: string | undefined; tooltip?: string | undefined; searchPlaceholder?: string | undefined; clearable?: boolean | undefined; ariaLabel?: string | undefined; accept?: string | undefined; step?: number | undefined; defaultCurrency?: string | undefined; helpHtml?: string | undefined; className?: string | undefined; }[]; submit?: { url?: string | undefined; label?: string | undefined; operationId?: string | undefined; method?: "POST" | "PUT" | "PATCH" | undefined; successMessage?: string | undefined; errorMessage?: string | undefined; confirmMessage?: string | undefined; beforeSubmit?: any; afterSubmit?: any; onSuccess?: any; onError?: any; redirect?: string | undefined; } | undefined; load?: { operationId: string; onSuccess?: any; onError?: any; args?: any; when?: any; mapFields?: Record | undefined; } | undefined; } | undefined; entityRef?: string | undefined; content?: string | undefined; agentChat?: { messages: { role: "user" | "agent"; content: string; label?: string | undefined; }[]; title?: string | undefined; } | undefined; cliUsage?: { command: string; options?: { description: string; flag: string; }[] | undefined; title?: string | undefined; } | undefined; layout?: { kind: "row" | "column" | "panel" | "tabs"; title?: string | undefined; items?: string[] | undefined; tabs?: { label: string; items?: string[] | undefined; content?: string | undefined; }[] | undefined; columns?: number | undefined; } | undefined; button?: { label: string; icon?: string | undefined; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; variant?: "primary" | "secondary" | "ghost" | undefined; } | undefined; table?: { operationId?: string | undefined; columns?: { header: string; accessor: string; render?: string | undefined; }[] | undefined; resourceId?: string | undefined; rowNavigateTo?: string | undefined; rowActions?: { label: string; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; }[] | undefined; } | undefined; themeToggle?: boolean | undefined; codeBlock?: { snippet: string; language: string; showLineNumbers: boolean; } | undefined; macro?: string | undefined; marketing?: { kind: "hero" | "features" | "testimonials" | "faq" | "logos" | "cta" | "stats" | "timeline"; align?: "left" | "center" | undefined; title?: string | undefined; subtitle?: string | undefined; items?: { value?: string | undefined; label?: string | undefined; description?: string | undefined; icon?: string | undefined; title?: string | undefined; image?: string | undefined; author?: string | undefined; role?: string | undefined; }[] | undefined; actions?: { label: string; icon?: string | undefined; href?: string | undefined; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; variant?: "primary" | "secondary" | "ghost" | undefined; }[] | undefined; badge?: string | undefined; } | undefined; }[]; basePath: string; pages: { path: string; type: "page"; name: string; components: { type: "component"; name: string; props?: Record | undefined; form?: { fields: { type: "number" | "date" | "text" | "select" | "textarea" | "checkbox" | "radio" | "datetime" | "time" | "url" | "phone" | "file" | "slider" | "currency" | "tags" | "signature" | "daterange" | "email" | "password"; name: string; options?: { value: string; label: string; }[] | undefined; label?: string | undefined; validators?: { custom?: { message?: string | undefined; logic?: any; }[] | undefined; required?: boolean | undefined; requiredIf?: any; min?: number | undefined; max?: number | undefined; minDate?: string | undefined; maxDate?: string | undefined; minLength?: number | undefined; maxLength?: number | undefined; pattern?: string | undefined; format?: "url" | "email" | undefined; equalsField?: string | undefined; notEqualsField?: string | undefined; greaterThanField?: string | undefined; lessThanField?: string | undefined; uniqueIn?: string[] | undefined; } | undefined; placeholder?: string | undefined; description?: string | undefined; icon?: string | undefined; dataSource?: { url: string; labelKey: string; valueKey: string; searchParam?: string | undefined; pageParam?: string | undefined; pageSizeParam?: string | undefined; pageSize?: number | undefined; debounceMs?: number | undefined; } | undefined; visibleIf?: any; disabledIf?: any; defaultValue?: any; computeValue?: any; multiple?: boolean | undefined; prefix?: string | undefined; suffix?: string | undefined; tooltip?: string | undefined; searchPlaceholder?: string | undefined; clearable?: boolean | undefined; ariaLabel?: string | undefined; accept?: string | undefined; step?: number | undefined; defaultCurrency?: string | undefined; helpHtml?: string | undefined; className?: string | undefined; }[]; submit?: { url?: string | undefined; label?: string | undefined; operationId?: string | undefined; method?: "POST" | "PUT" | "PATCH" | undefined; successMessage?: string | undefined; errorMessage?: string | undefined; confirmMessage?: string | undefined; beforeSubmit?: any; afterSubmit?: any; onSuccess?: any; onError?: any; redirect?: string | undefined; } | undefined; load?: { operationId: string; onSuccess?: any; onError?: any; args?: any; when?: any; mapFields?: Record | undefined; } | undefined; } | undefined; entityRef?: string | undefined; content?: string | undefined; agentChat?: { messages: { role: "user" | "agent"; content: string; label?: string | undefined; }[]; title?: string | undefined; } | undefined; cliUsage?: { command: string; options?: { description: string; flag: string; }[] | undefined; title?: string | undefined; } | undefined; layout?: { kind: "row" | "column" | "panel" | "tabs"; title?: string | undefined; items?: string[] | undefined; tabs?: { label: string; items?: string[] | undefined; content?: string | undefined; }[] | undefined; columns?: number | undefined; } | undefined; button?: { label: string; icon?: string | undefined; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; variant?: "primary" | "secondary" | "ghost" | undefined; } | undefined; table?: { operationId?: string | undefined; columns?: { header: string; accessor: string; render?: string | undefined; }[] | undefined; resourceId?: string | undefined; rowNavigateTo?: string | undefined; rowActions?: { label: string; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; }[] | undefined; } | undefined; themeToggle?: boolean | undefined; codeBlock?: { snippet: string; language: string; showLineNumbers: boolean; } | undefined; macro?: string | undefined; marketing?: { kind: "hero" | "features" | "testimonials" | "faq" | "logos" | "cta" | "stats" | "timeline"; align?: "left" | "center" | undefined; title?: string | undefined; subtitle?: string | undefined; items?: { value?: string | undefined; label?: string | undefined; description?: string | undefined; icon?: string | undefined; title?: string | undefined; image?: string | undefined; author?: string | undefined; role?: string | undefined; }[] | undefined; actions?: { label: string; icon?: string | undefined; href?: string | undefined; onClick?: { kind: "invoke"; operationId: string; confirmMessage?: string | undefined; args?: any; } | { kind: "navigate"; confirmMessage?: string | undefined; to?: any; } | undefined; variant?: "primary" | "secondary" | "ghost" | undefined; }[] | undefined; badge?: string | undefined; } | undefined; }[]; description?: string | undefined; hideHeader?: boolean | undefined; docsLayout?: boolean | undefined; docsGroupLabel?: string | undefined; }[]; datasources: { id: string; baseUrl: string; defaultHeaders?: Record | undefined; withCredentials?: boolean | undefined; timeoutMs?: number | undefined; authStrategyId?: string | undefined; csrfStrategyId?: string | undefined; capabilities?: { supportsCookies?: boolean | undefined; supportsCsrf?: boolean | undefined; supportsMultipart?: boolean | undefined; supportsStreaming?: boolean | undefined; } | undefined; }[]; resources: { id: string; datasourceId: string; idField?: string | undefined; listOpId?: string | undefined; getOpId?: string | undefined; createOpId?: string | undefined; updateOpId?: string | undefined; deleteOpId?: string | undefined; }[]; pwa?: { enabled: boolean; name?: string | undefined; description?: string | undefined; shortName?: string | undefined; startUrl?: string | undefined; scope?: string | undefined; display?: string | undefined; backgroundColor?: string | undefined; themeColor?: string | undefined; orientation?: string | undefined; icons?: { type: string; src: string; sizes: string; purpose?: string | undefined; }[] | undefined; } | undefined; auth?: { enabled?: boolean | undefined; loginPath?: string | undefined; meOperationId?: string | undefined; logoutOperationId?: string | undefined; hideLoginWhenAuthed?: boolean | undefined; } | undefined; requiredComponentKeys?: string[] | undefined; }; export declare function loadFrontendDsl(entry: string): Promise; export {};