declare module '@webrad/runtime' { export function normalizeLabelTextWrap(value: unknown): WebLabelTextWrap; export function projectLabelTextWrap(value: WebLabelTextWrap): { whiteSpace: 'nowrap' | 'pre-wrap'; overflowWrap: 'normal' | 'anywhere'; wordBreak: 'normal' | 'break-all'; }; export const Sucess: 'Sucess'; export const Alert: 'Alert'; export const Danger: 'Danger'; export const Notifier: 'Notifier'; export type WebToastState = typeof Sucess | typeof Alert | typeof Danger | typeof Notifier; export type WebToastPosition = 'top-left' | 'top-center' | 'top-right' | 'middle-left' | 'middle-center' | 'middle-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; export interface WebToastEventDetail { readonly message: string; readonly state: WebToastState; } export class WebToast extends WebComponent { duration: number; position: WebToastPosition; sucessIcon: WebButtonIcon | ''; alertIcon: WebButtonIcon | ''; dangerIcon: WebButtonIcon | ''; notifierIcon: WebButtonIcon | ''; Success(message: string): void; Alert(message: string): void; Danger(message: string): void; Notifier(message: string): void; Clear(): void; set onShow(handler: WebComponentEventHandler | null); set onClose(handler: WebComponentEventHandler | null); } export type LucideIconName = 'a-arrow-down' | 'a-arrow-up' | 'a-large-small' | 'accessibility' | 'activity' | 'ad' | 'air-vent' | 'airplay' | 'alarm-clock-check' | 'alarm-clock-minus' | 'alarm-clock-off' | 'alarm-clock-plus' | 'alarm-clock' | 'alarm-smoke' | 'align-center-horizontal' | 'align-center-vertical' | 'align-end-horizontal' | 'align-end-vertical' | 'align-horizontal-distribute-center' | 'align-horizontal-distribute-end' | 'align-horizontal-distribute-start' | 'align-horizontal-justify-center' | 'align-horizontal-justify-end' | 'align-horizontal-justify-start' | 'align-horizontal-space-around' | 'align-horizontal-space-between' | 'align-start-horizontal' | 'align-start-vertical' | 'align-vertical-distribute-center' | 'align-vertical-distribute-end' | 'align-vertical-distribute-start' | 'align-vertical-justify-center' | 'align-vertical-justify-end' | 'align-vertical-justify-start' | 'align-vertical-space-around' | 'align-vertical-space-between' | 'ambulance' | 'ampersand' | 'ampersands' | 'amphora' | 'anchor' | 'angle' | 'antenna' | 'anvil' | 'aperture' | 'app-window-mac' | 'app-window' | 'apple' | 'archive-restore' | 'archive-x' | 'archive' | 'armchair' | 'armenian-dram' | 'arrow-big-down-dash' | 'arrow-big-down' | 'arrow-big-left-dash' | 'arrow-big-left' | 'arrow-big-right-dash' | 'arrow-big-right' | 'arrow-big-up-dash' | 'arrow-big-up' | 'arrow-down-0-1' | 'arrow-down-1-0' | 'arrow-down-a-z' | 'arrow-down-from-line' | 'arrow-down-left' | 'arrow-down-narrow-wide' | 'arrow-down-right' | 'arrow-down-to-dot' | 'arrow-down-to-line' | 'arrow-down-up' | 'arrow-down-wide-narrow' | 'arrow-down-z-a' | 'arrow-down' | 'arrow-left-from-line' | 'arrow-left-right' | 'arrow-left-to-line' | 'arrow-left' | 'arrow-right-from-line' | 'arrow-right-left' | 'arrow-right-to-line' | 'arrow-right' | 'arrow-up-0-1' | 'arrow-up-1-0' | 'arrow-up-a-z' | 'arrow-up-down' | 'arrow-up-from-dot' | 'arrow-up-from-line' | 'arrow-up-left' | 'arrow-up-narrow-wide' | 'arrow-up-right' | 'arrow-up-to-line' | 'arrow-up-wide-narrow' | 'arrow-up-z-a' | 'arrow-up' | 'arrows-up-from-line' | 'asterisk' | 'astroid' | 'at-sign' | 'atom' | 'audio-lines-off' | 'audio-lines-x' | 'audio-lines' | 'audio-waveform' | 'avocado' | 'award' | 'axe' | 'axis-3d' | 'baby' | 'backpack' | 'bacon' | 'badge-alert' | 'badge-cent' | 'badge-check' | 'badge-dollar-sign' | 'badge-euro' | 'badge-indian-rupee' | 'badge-info' | 'badge-japanese-yen' | 'badge-minus' | 'badge-percent' | 'badge-plus' | 'badge-pound-sterling' | 'badge-question-mark' | 'badge-russian-ruble' | 'badge-swiss-franc' | 'badge-turkish-lira' | 'badge-x' | 'badge' | 'baggage-claim' | 'balloon' | 'ban' | 'banana' | 'bandage' | 'bangladeshi-taka' | 'banknote-arrow-down' | 'banknote-arrow-up' | 'banknote-check' | 'banknote-x' | 'banknote' | 'barcode' | 'barrel' | 'baseline' | 'bath' | 'battery-charging' | 'battery-full' | 'battery-low' | 'battery-medium' | 'battery-plus' | 'battery-warning' | 'battery' | 'beaker' | 'bean-off' | 'bean' | 'bed-double' | 'bed-single' | 'bed' | 'beef-off' | 'beef' | 'beer-off' | 'beer' | 'belarusian-ruble' | 'bell-check' | 'bell-dot' | 'bell-electric' | 'bell-minus' | 'bell-off' | 'bell-plus' | 'bell-ring' | 'bell' | 'between-horizontal-end' | 'between-horizontal-start' | 'between-vertical-end' | 'between-vertical-start' | 'biceps-flexed' | 'bike' | 'binary' | 'binoculars' | 'biohazard' | 'bird' | 'birdhouse' | 'bitcoin' | 'blend' | 'blender' | 'blinds' | 'blocks' | 'bluetooth-connected' | 'bluetooth-off' | 'bluetooth-searching' | 'bluetooth' | 'bold' | 'bolt' | 'bomb' | 'bone-fracture' | 'bone' | 'book-a' | 'book-alert' | 'book-audio' | 'book-bookmark' | 'book-check' | 'book-copy' | 'book-dashed' | 'book-down' | 'book-headphones' | 'book-heart' | 'book-image' | 'book-key' | 'book-lock' | 'book-minus' | 'book-open-check' | 'book-open-text' | 'book-open' | 'book-plus' | 'book-search' | 'book-text' | 'book-type' | 'book-up-2' | 'book-up' | 'book-user' | 'book-x' | 'book' | 'bookmark-check' | 'bookmark-minus' | 'bookmark-off' | 'bookmark-plus' | 'bookmark-x' | 'bookmark' | 'boom-box' | 'bot-message-square' | 'bot-off' | 'bot' | 'bottle-wine' | 'bow-arrow' | 'box' | 'boxes' | 'braces' | 'brackets' | 'brain-circuit' | 'brain-cog' | 'brain-off' | 'brain' | 'brick-wall-fire' | 'brick-wall-shield' | 'brick-wall' | 'bridge' | 'briefcase-business' | 'briefcase-conveyor-belt' | 'briefcase-medical' | 'briefcase-plus' | 'briefcase' | 'bring-to-front' | 'broccoli' | 'broom-sparkles' | 'broom' | 'brush-cleaning' | 'brush' | 'bubbles' | 'bug-off' | 'bug-play' | 'bug' | 'building-complex-plus' | 'building-complex' | 'building' | 'bus-front' | 'bus' | 'cable-car' | 'cable' | 'cake-slice' | 'cake' | 'calculator' | 'calendar-1' | 'calendar-arrow-down' | 'calendar-arrow-up' | 'calendar-check-2' | 'calendar-check' | 'calendar-chevrons-left' | 'calendar-chevrons-right' | 'calendar-clock' | 'calendar-cog' | 'calendar-days' | 'calendar-fold' | 'calendar-heart' | 'calendar-minus-2' | 'calendar-minus' | 'calendar-off' | 'calendar-plus-2' | 'calendar-plus' | 'calendar-range' | 'calendar-search' | 'calendar-sync' | 'calendar-x-2' | 'calendar-x' | 'calendar' | 'calendars' | 'camera-off' | 'camera' | 'can-soda' | 'can' | 'candy-cane' | 'candy-off' | 'candy' | 'cannabis-off' | 'cannabis' | 'captions-off' | 'captions' | 'car-battery' | 'car-front' | 'car-taxi-front' | 'car' | 'caravan' | 'card-sim' | 'carrot' | 'carton-off' | 'carton' | 'case-lower' | 'case-sensitive' | 'case-upper' | 'cassette-tape' | 'cast' | 'castle' | 'cat' | 'cctv-off' | 'cctv' | 'certificate' | 'chart-area' | 'chart-bar-big' | 'chart-bar-decreasing' | 'chart-bar-increasing' | 'chart-bar-stacked' | 'chart-bar' | 'chart-candlestick' | 'chart-column-big' | 'chart-column-decreasing' | 'chart-column-increasing' | 'chart-column-stacked' | 'chart-column' | 'chart-gantt' | 'chart-line' | 'chart-network' | 'chart-no-axes-column-decreasing' | 'chart-no-axes-column-increasing' | 'chart-no-axes-column' | 'chart-no-axes-combined' | 'chart-no-axes-gantt' | 'chart-pie' | 'chart-scatter' | 'chart-spline' | 'check-check' | 'check-line' | 'check' | 'chef-hat' | 'cherry' | 'chess-bishop' | 'chess-king' | 'chess-knight' | 'chess-pawn' | 'chess-queen' | 'chess-rook' | 'chevron-down' | 'chevron-first' | 'chevron-last' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-down-up' | 'chevrons-down' | 'chevrons-left-right-ellipsis' | 'chevrons-left-right' | 'chevrons-left' | 'chevrons-right-left' | 'chevrons-right' | 'chevrons-up-down' | 'chevrons-up' | 'church' | 'cigarette-off' | 'cigarette' | 'circle-alert' | 'circle-arrow-down' | 'circle-arrow-left' | 'circle-arrow-out-down-left' | 'circle-arrow-out-down-right' | 'circle-arrow-out-up-left' | 'circle-arrow-out-up-right' | 'circle-arrow-right' | 'circle-arrow-up' | 'circle-check-big' | 'circle-check' | 'circle-chevron-down' | 'circle-chevron-left' | 'circle-chevron-right' | 'circle-chevron-up' | 'circle-chevrons-down' | 'circle-chevrons-left' | 'circle-chevrons-right' | 'circle-chevrons-up' | 'circle-dashed-check' | 'circle-dashed' | 'circle-divide' | 'circle-dollar-sign' | 'circle-dot-dashed' | 'circle-dot' | 'circle-ellipsis' | 'circle-equal' | 'circle-euro' | 'circle-fading-arrow-up' | 'circle-fading-play' | 'circle-fading-plus' | 'circle-gauge' | 'circle-minus' | 'circle-off' | 'circle-parking-off' | 'circle-parking' | 'circle-pause' | 'circle-percent' | 'circle-pile' | 'circle-play' | 'circle-plus' | 'circle-pound-sterling' | 'circle-power' | 'circle-question-mark' | 'circle-slash-2' | 'circle-slash' | 'circle-small' | 'circle-star' | 'circle-stop' | 'circle-user-round' | 'circle-user' | 'circle-x' | 'circle' | 'circuit-board' | 'citrus' | 'clapperboard' | 'clef-alto' | 'clef-bass' | 'clef-treble' | 'clipboard-check' | 'clipboard-clock' | 'clipboard-copy' | 'clipboard-list' | 'clipboard-minus' | 'clipboard-paste' | 'clipboard-pen-line' | 'clipboard-pen' | 'clipboard-plus' | 'clipboard-type' | 'clipboard-x' | 'clipboard' | 'clock-1' | 'clock-10' | 'clock-11' | 'clock-12' | 'clock-2' | 'clock-3' | 'clock-4' | 'clock-5' | 'clock-6' | 'clock-7' | 'clock-8' | 'clock-9' | 'clock-alert' | 'clock-arrow-down' | 'clock-arrow-left' | 'clock-arrow-right' | 'clock-arrow-up' | 'clock-check' | 'clock-fading' | 'clock-plus' | 'clock' | 'closed-caption' | 'cloud-alert' | 'cloud-backup' | 'cloud-check' | 'cloud-cog' | 'cloud-download' | 'cloud-drizzle' | 'cloud-fog' | 'cloud-hail' | 'cloud-lightning' | 'cloud-moon-rain' | 'cloud-moon' | 'cloud-off' | 'cloud-rain-wind' | 'cloud-rain' | 'cloud-snow' | 'cloud-sun-rain' | 'cloud-sun' | 'cloud-sync' | 'cloud-upload' | 'cloud' | 'cloudy' | 'clover' | 'club' | 'code-xml' | 'code' | 'coffee' | 'cog' | 'coins' | 'columns-2' | 'columns-3-cog' | 'columns-3' | 'columns-4' | 'combine' | 'command' | 'compass' | 'component' | 'computer' | 'concierge-bell' | 'cone' | 'construction' | 'contact-round' | 'contact' | 'container' | 'contrast' | 'cookie' | 'cooking-pot' | 'copy-check' | 'copy-minus' | 'copy-plus' | 'copy-slash' | 'copy-x' | 'copy' | 'copyleft' | 'copyright' | 'corner-down-left' | 'corner-down-right' | 'corner-left-down' | 'corner-left-up' | 'corner-right-down' | 'corner-right-up' | 'corner-up-left' | 'corner-up-right' | 'cpu-ai' | 'cpu' | 'creative-commons' | 'credit-card-check' | 'credit-card-minus' | 'credit-card-plus' | 'credit-card-reader' | 'credit-card-x' | 'credit-card' | 'croissant' | 'crop' | 'cross' | 'crosshair' | 'crown' | 'cuboid' | 'cup-soda' | 'cupcake' | 'currency' | 'cylinder' | 'dam' | 'database-arrow-down' | 'database-arrow-up' | 'database-backup' | 'database-check' | 'database-minus' | 'database-plus' | 'database-search' | 'database-x' | 'database-zap' | 'database' | 'decimals-arrow-left' | 'decimals-arrow-right' | 'delete' | 'dessert' | 'diameter' | 'diamond-minus' | 'diamond-percent' | 'diamond-plus' | 'diamond' | 'dice-1' | 'dice-2' | 'dice-3' | 'dice-4' | 'dice-5' | 'dice-6' | 'dices' | 'diff' | 'disc-2' | 'disc-3' | 'disc-album' | 'disc' | 'divide' | 'dna-off' | 'dna' | 'dock' | 'dog' | 'dollar-sign' | 'dome' | 'donut' | 'door-closed-cog' | 'door-closed-locked' | 'door-closed-package' | 'door-closed' | 'door-open' | 'door-stairwell' | 'dot' | 'download' | 'drafting-compass' | 'drama' | 'drill' | 'drone' | 'droplet-off' | 'droplet' | 'droplets' | 'drum' | 'drumstick' | 'dumbbell' | 'ear-off' | 'ear' | 'earth-lock' | 'earth' | 'eclipse' | 'egg-fried' | 'egg-off' | 'egg' | 'eighth-note' | 'eighth-notes' | 'eject' | 'ellipse' | 'ellipsis-vertical' | 'ellipsis' | 'engine' | 'equal-approximately-not' | 'equal-approximately' | 'equal-not' | 'equal' | 'eraser' | 'ethernet-port' | 'euro' | 'ev-charger' | 'expand' | 'external-link' | 'eye-closed' | 'eye-dashed' | 'eye-off' | 'eye' | 'face-angry' | 'face-expressionless' | 'face-grinning' | 'face-neutral' | 'face-slightly-frowning' | 'face-slightly-smiling-plus' | 'face-slightly-smiling' | 'factory' | 'fan' | 'fast-forward' | 'faucet' | 'feather' | 'fence' | 'ferris-wheel' | 'file-archive' | 'file-axis-3d' | 'file-badge' | 'file-box' | 'file-braces-corner' | 'file-braces' | 'file-chart-column-increasing' | 'file-chart-column' | 'file-chart-line' | 'file-chart-pie' | 'file-check-corner' | 'file-check' | 'file-clock' | 'file-code-corner' | 'file-code' | 'file-cog' | 'file-diff' | 'file-digit' | 'file-down' | 'file-exclamation-point' | 'file-headphone' | 'file-heart' | 'file-image' | 'file-input' | 'file-key' | 'file-lock' | 'file-minus-corner' | 'file-minus' | 'file-music' | 'file-output' | 'file-pen-line' | 'file-pen' | 'file-play' | 'file-plus-corner' | 'file-plus' | 'file-question-mark' | 'file-scan' | 'file-search-corner' | 'file-search' | 'file-signal' | 'file-sliders' | 'file-spreadsheet' | 'file-stack' | 'file-symlink' | 'file-terminal' | 'file-text' | 'file-type-corner' | 'file-type' | 'file-up' | 'file-user' | 'file-video-camera' | 'file-volume' | 'file-x-corner' | 'file-x' | 'file' | 'files' | 'film' | 'fingerprint-pattern' | 'fire-extinguisher' | 'fish-off' | 'fish-symbol' | 'fish' | 'fishing-hook' | 'fishing-rod' | 'flag-off' | 'flag-triangle-left' | 'flag-triangle-right' | 'flag' | 'flame-kindling' | 'flame' | 'flashlight-off' | 'flashlight' | 'flask-conical-off' | 'flask-conical' | 'flask-round' | 'flower-2' | 'flower' | 'focus' | 'fold-horizontal' | 'fold-vertical' | 'folder-archive' | 'folder-bookmark' | 'folder-check' | 'folder-clock' | 'folder-closed' | 'folder-code' | 'folder-cog' | 'folder-dot' | 'folder-down' | 'folder-git-2' | 'folder-git' | 'folder-heart' | 'folder-input' | 'folder-kanban' | 'folder-key' | 'folder-lock' | 'folder-minus' | 'folder-open-dot' | 'folder-open' | 'folder-output' | 'folder-pen' | 'folder-plus' | 'folder-root' | 'folder-search-2' | 'folder-search' | 'folder-symlink' | 'folder-sync' | 'folder-tree' | 'folder-up' | 'folder-user' | 'folder-users' | 'folder-x' | 'folder' | 'folders' | 'footprints' | 'forklift' | 'form' | 'forward' | 'frame' | 'fuel' | 'fullscreen' | 'funnel-plus' | 'funnel-x' | 'funnel' | 'galaxy' | 'gallery-horizontal-end' | 'gallery-horizontal' | 'gallery-thumbnails' | 'gallery-vertical-end' | 'gallery-vertical' | 'gamepad-2' | 'gamepad-directional' | 'gamepad' | 'gap-horizontal' | 'gap-vertical' | 'gauge' | 'gavel' | 'gem' | 'georgian-lari' | 'germ-off' | 'germ' | 'ghost' | 'gift' | 'git-branch-minus' | 'git-branch-plus' | 'git-branch' | 'git-commit-horizontal' | 'git-commit-vertical' | 'git-compare-arrows' | 'git-compare' | 'git-fork' | 'git-graph' | 'git-merge-conflict' | 'git-merge' | 'git-pull-request-arrow' | 'git-pull-request-closed' | 'git-pull-request-create-arrow' | 'git-pull-request-create' | 'git-pull-request-draft' | 'git-pull-request' | 'glass-water' | 'glasses' | 'globe-check' | 'globe-code' | 'globe-lock' | 'globe-off' | 'globe-x' | 'globe' | 'goal' | 'gpu' | 'graduation-cap' | 'grape' | 'graph-hub' | 'graph-star' | 'grid-2x2-check' | 'grid-2x2-plus' | 'grid-2x2-x' | 'grid-2x2' | 'grid-3x2' | 'grid-3x3' | 'grip-horizontal' | 'grip-vertical' | 'grip' | 'groceries' | 'group' | 'guitar-electric' | 'guitar' | 'half-note' | 'ham' | 'hamburger' | 'hammer' | 'hand-coins' | 'hand-fist' | 'hand-grab' | 'hand-heart' | 'hand-helping' | 'hand-metal' | 'hand-platter' | 'hand' | 'handbag' | 'handle-bottom-right' | 'handshake' | 'hard-drive-download' | 'hard-drive-upload' | 'hard-drive' | 'hard-hat' | 'hash' | 'hat-glasses' | 'haze' | 'hd' | 'hdmi-port' | 'heading-1' | 'heading-2' | 'heading-3' | 'heading-4' | 'heading-5' | 'heading-6' | 'heading' | 'headphone-off' | 'headphones' | 'headset' | 'heart-crack' | 'heart-handshake' | 'heart-minus' | 'heart-off' | 'heart-plus' | 'heart-pulse' | 'heart-x' | 'heart' | 'heater' | 'helicopter' | 'hexagon' | 'highlighter' | 'hiking-stick' | 'hop-off' | 'hop' | 'hospital' | 'hotel' | 'hourglass-cog' | 'hourglass' | 'house-cog' | 'house-heart' | 'house-plug' | 'house-plus' | 'house-wifi' | 'house' | 'houses' | 'ice-cream-bowl' | 'ice-cream-cone' | 'id-card-lanyard' | 'id-card' | 'image-down' | 'image-minus' | 'image-off' | 'image-play' | 'image-plus' | 'image-up' | 'image-upscale' | 'image' | 'images' | 'import' | 'inbox' | 'indian-rupee' | 'infinity' | 'info' | 'inspection-panel' | 'italic' | 'iteration-ccw' | 'iteration-cw' | 'iv-bag' | 'japanese-yen' | 'joystick' | 'kanban' | 'kayak' | 'kazakh-tenge' | 'key-round' | 'key-square' | 'key' | 'keyboard-music' | 'keyboard-off' | 'keyboard' | 'lambda' | 'lamp-ceiling' | 'lamp-desk' | 'lamp-floor' | 'lamp-wall-down' | 'lamp-wall-up' | 'lamp' | 'land-plot' | 'landmark' | 'languages' | 'laptop-minimal-check' | 'laptop-minimal' | 'laptop' | 'lasso-select' | 'lasso' | 'layer-arrow-down' | 'layer-arrow-up' | 'layers-2' | 'layers-arrow-down' | 'layers-arrow-up' | 'layers-minus' | 'layers-plus' | 'layers' | 'layout-arrow-down' | 'layout-arrow-right' | 'layout-dashboard' | 'layout-freeform' | 'layout-grid-circles' | 'layout-grid' | 'layout-list' | 'layout-panel-left' | 'layout-panel-top' | 'layout-template' | 'leaf' | 'leafy-green' | 'lectern' | 'lens-concave' | 'lens-convex' | 'lens' | 'letter-spacing' | 'letters' | 'library-big' | 'library' | 'life-buoy' | 'ligature' | 'lightbulb-off' | 'lightbulb' | 'lighthouse' | 'line-dot-bottom-vertical' | 'line-dot-left-horizontal' | 'line-dot-right-horizontal' | 'line-dot-top-vertical' | 'line-height' | 'line-squiggle' | 'line-style' | 'link-2-off' | 'link-2' | 'link' | 'list-check' | 'list-checks' | 'list-chevrons-down-up' | 'list-chevrons-up-down' | 'list-clock' | 'list-collapse' | 'list-end' | 'list-filter-plus' | 'list-filter' | 'list-indent-decrease' | 'list-indent-increase' | 'list-minus' | 'list-music' | 'list-ordered' | 'list-plus' | 'list-restart' | 'list-sort-ascending' | 'list-sort-descending' | 'list-start' | 'list-todo' | 'list-tree' | 'list-video' | 'list-x' | 'list' | 'loader-circle' | 'loader-pinwheel' | 'loader' | 'locate-fixed' | 'locate-off' | 'locate' | 'lock-keyhole-open' | 'lock-keyhole' | 'lock-open' | 'lock' | 'log-in' | 'log-out' | 'logs' | 'lollipop' | 'luggage' | 'magnet' | 'mail-badge' | 'mail-check' | 'mail-clock' | 'mail-dot' | 'mail-minus' | 'mail-open' | 'mail-pen' | 'mail-plus' | 'mail-question-mark' | 'mail-search' | 'mail-warning' | 'mail-x' | 'mail' | 'mailbox' | 'mails' | 'map-minus' | 'map-pin-check-inside' | 'map-pin-check' | 'map-pin-house' | 'map-pin-minus-inside' | 'map-pin-minus' | 'map-pin-off' | 'map-pin-pen' | 'map-pin-plus-inside' | 'map-pin-plus' | 'map-pin-search' | 'map-pin-x-inside' | 'map-pin-x' | 'map-pin' | 'map-pinned' | 'map-plus' | 'map' | 'mars-stroke' | 'mars' | 'martini' | 'maximize-2' | 'maximize' | 'medal' | 'megaphone-off' | 'megaphone' | 'memory-stick' | 'menu' | 'merge' | 'message-circle-check' | 'message-circle-code' | 'message-circle-dashed-check' | 'message-circle-dashed' | 'message-circle-heart' | 'message-circle-more' | 'message-circle-off' | 'message-circle-plus' | 'message-circle-question-mark' | 'message-circle-reply' | 'message-circle-text' | 'message-circle-warning' | 'message-circle-x' | 'message-circle' | 'message-square-check' | 'message-square-code' | 'message-square-dashed' | 'message-square-diff' | 'message-square-dot' | 'message-square-heart' | 'message-square-lock' | 'message-square-more' | 'message-square-off' | 'message-square-plus' | 'message-square-quote' | 'message-square-reply' | 'message-square-share' | 'message-square-text' | 'message-square-warning' | 'message-square-x' | 'message-square' | 'messages-circle' | 'messages-square' | 'metronome' | 'mic-audio-lines' | 'mic-off' | 'mic-signal' | 'mic-vocal' | 'mic' | 'microchip' | 'microscope' | 'microwave' | 'midi-port' | 'milestone' | 'milk-off' | 'milk' | 'minimize-2' | 'minimize' | 'minus' | 'mirror-rectangular' | 'mirror-round' | 'monitor-check' | 'monitor-cloud' | 'monitor-cog' | 'monitor-dot' | 'monitor-down' | 'monitor-off' | 'monitor-pause' | 'monitor-pc' | 'monitor-play' | 'monitor-smartphone' | 'monitor-speaker' | 'monitor-stop' | 'monitor-up' | 'monitor-x' | 'monitor' | 'moon-star' | 'moon' | 'mop-sparkles' | 'mop' | 'mosque' | 'motorbike' | 'mountain-snow' | 'mountain' | 'mouse-left' | 'mouse-off' | 'mouse-pointer-2-off' | 'mouse-pointer-2' | 'mouse-pointer-ban' | 'mouse-pointer-click' | 'mouse-pointer' | 'mouse-right' | 'mouse' | 'mouth-off' | 'mouth' | 'move-3d' | 'move-diagonal-2' | 'move-diagonal' | 'move-down-left' | 'move-down-right' | 'move-down' | 'move-horizontal' | 'move-left' | 'move-right' | 'move-up-left' | 'move-up-right' | 'move-up' | 'move-vertical' | 'move' | 'navigation-2-off' | 'navigation-2' | 'navigation-off' | 'navigation' | 'nepali-rupee' | 'network' | 'newspaper' | 'nfc' | 'non-binary' | 'notebook-dot' | 'notebook-pen' | 'notebook-tabs' | 'notebook-text' | 'notebook' | 'notepad-text-dashed' | 'notepad-text' | 'nut-off' | 'nut' | 'octagon-alert' | 'octagon-minus' | 'octagon-pause' | 'octagon-x' | 'octagon' | 'omega' | 'option' | 'orbit' | 'origami' | 'package-2' | 'package-check' | 'package-minus' | 'package-open' | 'package-plus' | 'package-search' | 'package-x' | 'package' | 'paint-bucket' | 'paint-roller' | 'paintbrush-vertical' | 'paintbrush' | 'palette' | 'panda' | 'panel-bottom-close' | 'panel-bottom-dashed' | 'panel-bottom-open' | 'panel-bottom' | 'panel-left-close' | 'panel-left-dashed' | 'panel-left-open' | 'panel-left-right-dashed' | 'panel-left' | 'panel-right-close' | 'panel-right-dashed' | 'panel-right-open' | 'panel-right' | 'panel-top-bottom-dashed' | 'panel-top-close' | 'panel-top-dashed' | 'panel-top-open' | 'panel-top' | 'panels-left-bottom' | 'panels-right-bottom' | 'panels-top-left' | 'paper-bag' | 'paperclip' | 'parasol' | 'parentheses' | 'park' | 'parking-meter' | 'party-popper' | 'pause' | 'paw-print' | 'pc-case' | 'pen-line' | 'pen-off' | 'pen-tool' | 'pen' | 'pencil-line' | 'pencil-off' | 'pencil-ruler' | 'pencil-sparkles' | 'pencil' | 'pentagon' | 'percent' | 'perfume-bottle' | 'person-standing' | 'phi' | 'philippine-peso' | 'phone-call' | 'phone-forwarded' | 'phone-incoming' | 'phone-log' | 'phone-missed' | 'phone-off' | 'phone-outgoing' | 'phone' | 'pi' | 'piano' | 'pickaxe' | 'picture-in-picture-2' | 'picture-in-picture' | 'piggy-bank' | 'pilcrow-left' | 'pilcrow-right' | 'pilcrow' | 'pill-bottle' | 'pill' | 'pin-off' | 'pin' | 'pipette' | 'pizza' | 'plane-landing' | 'plane-takeoff' | 'plane' | 'plant-pot' | 'play-off' | 'play' | 'playing-card' | 'playing-cards-fan' | 'playing-cards' | 'plug-2' | 'plug-zap' | 'plug' | 'plus' | 'pocket-knife' | 'podium' | 'pointer-off' | 'pointer' | 'popcorn' | 'popsicle' | 'pound-sterling' | 'power-off' | 'power' | 'presentation' | 'printer-3d' | 'printer-check' | 'printer-x' | 'printer' | 'projector' | 'proportions' | 'puzzle' | 'pyramid' | 'qr-code' | 'quote' | 'rabbit' | 'radar' | 'radiation' | 'radical' | 'radio-off' | 'radio-receiver' | 'radio-tower' | 'radio' | 'radius' | 'rainbow' | 'rat' | 'ratio' | 'receipt-cent' | 'receipt-euro' | 'receipt-indian-rupee' | 'receipt-japanese-yen' | 'receipt-pound-sterling' | 'receipt-russian-ruble' | 'receipt-swiss-franc' | 'receipt-text' | 'receipt-turkish-lira' | 'receipt' | 'rectangle-circle' | 'rectangle-ellipsis' | 'rectangle-goggles' | 'rectangle-horizontal' | 'rectangle-vertical' | 'recycle' | 'redo-2' | 'redo-dot' | 'redo' | 'refresh-ccw-dot' | 'refresh-ccw' | 'refresh-cw-off' | 'refresh-cw' | 'refrigerator' | 'regex' | 'remove-formatting' | 'repeat-1' | 'repeat-2' | 'repeat-off' | 'repeat' | 'replace-all' | 'replace' | 'reply-all' | 'reply' | 'rewind' | 'ribbon' | 'road' | 'robot-arm' | 'robot-vacuum' | 'rocket' | 'rocking-chair' | 'roller-coaster' | 'rose' | 'rotate-3d' | 'rotate-ccw-clock' | 'rotate-ccw-key' | 'rotate-ccw-square' | 'rotate-ccw' | 'rotate-cw-clock' | 'rotate-cw-fading-clock' | 'rotate-cw-square' | 'rotate-cw' | 'route-off' | 'route' | 'router' | 'rows-2' | 'rows-3' | 'rows-4' | 'rss' | 'rugby-ball' | 'ruler-dimension-line' | 'ruler' | 'russian-ruble' | 'sailboat' | 'salad' | 'sandwich' | 'satellite-dish' | 'satellite' | 'saudi-riyal' | 'save-all' | 'save-check' | 'save-off' | 'save-pen' | 'save-plus' | 'save' | 'scale-3d' | 'scale' | 'scaling' | 'scan-barcode' | 'scan-box' | 'scan-eye' | 'scan-face' | 'scan-heart' | 'scan-line' | 'scan-qr-code' | 'scan-search' | 'scan-square' | 'scan-text' | 'scan' | 'school' | 'scissors-line-dashed' | 'scissors' | 'scooter' | 'scratch-blocks' | 'screen-share-off' | 'screen-share' | 'screw' | 'scroll-text' | 'scroll' | 'search-alert' | 'search-check' | 'search-code' | 'search-slash' | 'search-x' | 'search' | 'section' | 'send-horizontal' | 'send-to-back' | 'send' | 'separator-horizontal' | 'separator-vertical' | 'server-cog' | 'server-crash' | 'server-nas' | 'server-off' | 'server-plus' | 'server' | 'settings-2' | 'settings' | 'shapes' | 'share-2' | 'share' | 'sheet' | 'shell' | 'shelving-unit' | 'shield-alert' | 'shield-ban' | 'shield-check' | 'shield-cog-corner' | 'shield-cog' | 'shield-ellipsis' | 'shield-half' | 'shield-house' | 'shield-keyhole' | 'shield-lock' | 'shield-minus' | 'shield-off' | 'shield-plus' | 'shield-question-mark' | 'shield-user' | 'shield-x' | 'shield' | 'ship-cargo' | 'ship-wheel' | 'ship' | 'shirt' | 'shopping-bag' | 'shopping-basket' | 'shopping-cart-minus' | 'shopping-cart-plus' | 'shopping-cart' | 'shovel' | 'shower-head' | 'shredder' | 'shrimp-off' | 'shrimp' | 'shrink' | 'shrub' | 'shuffle' | 'sigma' | 'signal-high' | 'signal-low' | 'signal-medium' | 'signal-zero' | 'signal' | 'signature' | 'signpost-big' | 'signpost' | 'siren' | 'sixteenth-notes' | 'skip-back' | 'skip-forward' | 'skull' | 'slash' | 'slice' | 'sliders-horizontal' | 'sliders-vertical' | 'smartphone-charging' | 'smartphone-nfc' | 'smartphone-user-round' | 'smartphone' | 'snail' | 'snowflake' | 'soap-dispenser-droplet' | 'sofa' | 'solar-panel' | 'soup' | 'space' | 'spade' | 'sparkle' | 'sparkles' | 'speaker' | 'speech' | 'spell-check-2' | 'spell-check' | 'spline-pointer' | 'spline' | 'split' | 'spool' | 'sport-shoe' | 'spotlight' | 'spray-can' | 'sprout' | 'square-activity' | 'square-arrow-down-left' | 'square-arrow-down-right' | 'square-arrow-down' | 'square-arrow-left' | 'square-arrow-out-down-left' | 'square-arrow-out-down-right' | 'square-arrow-out-up-left' | 'square-arrow-out-up-right' | 'square-arrow-right-enter' | 'square-arrow-right-exit' | 'square-arrow-right' | 'square-arrow-up-left' | 'square-arrow-up-right' | 'square-arrow-up' | 'square-asterisk' | 'square-bookmark' | 'square-bottom-dashed-scissors' | 'square-centerline-dashed-horizontal' | 'square-centerline-dashed-vertical' | 'square-chart-gantt' | 'square-check-big' | 'square-check' | 'square-chevron-down' | 'square-chevron-left' | 'square-chevron-right' | 'square-chevron-up' | 'square-code' | 'square-dashed-bottom-code' | 'square-dashed-bottom' | 'square-dashed-kanban' | 'square-dashed-mouse-pointer' | 'square-dashed-plus' | 'square-dashed-text' | 'square-dashed-top-solid' | 'square-dashed-x-corner' | 'square-dashed-x' | 'square-dashed' | 'square-dimensions' | 'square-divide' | 'square-dot' | 'square-equal' | 'square-exclamation-point' | 'square-function' | 'square-kanban' | 'square-library' | 'square-m' | 'square-menu' | 'square-minus' | 'square-mouse-pointer' | 'square-off' | 'square-parking-off' | 'square-parking' | 'square-pause' | 'square-pen' | 'square-percent' | 'square-pi' | 'square-pilcrow' | 'square-play' | 'square-plus' | 'square-power' | 'square-radical' | 'square-round-corner' | 'square-scissors' | 'square-sigma' | 'square-slash' | 'square-sparkles' | 'square-split-horizontal' | 'square-split-vertical' | 'square-square' | 'square-stack' | 'square-star' | 'square-stop' | 'square-terminal' | 'square-text' | 'square-user-round' | 'square-user' | 'square-x' | 'square' | 'squares-exclude' | 'squares-intersect' | 'squares-subtract' | 'squares-unite' | 'squircle-dashed' | 'squircle' | 'squirrel' | 'stamp' | 'star-check' | 'star-half' | 'star-minus' | 'star-off' | 'star-plus' | 'star-x' | 'star' | 'step-back' | 'step-forward' | 'stethoscope' | 'sticker' | 'sticky-note-check' | 'sticky-note-minus' | 'sticky-note-off' | 'sticky-note-plus' | 'sticky-note-x' | 'sticky-note' | 'sticky-notes' | 'stone' | 'store' | 'stretch-horizontal' | 'stretch-vertical' | 'strikethrough' | 'subscript' | 'summary' | 'sun-dim' | 'sun-medium' | 'sun-moon' | 'sun-snow' | 'sun' | 'sunrise' | 'sunset' | 'superscript' | 'swatch-book' | 'swiss-franc' | 'switch-camera' | 'sword' | 'swords' | 'syringe' | 'table-2' | 'table-cells-merge' | 'table-cells-split' | 'table-columns-split' | 'table-of-contents' | 'table-properties' | 'table-rows-split' | 'table' | 'tablet-smartphone' | 'tablet' | 'tablets' | 'tag-plus' | 'tag-x' | 'tag' | 'tags' | 'tally-1' | 'tally-2' | 'tally-3' | 'tally-4' | 'tally-5' | 'tangent' | 'target' | 'telescope' | 'tent-tree' | 'tent' | 'terminal' | 'test-tube-diagonal' | 'test-tube' | 'test-tubes' | 'text-align-center' | 'text-align-end' | 'text-align-justify-center' | 'text-align-justify-end' | 'text-align-justify-start' | 'text-align-justify' | 'text-align-start' | 'text-cursor-input' | 'text-cursor' | 'text-initial' | 'text-quote' | 'text-search' | 'text-wrap' | 'theater' | 'thermometer-snowflake' | 'thermometer-sun' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'tic-tac-toe' | 'ticket-check' | 'ticket-minus' | 'ticket-percent' | 'ticket-plus' | 'ticket-slash' | 'ticket-x' | 'ticket' | 'tickets-plane' | 'tickets' | 'timeline' | 'timer-off' | 'timer-reset' | 'timer' | 'toggle-left' | 'toggle-right' | 'toilet' | 'tombstone' | 'tool-case' | 'toolbox' | 'toothbrush-sparkles' | 'toothbrush' | 'tornado' | 'torus' | 'touchpad-off' | 'touchpad' | 'towel-rack' | 'tower-control' | 'toy-brick' | 'tractor' | 'traffic-cone' | 'trailer' | 'train-front-tunnel' | 'train-front' | 'train-track' | 'tram-front' | 'transgender' | 'trash-off' | 'trash' | 'tree-deciduous' | 'tree-palm' | 'tree-pine' | 'trees' | 'trending-down' | 'trending-up-down' | 'trending-up' | 'triangle-alert' | 'triangle-dashed' | 'triangle-right' | 'triangle' | 'triangles-centerline-dashed-horizontal' | 'triangles-centerline-dashed-vertical' | 'trophy' | 'truck-electric' | 'truck' | 'tube-lotion' | 'turkish-lira' | 'turntable' | 'turtle' | 'tv-minimal-play' | 'tv-minimal' | 'tv' | 'type-outline' | 'type' | 'umbrella-off' | 'umbrella' | 'underline' | 'undo-2' | 'undo-dot' | 'undo' | 'unfold-horizontal' | 'unfold-vertical' | 'ungroup' | 'university' | 'unlink-2' | 'unlink' | 'unplug' | 'upload' | 'usb-c-port' | 'usb' | 'user-check' | 'user-cog' | 'user-group' | 'user-key' | 'user-lock' | 'user-minus' | 'user-pen' | 'user-plus' | 'user-round-arrow-left' | 'user-round-check' | 'user-round-cog' | 'user-round-group' | 'user-round-key' | 'user-round-minus' | 'user-round-pen' | 'user-round-plus' | 'user-round-search' | 'user-round-star' | 'user-round-x' | 'user-round' | 'user-search' | 'user-shield' | 'user-star' | 'user-x' | 'user' | 'users-collaboration' | 'users-round-collaboration' | 'users-round' | 'users' | 'utensils-crossed' | 'utensils' | 'utility-pole' | 'van' | 'variable' | 'vault' | 'vector-polygon' | 'vector-square' | 'vegan' | 'venetian-mask' | 'venus-and-mars' | 'venus' | 'vibrate-off' | 'vibrate' | 'video-off' | 'video' | 'videotape' | 'view' | 'virus-off' | 'virus' | 'voicemail' | 'volleyball' | 'volume-1' | 'volume-2' | 'volume-off' | 'volume-x' | 'volume' | 'vote' | 'wallet-cards' | 'wallet-minimal' | 'wallet' | 'wallpaper' | 'wand-sparkles' | 'wand' | 'warehouse' | 'washing-machine' | 'watch' | 'waves-arrow-down' | 'waves-arrow-up' | 'waves-horizontal' | 'waves-ladder' | 'waves-vertical' | 'waypoints' | 'webcam-off' | 'webcam' | 'webhook-off' | 'webhook' | 'weight-tilde' | 'weight' | 'wheat-off' | 'wheat' | 'whistle' | 'whole-word' | 'wifi-cog' | 'wifi-high' | 'wifi-lock' | 'wifi-low' | 'wifi-off' | 'wifi-pen' | 'wifi-sync' | 'wifi-zero' | 'wifi' | 'wind-arrow-down' | 'wind-arrow-up' | 'wind' | 'wine-off' | 'wine' | 'workflow' | 'worm' | 'wrench-off' | 'wrench' | 'x-line-top' | 'x' | 'zap-off' | 'zap' | 'zodiac-aquarius' | 'zodiac-aries' | 'zodiac-cancer' | 'zodiac-capricorn' | 'zodiac-gemini' | 'zodiac-leo' | 'zodiac-libra' | 'zodiac-ophiuchus' | 'zodiac-pisces' | 'zodiac-sagittarius' | 'zodiac-scorpio' | 'zodiac-taurus' | 'zodiac-virgo' | 'zoom-in' | 'zoom-out'; export type WebIconMode = 'icon' | 'button'; export class WebIcon extends WebComponent { constructor(element: HTMLElement); icon: LucideIconName; mode: WebIconMode; accessibleLabel: string; strokeWidth: number; click(): void; set onClick(handler: WebComponentEventHandler | null); } export interface WebTimerConfiguration extends WebNonvisualComponentOptions { readonly time?: number; readonly loop?: boolean; readonly enabled?: boolean; } export interface WebTimerEventDetail { readonly tick: number; } /** Browser timer owned by one page or reusable placement. Time is in milliseconds. */ export class WebTimer extends WebNonvisualComponent { #private; constructor(configuration?: WebTimerConfiguration); get time(): number; /** Changing the interval while running schedules a fresh full interval. */ set time(value: number); get loop(): boolean; set loop(value: boolean); get enabled(): boolean; set enabled(value: boolean); get tickCount(): number; /** Starts a new run; calling Start while running has no effect. */ Start(): void; Stop(): void; Restart(): void; set onTimer(handler: WebComponentEventHandler | null); set onStart(handler: WebComponentEventHandler | null); set onStop(handler: WebComponentEventHandler | null); dispose(): void; } export interface WebPaymentsConfiguration extends WebNonvisualComponentOptions { readonly gatewaySlug?: string; readonly mode?: 'payment' | 'subscription'; readonly enabled?: boolean; readonly pollInterval?: number; readonly pollTimeout?: number; readonly autoResume?: boolean; readonly autoWatch?: boolean; readonly persistAttempts?: boolean; /** Runtime-only durable adapter; never serialized into the Project Model. */ readonly storage?: WebPaymentsStorageAdapter; } export interface WebPaymentsStorageAdapter { getItem(key: string): string | null; setItem(key: string, value: string): void; removeItem(key: string): void; withLock?(name: string, action: () => Promise, signal?: AbortSignal): Promise; } /** Application-owned recovery data. Save before POST and again before navigation. */ export interface WebPaymentsCheckpoint { readonly version: 1; readonly baseUrl: string; readonly gatewaySlug: string; readonly userId: string; readonly sourceKey: string; readonly mode: 'payment' | 'subscription'; readonly idempotencyKey: string; readonly operationId?: string; } export interface WebPaymentsObservationOptions { readonly signal?: AbortSignal; readonly interval?: number; readonly timeout?: number; } export interface WebPaymentsCheckoutOptions extends WebPaymentsObservationOptions { /** Defaults to true. False prepares an open checkout for custom authored UI. */ readonly openCheckout?: boolean; } export interface WebPaymentsResumeOptions extends WebPaymentsObservationOptions { readonly mode?: 'payment' | 'subscription'; /** Defaults to the component's autoWatch setting. Never opens checkout. */ readonly watch?: boolean; } export interface WebPaymentsConfirmationOptions extends WebPaymentsObservationOptions { readonly operationId?: string; /** Financial confirmation is enough by default; source synchronization is separate. */ readonly waitForSynchronization?: boolean; } export type WebPaymentsState = 'idle' | 'restoring' | 'preparing' | 'creating' | 'waiting' | 'opening' | 'watching' | 'refreshing' | 'loading-history' | 'canceling' | 'ready' | 'confirmed' | 'canceled' | 'uncertain' | 'failed' | 'error'; export interface WebPaymentsStateEventDetail { readonly previous: WebPaymentsState; readonly state: WebPaymentsState; } export interface WebPaymentsHistoryEventDetail { readonly items: readonly import("@webrad/restgo-sdk").RestGoPaymentOperation[]; readonly nextCursor: string; readonly hasMore: boolean; } export interface WebPaymentsResumeEventDetail { readonly checkpoint: WebPaymentsCheckpoint; readonly operation: import("@webrad/restgo-sdk").RestGoPaymentOperation | null; readonly automatic: boolean; } export type WebPaymentsAction = 'pay' | 'subscribe' | 'checkout' | 'resume' | 'refresh' | 'history' | 'load-more' | 'confirm' | 'create' | 'get' | 'list' | 'cancel' | 'wait' | 'watch'; export interface WebPaymentsOperationEventDetail { readonly previous: import("@webrad/restgo-sdk").RestGoPaymentOperation | null; readonly operation: import("@webrad/restgo-sdk").RestGoPaymentOperation | null; } export interface WebPaymentsCheckoutEventDetail { readonly operation: import("@webrad/restgo-sdk").RestGoPaymentOperation; } export interface WebPaymentsSynchronizationEventDetail { readonly operation: import("@webrad/restgo-sdk").RestGoPaymentOperation; readonly pending: boolean; readonly error: string | null; } export interface WebPaymentsErrorEventDetail { readonly action: WebPaymentsAction; readonly operationId: string | null; readonly error: Error; } export interface WebPaymentsRequestEventDetail { readonly action: WebPaymentsAction; readonly operationId: string | null; readonly error: Error | null; } export type WebPaymentsErrorKind = 'invalid-argument' | 'not-configured' | 'auth-required' | 'context-changed' | 'disabled' | 'disposed' | 'busy' | 'attempt-required' | 'attempt-conflict' | 'checkout-uncertain' | 'checkout-unavailable' | 'timeout' | 'storage-unavailable' | 'storage-corrupt' | 'payment-failed' | 'synchronization-failed' | 'aborted'; /** Local orchestration errors; HTTP failures retain their original RestGoError. */ export class WebPaymentsError extends Error { readonly kind: WebPaymentsErrorKind; constructor(kind: WebPaymentsErrorKind, message: string); } /** Customer payment coordinator, owned by one page or reusable placement. */ export class WebPayments extends WebNonvisualComponent { #private; constructor(configuration?: WebPaymentsConfiguration); get gatewaySlug(): string; set gatewaySlug(value: string); get mode(): import("@webrad/restgo-sdk").RestGoPaymentMode; /** Changes only the default for a future prepared attempt. */ set mode(value: import("@webrad/restgo-sdk").RestGoPaymentMode); get enabled(): boolean; set enabled(value: boolean); get pollInterval(): number; set pollInterval(value: number); get pollTimeout(): number; set pollTimeout(value: number); get busy(): boolean; get autoResume(): boolean; set autoResume(value: boolean); get autoWatch(): boolean; set autoWatch(value: boolean); get persistAttempts(): boolean; set persistAttempts(value: boolean); get state(): WebPaymentsState; get status(): string | null; get checkoutState(): string | null; get synchronizationPending(): boolean; get synchronizationError(): string | null; get canOpenCheckout(): boolean; get canCancelSubscription(): boolean; get history(): readonly import("@webrad/restgo-sdk").RestGoPaymentOperation[]; get nextCursor(): string; get hasMore(): boolean; get watching(): boolean; get operation(): import("@webrad/restgo-sdk").RestGoPaymentOperation | null; get checkoutUrl(): string | null; get error(): Error | null; get attempt(): import("@webrad/restgo-sdk").RestGoCheckoutInput | null; /** Prepare/recover the purchase, persist its key, wait for checkout and open it. */ Pay(sourceKey: string, options?: WebPaymentsCheckoutOptions): Promise; /** Subscribe through the hosted checkout with the same automatic recovery flow. */ Subscribe(sourceKey: string, options?: WebPaymentsCheckoutOptions): Promise; /** Use the mode selected in the Inspector. Opens checkout by default. */ Checkout(sourceKey: string, options?: WebPaymentsCheckoutOptions): Promise; /** Recover a purchase or the last saved attempt; never redirects back to checkout. */ Resume(sourceKey?: string, options?: WebPaymentsResumeOptions): Promise; /** Refresh the selected/saved operation without creating a charge. */ Refresh(options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; /** Load customer history and expose its cursor without changing selection. */ LoadHistory(options?: import("@webrad/restgo-sdk").RestGoPaymentListOptions): Promise; /** Append the next page, deduplicating operations. Last page is a harmless no-op. */ LoadMore(options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; /** Await payment success or subscription activation, optionally including source synchronization. */ WaitForConfirmation(options?: WebPaymentsConfirmationOptions): Promise; /** Advanced preparation without HTTP. Default persistence saves its recovery checkpoint. */ PrepareCheckout(sourceKey: string, mode?: import("@webrad/restgo-sdk").RestGoPaymentMode): WebPaymentsCheckpoint; CreateCheckout(options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; GetOperation(id: string, options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; ListOperations(options?: import("@webrad/restgo-sdk").RestGoPaymentListOptions): Promise; CancelSubscription(options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; CancelSubscription(id: string, options?: import("@webrad/restgo-sdk").RestGoPaymentRequestOptions): Promise; WaitForCheckout(id?: string, options?: WebPaymentsObservationOptions): Promise; /** Starts one bounded loop. Background failures are delivered through OnError. */ StartWatching(id?: string, options?: WebPaymentsObservationOptions): void; /** Local observation cancellation only; never cancels the backend transaction. */ StopWatching(): void; OpenCheckout(): void; ExportCheckpoint(): WebPaymentsCheckpoint; /** Validates recovery data against this API, gateway and customer. Performs no HTTP. */ RestoreCheckpoint(value: unknown): WebPaymentsCheckpoint; /** Save recovery data first. This only clears local state and never cancels a charge. */ Clear(): void; set onCheckoutCreated(handler: WebComponentEventHandler | null); set onCheckoutReady(handler: WebComponentEventHandler | null); set onOperationChange(handler: WebComponentEventHandler | null); set onSynchronizationChange(handler: WebComponentEventHandler | null); set onError(handler: WebComponentEventHandler | null); set onRequestComplete(handler: WebComponentEventHandler | null); set onPaymentSucceeded(handler: WebComponentEventHandler | null); set onSubscriptionActivated(handler: WebComponentEventHandler | null); set onSubscriptionCanceled(handler: WebComponentEventHandler | null); set onCheckoutOpened(handler: WebComponentEventHandler | null); set onHistoryChange(handler: WebComponentEventHandler | null); set onStateChange(handler: WebComponentEventHandler | null); set onRestored(handler: WebComponentEventHandler | null); dispose(): void; } /** Isolated markup or a standalone external iframe, with the original HTML preserved. */ export class WebHtml extends WebComponent { constructor(element: HTMLElement); /** A fixed ratio derives height from width; none restores the saved height rules. */ get aspectRatio(): WebAspectRatio; set aspectRatio(value: WebAspectRatio); /** A fragment or complete HTML document, preserved exactly as authored. */ get html(): string; set html(value: string); /** Accessible name for the embedded document. */ get title(): string; set title(value: string); get enabled(): boolean; set enabled(value: boolean); clear(): void; set onLoad(handler: WebComponentEventHandler | null); } export type WebDateMode = 'date' | 'datetime'; export type WebDateFormat = 'dd/MM/yyyy' | 'MM/dd/yyyy' | 'yyyy-MM-dd'; /** Empty values clear a field. Nonempty values use local ISO calendar fields. */ export function isWebDateValue(value: unknown): value is string; /** Shared model projection for Designer and generated browser applications. */ export function configureWebDate(component: WebDate, props: Readonly>, name: string): void; /** Masked local date/date-time input. Values never imply a UTC time zone. */ export class WebDate extends WebComponent { #private; constructor(element: HTMLElement); get mode(): WebDateMode; set mode(value: WebDateMode); get dateFormat(): WebDateFormat; set dateFormat(value: WebDateFormat); get showSeconds(): boolean; set showSeconds(value: boolean); get mask(): string; /** Canonical YYYY-MM-DD or YYYY-MM-DDTHH:mm[:ss]; empty while incomplete/invalid. */ get value(): string; set value(value: string); /** Display text, including an incomplete or invalid draft. */ get text(): string; set text(value: string); /** A fresh Date at the start of the local day; null for an empty/incomplete/impossible date. */ get date(): Date | null; set date(value: Date | null); /** A fresh local Date including time; date mode returns the start of the local day. */ get datetime(): Date | null; set datetime(value: Date | null); get min(): string; set min(value: string); get max(): string; set max(value: string); get required(): boolean; set required(value: boolean); get readOnly(): boolean; set readOnly(value: boolean); get placeholder(): string; set placeholder(value: string); get accessibleLabel(): string; set accessibleLabel(value: string); get showCalendar(): boolean; set showCalendar(value: boolean); get visible(): boolean; set visible(value: boolean); get enabled(): boolean; set enabled(value: boolean); get tabIndex(): number; set tabIndex(value: number); focus(options?: FocusOptions): void; get valid(): boolean; get validationMessage(): string; checkValidity(): boolean; reportValidity(): boolean; clear(): void; setNow(): void; /** Opens the calendar aligned to the field, with a minimum popup width of 260px. */ showPicker(): boolean; set onChange(handler: WebComponentEventHandler | null); set onInput(handler: WebComponentEventHandler | null); dispose(): void; } /** Serializable character rules shared by the Inspector and browser runtime. */ export type WebEditMaskCase = 'none' | 'upper' | 'lower'; export interface WebEditMaskToken { /** A JavaScript Unicode regular expression matching one complete character. */ readonly pattern: string; readonly transform?: WebEditMaskCase; } export type WebEditMaskTokens = Readonly>; export const DEFAULT_EDIT_MASK_TOKENS: WebEditMaskTokens; export interface EditMaskResult { readonly text: string; readonly raw: string; readonly complete: boolean; /** UTF-16 offsets of editable characters in the formatted value. */ readonly positions: readonly { readonly start: number; readonly end: number; }[]; /** Formatted caret offsets indexed by source UTF-16 offset. */ readonly carets: readonly number[]; } export interface CompiledEditMask { format(value: string, letterCase?: WebEditMaskCase, raw?: boolean): EditMaskResult; } export function parseWebEditMaskTokens(value: unknown): WebEditMaskTokens; /** Bounded pattern grammar: literals, escapes, [optional groups], {min,max} and | alternatives. */ export function compileEditMask(pattern: string, tokens?: WebEditMaskTokens): CompiledEditMask; export function isWebEditMaskPattern(value: unknown): value is string; export function isWebEditMaskTokens(value: unknown): value is WebEditMaskTokens; export type WebInputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url'; /** An empty string removes the icon. */ export type WebEditIcon = WebButtonIcon | ''; /** A text field with an optional, dynamically configurable character mask. */ export class WebEdit extends WebComponent { #private; constructor(element: HTMLElement); get value(): string; set value(value: string); /** Accepted characters without mask literals. Assign this when input is known to be raw. */ get rawValue(): string; set rawValue(value: string); get maskEnabled(): boolean; set maskEnabled(value: boolean); /** 0 digit, a Unicode letter, * alphanumeric, # any character; escape literals with \\. */ get mask(): string; set mask(value: string); /** Custom tokens override built-ins. Each pattern matches one whole Unicode character. */ get maskTokens(): WebEditMaskTokens; set maskTokens(value: WebEditMaskTokens); get maskCase(): WebEditMaskCase; set maskCase(value: WebEditMaskCase); /** True when an active mask has all its required positions filled. Empty is incomplete. */ get maskComplete(): boolean; /** Empty for a valid pattern. Invalid patterns leave the text editable without masking. */ get maskError(): string; get placeholder(): string; set placeholder(value: string); get readOnly(): boolean; set readOnly(value: boolean); get inputType(): WebInputType; set inputType(value: WebInputType); /** Visible, accessible field label. An empty string hides it. */ get label(): string; set label(value: string); /** Icon shown inside the field. An empty string removes it. */ get icon(): WebEditIcon; set icon(value: WebEditIcon); /** Accessible name of the clickable icon; empty uses the icon and field names. */ get iconAccessibleLabel(): string; set iconAccessibleLabel(value: string); get enabled(): boolean; set enabled(value: boolean); get tabIndex(): number; set tabIndex(value: number); focus(options?: FocusOptions): void; clear(): void; set onChange(handler: WebComponentEventHandler | null); set onInput(handler: WebComponentEventHandler | null); /** Binds the icon action, enabling its native button and hover feedback. */ set onIconClick(handler: ((sender: this, event: MouseEvent) => void | Promise) | null); bindEvent(eventName: string, handler: WebComponentEventHandler | null): () => void; dispose(): void; } /** Project-model projection used by Designer, Preview and exported applications. */ export function configureWebEdit(component: WebEdit, props: Readonly>): void; export const THEME_MODES: readonly [ "light", "dark", "system" ]; export type ThemeMode = (typeof THEME_MODES)[number]; export type ResolvedThemeMode = 'light' | 'dark'; export const THEME_COLOR_NAMES: readonly [ "background", "background-end", "surface", "surface-end", "surface-muted", "input", "input-end", "control-thumb", "text", "text-muted", "heading", "border", "border-accent", "primary", "primary-hover", "primary-active", "on-primary", "accent", "accent-hover", "accent-active", "on-accent", "focus", "disabled-surface", "disabled-text", "success", "warning", "danger", "overlay", "scrollbar-track", "scrollbar-thumb", "scrollbar-thumb-hover", "scrollbar-thumb-active", "media-background", "media-background-end", "on-media" ]; export type ThemeColorName = (typeof THEME_COLOR_NAMES)[number]; /** Stable identities for user-defined colors managed in Themes. */ export function customThemeColorId(value: unknown): string | undefined; export function customThemeColorReference(id: string): string; export function themeColorId(value: unknown): ThemeColorName | undefined; export function themeColorReference(name: ThemeColorName): string; export interface ThemeRuntimeConfiguration { readonly initialMode: ThemeMode; readonly rememberChoice: boolean; /** Unique per project, including when multiple applications share an origin. */ readonly storageKey: string; } export interface ThemeChangeDetail { readonly mode: ThemeMode; readonly resolvedMode: ResolvedThemeMode; readonly previousMode: ThemeMode; readonly previousResolvedMode: ResolvedThemeMode; } export type ThemeChangeHandler = (sender: WebTheme, event: CustomEvent) => void; /** Self-contained so this exact initializer can also run in the HTML head before CSS. */ export function initializeTheme(configuration: ThemeRuntimeConfiguration): void; /** Browser-only application service. It owns no component instances or page state. */ export class WebTheme { #private; onChange: ThemeChangeHandler | null; get mode(): ThemeMode; set mode(value: ThemeMode); get resolvedMode(): ResolvedThemeMode; configure(configuration: ThemeRuntimeConfiguration): void; toggle(): void; subscribe(handler: ThemeChangeHandler): () => void; /** Forget the remembered choice and return to the project's initial mode. */ reset(): void; dispose(): void; } export const Theme: WebTheme; export function themeBootstrapSource(configuration: ThemeRuntimeConfiguration): string; export interface WebMenuItem { readonly id: string; readonly label: string; readonly kind?: 'item' | 'heading' | 'separator'; readonly icon?: LucideIconName | ''; readonly badge?: string; readonly description?: string; /** Stable project page ID, resolved by the application's router. */ readonly page?: string; readonly href?: string; readonly target?: '_self' | '_blank'; readonly visible?: boolean; readonly disabled?: boolean; readonly expanded?: boolean; readonly children?: readonly WebMenuItem[]; } export interface WebMenuBrand { readonly visible: boolean; readonly caption: string; readonly subtitle: string; readonly logo: string; readonly logoSize: number; readonly page: string; readonly href: string; } export interface WebMenuUser { readonly visible: boolean; /** Resolve the profile from the project's RestGO session; omitted means manual. */ readonly bindToCurrentUser?: boolean; /** Open the built-in RestGO account editor from the user settings icon. */ readonly settings?: boolean; /** Language of the built-in account editor; omitted means English. */ readonly settingsLanguage?: 'en' | 'pt-BR'; /** Public page that handles the email-confirmation token; blank uses RestGO defaults. */ readonly emailConfirmationUrl?: string; /** Public page that handles the password-reset token; blank uses RestGO defaults. */ readonly passwordResetUrl?: string; readonly name: string; readonly description: string; readonly avatar: string; readonly status: 'none' | 'online' | 'away' | 'busy'; } export interface WebMenuAppearance { readonly background: string; readonly foreground: string; readonly muted: string; readonly border: string; readonly hoverBackground: string; readonly activeBackground: string; readonly activeForeground: string; readonly accent: string; readonly badgeBackground: string; readonly badgeForeground: string; readonly itemHeight: number; readonly itemRadius: number; readonly itemGap: number; readonly iconSize: number; readonly fontSize: number; readonly padding: number; readonly indent: number; readonly collapsedWidth: number; } export interface WebMenuConfiguration { readonly schemaVersion: 1; readonly orientation: 'vertical' | 'horizontal'; readonly accessibleLabel: string; readonly collapsible: boolean; readonly collapsed: boolean; readonly accordion: boolean; readonly searchable: boolean; readonly themeToggle: boolean; /** Filter while typing, or emit OnSearch when the user presses Enter. */ readonly searchMode: 'filter' | 'event'; readonly searchPlaceholder: string; readonly emptyText: string; readonly footerText: string; readonly selectedItemId: string; /** Browser viewport width in CSS pixels, independent of the sidebar width. */ readonly mobileBreakpoint: number; /** Side of the hamburger icon in the mobile navigation bar. */ readonly mobileIconPosition: 'left' | 'right'; readonly drawerWidth: number; readonly drawerSide: 'left' | 'right'; readonly closeOnSelect: boolean; readonly brand: WebMenuBrand; readonly user: WebMenuUser; readonly appearance: WebMenuAppearance; readonly items: readonly WebMenuItem[]; } export interface WebMenuSearchEvent { readonly text: string; } export interface WebMenuItemEvent { readonly item: WebMenuItem; readonly itemId: string; readonly path: readonly string[]; } export interface WebMenuStateEvent { readonly collapsed: boolean; readonly open: boolean; } export interface WebMenuItemToggleEvent extends WebMenuItemEvent { readonly expanded: boolean; } export const WEB_MENU_THEMES: Readonly>; export function createDefaultWebMenuConfiguration(): WebMenuConfiguration; /** A saved appearance can follow project themes while fixed presets stay available. */ export function createProjectWebMenuAppearance(appearance?: WebMenuAppearance): WebMenuAppearance; /** Accepts relative, HTTP(S), mail and telephone links; rejects executable schemes. */ export function isWebMenuLink(value: string, image?: boolean): boolean; /** Strict browser-safe parser used by serialization, the Inspector and runtime. */ export function parseWebMenuConfiguration(value: unknown): WebMenuConfiguration; export function webMenuItemPath(items: readonly WebMenuItem[], id: string, path?: readonly string[]): readonly WebMenuItem[]; export interface WebMenuOptions { /** Static projections still use the identical DOM and appearance. */ readonly interactive?: boolean; readonly viewportWidth?: number; /** Allows embedded previews to change their local theme without changing the application. */ readonly onThemeToggle?: () => void; } /** Responsive navigation with per-instance state, disclosure submenus and a modal mobile drawer. */ export class WebMenu extends WebComponent { #private; /** Apply the saved placement before the authored subclass constructor runs. */ static createDefinition(element: HTMLElement, factory: (element: HTMLElement) => WebMenu, initialize: (menu: WebMenu) => void): WebMenu; /** Resolve the concrete authored Menu already mounted for this element. */ static fromElement(element: HTMLElement, menuClass: new (element: HTMLElement) => T): T; /** Shared handlers precede the containing page's ordinary event bindings. */ protected bindDefinitionEvent(eventName: string, handlerName: string): void; emit(eventName: string, detail?: unknown): boolean; get floatingZIndex(): number; get margin(): number; get marginTop(): number; set marginTop(value: number); get marginRight(): number; set marginRight(value: number); get marginBottom(): number; set marginBottom(value: number); get marginLeft(): number; set marginLeft(value: number); set margin(value: number); get placement(): 'floating'; get floatingHorizontalAnchor(): 'left' | 'center' | 'right'; set floatingHorizontalAnchor(value: 'left' | 'center' | 'right'); get floatingVerticalAnchor(): 'top' | 'center' | 'bottom'; set floatingVerticalAnchor(value: 'top' | 'center' | 'bottom'); constructor(element: HTMLElement, options?: WebMenuOptions); get configuration(): WebMenuConfiguration; get enabled(): boolean; set enabled(value: boolean); set configuration(value: WebMenuConfiguration); get items(): readonly WebMenuItem[]; set items(value: readonly WebMenuItem[]); get orientation(): WebMenuConfiguration['orientation']; set orientation(value: WebMenuConfiguration['orientation']); get brand(): WebMenuConfiguration['brand']; set brand(value: WebMenuConfiguration['brand']); get user(): WebMenuConfiguration['user']; set user(value: WebMenuConfiguration['user']); get appearance(): WebMenuConfiguration['appearance']; set appearance(value: WebMenuConfiguration['appearance']); get selectedItemId(): string; set selectedItemId(value: string); get collapsed(): boolean; set collapsed(value: boolean); get isOpen(): boolean; get isMobile(): boolean; get searchMode(): WebMenuConfiguration['searchMode']; get themeToggle(): boolean; set themeToggle(value: boolean); set searchMode(value: WebMenuConfiguration['searchMode']); get searchText(): string; set searchText(value: string); findItem(id: string): WebMenuItem | undefined; updateItem(id: string, changes: Partial>): void; expandItem(id: string): void; collapseItem(id: string): void; toggleItem(id: string): void; focusItem(id: string): void; activateItem(id: string): void; open(): void; close(): void; toggle(): void; /** Open the account editor when the saved Menu user settings option is enabled. */ openUserSettings(): void; closeUserSettings(): void; dispose(): void; } export const WEB_LOGIN_STYLE_SLOTS: readonly [ { readonly name: "panel"; readonly label: "Panel"; readonly componentType: "WebPanel"; }, { readonly name: "popup"; readonly label: "Popup"; readonly componentType: "WebPopup"; }, { readonly name: "title"; readonly label: "Title"; readonly componentType: "WebLabel"; }, { readonly name: "subtitle"; readonly label: "Subtitle"; readonly componentType: "WebLabel"; }, { readonly name: "fullNameLabel"; readonly label: "Full name label"; readonly componentType: "WebLabel"; }, { readonly name: "fullName"; readonly label: "Full name input"; readonly componentType: "WebEdit"; }, { readonly name: "emailLabel"; readonly label: "Email label"; readonly componentType: "WebLabel"; }, { readonly name: "email"; readonly label: "Email input"; readonly componentType: "WebEdit"; }, { readonly name: "passwordLabel"; readonly label: "Password label"; readonly componentType: "WebLabel"; }, { readonly name: "password"; readonly label: "Password input"; readonly componentType: "WebEdit"; }, { readonly name: "passwordConfirmationLabel"; readonly label: "Password confirmation label"; readonly componentType: "WebLabel"; }, { readonly name: "passwordConfirmation"; readonly label: "Password confirmation input"; readonly componentType: "WebEdit"; }, { readonly name: "remember"; readonly label: "Remember me"; readonly componentType: "WebCheckBox"; }, { readonly name: "submit"; readonly label: "Submit button"; readonly componentType: "WebButton"; }, { readonly name: "passwordToggle"; readonly label: "Show password button"; readonly componentType: "WebButton"; readonly defaultStyle: "none"; }, { readonly name: "registerLink"; readonly label: "Registration link"; readonly componentType: "WebButton"; readonly defaultStyle: "none"; }, { readonly name: "loginLink"; readonly label: "Return to login link"; readonly componentType: "WebButton"; readonly defaultStyle: "none"; }, { readonly name: "recoveryLink"; readonly label: "Recovery link"; readonly componentType: "WebButton"; readonly defaultStyle: "none"; }, { readonly name: "close"; readonly label: "Close button"; readonly componentType: "WebButton"; readonly defaultStyle: "none"; }, { readonly name: "feedback"; readonly label: "Success / status message"; readonly componentType: "WebLabel"; }, { readonly name: "errorFeedback"; readonly label: "Error message"; readonly componentType: "WebLabel"; readonly defaultStyle: "none"; } ]; export type WebLoginStyleSlot = (typeof WEB_LOGIN_STYLE_SLOTS)[number]['name']; /** Omitted entries follow the compatible default style; null explicitly selects None. */ export type WebLoginStyleBindings = Readonly>>; export type WebLoginView = 'login' | 'register' | 'recovery' | 'reset'; export type WebLoginPresentation = 'panel' | 'popup'; export interface WebLoginField { readonly label: string; readonly placeholder: string; } export interface WebLoginAppearance { readonly fontFamily: string; readonly fontSize: number; readonly background: string; readonly backgroundEnd?: string; readonly foreground: string; readonly heading?: string; readonly muted: string; readonly border: string; readonly borderEnd?: string; readonly inputBackground: string; readonly inputBackgroundEnd?: string; readonly primary: string; readonly primaryEnd?: string; readonly focus?: string; readonly onPrimary: string; readonly error: string; readonly borderRadius: number; readonly padding: number; readonly gap: number; readonly maxWidth: number; readonly fieldHeight: number; } export interface WebLoginTexts { readonly loginTitle: string; readonly loginSubtitle: string; readonly registerTitle: string; readonly registerSubtitle: string; readonly loginButton: string; readonly registerButton: string; readonly switchToRegister: string; readonly switchToLogin: string; readonly remember: string; readonly showPassword: string; readonly hidePassword: string; readonly close: string; readonly busy: string; readonly registered: string; readonly authenticated: string; readonly passwordMismatch: string; readonly unavailable: string; readonly requestFailed: string; } export interface WebLoginRecoveryConfiguration { readonly enabled: boolean; readonly automaticLinks: boolean; /** Blank returns to the current application route. Otherwise use an absolute HTTP(S) URL. */ readonly returnUrl: string; readonly texts: { readonly forgotPassword: string; readonly requestTitle: string; readonly requestSubtitle: string; readonly requestButton: string; readonly requestSent: string; readonly resetTitle: string; readonly resetSubtitle: string; readonly resetButton: string; readonly passwordChanged: string; readonly invalidLink: string; readonly backToLogin: string; }; } export function createDefaultWebLoginRecoveryConfiguration(language?: 'en' | 'pt-BR'): WebLoginRecoveryConfiguration; /** Credentials and transient runtime state are never part of this saved configuration. */ export interface WebLoginConfiguration { readonly version: 1; readonly presentation: WebLoginPresentation; readonly initialView: Exclude; readonly allowRegistration: boolean; readonly showFullName: boolean; readonly requireFullName: boolean; readonly confirmPassword: boolean; readonly showRemember: boolean; readonly rememberDefault: boolean; readonly showPasswordToggle: boolean; readonly autoLoginAfterRegistration: boolean; readonly closeOnLogin: boolean; readonly openOnShow: boolean; readonly dismissible: boolean; readonly language: 'en' | 'pt-BR'; readonly email: WebLoginField; readonly password: WebLoginField; readonly fullName: WebLoginField; readonly passwordConfirmation: WebLoginField; readonly texts: WebLoginTexts; /** Layout defaults and compatibility for earlier saved paint values. New paint comes from styles. */ readonly appearance: WebLoginAppearance; readonly recovery?: WebLoginRecoveryConfiguration; readonly styles?: WebLoginStyleBindings; } export function createDefaultWebLoginConfiguration(language?: 'en' | 'pt-BR'): WebLoginConfiguration; /** Validate saved values without accepting unknown fields, credentials or future versions. */ export function parseWebLoginConfiguration(value: unknown): WebLoginConfiguration; export interface WebLoginOptions { /** Designer and configuration previews never contact RestGo. */ readonly interactive?: boolean; } export interface WebLoginUserEvent { readonly user: import("@webrad/restgo-sdk").RestGoCurrentUser; readonly restored: boolean; } export interface WebLoginViewEvent { readonly view: WebLoginView; } export interface WebLoginRecoveryEvent { readonly email: string; } export interface WebLoginErrorEvent { readonly operation: WebLoginView | 'restore'; readonly message: string; readonly code: string; readonly status: number; } export interface WebLoginControls { readonly panel: WebPanel; readonly title: WebLabel; readonly subtitle: WebLabel; readonly email: WebEdit; readonly password: WebEdit; readonly fullName: WebEdit; readonly passwordConfirmation: WebEdit; readonly remember: WebCheckBox; readonly submit: WebButton; } /** A ready-to-use authentication template composed from the ordinary runtime controls. */ export class WebLogin extends WebComponent { #private; constructor(element: HTMLElement, options?: WebLoginOptions); get configuration(): WebLoginConfiguration; set configuration(value: WebLoginConfiguration); get controls(): WebLoginControls; /** The compiler/Designer supplies project style classes; configuration stores only stable IDs. */ get styleCatalog(): readonly RuntimeComponentStyle[]; set styleCatalog(value: readonly RuntimeComponentStyle[]); get view(): WebLoginView; set view(value: WebLoginView); get busy(): boolean; get open(): boolean; get email(): string; set email(value: string); get remember(): boolean; set remember(value: boolean); get hasRecoveryToken(): boolean; get enabled(): boolean; set enabled(value: boolean); get visible(): boolean; set visible(value: boolean); show(): void; hide(): void; close(): void; showLogin(): void; showRegistration(): void; showRecovery(): void; /** Claims a pending email link without exposing its token to authored code. */ openRecoveryLink(): boolean; /** The token remains private and is cleared on completion, replacement, hiding or disposal. */ showPasswordReset(token: string): void; /** Runs the current form through the shared project RestGo client. Never exposes tokens. */ submit(): Promise; dispose(): void; } /** Browser-safe, versioned report document. Geometry is expressed in millimetres. */ export type WebReportParameterType = 'string' | 'number' | 'boolean' | 'date'; export type WebReportParameterValue = string | number | boolean | null; export interface WebReportParameter { readonly name: string; readonly type: WebReportParameterType; readonly defaultValue: WebReportParameterValue; } export type WebReportValueSource = { readonly kind: 'static'; readonly value: string; } | { readonly kind: 'parameter'; readonly name: string; } | { readonly kind: 'field'; readonly apiClientId: string; readonly operationId: string; readonly path: string; } | { readonly kind: 'row'; readonly path: string; } | { readonly kind: 'system'; readonly value: 'pageNumber' | 'pageCount'; }; export interface WebReportElementBase { readonly id: string; readonly name: string; readonly x: number; readonly y: number; readonly width: number; readonly height: number; /** Zero-based owning column when placed directly in a Repeater Header or Footer. */ readonly column?: number; } export interface WebReportTextElement extends WebReportElementBase { readonly type: 'text'; readonly value: WebReportValueSource; /** PDF point size (1/72 inch). */ readonly fontSize: number; readonly color: string; readonly bold: boolean; readonly align: 'left' | 'center' | 'right'; } export interface WebReportImageElement extends WebReportElementBase { readonly type: 'image'; readonly value: WebReportValueSource; readonly fit: 'contain'; } export interface WebReportLineElement extends WebReportElementBase { readonly type: 'line'; readonly color: string; /** PDF point size. */ readonly strokeWidth: number; } export type WebReportLeafElement = WebReportTextElement | WebReportImageElement | WebReportLineElement; export interface WebReportRepeaterSection { readonly height: number; readonly elements: readonly WebReportElement[]; readonly columns?: number; readonly columnGap?: number; } export interface WebReportRepeaterAppearance { readonly backgroundColor: string | null; readonly borderColor: string; /** Millimetres, matching the editor's geometry. */ readonly borderWidth: number; readonly borderStyle: 'solid' | 'dashed'; readonly rowLines: boolean; readonly columnLines: boolean; readonly lineColor: string; readonly lineWidth: number; } export interface WebReportRepeaterLayout { readonly columns: number; /** Rows per grid block; zero fits all records into the configured columns. */ readonly rows: number; readonly columnGap: number; readonly fill: 'rows' | 'columns'; } export interface WebReportGroupAppearance { readonly backgroundColor: string | null; readonly borderColor: string; /** Millimetres, matching the editor's geometry. */ readonly borderWidth: number; readonly borderStyle: 'solid' | 'dashed'; /** Millimetres; limited to half the rendered width/height when painting. */ readonly borderRadius: number; } /** A single container; children inherit the enclosing record without introducing a data source. */ export interface WebReportGroupElement extends WebReportElementBase { readonly type: 'group'; readonly children: readonly WebReportElement[]; readonly appearance?: WebReportGroupAppearance; } export interface WebReportRepeaterElement extends WebReportElementBase { readonly type: 'repeater'; readonly source: { readonly apiClientId: string; readonly operationId: string; readonly listPath: string; /** Nested repeaters can read a list relative to the enclosing record. */ readonly scope?: 'api' | 'row'; }; /** Space in millimetres between complete records. */ readonly gap: number; readonly children: readonly WebReportElement[]; readonly header?: WebReportRepeaterSection; readonly footer?: WebReportRepeaterSection; readonly appearance?: WebReportRepeaterAppearance; readonly layout?: WebReportRepeaterLayout; } export type WebReportElement = WebReportLeafElement | WebReportRepeaterElement | WebReportGroupElement; export type WebReportContainerElement = WebReportRepeaterElement | WebReportGroupElement; export type WebReportBandKind = 'title' | 'pageHeader' | 'detail' | 'pageFooter' | 'summary'; export interface WebReportBand { readonly id: string; readonly kind: WebReportBandKind; readonly height: number; readonly elements: readonly WebReportElement[]; } export interface WebReportTemplate { readonly schemaVersion: 1; readonly name: string; readonly paper: { readonly size: 'A4' | 'Letter'; readonly orientation: 'portrait' | 'landscape'; readonly margins: { readonly top: number; readonly right: number; readonly bottom: number; readonly left: number; }; }; readonly parameters: readonly WebReportParameter[]; readonly bands: readonly WebReportBand[]; } export function reportRepeaterLayout(element: WebReportRepeaterElement): WebReportRepeaterLayout; export function reportRepeaterAppearance(element: WebReportRepeaterElement): WebReportRepeaterAppearance; export function reportRepeaterColumnWidth(element: WebReportRepeaterElement): number; export function reportRepeaterSectionLayout(section: WebReportRepeaterSection | undefined): Pick; export function reportRepeaterSectionColumnWidth(element: WebReportRepeaterElement, section: 'header' | 'footer'): number; export function reportRepeaterTemplateHeight(element: WebReportRepeaterElement): number; export function reportGroupAppearance(element: WebReportGroupElement): WebReportGroupAppearance; export function reportElementChildren(element: WebReportElement): readonly WebReportElement[]; /** All authored descendants, including sections, without introducing runtime globals. */ export function reportRepeaterElements(element: WebReportRepeaterElement): readonly WebReportElement[]; export function createDefaultReportTemplate(): WebReportTemplate; /** Checks both authored defaults and programmatically supplied values. Dates use ISO text. */ export function validateReportParameterValue(parameter: WebReportParameter, value: unknown): WebReportParameterValue; export function reportPaperSize(template: WebReportTemplate): { readonly width: number; readonly height: number; }; /** Parses into a fresh validated value; unknown properties never enter the runtime model. */ export function parseReportTemplate(value: unknown): WebReportTemplate; export function serializeReportTemplate(template: WebReportTemplate): string; /** Own-property JSON Pointer traversal; a missing field displays an empty value. */ export function resolveReportPointer(value: unknown, path: string): unknown; export type WebReportPreviewMode = 'modal' | 'new-tab' | 'download'; export interface WebReportBuilderConfiguration extends WebNonvisualComponentOptions { readonly reportTemplate?: WebReportTemplate; readonly template?: WebReportTemplate; readonly previewMode?: WebReportPreviewMode; readonly fileName?: string; } export interface WebReportGenerationOptions { readonly parameters?: Readonly>; readonly previewMode?: WebReportPreviewMode; readonly fileName?: string; readonly signal?: AbortSignal; } export interface WebReportResult { readonly blob: Blob; readonly pageCount: number; readonly fileName: string; } export type WebReportEventHandler = (sender: TSender, event: CustomEvent) => void | Promise; export type WebReportParameterValues = Record; /** Typed parameter overrides are independent of the immutable template defaults. */ export class WebReportParameters { #private; readonly template: () => WebReportTemplate; constructor(template: () => WebReportTemplate); Set(name: K, value: TValues[K]): void; /** Dynamic names for externally loaded templates; values still follow their declared types. */ SetValue(name: string, value: WebReportParameterValue): void; Get(name: K): TValues[K]; GetValue(name: string): WebReportParameterValue; Clear(name?: keyof TValues & string): void; get values(): Readonly; /** Retains only overrides whose names and declared types survive a template replacement. */ reconcile(previous: WebReportTemplate, next: WebReportTemplate): void; } /** Nonvisual browser report service. It reads loaded ApiClient state and never executes requests. */ export class WebReportBuilder extends WebNonvisualComponent { #private; readonly Parameters: WebReportParameters; constructor(configuration?: WebReportBuilderConfiguration); get template(): WebReportTemplate; set template(value: WebReportTemplate); get reportTemplate(): WebReportTemplate; set reportTemplate(value: WebReportTemplate); get previewMode(): WebReportPreviewMode; set previewMode(value: WebReportPreviewMode); get fileName(): string; set fileName(value: string); get busy(): boolean; get OnGenerate(): WebReportEventHandler | null; set OnGenerate(value: WebReportEventHandler | null); get OnSuccess(): WebReportEventHandler | null; set OnSuccess(value: WebReportEventHandler | null); get OnError(): WebReportEventHandler | null; set OnError(value: WebReportEventHandler | null); /** Generated code binds each component by stable model ID and by its authored name. */ bindApiClient(key: string, client: WebApiClient): void; SaveTemplate(): string; LoadTemplate(value: WebReportTemplate | string | Blob): Promise; GeneratePDF(options?: WebReportGenerationOptions): Promise; Generate(options?: WebReportGenerationOptions): Promise; ClosePreview(): void; dispose(): void; } export interface WebRepeatingGroupConfiguration { readonly schemaVersion: 1; readonly apiClientId: string | null; readonly operationId: string | null; readonly listPath: string; readonly rowHeightMode: 'fixed' | 'dynamic'; readonly fixedRowHeight: number; readonly minRowHeight: number; readonly maxRowHeight: number | null; readonly gap: number; readonly emptyMessage: string; } export interface WebRepeatingGroupCurrentRow { readonly index: number; readonly value: T; /** Resolves one concrete instance inside this row, including across awaits. */ component(templateId: string): C; } export interface WebRepeatingGroupRow extends WebRepeatingGroupCurrentRow { readonly element: HTMLElement; /** Physical IDs are unique per row and reusable placement. */ readonly components: ReadonlyMap; readonly componentIds: ReadonlyMap; readonly reusableInstances: readonly MountedReusableElementInstance[]; dispose(): void; } export type WebRepeatingGroupRowRenderer = (index: number, value: unknown, configuration: WebRepeatingGroupConfiguration) => WebRepeatingGroupRow; export type WebRepeatingGroupRowListener = (row: WebRepeatingGroupRow) => void | (() => void); /** Generated entry supplies authored reusable classes before requests execute. */ export function setRepeatingGroupReusableFactory(factory: WebRepeatingGroupRowListener): void; /** Native events keep the row that owns the sender even after the row is removed. */ export function getRepeatingGroupCurrentRow(sender: HTMLElement | Event): WebRepeatingGroupCurrentRow | undefined; /** Renderer associates native sender elements without copying row data into DOM attributes. */ export function bindRepeatingGroupRowContext(element: HTMLElement, context: WebRepeatingGroupCurrentRow): void; export function normalizeWebRepeatingGroupConfiguration(value: unknown): WebRepeatingGroupConfiguration; /** Shared row shell geometry for the Designer and browser runtime. */ export function projectRepeatingGroupRowStyle(configuration: WebRepeatingGroupConfiguration, layout?: RuntimeComponentLayout, childrenBounds?: readonly { readonly y: number; readonly height: number; }[]): Readonly>; /** Reads only own JSON fields; never follows object prototypes. */ export function readCurrentRowField(value: unknown, pointer: string): unknown; /** A native typed setter remains responsible for its visual projection. */ export function applyCurrentRowBindings(component: WebComponent, bindings: unknown, value: unknown): void; /** One responsive template mounted independently for every response-list item. */ export class WebRepeatingGroup extends WebComponent { #private; constructor(element: HTMLElement); get repeatingGroupConfig(): WebRepeatingGroupConfiguration; set repeatingGroupConfig(value: WebRepeatingGroupConfiguration); get rows(): readonly T[]; set rows(values: readonly T[]); get rowCount(): number; getRow(index: number): WebRepeatingGroupRow; /** The Designer uses one editable host without serializing sampled row data. */ getTemplateHost(): HTMLElement; /** Runtime renderer owns creation; authored code only supplies values. */ configureRowTemplate(renderer: WebRepeatingGroupRowRenderer): void; /** Observes completed API results; it never executes an operation itself. */ bindApiClient(apiClient: WebApiClient | null): void; subscribeRows(listener: WebRepeatingGroupRowListener): () => void; dispose(): void; } /** Browser-only chart contracts, shared by runtime and Designer projections. */ export const WEB_CHART_TYPES: readonly [ "doughnut", "pie", "bar", "horizontalBar", "line", "area", "radar", "polarArea" ]; export type WebChartType = (typeof WEB_CHART_TYPES)[number]; export type WebChartFontFamily = 'inherit' | 'roboto' | 'open-sans' | 'jetbrains-mono' | 'inter' | 'lato' | 'montserrat' | 'poppins' | 'nunito'; export interface WebChartSeriesConfiguration { readonly id: string; readonly name: string; readonly color: string; readonly apiClientId: string | null; readonly operationId: string | null; readonly listPath: string; readonly labelField: string; readonly valueField: string; } export interface WebChartsConfiguration { readonly schemaVersion: 1; readonly type: WebChartType; readonly title: string; readonly subtitle: string; readonly fontFamily?: WebChartFontFamily; readonly legendFontFamily?: WebChartFontFamily; readonly textColor?: string | null; readonly titleColor?: string | null; readonly subtitleColor?: string | null; readonly legendColor?: string | null; readonly titleIcon?: LucideIconName | null; readonly showLegend: boolean; readonly legendPosition: 'bottom' | 'right'; readonly showGrid: boolean; readonly showLabels: boolean; readonly smooth: boolean; readonly stacked: boolean; readonly innerRadius: number; readonly valuePrefix: string; readonly valueSuffix: string; readonly decimalPlaces: number; readonly emptyText: string; readonly series: readonly WebChartSeriesConfiguration[]; } export interface WebChartPoint { readonly label: string; readonly value: number; } export interface WebChartSeriesData { readonly id: string; readonly name: string; readonly color: string; readonly points: readonly WebChartPoint[]; } /** The original numeric value and category of one activated chart mark. */ export interface WebChartPointEventDetail { readonly label: string; readonly value: number; readonly seriesId: string; readonly seriesName: string; readonly index: number; } export const WEB_CHART_COLORS: readonly [ "#6366f1", "#14b8a6", "#f59e0b", "#ec4899", "#38bdf8" ]; export function webChartColor(value: unknown, index?: number): string; /** Distinct shades keep a circular series tied to its authored base color. */ export function webChartSliceColor(baseColor: string, index: number): string; export function normalizeWebChartsConfiguration(value: unknown): WebChartsConfiguration; /** Invalid pointers and missing properties never select a different value. */ export function webChartPointer(value: unknown, pointer: string): unknown; export function webChartPoints(rows: readonly unknown[], configuration: WebChartSeriesConfiguration): readonly WebChartPoint[]; export function formatWebChartValue(value: number, configuration: WebChartsConfiguration): string; export function freezeWebChartData(value: readonly WebChartSeriesData[]): readonly WebChartSeriesData[]; export interface WebChartsRenderOptions { readonly interactive?: boolean; readonly width?: number; readonly height?: number; readonly onPointClick?: (detail: WebChartPointEventDetail) => void; } /** Shared SVG projection. It creates no subscriptions, observers or API requests. */ export function renderChartsSvg(document: Document, configuration: WebChartsConfiguration, data: readonly WebChartSeriesData[], options?: WebChartsRenderOptions): SVGSVGElement; export type WebChartPointEventHandler = (sender: TSender, event: CustomEvent) => void | Promise; /** Responsive, accessible SVG charts whose API bindings observe completed requests. */ export class WebCharts extends WebComponent { #private; constructor(element: HTMLElement); /** Persisted chart appearance and up to five declarative API series. */ get chartsConfig(): WebChartsConfiguration; set chartsConfig(value: WebChartsConfiguration); /** Current transient series. Values remain numeric and never enter the Project Model. */ get data(): readonly WebChartSeriesData[]; set data(value: readonly WebChartSeriesData[]); get selectedLabel(): string | null; get selectedValue(): number | null; get selectedSeriesId(): string | null; set onPointClick(handler: WebChartPointEventHandler | null); /** Clears displayed points; an existing binding can refresh after the next successful request. */ clear(): void; /** * Binds one configured series to a named API operation by stable operation ID. * Reads existing successful data and subsequent results; never executes a request. */ bindApiClient(apiClient: WebApiClient, operationId: string, seriesId: string): () => void; dispose(): void; } export interface RestGoRuntimeConfiguration { readonly enabled: boolean; readonly baseUrl: string; readonly apiToken?: string; readonly apiVersion: number; readonly defaultDatabase: string; readonly persistSession: boolean; readonly sessionStorage: 'local' | 'session' | 'memory'; readonly storageKey: string; } export class RestGoNotConfiguredError extends Error { constructor(); } export function configureRestGo(configuration: RestGoRuntimeConfiguration): import('@webrad/restgo-sdk').RestGoClient | null; export function getRestGoClient(): import('@webrad/restgo-sdk').RestGoClient; export const RestGO: import('@webrad/restgo-sdk').RestGoClient; /** Handler used by every WebRAD component event. */ export type WebComponentEventHandler = ( sender: TSender, event: Event, ) => void | Promise; /** Converts a WebRAD event name, such as OnClick, to its browser event name. */ export function runtimeEventName(eventName: string): string; export interface WebNonvisualComponentOptions { readonly id?: string; readonly name?: string; } /** Browser-safe identity shared by services that do not own a DOM element. */ export class WebNonvisualComponent { constructor(options?: WebNonvisualComponentOptions); readonly id: string; readonly name: string; bindEvent(eventName: string, handler: WebComponentEventHandler | null): () => void; emit(eventName: string, detail?: unknown): boolean; dispose(): void; } export const WEB_DATA_GRID_CELL_KINDS: readonly ['text', 'image', 'button', 'checkbox', 'toggle']; export type WebDataGridCellKind = (typeof WEB_DATA_GRID_CELL_KINDS)[number]; export const WEB_DATA_GRID_COLUMN_WIDTH_MODES: readonly ['fixed', 'dynamic']; export type WebDataGridColumnWidthMode = (typeof WEB_DATA_GRID_COLUMN_WIDTH_MODES)[number]; export const WEB_DATA_GRID_ROW_HEIGHT_MODES: readonly ['fixed', 'dynamic']; export type WebDataGridRowHeightMode = (typeof WEB_DATA_GRID_ROW_HEIGHT_MODES)[number]; export const WEB_DATA_GRID_HORIZONTAL_ALIGNMENTS: readonly ['start', 'center', 'end']; export type WebDataGridHorizontalAlignment = (typeof WEB_DATA_GRID_HORIZONTAL_ALIGNMENTS)[number]; export interface WebDataGridColumn { readonly id: string; readonly header: string; readonly fieldPath: string; readonly cellKind: WebDataGridCellKind; readonly fixedCaption: string; readonly buttonIcon: WebButtonIcon | null; readonly footer: string; readonly widthMode: WebDataGridColumnWidthMode; readonly width: number; readonly minWidth: number; readonly maxWidth: number | null; readonly flex: number; readonly headerAlign: WebDataGridHorizontalAlignment; readonly cellAlign: WebDataGridHorizontalAlignment; } export interface WebDataGridConfiguration { readonly schemaVersion: number; readonly apiClientId: string | null; readonly operationId: string | null; readonly listPath: string; readonly columnCount: number; readonly showHeader: boolean; readonly stickyHeader: boolean; readonly showFooter: boolean; readonly stickyFooter: boolean; readonly rowHeightMode: WebDataGridRowHeightMode; readonly fixedRowHeight: number; readonly minRowHeight: number; readonly maxRowHeight: number | null; readonly cellPaddingHorizontal: number; readonly cellPaddingVertical: number; readonly wrapText: boolean; readonly stripedRows: boolean; readonly showHorizontalLines: boolean; readonly showVerticalLines: boolean; readonly emptyMessage: string; readonly columns: readonly WebDataGridColumn[]; } export type WebDataGridRowValues = Readonly & { (fieldNameOrPath: string): T | undefined; }; export interface WebDataGridCellEventDetail { readonly rowIndex: number; readonly columnIndex: number; readonly row: TRow; readonly column: WebDataGridColumn; readonly value: unknown; readonly getValue: WebDataGridRowValues; } export function normalizeWebDataGridConfiguration(value: unknown): WebDataGridConfiguration; export class WebDataGrid extends WebComponent { constructor(element: HTMLElement); configuration: WebDataGridConfiguration; dataGridConfig: WebDataGridConfiguration; bindApiClient(apiClient: WebApiClient | null): void; } /** Base browser-side wrapper shared by every visual WebRAD component. */ export interface WebCurrentRowBinding { readonly property: string; readonly fieldPath: string; } export class WebComponent { currentRowBindings: readonly WebCurrentRowBinding[]; readonly element: TElement; constructor(element: TElement); readonly id: string; readonly name: string; visible: boolean; collapseWhenHidden: boolean; enabled: boolean; x: number; y: number; width: number; height: number; /** Outer spacing on all four sides, in pixels. */ margin: number; marginTop: number; marginRight: number; marginBottom: number; marginLeft: number; alignSelf: RuntimeLayoutAlignSelf; tabIndex: number; backgroundColor: string; color: string; borderColor: string; focus(options?: FocusOptions): void; show(): void; hide(): void; bindEvent(eventName: string, handler: WebComponentEventHandler | null): () => void; emit(eventName: string, detail?: unknown): boolean; dispose(): void; } /** Visual container used to group controls. */ export type WebPanelBackgroundSize = 'cover' | 'contain' | 'auto' | 'stretch'; export type WebPanelBackgroundPosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'left top' | 'right top' | 'left bottom' | 'right bottom'; export type WebPanelBackgroundRepeat = 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y'; export const PANEL_BACKGROUND_SIZES: readonly ['cover', 'contain', 'auto', 'stretch']; export const PANEL_BACKGROUND_POSITIONS: readonly ['center', 'top', 'bottom', 'left', 'right', 'left top', 'right top', 'left bottom', 'right bottom']; export const PANEL_BACKGROUND_REPEATS: readonly ['no-repeat', 'repeat', 'repeat-x', 'repeat-y']; export class WebPanel extends WebComponent { aspectRatio: WebAspectRatio; floatingAlignment: WebPanelFloatingAlignment; placement: 'in-flow' | 'floating'; floatingHorizontalAnchor: 'left' | 'center' | 'right'; floatingVerticalAnchor: 'top' | 'center' | 'bottom'; floatingZIndex: number; caption: string; progressEnabled: boolean; progressValue: number; readonly progressVisible: boolean; backgroundImage: string; backgroundSize: WebPanelBackgroundSize; backgroundPosition: WebPanelBackgroundPosition; backgroundRepeat: WebPanelBackgroundRepeat; } export class WebGroup extends WebPanel {} /** Browser-native floating child container that can be shown or closed from page code. */ export class WebPopup extends WebComponent { constructor(element: HTMLElement); modal: boolean; readonly open: boolean; returnValue: string; show(): void; hide(): void; close(returnValue?: string): void; } /** One instance of a shared reusable component definition. */ export class WebReusableElement extends WebPanel { reusableElementId: string; } export interface ClosePageOptions { /** Remove the page element from the document instead of hiding it. */ readonly remove?: boolean; } export type RuntimeContainerLayoutMode = 'fixed' | 'align-to-parent' | 'row' | 'column'; export type RuntimeLayoutItemSizingMode = 'fixed' | 'stretch' | 'fit-content'; export type RuntimeLayoutAnchor = 'start' | 'center' | 'end' | 'stretch'; export type RuntimeLayoutJustifyContent = | 'start' | 'center' | 'end' | 'space-between' | 'space-around'; export type RuntimeLayoutAlignItems = 'start' | 'center' | 'end' | 'stretch'; export type RuntimeLayoutAlignSelf = 'auto' | RuntimeLayoutAlignItems; export interface RuntimeContainerLayout { readonly mode: RuntimeContainerLayoutMode; readonly paddingTop: number; readonly paddingRight: number; readonly paddingBottom: number; readonly paddingLeft: number; readonly gap: number; readonly wrap: boolean; readonly justifyContent: RuntimeLayoutJustifyContent; readonly alignItems: RuntimeLayoutAlignItems; } export interface RuntimeLayoutItem { readonly width: RuntimeLayoutItemSizingMode; readonly height: RuntimeLayoutItemSizingMode; readonly minWidth: number; readonly maxWidth: number | null; readonly minHeight: number; readonly maxHeight: number | null; readonly grow: number; readonly shrink: boolean; readonly alignSelf?: RuntimeLayoutAlignSelf; readonly horizontalAnchor: RuntimeLayoutAnchor; readonly verticalAnchor: RuntimeLayoutAnchor; readonly left: number; readonly right: number; readonly top: number; readonly bottom: number; } export interface RuntimeComponentLayout { readonly container: RuntimeContainerLayout; readonly item: RuntimeLayoutItem; } export interface RuntimeLayoutBounds { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } /** Structural node subset accepted by the browser-safe layout projector. */ export interface RuntimeLayoutNode { readonly type?: string; readonly bounds: RuntimeLayoutBounds; readonly children?: readonly string[]; readonly props?: Readonly>; readonly layout?: RuntimeComponentLayout; } export interface RuntimeLayoutProjection { readonly container: Readonly>; readonly item: Readonly>; } export interface ApplyRuntimeLayoutOptions { readonly isPageRoot?: boolean; readonly isReusableRoot?: boolean; readonly reusableRootFitContent?: { readonly width: boolean; readonly height: boolean; readonly hasMaxWidth: boolean; readonly hasMaxHeight: boolean; }; } export interface RuntimeFitContentSize { readonly width?: number; readonly height?: number; } export interface RuntimeFitContentMeasurementOptions { readonly scale?: number; readonly isLayoutChild?: (child: HTMLElement) => boolean; } export interface RuntimeFitContentBinding { refresh(): void; dispose(): void; } export function resolveRuntimeContainerLayout( layout: RuntimeComponentLayout | undefined, ): RuntimeContainerLayout; export function isFloatingLayoutNode(node: RuntimeLayoutNode): boolean; export type WebPanelFloatingAlignment = 'none' | 'top' | 'bottom' | 'left' | 'right' | 'client'; export function getFloatingPanelAlignment(node: Pick): WebPanelFloatingAlignment; export function projectFloatingPanelBounds(node: RuntimeLayoutNode, pageSize: Pick): RuntimeLayoutBounds | undefined; export function projectRuntimeLayout( node: RuntimeLayoutNode, parentContainer?: RuntimeContainerLayout, ): RuntimeLayoutProjection; export function setRuntimeLayoutAspectRatio( element: HTMLElement, ratio: WebAspectRatio, ): void; export const WEB_ASPECT_RATIOS: readonly ['none', '1:1', '4:3', '3:4', '16:9', '9:16']; export type WebAspectRatio = (typeof WEB_ASPECT_RATIOS)[number]; export function normalizeWebAspectRatio(value: unknown): WebAspectRatio; export function getRuntimeLayoutAspectRatio(element: HTMLElement): WebAspectRatio; export type RuntimeLayoutNodeProjector = (node: RuntimeLayoutNode) => RuntimeLayoutNode; export function setRuntimeLayoutProjection( element: HTMLElement, projector: RuntimeLayoutNodeProjector | null, ): boolean; export function measureRuntimeFitContentSize( target: HTMLElement, contentHost: HTMLElement, layout: RuntimeComponentLayout | undefined, options?: RuntimeFitContentMeasurementOptions, ): RuntimeFitContentSize; export function bindRuntimeFitContent( target: HTMLElement, contentHost: HTMLElement, layout: RuntimeComponentLayout | undefined, options?: RuntimeFitContentMeasurementOptions, ): RuntimeFitContentBinding; export function applyRuntimeContainerLayout( element: HTMLElement, node: RuntimeLayoutNode, ): RuntimeLayoutProjection; export function applyRuntimeLayout( element: HTMLElement, node: RuntimeLayoutNode, parentContainer?: RuntimeContainerLayout, options?: ApplyRuntimeLayoutOptions, ): RuntimeLayoutProjection; export type WebPageLayoutMode = RuntimeContainerLayoutMode; /** Shared event-binding and component lookup surface for authored scopes. */ export class WebComponentScope extends WebPanel { constructor(element: HTMLElement, components?: ReadonlyMap); requireComponentElement(componentId: string): HTMLElement; protected bindGeneratedEvent( component: WebComponent | WebNonvisualComponent, eventName: string, handlerName: string, currentRow?: WebRepeatingGroupCurrentRow, ): () => void; dispose(): void; } /** One isolated authored-code scope for a mounted reusable placement. */ export class WebReusableElementInstance extends WebComponentScope { constructor( element: HTMLElement, instanceId: string, components: ReadonlyMap, componentIds: ReadonlyMap, ); readonly instanceId: string; /** User-facing name of the page that contains this reusable placement. */ readonly pageName: string; componentId(templateComponentId: string): string; } /** Current user delivered when a shown page receives an authenticated session. */ export interface WebPageLoginEventDetail { readonly user: import('@webrad/restgo-sdk').RestGoUser; readonly restored: boolean; } export interface WebPageLogoutEventDetail { readonly user: import('@webrad/restgo-sdk').RestGoUser; } /** Base class for generated and user-authored pages. */ export class WebPage extends WebComponentScope { /** Browser tab title; blank values retain the application's original title. */ browserTitle: string; readonly routePath: string; readonly params: Readonly; layoutMode: WebPageLayoutMode; show(): void; close(options?: ClosePageOptions): void; } export type WebLabelTextWrap = 'none' | 'word' | 'break-word' | 'character'; export class WebLabel extends WebComponent { textWrap: WebLabelTextWrap; caption: string; text: string; autoSize: boolean; } export class WebTextArea extends WebComponent { constructor(element: HTMLElement); value: string; placeholder: string; readOnly: boolean; rows: number; spellCheck: boolean; clear(): void; set onChange(handler: WebComponentEventHandler | null); set onInput(handler: WebComponentEventHandler | null); } export type WebButtonIcon = | 'add' | 'chevron-down' | 'chevron-right' | 'close' | 'delete' | 'folder-open' | 'info' | 'layers' | 'lightbulb' | 'palette' | 'page' | 'play' | 'redo' | 'save' | 'search' | 'settings' | 'style' | 'undo' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-down' | 'chevron-left' | 'chevron-up' | 'chevrons-left' | 'chevrons-right' | 'chevrons-up' | 'chevrons-down' | 'menu' | 'more-horizontal' | 'more-vertical' | 'home' | 'external-link' | 'check' | 'check-circle' | 'check-square' | 'minus' | 'minus-circle' | 'plus-circle' | 'edit' | 'copy' | 'cut' | 'clipboard' | 'download' | 'upload' | 'refresh' | 'link' | 'unlink' | 'share' | 'send' | 'printer' | 'archive' | 'eye' | 'eye-off' | 'lock' | 'unlock' | 'filter' | 'sort-asc' | 'sort-desc' | 'warning' | 'alert-circle' | 'help-circle' | 'bell' | 'bookmark' | 'flag' | 'heart' | 'star' | 'folder' | 'file' | 'file-plus' | 'file-text' | 'text' | 'image' | 'camera' | 'database' | 'table' | 'list' | 'grid' | 'chart-bar' | 'chart-line' | 'code' | 'terminal' | 'cloud' | 'upload-cloud' | 'download-cloud' | 'user' | 'users' | 'user-plus' | 'mail' | 'phone' | 'globe' | 'map-pin' | 'calendar' | 'clock' | 'pause' | 'stop' | 'skip-back' | 'skip-forward' | 'volume-2' | 'volume-x' | 'video' | 'login' | 'logout' | 'sign-in' | 'sign-out' | 'door-in' | 'door-out' | 'door-open' | 'door-closed' | 'key' | 'key-round' | 'shield' | 'shield-check' | 'shield-alert' | 'shield-x' | 'fingerprint' | 'badge-check' | 'id-card' | 'user-check' | 'user-x' | 'user-minus' | 'user-round' | 'contact' | 'accessibility' | 'password' | 'at-sign' | 'scan-face' | 'circle' | 'circle-dot' | 'square' | 'move' | 'maximize' | 'minimize' | 'expand' | 'shrink' | 'fullscreen' | 'panel-left' | 'panel-right' | 'panel-top' | 'panel-bottom' | 'sidebar-left' | 'sidebar-right' | 'layout' | 'columns' | 'rows' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'rotate-cw' | 'rotate-ccw' | 'repeat' | 'folder-plus' | 'folder-minus' | 'folder-x' | 'folder-search' | 'folder-check' | 'folder-lock' | 'file-minus' | 'file-x' | 'file-check' | 'file-code' | 'file-image' | 'file-video' | 'file-audio' | 'file-archive' | 'file-lock' | 'file-search' | 'file-copy' | 'files' | 'hard-drive' | 'server' | 'cpu' | 'monitor' | 'laptop' | 'smartphone' | 'tablet' | 'wifi' | 'bluetooth' | 'message-circle' | 'message-square' | 'messages-square' | 'message-plus' | 'message-x' | 'inbox' | 'outbox' | 'reply' | 'reply-all' | 'forward-mail' | 'paperclip' | 'attachment' | 'rss' | 'megaphone' | 'microphone' | 'microphone-off' | 'headset' | 'radio' | 'sms' | 'cart' | 'shopping-bag' | 'credit-card' | 'receipt' | 'wallet' | 'dollar-sign' | 'percent' | 'tags' | 'gift' | 'truck' | 'building' | 'briefcase' | 'target' | 'trophy' | 'toggle-right'; export class WebButton extends WebComponent { constructor(element: HTMLElement); caption: string; icon: WebButtonIcon; click(): void; set onClick(handler: WebComponentEventHandler | null); } export interface WebFileUploadOptions { readonly isPublic?: boolean; readonly name?: string; readonly signal?: AbortSignal; } export interface WebFileUploadConfiguration extends WebNonvisualComponentOptions { readonly accept?: string; readonly isPublic?: boolean; readonly enabled?: boolean; } export interface WebFileUploadSelection { readonly name: string; readonly path: string | null; readonly size: number; readonly extension: string; } export interface WebFileUploadResult extends Readonly { readonly url: string; } export type WebFileUploadChangeEventDetail = WebFileUploadSelection | null; export type WebFileUploadProgressEventDetail = import('@webrad/restgo-sdk').RestGoUploadProgress; export interface WebFileUploadCompleteEventDetail { readonly result: WebFileUploadResult | null; readonly error: Error | null; } /** Selects a local file and uploads it through the configured RestGO client. */ export class WebFileUpload extends WebNonvisualComponent { constructor(configuration?: WebFileUploadConfiguration); accept: string; isPublic: boolean; enabled: boolean; readonly selectedFile: File | null; readonly selection: WebFileUploadSelection | null; readonly fileName: string; readonly uploading: boolean; readonly progress: number | null; readonly result: WebFileUploadResult | null; readonly lastError: Error | null; OpenFile(): Promise; SendToRestGO(options?: WebFileUploadOptions): Promise; Clear(): void; set onChange(handler: WebComponentEventHandler | null); set onSuccess(handler: WebComponentEventHandler | null); set onError(handler: WebComponentEventHandler | null); set onComplete(handler: WebComponentEventHandler | null); set onProgress(handler: WebComponentEventHandler | null); } export class WebToggle extends WebComponent { constructor(element: HTMLElement); checked: boolean; click(): void; set onChange(handler: WebComponentEventHandler | null); set onClick(handler: WebComponentEventHandler | null); } export type WebProgressBarFormat = 'bars' | 'dunnet' | 'circus'; export class WebProgressBar extends WebComponent { constructor(element: HTMLElement); value: number; min: number; max: number; format: WebProgressBarFormat; showValue: boolean; readonly percentage: number; setRange(min: number, max: number): void; increment(amount?: number): void; reset(): void; set onChange(handler: WebComponentEventHandler | null); } export class WebCheckBox extends WebComponent { constructor(element: HTMLElement); checked: boolean; caption: string; enabled: boolean; set onChange(handler: WebComponentEventHandler | null); } export interface WebSelectItem { readonly value: string; readonly label: string; readonly disabled?: boolean; } export interface WebComboBoxConfiguration { readonly schemaVersion: 1; readonly apiClientId: string | null; readonly operationId: string | null; readonly listPath: string; readonly displayField: string; readonly keyField: string; } export class WebComboBox extends WebComponent { constructor(element: HTMLElement); value: string; selectedIndex: number; get values(): readonly string[]; set values(values: readonly string[]); get items(): readonly WebSelectItem[]; set items(items: readonly (string | WebSelectItem)[]); comboBoxConfig: WebComboBoxConfiguration | null; bindApiClient(apiClient: WebApiClient | null): void; override dispose(): void; set onChange(handler: WebComponentEventHandler | null); } export class WebImage extends WebComponent { constructor(element: HTMLElement); get src(): string; set src(value: string | null); placeholder: WebImagePlaceholder; alt: string; objectFit: WebImageObjectFit; } export type WebImageObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; export type WebImagePlaceholder = 'image' | 'user'; export class WebListBox extends WebComponent { constructor(element: HTMLElement); value: string; selectedIndex: number; multiple: boolean; get items(): readonly WebSelectItem[]; set items(items: readonly (string | WebSelectItem)[]); selectedValues: readonly string[]; set onChange(handler: WebComponentEventHandler | null); } export type PageParameterValue = string | number | boolean; export type PageParameterValues = Readonly>; export interface PageParameterDefinition { readonly name: string; readonly type: 'string' | 'number' | 'boolean'; readonly required: boolean; readonly defaultValue?: PageParameterValue; } export interface PageParametersChangedEventDetail { readonly previous: PageParameterValues; readonly params: PageParameterValues; } export class PageParameterError extends Error { readonly pageName: string; readonly parameterName: string; constructor(pageName: string, parameterName: string, reason: string); } export interface WebRadPageParameters {} export type PageDestination = keyof WebRadPageParameters | (string & {}) | URL; export type NavigateArguments = Destination extends keyof WebRadPageParameters ? {} extends WebRadPageParameters[Destination] ? [options?: Omit & { readonly params?: WebRadPageParameters[Destination] }] : [options: Omit & { readonly params: WebRadPageParameters[Destination] }] : [options?: NavigateOptions]; export interface NavigateOptions { readonly replace?: boolean; readonly newWindow?: boolean; readonly target?: string; readonly params?: PageParameterValues; readonly paramsHandling?: 'replace' | 'merge' | 'preserve'; } /** Shows a browser message to the application user. */ export function Message(message: unknown): void; /** Asks the application user to confirm an action. */ export function Confirm(message: unknown): boolean; /** * Navigates an internal project page when its name or ID is provided by a * compiled app; otherwise navigates the browser or opens another window. */ export function Navigate(destination: Destination, ...args: NavigateArguments): void; export const message: typeof Message; export const confirm: typeof Confirm; export const navigate: typeof Navigate; /** Browser-safe authorization shared by the editor, Preview and generated apps. */ export type WebApiAuthorization = { readonly type: 'none'; } | { readonly type: 'basic'; readonly username: string; readonly password: string; } | { readonly type: 'bearer'; readonly token: string; } | { readonly type: 'api-key'; readonly name: string; readonly value: string; readonly in: 'header' | 'query'; }; /** Returns a detached, validated definition without coercing or trimming secrets. */ export function normalizeApiClientAuthorization(value: unknown): WebApiAuthorization | null; /** Explicit authorization wins over manual headers; omission preserves legacy headers. */ export function applyApiClientAuthorization(url: string, headers: Headers, authorization: WebApiAuthorization | null | undefined): string; /** Browser-safe request-body templates shared by the IDE and generated applications. */ export const WEB_API_TEMPLATE_PARAMETER_TYPES: readonly [ "string", "number", "integer", "boolean", "object", "array", "null" ]; export type WebApiTemplateParameterType = (typeof WEB_API_TEMPLATE_PARAMETER_TYPES)[number]; export interface WebApiTemplateParameter { readonly name: string; readonly type: WebApiTemplateParameterType; } export type WebApiTemplateValue = string | number | boolean | null | readonly WebApiTemplateValue[] | { readonly [key: string]: WebApiTemplateValue; }; export type WebApiTemplateValues = Readonly>; /** Derives unique names from the template and preserves existing type choices by name. */ export function getApiClientTemplateParameters(content: string, existing?: readonly WebApiTemplateParameter[]): readonly WebApiTemplateParameter[]; /** Converts an IDE-only input into a typed value without evaluating source code. */ export function parseApiClientTemplateTestValue(parameter: WebApiTemplateParameter, input: string): WebApiTemplateValue; /** Resolves a body template while preserving JSON types and escaping string contents. */ export function resolveApiClientBodyTemplate(body: WebApiRequestBody, values?: WebApiTemplateValues): string; export interface WebApiBodyInput extends WebApiTemplateParameter { readonly required: boolean; readonly inferred: boolean; readonly defaultValue?: WebApiTemplateValue; } /** Public reflection uses the same persisted body for code generation and runtime parameters. */ export function getApiClientBodyInputs(body: WebApiRequestBody): readonly WebApiBodyInput[]; /** Validates/copies input data while preventing prototype fields and unserializable values. */ export function copyApiClientInput(value: WebApiTemplateValue): WebApiTemplateValue; export type WebApiQueryValue = QueryValue | readonly QueryValue[]; export type WebApiParameterValue = WebApiTemplateValue | readonly QueryValue[]; export type WebApiParameterValues = { -readonly [K in keyof T]?: T[K]; }; export type WebApiQueryValues> = WebApiParameterValues & Record; export type WebApiHeaderValues> = WebApiParameterValues & Record; /** Generated inputs preserve the configured names without an untyped component namespace. */ export interface WebApiRequestInputs { readonly Parameter: object; readonly Query: object; readonly Headers: object; } export interface WebApiDefaultInputs extends WebApiRequestInputs { readonly Parameter: Record; readonly Query: Record; readonly Headers: Record; } export type WebApiInputPart = T extends { readonly [P in K]: infer Values extends object; } ? Values : Record; export type WebApiInputUnion = WebApiInputPart; export type WebApiUnionKeys = T extends object ? keyof T : never; export type WebApiUnionValue = T extends object ? K extends keyof T ? T[K] : never : never; export type WebApiCombinedInputs = { [P in WebApiUnionKeys>]: WebApiUnionValue, P>; }; export type WebApiRequests = { readonly [K in keyof TOutputs & string]: WebApiRequest, TOutputs[K], WebApiInputPart, WebApiInputPart>; }; /** Narrow callbacks keep request objects attached to their owner's stable operation ID. */ export interface WebApiAccessContext { readConfiguration(): WebApiClientConfiguration; writeConfiguration(value: WebApiClientConfiguration): void; readOperation(id: string): WebApiOperation; patchOperation(id: string, patch: Partial>): void; readBaseUrl(): string; writeBaseUrl(value: string): void; parameterNames(id: string): readonly string[]; readParameter(id: string, name: string): WebApiParameterValue | undefined; writeParameter(id: string, name: string, value: WebApiParameterValue | undefined): void; readParameterType(id: string, name: string): WebApiTemplateParameterType; writeParameterType(id: string, name: string, type: WebApiTemplateParameterType): void; clearParameters(id: string): void; readQuery(id: string, name: string): WebApiQueryValue; writeQuery(id: string, name: string, value: WebApiQueryValue): void; headerNames(id?: string): readonly string[]; readHeader(name: string, id?: string): string | undefined; writeHeader(name: string, value: string | undefined, id?: string): void; readResponseType(id: string): WebApiResponseType; writeResponseType(id: string, value: WebApiResponseType): void; readState(id: string): WebApiOperationState; execute(id: string, options: WebApiRequestOptions): Promise; bodyParameters(id: string): readonly WebApiTemplateParameter[]; } /** A FireDAC-style named parameter, backed by the owning runtime request. */ export class WebApiNamedParameter { private readonly context; private readonly operationId; readonly Name: string; constructor(context: WebApiAccessContext, operationId: string, Name: string); get Value(): WebApiParameterValue | undefined; set Value(value: WebApiParameterValue | undefined); get Type(): WebApiTemplateParameterType; set Type(value: WebApiTemplateParameterType); Clear(): void; } export class WebApiBodySettings { private readonly context; private readonly operationId; constructor(context: WebApiAccessContext, operationId: string); get Kind(): WebApiBodyKind; set Kind(value: WebApiBodyKind); get Value(): string; set Value(value: string); get Parameters(): readonly WebApiTemplateParameter[]; set Parameters(value: readonly WebApiTemplateParameter[]); } export class WebApiRequestSettings { private readonly context; private readonly operationId; constructor(context: WebApiAccessContext, operationId: string); get Credentials(): WebApiCredentials; set Credentials(value: WebApiCredentials); get Timeout(): number | null; set Timeout(value: number | null); get ResponseType(): WebApiResponseType; set ResponseType(value: WebApiResponseType); } export class WebApiResponse { private readonly context; private readonly operationId; constructor(context: WebApiAccessContext, operationId: string); get Value(): T | undefined; get Status(): WebApiOperationState['status']; get Error(): unknown; get UpdatedAt(): number | undefined; get Schema(): WebApiResponseSchema | null; set Schema(value: WebApiResponseSchema | null); } export class WebApiConnectionSettings> { private readonly context; readonly Headers: WebApiHeaderValues; constructor(context: WebApiAccessContext); get Mode(): WebApiConnection; set Mode(value: WebApiConnection); get BaseURL(): string; set BaseURL(value: string); get Authorization(): WebApiAuthorization | null; set Authorization(value: WebApiAuthorization | null); get Timeout(): number; set Timeout(value: number); get DefaultHeaders(): readonly WebApiParameter[]; set DefaultHeaders(value: readonly WebApiParameter[]); } /** Stable request object with mutable settings and private per-instance parameter values. */ export class WebApiRequest, TResult = unknown, TQuery extends object = Record, THeaders extends object = Record> { private readonly context; readonly ID: string; readonly parameter: WebApiParameterValues; readonly Query: WebApiQueryValues; readonly Headers: WebApiHeaderValues; readonly Body: WebApiBodySettings; readonly Options: WebApiRequestSettings; readonly Response: WebApiResponse; constructor(context: WebApiAccessContext, ID: string); get Name(): string; set Name(value: string); get Method(): string; set Method(value: string); /** Null inherits the client default; explicit none suppresses Authorization. */ get Authorization(): WebApiAuthorization | null; set Authorization(value: WebApiAuthorization | null); get Endpoint(): string; set Endpoint(value: string); get ApiVersion(): number | null; set ApiVersion(value: number | null); get Definition(): WebApiOperation; set Definition(value: WebApiOperation); ParamByName(name: string): WebApiNamedParameter; ClearParameters(): void; /** Executes this request without changing the client's selected Operation first. */ execute(options?: WebApiRequestOptions): Promise; } /** Names that must never turn an API client into a thenable or replace object behavior. */ export const WEB_API_REQUEST_RESERVED_NAMES: readonly [ "then", "constructor", "__proto__", "prototype", "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__" ]; /** Named request access with the client's existing public members protected. */ export type WebApiClientInstance, TInputs extends object = Record, TDefaultHeaders extends object = Record> = WebApiClient & (string extends keyof TOutputs ? object : Pick, Exclude | (typeof WEB_API_REQUEST_RESERVED_NAMES)[number]>>); export type QueryValue = string | number | boolean | null | undefined; /** Shared by the browser tester and generated runtime for versioned requests. */ export function apiOperationPath(path: string, version?: number | null): string; export const WEB_API_RESPONSE_TYPES: readonly [ "auto", "json", "text", "blob", "arrayBuffer" ]; export type WebApiResponseType = (typeof WEB_API_RESPONSE_TYPES)[number]; export type WebApiBodyKind = 'none' | 'json' | 'text' | 'form-urlencoded' | 'form-data'; export type WebApiConnection = 'custom' | 'restgo-session' | 'restgo-api-token' | 'restgo-public'; export type WebApiCredentials = 'omit' | 'same-origin' | 'include'; export type WebApiOperationStatus = 'idle' | 'loading' | 'success' | 'error'; /** Structural, browser-safe counterpart of a persisted API parameter. */ export interface WebApiParameter { readonly id: string; readonly name: string; readonly value: string; readonly enabled: boolean; } export interface WebApiRequestBody { readonly kind: WebApiBodyKind; readonly content: string; readonly parameters?: readonly WebApiTemplateParameter[]; } /** Structural contract consumed at runtime; it intentionally has no IDE dependency. */ export interface WebApiResponseSchemaNode { readonly id: string; readonly name: string; readonly path: string; readonly kind: 'field' | 'object' | 'list'; readonly fieldType: string; readonly nullable: boolean; readonly children: readonly WebApiResponseSchemaNode[]; } export interface WebApiResponseSchema { readonly version: 1; readonly root: WebApiResponseSchemaNode; } export interface WebApiOperation { readonly id: string; readonly name: string; readonly method: string; readonly path: string; readonly apiVersion?: number | null; readonly authorization?: WebApiAuthorization | null; readonly headers: readonly WebApiParameter[]; readonly query: readonly WebApiParameter[]; readonly body: WebApiRequestBody; readonly credentials: WebApiCredentials; readonly timeoutMs: number | null; readonly responseSchema: WebApiResponseSchema | null; } export interface WebApiClientConfiguration { readonly schemaVersion: number; /** Omitted in existing projects, which continue to use their custom base URL. */ readonly connection?: WebApiConnection; readonly authorization?: WebApiAuthorization | null; readonly defaultHeaders: readonly WebApiParameter[]; readonly timeoutMs: number; readonly operations: readonly WebApiOperation[]; } export interface WebApiRequestOptions extends Omit { readonly body?: unknown; /** Values supplied to placeholders in the configured body for execute(). */ readonly parameters?: WebApiTemplateValues; readonly headers?: HeadersInit; /** Overrides request/client authorization for this call; none explicitly disables it. */ readonly authorization?: WebApiAuthorization; readonly query?: Readonly>; readonly signal?: AbortSignal | null; /** Cancels the request after this duration without changing the component default. */ readonly timeoutMs?: number | null; readonly responseType?: WebApiResponseType; } export interface WebApiClientOptions extends WebNonvisualComponentOptions { readonly baseUrl?: string; /** Programmatic default headers, kept compatible with the original client API. */ readonly headers?: HeadersInit; readonly fetch?: typeof globalThis.fetch; /** Configuration materialized by the Project Model for named operations. */ readonly apiClientConfig?: WebApiClientConfiguration; } export interface WebApiOperationState { readonly status: WebApiOperationStatus; readonly data?: T; readonly error?: unknown; readonly updatedAt?: number; } /** Details supplied by the WebApiClient request lifecycle events. */ export interface WebApiOperationEventDetail { readonly operation: WebApiOperation; readonly state: WebApiOperationState; } export class WebApiError extends Error { readonly status: number; readonly statusText: string; readonly url: string; readonly body: TBody; readonly response: Response; constructor(message: string, status: number, statusText: string, url: string, body: TBody, response: Response); } /** Enriches a browser fetch failure without exposing request headers, body or URL parameters. */ export function describeApiClientFetchFailure(error: TypeError, url: string, init: RequestInit): TypeError; export class WebApiTimeoutError extends Error { readonly timeoutMs: number; readonly url: string; constructor(timeoutMs: number, url: string); } /** A real shared SDK client or an explicitly supplied, transient test-session source. */ export interface RestGoApiSessionSource { readonly baseUrl: string; getSession(): Promise | null>>; } export interface RestGoApplicationApiSource { readonly baseUrl: string; readonly apiToken?: string; } /** * Pins a REST request to the RestGo integration and validates its current user session. * The SDK validates/renews the session before the request; raw API tokens never qualify. * The optional source lets the IDE test with a transient JWT without persisting it. */ export function prepareRestGoApiRequest(endpoint: string, options?: RequestInit, source?: RestGoApiSessionSource): Promise<{ readonly url: string; readonly init: RequestInit; }>; /** Prepares public or application-token requests without borrowing a user or admin credential. */ export function prepareRestGoApplicationApiRequest(endpoint: string, authentication: 'public' | 'api-token', options?: RequestInit, source?: RestGoApplicationApiSource): { readonly url: string; readonly init: RequestInit; }; /** * Browser-safe HTTP client with direct requests and Project-Model backed named * operations. The latter retain transient state so future data components can * bind to an API result without using the DOM as a data store. */ export class WebApiClient, TInputs extends object = Record, TDefaultHeaders extends object = Record> extends WebNonvisualComponent { #private; constructor(options?: WebApiClientOptions | string); /** Typed view of the same instance, used by generated page and reusable code. */ withRequests(): WebApiClientInstance; get baseUrl(): string; set baseUrl(value: string); /** Immutable normalized contract configured for this client instance. */ get apiClientConfig(): WebApiClientConfiguration; set apiClientConfig(value: WebApiClientConfiguration); get Configuration(): WebApiClientConfiguration; set Configuration(value: WebApiClientConfiguration); get Connection(): WebApiConnectionSettings; get Operation(): (keyof TOutputs & string) | undefined; set Operation(value: (keyof TOutputs & string) | undefined); get Requests(): WebApiRequests; get Request(): WebApiRequest, TOutputs[keyof TOutputs], WebApiCombinedInputs, WebApiCombinedInputs>; get parameter(): WebApiParameterValues>; get Query(): WebApiQueryValues>; get Headers(): WebApiHeaderValues>; get Body(): WebApiBodySettings; get Authorization(): WebApiAuthorization | null; set Authorization(value: WebApiAuthorization | null); get Options(): WebApiRequestSettings; get Response(): WebApiResponse; get Method(): string; set Method(value: string); get Endpoint(): string; set Endpoint(value: string); get ApiVersion(): number | null; set ApiVersion(value: number | null); RequestByName(name: K): WebApiRequests[K]; RequestByName(name: string): WebApiRequest; ParamByName(name: string): WebApiNamedParameter; ClearParameters(): void; /** Saved operation metadata, safe for a Table or another consumer to inspect. */ get operations(): readonly WebApiOperation[]; set operations(value: readonly WebApiOperation[]); /** Latest successful data, keyed by the configured operation name. */ get data(): Readonly>; /** State of the most recently executed operation. */ get status(): WebApiOperationStatus; get error(): unknown; getOperationState(operationName: string): WebApiOperationState; /** Notifies runtime consumers whenever a named operation changes state. */ subscribe(listener: () => void): () => void; request(path: string, options?: WebApiRequestOptions): Promise; get(path: string, options?: WebApiRequestOptions): Promise; post(path: string, body?: unknown, options?: WebApiRequestOptions): Promise; put(path: string, body?: unknown, options?: WebApiRequestOptions): Promise; patch(path: string, body?: unknown, options?: WebApiRequestOptions): Promise; delete(path: string, options?: WebApiRequestOptions): Promise; head(path: string, options?: WebApiRequestOptions): Promise; options(path: string, options?: WebApiRequestOptions): Promise; execute(operationName: K, options?: WebApiRequestOptions): Promise; execute(options?: WebApiRequestOptions): Promise; execute(operationName: string, options?: WebApiRequestOptions): Promise; /** Resolves any saved schema node from the latest result of one operation. */ getOutputById(operationName: string, schemaNodeIdOrPath: string): T | undefined; /** Returns a saved list output, or an empty readonly list when it is unavailable. */ getList(operationName: string, schemaNodeIdOrPath: string): readonly T[]; } export interface WebVideoUploadSelection extends WebFileUploadSelection { /** Seconds, or null when the browser cannot decode this container/codec. */ readonly duration: number | null; } export interface WebVideoUploadConfiguration extends WebNonvisualComponentOptions { readonly accept?: string; readonly enabled?: boolean; readonly title?: string; readonly descri?: string; readonly isPublic?: boolean; readonly chunkSizeBytes?: number; /** MiB (1024² bytes). Null disables the local file-size limit. */ readonly maxFileSizeMB?: number | null; /** Null disables the local duration limit. */ readonly maxDurationSeconds?: number | null; } export interface WebVideoUploadOptions { readonly title?: string; readonly descri?: string; readonly isPublic?: boolean; readonly signal?: AbortSignal; } export interface WebVideoUploadResumeOptions extends WebVideoUploadOptions { /** Supply a saved checkpoint after reload, after selecting the original file again. */ readonly resumeToken?: import("@webrad/restgo-sdk").RestGoVideoResumeToken; } export type WebVideoUploadState = 'idle' | 'selecting' | 'selected' | 'hashing' | 'creating' | 'uploading' | 'paused' | 'finalizing' | 'uploaded' | 'waiting' | 'ready' | 'cancelling' | 'cancelled' | 'error'; export type WebVideoUploadProgressEventDetail = import("@webrad/restgo-sdk").RestGoVideoProgress; export type WebVideoUploadProcessingEventDetail = import("@webrad/restgo-sdk").RestGoVideoDetails; export type WebVideoUploadChangeEventDetail = WebVideoUploadSelection | null; export type WebVideoUploadResult = import("@webrad/restgo-sdk").RestGoVideo; export interface WebVideoUploadStateEventDetail { readonly previous: WebVideoUploadState; readonly state: WebVideoUploadState; } export interface WebVideoUploadCompleteEventDetail { readonly operation: 'upload' | 'processing' | 'cancel'; readonly video: import("@webrad/restgo-sdk").RestGoVideo | null; readonly error: Error | null; } /** Nonvisual resumable uploader. Conversion runs on RestGo; waiting is explicit. */ export class WebVideoUpload extends WebNonvisualComponent { #private; title: string; descri: string; isPublic: boolean; constructor(configuration?: WebVideoUploadConfiguration); get accept(): string; set accept(value: string); get enabled(): boolean; set enabled(value: boolean); get maxFileSizeMB(): number | null; set maxFileSizeMB(value: number | null); get maxDurationSeconds(): number | null; set maxDurationSeconds(value: number | null); get chunkSizeBytes(): number; set chunkSizeBytes(value: number); get selectedFile(): File | null; get selection(): WebVideoUploadSelection | null; get uploadSession(): import("@webrad/restgo-sdk").RestGoVideoUploadSession | null; get resumeToken(): import("@webrad/restgo-sdk").RestGoVideoResumeToken | null; get video(): import("@webrad/restgo-sdk").RestGoVideo | null; get state(): WebVideoUploadState; get confirmedBytes(): number; get totalBytes(): number; get percentage(): number | null; get processingProgress(): number | null; get error(): Error | null; /** Opens the chooser from a user gesture. It never creates or sends an upload. */ OpenFile(): Promise; SendToRestGO(options?: WebVideoUploadOptions): Promise; Resume(options?: WebVideoUploadResumeOptions): Promise; /** Aborts only local upload I/O. The server session remains resumable. */ Pause(): void; /** Explicitly cancels the open upload on RestGo. It does not cancel conversion jobs. */ CancelUpload(): Promise; WaitUntilReady(options?: import("@webrad/restgo-sdk").RestGoVideoWaitOptions): Promise; /** Clears local state and stops requests. No remote video/session is deleted. */ Clear(): void; set onChange(handler: WebComponentEventHandler | null); set onProgress(handler: WebComponentEventHandler | null); set onStateChange(handler: WebComponentEventHandler | null); set onUploadComplete(handler: WebComponentEventHandler | null); set onProcessingProgress(handler: WebComponentEventHandler | null); set onReady(handler: WebComponentEventHandler | null); set onError(handler: WebComponentEventHandler | null); set onComplete(handler: WebComponentEventHandler | null); dispose(): void; } export type WebVideoPlayerSource = { readonly kind: 'restgo'; readonly videoId: string; } | { readonly kind: 'url'; readonly url: string; readonly format: 'hls' | 'dash'; }; export type WebVideoPlayerState = 'idle' | 'loading' | 'loaded' | 'playing' | 'paused' | 'ended' | 'error' | 'disposed'; export type WebVideoPlayerQuality = 'auto' | number; export type WebVideoPlayerObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; export type WebVideoPlayerAspectRatio = 'none' | '16:9' | '9:16'; export interface WebVideoPlayerLoadOptions { readonly signal?: AbortSignal; readonly startTime?: number; } export interface WebVideoPlayerRestGoOptions extends WebVideoPlayerLoadOptions { readonly public?: boolean; } export interface WebVideoPlayerUrlOptions extends WebVideoPlayerLoadOptions { readonly format?: 'hls' | 'dash'; } export interface WebVideoPlayerAvailableQuality { readonly quality: number; readonly width: number; readonly height: number; readonly codecs: string; } export interface WebVideoPlayerLoadedEventDetail { readonly source: WebVideoPlayerSource; readonly duration: number; readonly availableQualities: readonly WebVideoPlayerAvailableQuality[]; } export interface WebVideoPlayerTimeEventDetail { readonly currentTime: number; readonly duration: number; } export interface WebVideoPlayerBufferingEventDetail { readonly buffering: boolean; } export interface WebVideoPlayerQualityEventDetail { readonly requested: WebVideoPlayerQuality; readonly current: number | null; } export interface WebVideoPlayerBufferedRange { readonly start: number; readonly end: number; } /** One real Shaka player per component element, shared by mounting and generated instances. */ export class WebVideoPlayer extends WebComponent { #private; constructor(element: HTMLElement); get source(): WebVideoPlayerSource | null; set source(value: WebVideoPlayerSource | null); get controls(): boolean; set controls(value: boolean); get autoplay(): boolean; set autoplay(value: boolean); get muted(): boolean; set muted(value: boolean); get loop(): boolean; set loop(value: boolean); get playsInline(): boolean; set playsInline(value: boolean); get volume(): number; set volume(value: number); get playbackRate(): number; set playbackRate(value: number); get objectFit(): WebVideoPlayerObjectFit; set objectFit(value: WebVideoPlayerObjectFit); /** Fixed ratios derive height from the responsive width, overriding vertical sizing rules. */ get aspectRatio(): WebVideoPlayerAspectRatio; set aspectRatio(value: WebVideoPlayerAspectRatio); get poster(): string; set poster(value: string); get enabled(): boolean; set enabled(value: boolean); get quality(): WebVideoPlayerQuality; set quality(value: WebVideoPlayerQuality); get state(): WebVideoPlayerState; get duration(): number; get currentTime(): number; get buffered(): readonly WebVideoPlayerBufferedRange[]; get availableQualities(): readonly WebVideoPlayerAvailableQuality[]; get currentQuality(): number | null; get isPlaying(): boolean; get error(): Error | null; LoadRestGo(videoId: string, options?: WebVideoPlayerRestGoOptions): Promise; LoadUrl(url: string, options?: WebVideoPlayerUrlOptions): Promise; Play(): Promise; Pause(): void; Stop(): void; Seek(seconds: number): void; SetQuality(value: WebVideoPlayerQuality): void; Unload(): Promise; dispose(): void; set onLoaded(handler: WebComponentEventHandler | null); set onPlay(handler: WebComponentEventHandler | null); set onPause(handler: WebComponentEventHandler | null); set onEnded(handler: WebComponentEventHandler | null); set onTimeUpdate(handler: WebComponentEventHandler | null); set onBuffering(handler: WebComponentEventHandler | null); set onQualityChange(handler: WebComponentEventHandler | null); set onError(handler: WebComponentEventHandler | null); } export interface RuntimeBounds { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } export interface RuntimeComponentNode { readonly embeddedStyleCatalog?: readonly RuntimeComponentStyle[]; readonly id: string; readonly templateId?: string; readonly reusableRoot?: boolean; readonly reusableDefinitionId?: string; readonly reusableInstanceId?: string; readonly type: string; readonly name: string; readonly parentId: string | null; readonly layout: RuntimeComponentLayout; readonly bounds: RuntimeBounds; readonly props: Readonly>; readonly children: readonly string[]; readonly styleClassName?: string; } export interface RuntimeReusableElementModel { readonly id: string; readonly name: string; readonly caption: string; readonly width: number; readonly height: number; readonly components: readonly RuntimeComponentNode[]; readonly rootComponentId: string; } export interface RuntimePageModel { readonly id: string; readonly name: string; readonly caption: string; readonly width: number; readonly height: number; readonly components: readonly RuntimeComponentNode[]; readonly rootComponentId: string; readonly reusableElements?: readonly RuntimeReusableElementModel[]; } export interface RuntimeComponentAdapter { readonly createElement: (document: Document, node: RuntimeComponentNode) => HTMLElement; readonly createComponent: (element: HTMLElement) => T; readonly applyProperties?: (component: T, node: RuntimeComponentNode) => void; readonly getChildrenHost?: (component: T, node: RuntimeComponentNode) => HTMLElement; readonly participatesInLayout?: boolean; } export class RuntimeComponentRegistry { register(type: string, adapter: RuntimeComponentAdapter): this; has(type: string): boolean; require(type: string): RuntimeComponentAdapter; create(document: Document, node: RuntimeComponentNode, menuFactories?: ReadonlyMap): WebComponent; } export const runtimeComponentRegistry: RuntimeComponentRegistry; export function expandReusableElements(model: RuntimePageModel): RuntimePageModel; export interface MountedRuntimePage { readonly element: HTMLElement; readonly page: WebPage; readonly components: ReadonlyMap; readonly reusableInstances: readonly MountedReusableElementInstance[]; dispose(): void; } export interface MountedReusableElementInstance { readonly instanceId: string; readonly reusableElementId: string; readonly element: HTMLElement; readonly componentIds: ReadonlyMap; } export interface MountPageOptions { readonly replaceHostContents?: boolean; readonly registry?: RuntimeComponentRegistry; readonly menuFactories?: ReadonlyMap; } export type RuntimeMenuFactory = (element: HTMLElement) => WebMenu; export function mountPage( model: RuntimePageModel, host?: HTMLElement, options?: MountPageOptions, ): MountedRuntimePage; /** Creates the authored wrapper for a page after its visual DOM is mounted. */ export type RuntimePageFactory = (element: HTMLElement) => WebPage; /** Creates authored classes for reusable placements after a page is mounted. */ export type RuntimeReusableElementFactory = ( mounted: MountedRuntimePage, ) => readonly WebReusableElementInstance[]; /** One route that can be mounted by the browser-side page router. */ export interface RuntimePageRoute { readonly id: string; readonly name: string; readonly model: RuntimePageModel; readonly path?: string; readonly parameters?: readonly PageParameterDefinition[]; readonly createPage: RuntimePageFactory; readonly createReusableElements?: RuntimeReusableElementFactory; readonly menuFactories?: ReadonlyMap; } /** Mounts one authored project page at a time and resolves IDs or page names. */ export class WebPageRouter { constructor(routes: readonly RuntimePageRoute[], host?: HTMLElement, options?: { readonly mode?: 'history' | 'hash'; readonly basePath?: string }); readonly activePage: WebPage | null; readonly activeRoute: RuntimePageRoute | null; findRoute(destination: string): RuntimePageRoute | undefined; start(entryDestination: string): WebPage; navigateBrowser(destination: string | URL, options?: NavigateOptions): void; navigate(destination: string): WebPage; dispose(): void; } export interface VisualPropertySource { readonly props: Readonly>; } export function projectPanelBackground(props: Readonly>, styled?: boolean): { '--wr-panel-background-image': string; backgroundImage: string; backgroundSize: string; backgroundPosition: string; backgroundRepeat: string; }; export interface VisualComponentSource extends VisualPropertySource { readonly type: string; readonly bounds: { readonly width: number; readonly height: number; }; } export interface DataGridColumnTrackSource { readonly widthMode: 'fixed' | 'dynamic'; readonly width: number; readonly minWidth: number; readonly maxWidth: number | null; readonly flex: number; } export type ComponentStyleStateName = 'base' | 'hover' | 'focus' | 'active' | 'disabled'; export type StyleLengthUnit = 'px' | 'rem' | '%' | 'vw' | 'vh'; export interface StyleLengthValue { readonly value: number; readonly unit: StyleLengthUnit; } export type LinearGradientDirection = | 'to-right' | 'to-bottom-right' | 'to-bottom' | 'to-bottom-left' | 'to-left' | 'to-top-left' | 'to-top' | 'to-top-right'; export interface BackgroundGradientValue { readonly kind: 'linear'; readonly direction: LinearGradientDirection; readonly from: string; readonly to: string; } export type StylePropertyValue = string | number | StyleLengthValue | BackgroundGradientValue; export type TailwindStyleProperties = Readonly< Record >; export interface TailwindStyleSource { readonly componentType?: string; readonly states: Readonly>; readonly themeOverrides?: Readonly>>>>; } export interface RuntimeComponentStyle { readonly id: string; readonly componentType: string; readonly preset?: string; readonly className: string; } export function tokenizeTailwindClasses(value: string): readonly string[]; export function paletteColorId(value: unknown): string | undefined; export function paletteColorReference(id: string): string; export function resolveDataGridColumnTrackWidths( columns: readonly DataGridColumnTrackSource[], availableWidth: number, ): readonly number[]; export function resolveStylePropertyCandidate( propertyName: string, value: StylePropertyValue, ): string | undefined; export function resolveComponentStyleStateClassNames( properties: TailwindStyleProperties | null | undefined, ): readonly string[]; export function resolveComponentStyleClassNames( style: TailwindStyleSource | null | undefined, ): readonly string[]; export function resolveComponentStyleClassName( style: TailwindStyleSource | null | undefined, ): string; export function resolveComponentStylePreviewClassName( style: TailwindStyleSource | null | undefined, stateName: ComponentStyleStateName, ): string; export function resolveThemedStyle(style: TailwindStyleSource, mode: ResolvedThemeMode): TailwindStyleSource; export type VisualSizingMode = 'bounds' | 'fill'; export interface ComponentVisualStyle { readonly width: string; readonly height: string; readonly backgroundColor?: string; readonly color?: string; readonly borderColor?: string; readonly borderStyle?: 'solid'; readonly borderWidth?: string; } export interface ComponentVisualProjection { readonly classNames: readonly string[]; readonly style: ComponentVisualStyle; readonly visible: boolean; readonly collapseWhenHidden: boolean; readonly enabled: boolean; readonly title?: string; readonly tabIndex?: number; } export function readStringProperty( source: VisualPropertySource, name: string, fallback?: string, ): string; export function readBooleanProperty( source: VisualPropertySource, name: string, fallback?: boolean, ): boolean; export function readIntegerProperty( source: VisualPropertySource, name: string, ): number | undefined; export function readIntegerProperty( source: VisualPropertySource, name: string, fallback: number, ): number; export function readStringListProperty( source: VisualPropertySource, name: string, ): readonly string[]; export function projectComponentVisual( source: VisualComponentSource, sizing?: VisualSizingMode, ): ComponentVisualProjection; export const WEBRAD_COMPONENT_CSS: string; export const WEBRAD_PROJECT_CSS: string; } declare module '@webrad/runtime/theme' { export { Theme, WebTheme, THEME_MODES, THEME_COLOR_NAMES, themeColorId, themeColorReference, customThemeColorId, customThemeColorReference, initializeTheme, themeBootstrapSource } from '@webrad/runtime'; export type { ThemeMode, ResolvedThemeMode, ThemeColorName, ThemeRuntimeConfiguration, ThemeChangeDetail, ThemeChangeHandler } from '@webrad/runtime'; } declare module '@webrad/runtime/login' { export { WebLogin } from '@webrad/runtime'; export type { WebLoginOptions, WebLoginControls, WebLoginUserEvent, WebLoginErrorEvent, WebLoginViewEvent, WebLoginRecoveryEvent } from '@webrad/runtime'; } declare module '@webrad/runtime/login-model' { export { createDefaultWebLoginConfiguration, createDefaultWebLoginRecoveryConfiguration, parseWebLoginConfiguration, WEB_LOGIN_STYLE_SLOTS } from '@webrad/runtime'; export type { WebLoginView, WebLoginPresentation, WebLoginField, WebLoginAppearance, WebLoginTexts, WebLoginConfiguration, WebLoginRecoveryConfiguration, WebLoginStyleSlot, WebLoginStyleBindings } from '@webrad/runtime'; } declare module '@webrad/runtime/image-display' { export type WebImagePlaceholder = 'image' | 'user'; export function imagePlaceholderSource(placeholder: WebImagePlaceholder): string; export function bindImageResampling(element: HTMLImageElement): () => void; } /** Globally available WebRAD dialog helper. */ declare const Message: typeof import('@webrad/runtime').Message; /** Globally available WebRAD confirmation helper. */ declare const Confirm: typeof import('@webrad/runtime').Confirm; /** Globally available WebRAD navigation helper. */ declare const Navigate: typeof import('@webrad/runtime').Navigate; /** Application theme service, available without an import. */ declare const Theme: typeof import('@webrad/runtime').Theme; /** The RestGO client configured in Project Settings, shared by all pages. */ declare const RestGO: import('@webrad/restgo-sdk').RestGoClient; declare const Sucess: typeof import('@webrad/runtime').Sucess; declare const Alert: typeof import('@webrad/runtime').Alert; declare const Danger: typeof import('@webrad/runtime').Danger; declare const Notifier: typeof import('@webrad/runtime').Notifier; declare module '@webrad/restgo-sdk' { type RestGoDynamicResult = RestGoResult & RestGoDynamicMetadata; type RestGoHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS'; interface RestGoEndpointOptions { database?: string; version?: number; } class RestGoEndpoint { private readonly transport; private readonly database; private readonly name; private readonly version?; constructor(transport: RestGoTransport, database: string, name: string, version?: number | undefined); get(options?: RestGoDynamicOptions): Promise>; post(body?: unknown, options?: RestGoDynamicOptions): Promise>; put(body?: unknown, options?: RestGoDynamicOptions): Promise>; patch(body?: unknown, options?: RestGoDynamicOptions): Promise>; delete(body?: unknown, options?: RestGoDynamicOptions): Promise>; head(options?: RestGoDynamicOptions): Promise>; options(options?: RestGoDynamicOptions): Promise>; request(method: RestGoHttpMethod, body?: unknown, options?: RestGoDynamicOptions): Promise>; } class RestGoDatabase { private readonly transport; private readonly database; constructor(transport: RestGoTransport, database: string); endpoint(name: string, options?: { version?: number; }): RestGoEndpoint; } /** Calls published endpoints. RestGo does not expose Supabase table/SQL operations. */ class RestGoApiClient { private readonly transport; constructor(transport: RestGoTransport); from(database?: string): RestGoDatabase; endpoint(name: string, options?: RestGoEndpointOptions): RestGoEndpoint; } type AuthListener = (event: RestGoAuthEvent, session: RestGoSession | null) => void; class RestGoAuthClient { private readonly transport; /** Startup checks persisted credentials with GET /auth/session. */ readonly ready: Promise>; private readonly store; private current; private restored; private generation; private readonly automatic; private timer; private refresh; private retryAt; private retryDelay; private retryError; private closing; private disposed; private readonly unsubscribeStorage; private readonly listeners; private validation; constructor(transport: RestGoTransport, options: RestGoClientOptions); /** Stop timers/listeners without revoking or deleting persisted credentials. */ dispose(): void; /** Local snapshot; reading it does not issue a request or validate the session. */ get CurrentUser(): RestGoCurrentUser | null; private stopTimer; private schedule; private synchronize; /** POST /auth/refresh, with single-use rotation serialized across callers and tabs. */ refreshSession(): Promise>; private rotate; private token; private emit; private apply; private clear; onAuthStateChange(callback: AuthListener): { unsubscribe: () => void; }; signInWithPassword(input: RestGoSignInInput): Promise>; private restoreAfterFailure; /** Public registration. The server must allow anonymous signup. Does not start a session. */ signUp(input: RestGoSignUpInput): Promise>; signOut(): Promise>; /** Always asks the server; JWT expiry metadata is not proof of an active session. */ getSession(): Promise>; private validate; getUser(): Promise>; setSession(input: StoredSession): Promise>; resetPasswordForEmail(email: string, options?: { url?: string; }): Promise>; confirmPasswordReset(input: { token: string; password: string; }): Promise>; confirmEmail(token: string): Promise>; updateUser(input: RestGoUpdateUserInput, options?: RestGoRequestOptions): Promise>; resendEmailConfirmation(options?: RestGoRequestOptions & { url?: string; }): Promise>; uploadAvatar(file: Blob, options?: { name?: string; signal?: AbortSignal; }): Promise>; deleteAvatar(options?: RestGoRequestOptions): Promise>; private avatarRequest; private cancelled; } class RestGoClient { readonly auth: RestGoAuthClient; readonly storage: RestGoStorageClient; readonly videos: RestGoVideosClient; readonly payments: RestGoPaymentsClient; readonly api: RestGoApiClient; readonly baseUrl: string; constructor(baseUrl: string, options?: RestGoClientOptions); from(endpoint: string, options?: RestGoEndpointOptions): RestGoEndpoint; /** Sign in with positional parameters and report whether this login succeeded. */ login(email: string, password: string, remember?: boolean): Promise; logout(): Promise>; getSession(): Promise>; getUser(): Promise>; /** Last server-confirmed identity, or null before authentication/restoration. */ get CurrentUser(): RestGoCurrentUser | null; refreshSession(): Promise>; onAuthStateChange(callback: (event: RestGoAuthEvent, session: RestGoSession | null) => void): { unsubscribe: () => void; }; /** Release browser listeners and automatic renewal without logging the user out. */ dispose(): void; } function createClient(baseUrl: string, options?: RestGoClientOptions): RestGoClient; type RestGoErrorCode = 'HTTP_ERROR' | 'NETWORK_ERROR' | 'ABORTED' | 'INVALID_RESPONSE' | 'INVALID_ARGUMENT' | 'AUTH_REQUIRED' | 'API_TOKEN_REQUIRED' | 'REFRESH_LOCK_UNAVAILABLE' | 'AUTH_OPERATION_CANCELLED'; class RestGoError extends Error { readonly status: number; readonly code: RestGoErrorCode; readonly details: unknown; readonly retryAfterMs: number | undefined; constructor(message: string, code: RestGoErrorCode, status?: number, details?: unknown, retryAfterMs?: number); } type RestGoResult = { data: T; error: null; } | { data: null; error: RestGoError; }; function success(data: T): RestGoResult; function failure(message: string, code: RestGoErrorCode, status?: number, details?: unknown, retryAfterMs?: number): { data: null; error: RestGoError; }; function isRecord(value: unknown): value is Record; type RestGoPaymentMode = 'payment' | 'subscription'; type RestGoPaymentProvider = 'stripe' | 'asaas'; interface RestGoCheckoutInput { /** Keep database identifiers as strings, including PostgreSQL int8 values. */ readonly sourceKey: string; readonly mode: RestGoPaymentMode; /** Persist before the first POST and reuse for every retry of this attempt. */ readonly idempotencyKey: string; } interface RestGoPaymentProviderState { readonly status: string; readonly paymentId?: string; readonly subscriptionId?: string; readonly customerId?: string; readonly invoiceId?: string; readonly periodEnd?: string; readonly cancelAtPeriodEnd: boolean; readonly everPaid?: boolean; readonly eventType?: string; } interface RestGoPaymentOperation { readonly id: string; readonly mode: RestGoPaymentMode; /** Financial state. Unknown future states are preserved, never treated as success. */ readonly status: string; /** Preparation state, independent of financial confirmation. */ readonly checkoutState: string; readonly checkoutUrl?: string; readonly synchronizationPending: boolean; readonly synchronizationError?: string; readonly providerName: RestGoPaymentProvider; readonly provider: RestGoPaymentProviderState; } interface RestGoPaymentOperationList { readonly data: readonly RestGoPaymentOperation[]; /** Empty string means the last page. Ordering is by UUID, not creation time. */ readonly nextCursor: string; } interface RestGoPaymentRequestOptions { readonly signal?: AbortSignal; } interface RestGoPaymentListOptions extends RestGoPaymentRequestOptions { readonly before?: string; } function isRestGoPaymentUUID(value: unknown): value is string; function isRestGoPaymentMode(value: unknown): value is RestGoPaymentMode; function isRestGoGatewaySlug(value: unknown): value is string; /** Hosted checkouts must never execute an arbitrary URL scheme or URL credentials. */ function isRestGoCheckoutURL(value: unknown): value is string; function isRestGoCheckoutInput(value: unknown): value is RestGoCheckoutInput; function isRestGoPaymentOperation(value: unknown): value is RestGoPaymentOperation; function isRestGoPaymentOperationList(value: unknown): value is RestGoPaymentOperationList; /** Customer-only payment routes. Gateway administration stays on the server. */ class RestGoPaymentGatewayClient { private readonly transport; readonly slug: string; constructor(transport: RestGoTransport, slug: string); createCheckout(input: RestGoCheckoutInput, options?: RestGoPaymentRequestOptions): Promise>; getOperation(id: string, options?: RestGoPaymentRequestOptions): Promise>; listOperations(options?: RestGoPaymentListOptions): Promise>; cancelSubscription(id: string, options?: RestGoPaymentRequestOptions): Promise>; private invalidId; private operation; private request; } class RestGoPaymentsClient { private readonly transport; constructor(transport: RestGoTransport); gateway(slug: string): RestGoPaymentGatewayClient; } interface StoredSession { token: string; expiresAt: string; refreshToken?: string; refreshExpiresAt?: string; } function isStoredSession(value: unknown): value is StoredSession; function credentials(value: StoredSession): StoredSession; /** Storage is optional: browser privacy/security settings may deny all access. */ class RestGoSessionStore { private readonly baseUrl; private storage; private readonly key; private readonly shared; constructor(baseUrl: string, options: RestGoClientOptions); get persistent(): boolean; /** Browser locks serialize single-use rotation across tabs; queues cover one realm. */ exclusive(operation: () => Promise>, requireCrossTab?: boolean): Promise>; subscribe(callback: () => void): () => void; read(): StoredSession | null; write(session: StoredSession | null, expectedToken?: string): void; } class RestGoStorageClient { private readonly transport; constructor(transport: RestGoTransport); list(options?: RestGoListOptions): Promise>>; upload(file: Blob, options?: RestGoFileOptions): Promise>; get(id: string, options?: { signal?: AbortSignal; }): Promise>; update(id: string, input: RestGoFileUpdate): Promise>; remove(id: string, options?: { signal?: AbortSignal; }): Promise>; private fileRequest; download(id: string, options?: { range?: string; public?: boolean; signal?: AbortSignal; }): Promise>; /** Constructs a URL; public access still depends on the file's isPublic metadata. */ getPublicUrl(id: string): RestGoResult<{ publicUrl: string; }>; usage(options?: { signal?: AbortSignal; }): Promise>; } interface TransportRequest extends RestGoRequestOptions { method?: string; body?: unknown; auth?: RestGoCredentialMode; token?: string; responseType?: 'json' | 'blob' | 'response'; /** A 401 from this endpoint definitively rejects the user session. */ sessionAuthority?: boolean; skipUnauthorized?: boolean; onUploadProgress?: (progress: RestGoUploadProgress) => void; /** Send a Blob as binary without changing its explicit Content-Type. */ binary?: boolean; /** Resumable writes must reconcile their offset after session renewal. */ retryUnauthorized?: boolean; } class RestGoTransport { readonly baseUrl: string; readonly apiVersion: number; readonly defaultDatabase: string; readonly apiToken: string | undefined; private readonly fetcher; private readonly customFetch; session: () => RestGoSession | null; sessionVersion: () => number; prepareSession: () => Promise>; unauthorized: (token: string, authoritative: boolean) => Promise>; constructor(baseUrl: string, options: RestGoClientOptions); url(path: string, options?: RestGoRequestOptions): string; request(path: string, options?: TransportRequest): Promise>; } type RestGoSessionStorage = 'local' | 'session' | 'memory'; /** Browser-safe durable storage supplied by an embedding host. */ interface RestGoSessionStorageAdapter { getItem(key: string): string | null; setItem(key: string, value: string): void; removeItem(key: string): void; subscribe?(callback: () => void): () => void; } interface RestGoClientOptions { persistSession?: boolean; /** Renew before JWT expiry and retry a rejected session request once. Defaults to true. */ autoRefreshToken?: boolean; sessionStorage?: RestGoSessionStorage; storageKey?: string; /** Used only with persistent local sessions; never changes session/memory semantics. */ storage?: RestGoSessionStorageAdapter; apiVersion?: number; defaultDatabase?: string; fetch?: typeof fetch; /** An active RestGo API token. Never supply RESTGO_AUTHORIZATION here. */ apiToken?: string; } interface RestGoUser { id: string; email: string; fullName: string; avatarUrl: string | null; active: boolean; emailConfirmed: boolean; } /** Readonly projection of the last server-confirmed user identity. */ interface RestGoCurrentUser { readonly nome: string; readonly email: string; readonly id: string; readonly emailconfirmed: boolean; readonly ativo: boolean; } interface RestGoManagedUser extends Omit { avatarUrl?: string; createdAt: string; updatedAt: string; } interface RestGoSession { token: string; /** Used to schedule renewal; the server remains the authority on session validity. */ expiresAt: string; /** Both refresh fields are absent for legacy JWT-only sessions. */ refreshToken?: string; refreshExpiresAt?: string; user: RestGoUser; } /** Result of login; the boolean also narrows data and error in authored code. */ type RestGoLoginResult = { sucess: true; data: RestGoSession; error: null; } | { sucess: false; data: null; error: RestGoError; }; type RestGoAuthEvent = 'INITIAL_SESSION' | 'SIGNED_IN' | 'SIGNED_OUT' | 'SESSION_VALIDATED' | 'TOKEN_REFRESHED' | 'USER_UPDATED'; interface RestGoSignInInput { email: string; password: string; remember?: boolean; } interface RestGoSignUpInput { email: string; password: string; fullName?: string; active?: boolean; } /** Self-service fields; activation and confirmation remain server-controlled. */ interface RestGoUpdateUserInput { fullName?: string; email?: string; password?: string; /** Required when changing email or password. */ currentPassword?: string; /** Optional absolute HTTP(S) destination for a confirmation email after a profile update. */ emailConfirmationUrl?: string; } interface RestGoUpdateUserResult { user: RestGoUser; /** Credential changes revoke all sessions and require a new login. */ sessionRevoked: boolean; } interface RestGoSuccess { success: boolean; message?: string; } type RestGoQueryValue = string | number | boolean | null | undefined; type RestGoQuery = Record; type RestGoCredentialMode = 'auto' | 'session' | 'apiToken' | 'none'; interface RestGoRequestOptions { query?: RestGoQuery; signal?: AbortSignal; headers?: HeadersInit; } interface RestGoDynamicOptions extends RestGoRequestOptions { auth?: RestGoCredentialMode; version?: number; pagination?: 'exact' | 'simple' | 'cursor'; cursorColumn?: string; cursor?: string; page?: number; } interface RestGoDynamicMetadata { page?: number; total_pages?: number; has_more?: boolean; next_cursor?: string; } interface RestGoListOptions { page?: number; pageSize?: number; q?: string; ownerId?: string; signal?: AbortSignal; } interface RestGoListPage { data: T[]; page: number; page_size: number; has_more: boolean; } type RestGoList = T[] | RestGoListPage; interface RestGoStoredFile { id: string; ownerId?: string; ownerEmail?: string; originalName: string; contentType: string; sizeBytes: number; isPublic: boolean; createdAt: string; updatedAt: string; downloadUrl: string; } interface RestGoFileOptions { name?: string; isPublic?: boolean; ownerId?: string; signal?: AbortSignal; /** Actual multipart upload progress. The percentage is null when it cannot be measured. */ onUploadProgress?: (progress: RestGoUploadProgress) => void; } interface RestGoUploadProgress { loaded: number; total: number | null; percentage: number | null; lengthComputable: boolean; } interface RestGoFileUpdate extends RestGoFileOptions { file?: Blob; } interface RestGoStorageUsage { usedBytes: number; capacityBytes: number; availableBytes: number; } type UploadProgressCallback = (progress: RestGoUploadProgress) => void; /** XHR omits ambient credentials only for requests that start across origins. */ function supportsCrossOriginUpload(url: string): boolean; function notifyUploadProgress(callback: UploadProgressCallback, progress: RestGoUploadProgress): void; /** * Cross-origin XHR provides bytes sent by the browser without dashboard cookies. * Unlike fetch, XHR cannot prevent redirects before following them. Reject a changed * response URL so a redirected response cannot be accepted as RestGo metadata. */ function requestWithUploadProgress(url: string, method: string, headers: Headers, body: FormData | Blob | string, signal: AbortSignal | undefined, callback: UploadProgressCallback, responseType: 'json' | 'blob' | undefined): Promise; type RestGoVideoStatus = 'uploading' | 'pending' | 'processing' | 'ready' | 'failed' | 'deleting'; type RestGoVideoUploadState = 'open' | 'completed' | 'cancelled'; type RestGoVideoJobState = 'pending' | 'processing' | 'ready' | 'failed' | 'cancelled'; interface RestGoVideoUploadSession { id: string; videoId: string; offset: number; sizeBytes: number; state: RestGoVideoUploadState; expiresAt: string; maxChunkBytes: number; } interface RestGoVideoSource { width: number; height: number; codedWidth: number; codedHeight: number; rotation: number; fps: number; frameRate: string; duration: number; format: string; codec: string; hasAudio: boolean; audioCodec?: string; videoStream: number; audioStream: number; level: number; } interface RestGoVideoVariant { quality: number; width: number; height: number; fps: number; frameRate: string; bandwidth: number; averageBandwidth: number; codecs: string; } interface RestGoVideo { id: string; ownerId?: string; title: string; descri: string; isPublic: boolean; sizeBytes: number; source: RestGoVideoSource; originalRetained: boolean; status: RestGoVideoStatus; progress: number | null; error: string; generation?: string; variants: RestGoVideoVariant[]; hasThumbnail: boolean; createdAt: string; updatedAt: string; } interface RestGoVideoJob { id: string; state: RestGoVideoJobState; error: string; attempts: number; options: Readonly>; createdAt: string; startedAt: string | null; finishedAt: string | null; } interface RestGoVideoDetails { video: RestGoVideo; jobs: RestGoVideoJob[]; } interface RestGoVideoList { data: RestGoVideo[]; total: number; limit: number; offset: number; } interface RestGoVideoHlsDescriptor { id: string; title: string; isPublic: boolean; masterUrl: string; thumbnailUrl: string; variants: RestGoVideoVariant[]; duration: number; authentication: string; masterAbsoluteUrl: string; thumbnailAbsoluteUrl: string; } interface RestGoVideoRequestOptions { signal?: AbortSignal; } interface RestGoVideoCreateInput { filename: string; sizeBytes: number; title?: string; descri?: string; isPublic?: boolean; } interface RestGoVideoUpdate { title: string; descri: string; isPublic: boolean; } interface RestGoVideoListOptions extends RestGoVideoRequestOptions { limit?: number; offset?: number; q?: string; status?: RestGoVideoStatus; } interface RestGoVideoChunkOptions extends RestGoVideoRequestOptions { offset: number; checksum: string; onUploadProgress?: (progress: RestGoUploadProgress) => void; } interface RestGoVideoProgress { readonly confirmedBytes: number; readonly totalBytes: number; readonly percentage: number; /** Transient network measurement, separate from confirmedBytes. */ readonly chunk: RestGoUploadProgress | null; } /** Serializable runtime checkpoint. No credential or File is included. */ interface RestGoVideoResumeToken { readonly version: 1; readonly baseUrl: string; readonly ownerId: string; readonly uploadId: string; readonly videoId: string; readonly name: string; readonly sizeBytes: number; readonly lastModified: number; /** SHA-256 chain over consecutive 8 MiB parts of the complete file. */ readonly fingerprint: string; } interface RestGoVideoUploadOptions extends RestGoVideoRequestOptions { title?: string; descri?: string; isPublic?: boolean; chunkSizeBytes?: number; maxRetries?: number; onSession?: (session: RestGoVideoUploadSession) => void; onResumeToken?: (token: RestGoVideoResumeToken) => void; onProgress?: (progress: RestGoVideoProgress) => void; onPhase?: (phase: 'hashing' | 'creating' | 'uploading' | 'finalizing') => void; } interface RestGoVideoResumeOptions extends RestGoVideoUploadOptions { resumeToken: RestGoVideoResumeToken; } interface RestGoVideoWaitOptions extends RestGoVideoRequestOptions { intervalMs?: number; timeoutMs?: number; onProgress?: (details: RestGoVideoDetails) => void; } function videoAbort(signal?: AbortSignal): void; function videoDelay(ms: number, signal?: AbortSignal): Promise; function videoTransient(error: RestGoError): boolean; function videoChecksum(chunk: Blob, signal?: AbortSignal): Promise; function transferVideo(client: RestGoVideosClient, transport: RestGoTransport, file: File, options: RestGoVideoUploadOptions, resume?: RestGoVideoResumeOptions): Promise>; function videoId(value: unknown): value is string; function videoInteger(value: unknown, minimum?: number): value is number; function videoNumber(value: unknown): value is number; function videoSession(value: unknown): value is RestGoVideoUploadSession; function videoVariants(value: unknown): value is RestGoVideoVariant[]; function videoRecord(value: unknown): value is RestGoVideo; function videoDetails(value: unknown): value is RestGoVideoDetails; class RestGoVideoUploadsClient { private readonly transport; constructor(transport: RestGoTransport); create(input: RestGoVideoCreateInput, options?: RestGoVideoRequestOptions): Promise>; get(id: string, options?: RestGoVideoRequestOptions): Promise>; sendChunk(id: string, chunk: Blob, options: RestGoVideoChunkOptions): Promise>; complete(id: string, options?: RestGoVideoRequestOptions): Promise>; cancel(id: string, options?: RestGoVideoRequestOptions): Promise>; private requestId; private request; } class RestGoVideosClient { private readonly transport; readonly uploads: RestGoVideoUploadsClient; constructor(transport: RestGoTransport); upload(file: File, options?: RestGoVideoUploadOptions): Promise>; resumeUpload(id: string, file: File, options: RestGoVideoResumeOptions): Promise>; list(options?: RestGoVideoListOptions): Promise>; get(id: string, options?: RestGoVideoRequestOptions): Promise>; update(id: string, input: RestGoVideoUpdate, options?: RestGoVideoRequestOptions): Promise>; remove(id: string, options?: RestGoVideoRequestOptions): Promise>; process(id: string, options?: RestGoVideoRequestOptions): Promise>; reprocess(id: string, options?: RestGoVideoRequestOptions): Promise>; cancelProcessing(id: string, options?: RestGoVideoRequestOptions): Promise>; getHls(id: string, options?: RestGoVideoRequestOptions & { public?: boolean; }): Promise>; getThumbnail(id: string, options?: RestGoVideoRequestOptions & { public?: boolean; }): Promise>; /** Browser media bridge: current shared session, one 401 renewal, no cookies or redirects. */ getMedia(id: string, uri: string, options?: RestGoVideoRequestOptions & { public?: boolean; range?: string; method?: 'GET' | 'HEAD'; }): Promise>; waitUntilReady(id: string, options?: RestGoVideoWaitOptions): Promise>; private job; private request; } export { createClient, isRestGoCheckoutInput, isRestGoCheckoutURL, isRestGoGatewaySlug, isRestGoPaymentMode, isRestGoPaymentOperation, isRestGoPaymentOperationList, isRestGoPaymentUUID, RestGoApiClient, RestGoAuthClient, type RestGoAuthEvent, type RestGoCheckoutInput, RestGoClient, type RestGoClientOptions, type RestGoCredentialMode, type RestGoCurrentUser, RestGoDatabase, type RestGoDynamicMetadata, type RestGoDynamicOptions, type RestGoDynamicResult, RestGoEndpoint, type RestGoEndpointOptions, RestGoError, type RestGoErrorCode, type RestGoFileOptions, type RestGoFileUpdate, type RestGoHttpMethod, type RestGoList, type RestGoListOptions, type RestGoListPage, type RestGoLoginResult, type RestGoManagedUser, RestGoPaymentGatewayClient, type RestGoPaymentListOptions, type RestGoPaymentMode, type RestGoPaymentOperation, type RestGoPaymentOperationList, type RestGoPaymentProvider, type RestGoPaymentProviderState, type RestGoPaymentRequestOptions, RestGoPaymentsClient, type RestGoQuery, type RestGoQueryValue, type RestGoRequestOptions, type RestGoResult, type RestGoSession, type RestGoSessionStorage, type RestGoSessionStorageAdapter, type RestGoSignInInput, type RestGoSignUpInput, RestGoStorageClient, type RestGoStorageUsage, type RestGoStoredFile, type RestGoSuccess, type RestGoUpdateUserInput, type RestGoUpdateUserResult, type RestGoUploadProgress, type RestGoUser, type RestGoVideo, type RestGoVideoChunkOptions, type RestGoVideoCreateInput, type RestGoVideoDetails, type RestGoVideoHlsDescriptor, type RestGoVideoJob, type RestGoVideoJobState, type RestGoVideoList, type RestGoVideoListOptions, type RestGoVideoProgress, type RestGoVideoRequestOptions, type RestGoVideoResumeOptions, type RestGoVideoResumeToken, RestGoVideosClient, type RestGoVideoSource, type RestGoVideoStatus, type RestGoVideoUpdate, type RestGoVideoUploadOptions, RestGoVideoUploadsClient, type RestGoVideoUploadSession, type RestGoVideoUploadState, type RestGoVideoVariant, type RestGoVideoWaitOptions }; }