@veltrixsecops/app-sdk 3.2.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -1
- package/dist/byol/index.cjs +3802 -0
- package/dist/byol/index.cjs.map +1 -0
- package/dist/byol/index.d.cts +578 -0
- package/dist/byol/index.d.ts +578 -0
- package/dist/byol/index.js +2587 -0
- package/dist/byol/index.js.map +1 -0
- package/dist/chunk-3WK4EVQ3.js +842 -0
- package/dist/chunk-3WK4EVQ3.js.map +1 -0
- package/dist/{chunk-EOOEHZGC.js → chunk-HIL6RIDG.js} +107 -3
- package/dist/chunk-HIL6RIDG.js.map +1 -0
- package/dist/{chunk-VWFTOFTI.js → chunk-Y6XBNZGR.js} +8 -2
- package/dist/chunk-Y6XBNZGR.js.map +1 -0
- package/dist/client/index.cjs +112 -2
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +118 -6
- package/dist/client/index.d.ts +118 -6
- package/dist/client/index.js +13 -1
- package/dist/connections/index.cjs +1787 -0
- package/dist/connections/index.cjs.map +1 -0
- package/dist/connections/index.d.cts +78 -0
- package/dist/connections/index.d.ts +78 -0
- package/dist/connections/index.js +754 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/opentofu/index.cjs +138 -0
- package/dist/opentofu/index.cjs.map +1 -0
- package/dist/opentofu/index.d.cts +131 -0
- package/dist/opentofu/index.d.ts +131 -0
- package/dist/opentofu/index.js +109 -0
- package/dist/opentofu/index.js.map +1 -0
- package/dist/pipeline/index.cjs +7 -0
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +9 -2
- package/dist/pipeline/index.d.ts +9 -2
- package/dist/pipeline/index.js +3 -1
- package/dist/pipeline-beeT8dje.d.cts +408 -0
- package/dist/pipeline-beeT8dje.d.ts +408 -0
- package/dist/ui/index.cjs +136 -0
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +109 -1
- package/dist/ui/index.d.ts +109 -1
- package/dist/ui/index.js +35 -677
- package/dist/ui/index.js.map +1 -1
- package/dist/{use-app-context-OQlcmq7t.d.cts → use-app-context-Byv_fam0.d.cts} +206 -4
- package/dist/{use-app-context-OQlcmq7t.d.ts → use-app-context-Byv_fam0.d.ts} +206 -4
- package/opentofu/README.md +114 -0
- package/opentofu/modules/aws/main.tf +1008 -0
- package/opentofu/modules/aws/outputs.tf +90 -0
- package/opentofu/modules/aws/variables.tf +437 -0
- package/opentofu/modules/aws/versions.tf +23 -0
- package/opentofu/modules/azure/main.tf +920 -0
- package/opentofu/modules/azure/outputs.tf +72 -0
- package/opentofu/modules/azure/variables.tf +498 -0
- package/opentofu/modules/azure/versions.tf +27 -0
- package/opentofu/modules/gcp/main.tf +645 -0
- package/opentofu/modules/gcp/outputs.tf +73 -0
- package/opentofu/modules/gcp/variables.tf +428 -0
- package/opentofu/modules/gcp/versions.tf +27 -0
- package/opentofu/modules/hetzner/main.tf +432 -0
- package/opentofu/modules/hetzner/outputs.tf +72 -0
- package/opentofu/modules/hetzner/variables.tf +423 -0
- package/opentofu/modules/hetzner/versions.tf +26 -0
- package/package.json +33 -1
- package/dist/chunk-EOOEHZGC.js.map +0 -1
- package/dist/chunk-VWFTOFTI.js.map +0 -1
- package/dist/pipeline-A-gSsPRR.d.cts +0 -189
- package/dist/pipeline-A-gSsPRR.d.ts +0 -189
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/index.tsx"],"sourcesContent":["// ========================================================================\n// @veltrixsecops/app-sdk/ui — the platform's shared component library,\n// exposed to app client bundles.\n//\n// App pages import these instead of hand-rolling raw HTML, so pages render\n// themed inside the Veltrix design system (dark/light + tenant branding via\n// `var(--vx-*)`), consistent with the rest of the portal, and externalized —\n// zero bundle bloat, one React instance. This completes the \"predictable\n// shell, flexible body\" contract: the platform owns the components; apps\n// compose their page body from them.\n//\n// RUNTIME: every export here reads its real implementation off the host at\n// render time — globalThis.__VELTRIX_APP_RUNTIME__.ui.<Name>, populated by\n// the platform from components/shared/* (see\n// client/src/appRuntime/installHostRuntime.ts). At packaging time the CLI's\n// client bundler (and the platform's on-demand esbuild bundle routes) shim\n// the '@veltrixsecops/app-sdk/ui' specifier straight to that `ui` bag, so\n// this module's own render-time lookup only actually executes in\n// non-bundled contexts: local dev, unit tests, a bare `tsc --noEmit`, or\n// Storybook.\n//\n// FALLBACK CONTRACT: outside the platform (host runtime absent, or an older\n// host that predates a given component) every export here renders a\n// minimal, accessible, unstyled fallback instead of throwing — an app page\n// under test or local dev keeps working, just without platform theming.\n// Never throw on render.\n//\n// TYPE FIDELITY: prop types are copied from the platform's real components\n// in client/src/components/shared (see the ADR at\n// _ai_tasks/ui-package/2026-07-10/02_sdk_ui_subpath.md) so app-author\n// typechecking matches what actually renders inside Veltrix. Heavy composite\n// widgets (ConfigurationCanvas, VersionControl, Pipeline) stay out of scope —\n// they carry platform coupling a later phase may expose read-only versions\n// of; see the ADR's \"Non-goals\" section.\n//\n// EXPORTS: Button, Badge, Card (+ CardHeader/CardBody/CardFooter), Input,\n// Textarea, Checkbox, Select, SearchBox, Pagination, FilterBar, SortSelect,\n// FormField, Tabs, EmptyState, Skeleton (+ SkeletonText/SkeletonCard),\n// Tooltip, Spinner, DataTable, StatsCard, FormDialog, useToast,\n// useConfirmDialog.\n//\n// useToast / useConfirmDialog are included because the platform's root\n// App.tsx mounts ToastProvider/ConfirmationDialogProvider around the ENTIRE\n// tree (including every app page, since app pages render inside the host's\n// own React instance) — so the real context-backed hooks resolve correctly\n// from app code with no extra wiring. Outside the platform they degrade to a\n// safe, non-throwing fallback (see each hook's docs below) rather than\n// crashing or silently doing nothing.\n// ========================================================================\n\nimport * as React from 'react'\nimport { getHostRuntime } from '../client'\n\n/** Read one named component off the host's `runtime.ui` bag, or undefined. */\nfunction getHostUi<T>(name: string): T | undefined {\n return getHostRuntime()?.ui?.[name] as T | undefined\n}\n\nconst fallbackNote: React.CSSProperties = { fontFamily: 'inherit' }\n\n// ---------------------------------------------------------------------------\n// Button\n// ---------------------------------------------------------------------------\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'ghost' | 'link'\nexport type ButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant\n size?: ButtonSize\n isLoading?: boolean\n loadingText?: string\n fullWidth?: boolean\n leftIcon?: React.ReactNode\n rightIcon?: React.ReactNode\n}\n\ntype ButtonComponent = React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>\n\n/**\n * Button — delegates to the platform's real Button at render time.\n *\n * @example\n * <Button variant=\"primary\" leftIcon={<RefreshIcon />} onClick={refresh}>Refresh</Button>\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const HostButton = getHostUi<ButtonComponent>('Button')\n if (HostButton) return <HostButton ref={ref} {...props} />\n\n const {\n variant: _variant,\n size: _size,\n isLoading,\n loadingText,\n fullWidth,\n leftIcon,\n rightIcon,\n children,\n disabled,\n type,\n style,\n ...rest\n } = props\n\n return (\n <button\n ref={ref}\n type={type ?? 'button'}\n disabled={disabled || isLoading}\n aria-busy={isLoading || undefined}\n style={{\n ...fallbackNote,\n display: 'inline-flex',\n alignItems: 'center',\n gap: 6,\n padding: '6px 14px',\n borderRadius: 6,\n border: '1px solid currentColor',\n background: 'transparent',\n cursor: disabled || isLoading ? 'not-allowed' : 'pointer',\n width: fullWidth ? '100%' : undefined,\n opacity: disabled || isLoading ? 0.6 : 1,\n justifyContent: 'center',\n ...style,\n }}\n {...rest}\n >\n {leftIcon}\n {isLoading ? loadingText ?? children : children}\n {rightIcon}\n </button>\n )\n})\nButton.displayName = 'Button'\n\n// ---------------------------------------------------------------------------\n// Badge\n// ---------------------------------------------------------------------------\n\nexport type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'\nexport type BadgeSize = 'sm' | 'md' | 'lg'\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n variant?: BadgeVariant\n size?: BadgeSize\n rounded?: boolean\n dot?: boolean\n}\n\nconst BADGE_FALLBACK_COLORS: Record<BadgeVariant, string> = {\n default: '#6b7280',\n primary: '#4f46e5',\n secondary: '#6b7280',\n success: '#16a34a',\n danger: '#dc2626',\n warning: '#d97706',\n info: '#0284c7',\n}\n\n/**\n * Badge — delegates to the platform's real Badge at render time.\n *\n * @example\n * <Badge variant={row.deployState === 'deployed' ? 'success' : 'warning'}>{row.deployState}</Badge>\n */\nexport const Badge: React.FC<BadgeProps> = ({ variant = 'default', size = 'md', rounded, dot, children, style, ...rest }) => {\n const HostBadge = getHostUi<React.FC<BadgeProps>>('Badge')\n if (HostBadge) return <HostBadge variant={variant} size={size} rounded={rounded} dot={dot} style={style} {...rest}>{children}</HostBadge>\n\n const color = BADGE_FALLBACK_COLORS[variant]\n const fontSize = size === 'sm' ? 11 : size === 'lg' ? 14 : 12\n return (\n <span\n style={{\n ...fallbackNote,\n display: 'inline-flex',\n alignItems: 'center',\n gap: 4,\n padding: size === 'sm' ? '1px 6px' : size === 'lg' ? '3px 10px' : '2px 8px',\n borderRadius: rounded ? 999 : 4,\n border: `1px solid ${color}`,\n color,\n fontSize,\n fontWeight: 500,\n ...style,\n }}\n {...rest}\n >\n {dot && <span aria-hidden=\"true\" style={{ width: 6, height: 6, borderRadius: '50%', background: color }} />}\n {children}\n </span>\n )\n}\nBadge.displayName = 'Badge'\n\n// ---------------------------------------------------------------------------\n// Card (+ Header/Body/Footer)\n// ---------------------------------------------------------------------------\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'bordered' | 'elevated'\n padding?: 'none' | 'sm' | 'md' | 'lg'\n}\nexport interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n actions?: React.ReactNode\n}\nexport type CardBodyProps = React.HTMLAttributes<HTMLDivElement>\nexport interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'bordered'\n}\n\n/** Card — delegates to the platform's real Card at render time. */\nexport const Card: React.FC<CardProps> = ({ children, style, ...rest }) => {\n const HostCard = getHostUi<React.FC<CardProps>>('Card')\n if (HostCard) return <HostCard style={style} {...rest}>{children}</HostCard>\n return (\n <div style={{ ...fallbackNote, border: '1px solid #d1d5db', borderRadius: 8, overflow: 'hidden', ...style }} {...rest}>\n {children}\n </div>\n )\n}\nCard.displayName = 'Card'\n\n/** CardHeader — the header section of a Card, with optional trailing actions. */\nexport const CardHeader: React.FC<CardHeaderProps> = ({ actions, children, style, ...rest }) => {\n const HostCardHeader = getHostUi<React.FC<CardHeaderProps>>('CardHeader')\n if (HostCardHeader) return <HostCardHeader actions={actions} style={style} {...rest}>{children}</HostCardHeader>\n return (\n <div\n style={{\n ...fallbackNote,\n padding: '12px 16px',\n borderBottom: '1px solid #d1d5db',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n ...style,\n }}\n {...rest}\n >\n <div style={{ flex: 1, minWidth: 0 }}>{children}</div>\n {actions && <div>{actions}</div>}\n </div>\n )\n}\nCardHeader.displayName = 'CardHeader'\n\n/** CardBody — the main content area of a Card. */\nexport const CardBody: React.FC<CardBodyProps> = ({ children, style, ...rest }) => {\n const HostCardBody = getHostUi<React.FC<CardBodyProps>>('CardBody')\n if (HostCardBody) return <HostCardBody style={style} {...rest}>{children}</HostCardBody>\n return (\n <div style={{ ...fallbackNote, padding: '12px 16px', ...style }} {...rest}>\n {children}\n </div>\n )\n}\nCardBody.displayName = 'CardBody'\n\n/** CardFooter — the footer section of a Card, typically for actions. */\nexport const CardFooter: React.FC<CardFooterProps> = ({ children, style, ...rest }) => {\n const HostCardFooter = getHostUi<React.FC<CardFooterProps>>('CardFooter')\n if (HostCardFooter) return <HostCardFooter style={style} {...rest}>{children}</HostCardFooter>\n return (\n <div style={{ ...fallbackNote, padding: '12px 16px', borderTop: '1px solid #d1d5db', ...style }} {...rest}>\n {children}\n </div>\n )\n}\nCardFooter.displayName = 'CardFooter'\n\n// ---------------------------------------------------------------------------\n// Input\n// ---------------------------------------------------------------------------\n\nexport type InputSize = 'sm' | 'md' | 'lg'\nexport type InputVariant = 'default' | 'error' | 'success'\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n label?: string\n error?: string\n helperText?: string\n leftIcon?: React.ReactNode\n rightIcon?: React.ReactNode\n variant?: InputVariant\n inputSize?: InputSize\n isSuccess?: boolean\n fullWidth?: boolean\n}\n\ntype InputComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>\n\n/**\n * Input — delegates to the platform's real Input at render time.\n *\n * @example\n * <Input label=\"Index name\" value={name} onChange={(e) => setName(e.target.value)} error={errors.name} />\n */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref) => {\n const HostInput = getHostUi<InputComponent>('Input')\n if (HostInput) return <HostInput ref={ref} {...props} />\n\n const { label, error, helperText, leftIcon, rightIcon, fullWidth = true, id, style, ...rest } = props\n const inputId = id ?? (label ? `vx-input-${label.toLowerCase().replace(/\\s+/g, '-')}` : undefined)\n\n return (\n <div style={{ ...fallbackNote, width: fullWidth ? '100%' : undefined }}>\n {label && (\n <label htmlFor={inputId} style={{ display: 'block', fontSize: 13, fontWeight: 500, marginBottom: 4 }}>\n {label}\n </label>\n )}\n <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>\n {leftIcon}\n <input\n ref={ref}\n id={inputId}\n aria-invalid={!!error || undefined}\n style={{ flex: 1, padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af', ...style }}\n {...rest}\n />\n {rightIcon}\n </div>\n {error && (\n <p role=\"alert\" style={{ marginTop: 4, fontSize: 12, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {helperText && !error && <p style={{ marginTop: 4, fontSize: 12, color: '#6b7280' }}>{helperText}</p>}\n </div>\n )\n})\nInput.displayName = 'Input'\n\n// ---------------------------------------------------------------------------\n// Textarea\n// ---------------------------------------------------------------------------\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string\n error?: string\n helperText?: string\n fullWidth?: boolean\n}\n\ntype TextareaComponent = React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>\n\n/**\n * Textarea — delegates to the platform's real Textarea at render time.\n *\n * @example\n * <Textarea label=\"Description\" helperText=\"Markdown is supported.\" />\n */\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, ref) => {\n const HostTextarea = getHostUi<TextareaComponent>('Textarea')\n if (HostTextarea) return <HostTextarea ref={ref} {...props} />\n\n const { label, error, helperText, fullWidth = true, id, rows = 4, style, ...rest } = props\n const textareaId = id ?? (label ? `vx-textarea-${label.toLowerCase().replace(/\\s+/g, '-')}` : undefined)\n\n return (\n <div style={{ ...fallbackNote, width: fullWidth ? '100%' : undefined }}>\n {label && (\n <label htmlFor={textareaId} style={{ display: 'block', fontSize: 13, fontWeight: 500, marginBottom: 4 }}>\n {label}\n </label>\n )}\n <textarea\n ref={ref}\n id={textareaId}\n rows={rows}\n aria-invalid={!!error || undefined}\n style={{ width: '100%', padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af', ...style }}\n {...rest}\n />\n {error && (\n <p role=\"alert\" style={{ marginTop: 4, fontSize: 12, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {helperText && !error && <p style={{ marginTop: 4, fontSize: 12, color: '#6b7280' }}>{helperText}</p>}\n </div>\n )\n})\nTextarea.displayName = 'Textarea'\n\n// ---------------------------------------------------------------------------\n// Checkbox\n// ---------------------------------------------------------------------------\n\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {\n label?: React.ReactNode\n error?: string\n helperText?: string\n}\n\ntype CheckboxComponent = React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>\n\n/**\n * Checkbox — delegates to the platform's real Checkbox at render time.\n *\n * @example\n * <Checkbox label=\"Enable drift detection\" checked={enabled} onChange={(e) => setEnabled(e.target.checked)} />\n */\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const HostCheckbox = getHostUi<CheckboxComponent>('Checkbox')\n if (HostCheckbox) return <HostCheckbox ref={ref} {...props} />\n\n const { label, error, helperText, id, disabled, ...rest } = props\n const generatedId = React.useId()\n const inputId = id ?? generatedId\n\n return (\n <div style={fallbackNote}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n <input ref={ref} id={inputId} type=\"checkbox\" disabled={disabled} aria-invalid={!!error || undefined} {...rest} />\n {label && (\n <label htmlFor={inputId} style={{ fontSize: 13, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.6 : 1 }}>\n {label}\n </label>\n )}\n </div>\n {error && (\n <p role=\"alert\" style={{ marginTop: 4, fontSize: 12, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {helperText && !error && <p style={{ marginTop: 4, fontSize: 12, color: '#6b7280' }}>{helperText}</p>}\n </div>\n )\n})\nCheckbox.displayName = 'Checkbox'\n\n// ---------------------------------------------------------------------------\n// Select (controlled; onChange receives the new value string)\n// ---------------------------------------------------------------------------\n\nexport type SelectSize = 'sm' | 'md' | 'lg'\n\nexport interface SelectOption {\n value: string\n label: string\n disabled?: boolean\n}\n\nexport interface SelectProps {\n options: SelectOption[]\n value?: string\n onChange?: (value: string) => void\n placeholder?: string\n label?: string\n error?: string\n helperText?: string\n size?: SelectSize\n disabled?: boolean\n fullWidth?: boolean\n className?: string\n id?: string\n name?: string\n 'aria-label'?: string\n}\n\n/**\n * Select — delegates to the platform's real (WAI-ARIA listbox) Select at render time.\n * The fallback is a native `<select>` — functionally equivalent, visually plainer.\n *\n * @example\n * <Select label=\"Environment\" value={env} onChange={setEnv} options={[{ value: 'prod', label: 'Production' }]} />\n */\nexport const Select: React.FC<SelectProps> = (props) => {\n const HostSelect = getHostUi<React.FC<SelectProps>>('Select')\n if (HostSelect) return <HostSelect {...props} />\n\n const { options, value, onChange, placeholder = 'Select…', label, error, helperText, disabled, fullWidth = true, id, name, className } = props\n const selectId = id ?? (label ? `vx-select-${label.toLowerCase().replace(/\\s+/g, '-')}` : undefined)\n\n return (\n <div className={className} style={{ ...fallbackNote, width: fullWidth ? '100%' : undefined }}>\n {label && (\n <label htmlFor={selectId} style={{ display: 'block', fontSize: 13, fontWeight: 500, marginBottom: 4 }}>\n {label}\n </label>\n )}\n <select\n id={selectId}\n name={name}\n aria-label={props['aria-label']}\n aria-invalid={!!error || undefined}\n disabled={disabled}\n value={value ?? ''}\n onChange={(event) => onChange?.(event.target.value)}\n style={{ width: '100%', padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af' }}\n >\n {placeholder && (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n )}\n {options.map((option) => (\n <option key={option.value} value={option.value} disabled={option.disabled}>\n {option.label}\n </option>\n ))}\n </select>\n {error && (\n <p role=\"alert\" style={{ marginTop: 4, fontSize: 12, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {helperText && !error && <p style={{ marginTop: 4, fontSize: 12, color: '#6b7280' }}>{helperText}</p>}\n </div>\n )\n}\nSelect.displayName = 'Select'\n\n// ---------------------------------------------------------------------------\n// SearchBox\n// ---------------------------------------------------------------------------\n\nexport type SearchBoxSize = 'sm' | 'md' | 'lg'\n\nexport interface SearchBoxProps {\n /** Controlled search text. */\n value: string\n /** Called with the new text — debounced by `debounceMs` when set. */\n onChange: (value: string) => void\n placeholder?: string\n disabled?: boolean\n size?: SearchBoxSize\n /** Debounces `onChange` by this many ms; omit (or `0`) to call on every keystroke. */\n debounceMs?: number\n className?: string\n 'aria-label'?: string\n}\n\n/**\n * SearchBox — delegates to the platform's real SearchBox at render time (leading search icon,\n * a clear button once there's text, optional debounce). The fallback is a bare\n * `<input type=\"search\">` wired straight to `value`/`onChange` — no icon, no debounce, no\n * clear button — but functionally sufficient for typing and clearing.\n *\n * @example\n * <SearchBox value={search} onChange={setSearch} placeholder=\"Search apps…\" debounceMs={250} />\n */\nexport const SearchBox: React.FC<SearchBoxProps> = (props) => {\n const HostSearchBox = getHostUi<React.FC<SearchBoxProps>>('SearchBox')\n if (HostSearchBox) return <HostSearchBox {...props} />\n\n const { value, onChange, placeholder, disabled, className, 'aria-label': ariaLabel } = props\n return (\n <input\n type=\"search\"\n value={value}\n onChange={(event) => onChange(event.target.value)}\n placeholder={placeholder}\n disabled={disabled}\n aria-label={ariaLabel ?? placeholder ?? 'Search'}\n className={className}\n style={{ ...fallbackNote, width: '100%', padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af' }}\n />\n )\n}\nSearchBox.displayName = 'SearchBox'\n\n// ---------------------------------------------------------------------------\n// Pagination\n// ---------------------------------------------------------------------------\n\nexport interface PaginationProps {\n /** 1-based current page. */\n page: number\n pageSize: number\n totalItems: number\n onPageChange: (page: number) => void\n /** Renders a page-size selector when provided together with `pageSizeOptions`. */\n onPageSizeChange?: (size: number) => void\n pageSizeOptions?: number[]\n disabled?: boolean\n className?: string\n}\n\n/**\n * Pagination — delegates to the platform's real Pagination at render time: a \"Showing X–Y of\n * N\" summary, numbered pages with ellipsis for large ranges, an optional page-size Select, and\n * `aria-current=\"page\"` on the active page — visually consistent with DataTable's built-in\n * pagination footer. The fallback is a plain Prev/Next pair with \"page X of Y\" text.\n *\n * @example\n * <Pagination page={page} pageSize={20} totalItems={total} onPageChange={setPage} />\n */\nexport const Pagination: React.FC<PaginationProps> = (props) => {\n const HostPagination = getHostUi<React.FC<PaginationProps>>('Pagination')\n if (HostPagination) return <HostPagination {...props} />\n\n const { page, pageSize, totalItems, onPageChange, disabled, className } = props\n const pageCount = Math.max(1, Math.ceil(totalItems / pageSize))\n const canGoPrev = !disabled && page > 1\n const canGoNext = !disabled && page < pageCount\n\n return (\n <nav aria-label=\"Pagination\" className={className} style={{ ...fallbackNote, display: 'flex', alignItems: 'center', gap: 12 }}>\n <button type=\"button\" onClick={() => onPageChange(page - 1)} disabled={!canGoPrev} style={{ padding: '4px 10px' }}>\n Prev\n </button>\n <span>\n page {page} of {pageCount}\n </span>\n <button type=\"button\" onClick={() => onPageChange(page + 1)} disabled={!canGoNext} style={{ padding: '4px 10px' }}>\n Next\n </button>\n </nav>\n )\n}\nPagination.displayName = 'Pagination'\n\n// ---------------------------------------------------------------------------\n// FilterBar\n// ---------------------------------------------------------------------------\n\nexport interface FilterOption {\n value: string\n label: string\n}\n\nexport interface FilterDefinition {\n /** Stable identifier; also the React key for this filter's dropdown. */\n key: string\n /** Shown as the dropdown's placeholder/aria-label, and as its entry in the \"Add filter\" menu. */\n label: string\n options: FilterOption[]\n /** `null` (not `''`) represents \"no selection\" — the value FilterBar clears back to. */\n value: string | null\n onChange: (value: string | null) => void\n /** Always rendered when true. Omit/false to make this filter addable/removable via the \"Add filter\" menu. */\n alwaysVisible?: boolean\n}\n\nexport interface FilterBarSearchProps {\n value: string\n onChange: (value: string) => void\n placeholder?: string\n}\n\nexport interface FilterBarProps {\n filters: FilterDefinition[]\n /** Renders a SearchBox ahead of the filter dropdowns when provided. */\n search?: FilterBarSearchProps\n /**\n * Called by \"Clear all\" instead of FilterBar's own clearing logic. Omit it to let FilterBar\n * clear every filter with a value itself (`filter.onChange(null)` for each).\n */\n onClearAll?: () => void\n addFilterLabel?: string\n className?: string\n}\n\n/**\n * FilterBar — delegates to the platform's real FilterBar at render time: an optional\n * SearchBox, always-visible filter dropdowns, and optional filters the user can add/remove via\n * an \"Add filter\" menu (a filter with a non-null `value` is always treated as visible, even\n * before the user explicitly adds it). The fallback renders every filter as a plain,\n * always-visible native `<select>` — no add/remove menu, no styled search box — so an app page\n * under test still exposes every filter's full behavior via `onChange`.\n *\n * @example\n * <FilterBar\n * search={{ value: search, onChange: setSearch, placeholder: 'Search apps…' }}\n * filters={[\n * { key: 'vendor', label: 'Vendor', options: vendorOptions, value: vendor, onChange: setVendor, alwaysVisible: true },\n * { key: 'category', label: 'Category', options: categoryOptions, value: category, onChange: setCategory },\n * ]}\n * />\n */\nexport const FilterBar: React.FC<FilterBarProps> = (props) => {\n const HostFilterBar = getHostUi<React.FC<FilterBarProps>>('FilterBar')\n if (HostFilterBar) return <HostFilterBar {...props} />\n\n const { filters, search, className } = props\n return (\n <div className={className} style={{ ...fallbackNote, display: 'flex', flexWrap: 'wrap', gap: 8, alignItems: 'center' }}>\n {search && (\n <input\n type=\"search\"\n aria-label={search.placeholder ?? 'Search'}\n placeholder={search.placeholder}\n value={search.value}\n onChange={(event) => search.onChange(event.target.value)}\n style={{ padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af' }}\n />\n )}\n {filters.map((filter) => (\n <label key={filter.key} style={{ display: 'flex', flexDirection: 'column', fontSize: 12 }}>\n {filter.label}\n <select\n aria-label={filter.label}\n value={filter.value ?? ''}\n onChange={(event) => filter.onChange(event.target.value === '' ? null : event.target.value)}\n style={{ padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af' }}\n >\n <option value=\"\">{filter.label}</option>\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n </label>\n ))}\n </div>\n )\n}\nFilterBar.displayName = 'FilterBar'\n\n// ---------------------------------------------------------------------------\n// SortSelect\n// ---------------------------------------------------------------------------\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface SortOption {\n value: string\n label: string\n}\n\nexport interface SortSelectProps {\n /** Sortable fields, e.g. `[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Updated' }]`. */\n options: SortOption[]\n /** Selected field key. */\n value: string\n direction: SortDirection\n /** Called with the field and direction together, whichever one the interaction changed. */\n onChange: (value: string, direction: SortDirection) => void\n disabled?: boolean\n className?: string\n}\n\n/**\n * SortSelect — delegates to the platform's real SortSelect at render time: a labeled field\n * Select paired with an asc/desc direction toggle button, styled to sit in the same toolbar\n * row as FilterBar. The standalone sort control for list/card surfaces that aren't a\n * DataTable (which has its own column-header sort). The fallback is a native `<select>` for\n * the field plus a button that flips direction.\n *\n * @example\n * <SortSelect\n * options={[{ value: 'name', label: 'Name' }, { value: 'updatedAt', label: 'Last updated' }]}\n * value={sortField}\n * direction={sortDirection}\n * onChange={(field, direction) => { setSortField(field); setSortDirection(direction) }}\n * />\n */\nexport const SortSelect: React.FC<SortSelectProps> = (props) => {\n const HostSortSelect = getHostUi<React.FC<SortSelectProps>>('SortSelect')\n if (HostSortSelect) return <HostSortSelect {...props} />\n\n const { options, value, direction, onChange, disabled, className } = props\n const directionLabel = direction === 'asc' ? 'Sort ascending' : 'Sort descending'\n\n return (\n <div className={className} style={{ ...fallbackNote, display: 'flex', alignItems: 'center', gap: 6 }}>\n <select\n aria-label=\"Sort by\"\n value={value}\n disabled={disabled}\n onChange={(event) => onChange(event.target.value, direction)}\n style={{ padding: '6px 10px', borderRadius: 6, border: '1px solid #9ca3af' }}\n >\n {options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => onChange(value, direction === 'asc' ? 'desc' : 'asc')}\n aria-label={directionLabel}\n style={{ padding: '4px 10px' }}\n >\n {direction === 'asc' ? '↑' : '↓'}\n </button>\n </div>\n )\n}\nSortSelect.displayName = 'SortSelect'\n\n// ---------------------------------------------------------------------------\n// FormField — generic label + control + error/hint wrapper\n// ---------------------------------------------------------------------------\n\nexport interface FormFieldProps {\n label?: string\n htmlFor?: string\n error?: string\n hint?: string\n required?: boolean\n className?: string\n children: React.ReactNode\n}\n\n/**\n * FormField — wraps a custom control (not already self-labeling like Input/Select) with\n * the platform's label + error/hint visual language.\n *\n * @example\n * <FormField label=\"Allowed IP ranges\" htmlFor=\"cidrs\" hint=\"One CIDR block per line\">\n * <textarea id=\"cidrs\" />\n * </FormField>\n */\nexport const FormField: React.FC<FormFieldProps> = (props) => {\n const HostFormField = getHostUi<React.FC<FormFieldProps>>('FormField')\n if (HostFormField) return <HostFormField {...props} />\n\n const { label, htmlFor, error, hint, required, className, children } = props\n return (\n <div className={className} style={fallbackNote}>\n {label && (\n <label htmlFor={htmlFor} style={{ display: 'block', fontSize: 13, fontWeight: 500, marginBottom: 4 }}>\n {label}\n {required && (\n <span aria-hidden=\"true\" style={{ color: '#dc2626', marginLeft: 2 }}>\n *\n </span>\n )}\n </label>\n )}\n {children}\n {error && (\n <p role=\"alert\" style={{ marginTop: 4, fontSize: 12, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {hint && !error && <p style={{ marginTop: 4, fontSize: 12, color: '#6b7280' }}>{hint}</p>}\n </div>\n )\n}\nFormField.displayName = 'FormField'\n\n// ---------------------------------------------------------------------------\n// Tabs\n// ---------------------------------------------------------------------------\n\nexport interface TabItem {\n key?: string\n label: string\n content: React.ReactNode\n disabled?: boolean\n}\n\nexport interface TabsProps {\n tabs: TabItem[]\n defaultActiveIndex?: number\n activeIndex?: number\n onTabChange?: (index: number) => void\n children?: React.ReactNode\n className?: string\n}\n\n/**\n * Tabs — delegates to the platform's real (WAI-ARIA tabs pattern) Tabs at render time.\n *\n * @example\n * <Tabs tabs={[{ key: 'indexes', label: 'Indexes', content: <IndexesPanel /> }]} />\n */\nexport const Tabs: React.FC<TabsProps> = (props) => {\n const HostTabs = getHostUi<React.FC<TabsProps>>('Tabs')\n if (HostTabs) return <HostTabs {...props} />\n\n const { tabs, defaultActiveIndex = 0, activeIndex, onTabChange, children, className } = props\n const [internalIndex, setInternalIndex] = React.useState(defaultActiveIndex)\n const isControlled = activeIndex !== undefined\n const currentIndex = isControlled ? activeIndex : internalIndex\n const activeTab = tabs[currentIndex]\n\n const selectTab = (index: number) => {\n if (tabs[index]?.disabled) return\n if (!isControlled) setInternalIndex(index)\n onTabChange?.(index)\n }\n\n return (\n <div className={className} style={fallbackNote}>\n <div role=\"tablist\" style={{ display: 'flex', gap: 4, borderBottom: '1px solid #d1d5db' }}>\n {tabs.map((tab, index) => (\n <button\n key={tab.key ?? index}\n type=\"button\"\n role=\"tab\"\n aria-selected={index === currentIndex}\n disabled={tab.disabled}\n onClick={() => selectTab(index)}\n style={{\n padding: '6px 12px',\n border: 'none',\n borderBottom: index === currentIndex ? '2px solid currentColor' : '2px solid transparent',\n background: 'transparent',\n cursor: tab.disabled ? 'not-allowed' : 'pointer',\n fontWeight: index === currentIndex ? 600 : 400,\n opacity: tab.disabled ? 0.5 : 1,\n }}\n >\n {tab.label}\n </button>\n ))}\n </div>\n <div role=\"tabpanel\" style={{ padding: 12 }}>\n {children || activeTab?.content}\n </div>\n </div>\n )\n}\nTabs.displayName = 'Tabs'\n\n// ---------------------------------------------------------------------------\n// EmptyState\n// ---------------------------------------------------------------------------\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode\n title: string\n description?: string\n action?: React.ReactNode\n className?: string\n}\n\n/** EmptyState — delegates to the platform's real EmptyState at render time. */\nexport const EmptyState: React.FC<EmptyStateProps> = (props) => {\n const HostEmptyState = getHostUi<React.FC<EmptyStateProps>>('EmptyState')\n if (HostEmptyState) return <HostEmptyState {...props} />\n\n const { icon, title, description, action, className } = props\n return (\n <div className={className} style={{ ...fallbackNote, textAlign: 'center', padding: '32px 16px' }}>\n {icon && <div style={{ marginBottom: 12 }}>{icon}</div>}\n <p style={{ fontWeight: 600, marginBottom: description ? 4 : 0 }}>{title}</p>\n {description && <p style={{ fontSize: 13, color: '#6b7280', marginBottom: action ? 12 : 0 }}>{description}</p>}\n {action}\n </div>\n )\n}\nEmptyState.displayName = 'EmptyState'\n\n// ---------------------------------------------------------------------------\n// Skeleton (+ Text/Card)\n// ---------------------------------------------------------------------------\n\nexport type SkeletonVariant = 'text' | 'circular' | 'rectangular'\n\nexport interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: SkeletonVariant\n width?: string | number\n height?: string | number\n animation?: 'pulse' | 'wave' | 'none'\n}\n\nconst skeletonRadius: Record<SkeletonVariant, number | string> = { text: 4, circular: '50%', rectangular: 8 }\n\n/** Skeleton — delegates to the platform's real Skeleton at render time. */\nexport const Skeleton: React.FC<SkeletonProps> = (props) => {\n const HostSkeleton = getHostUi<React.FC<SkeletonProps>>('Skeleton')\n if (HostSkeleton) return <HostSkeleton {...props} />\n\n const { variant = 'text', width, height, style, ...rest } = props\n return (\n <div\n aria-hidden=\"true\"\n style={{\n background: '#e5e7eb',\n borderRadius: skeletonRadius[variant],\n width: width ?? (variant === 'text' ? '100%' : undefined),\n height: height ?? (variant === 'text' ? 14 : undefined),\n ...style,\n }}\n {...rest}\n />\n )\n}\nSkeleton.displayName = 'Skeleton'\n\nexport interface SkeletonTextProps {\n lines?: number\n width?: string | number\n lastLineWidth?: string | number\n className?: string\n}\n\n/** SkeletonText — a multi-line text skeleton, delegating to the platform's real one. */\nexport const SkeletonText: React.FC<SkeletonTextProps> = (props) => {\n const HostSkeletonText = getHostUi<React.FC<SkeletonTextProps>>('SkeletonText')\n if (HostSkeletonText) return <HostSkeletonText {...props} />\n\n const { lines = 3, width = '100%', lastLineWidth = '80%', className } = props\n return (\n <div className={className} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>\n {Array.from({ length: lines }).map((_, index) => (\n <Skeleton key={index} variant=\"text\" width={index === lines - 1 ? lastLineWidth : width} />\n ))}\n </div>\n )\n}\nSkeletonText.displayName = 'SkeletonText'\n\nexport interface SkeletonCardProps {\n hasAvatar?: boolean\n hasActions?: boolean\n className?: string\n}\n\n/** SkeletonCard — a card-shaped skeleton, delegating to the platform's real one. */\nexport const SkeletonCard: React.FC<SkeletonCardProps> = (props) => {\n const HostSkeletonCard = getHostUi<React.FC<SkeletonCardProps>>('SkeletonCard')\n if (HostSkeletonCard) return <HostSkeletonCard {...props} />\n\n const { hasAvatar, hasActions, className } = props\n return (\n <div className={className} style={{ border: '1px solid #e5e7eb', borderRadius: 8, padding: 16 }}>\n <div style={{ display: 'flex', gap: 12 }}>\n {hasAvatar && <Skeleton variant=\"circular\" width={40} height={40} />}\n <div style={{ flex: 1 }}>\n <Skeleton variant=\"text\" width=\"60%\" />\n <div style={{ marginTop: 8 }}>\n <SkeletonText lines={2} />\n </div>\n </div>\n </div>\n {hasActions && (\n <div style={{ display: 'flex', gap: 8, marginTop: 12 }}>\n <Skeleton variant=\"rectangular\" width={72} height={30} />\n <Skeleton variant=\"rectangular\" width={72} height={30} />\n </div>\n )}\n </div>\n )\n}\nSkeletonCard.displayName = 'SkeletonCard'\n\n// ---------------------------------------------------------------------------\n// Tooltip\n// ---------------------------------------------------------------------------\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right'\n\nexport interface TooltipProps {\n content?: React.ReactNode\n placement?: TooltipPlacement\n delayDuration?: number\n disabled?: boolean\n className?: string\n children: React.ReactNode\n}\n\n/**\n * Tooltip — delegates to the platform's real Tooltip at render time. The fallback uses the\n * browser's native `title` attribute (only works when `content` is plain text).\n */\nexport const Tooltip: React.FC<TooltipProps> = (props) => {\n const HostTooltip = getHostUi<React.FC<TooltipProps>>('Tooltip')\n if (HostTooltip) return <HostTooltip {...props} />\n\n const { content, disabled, className, children } = props\n const titleText = typeof content === 'string' ? content : undefined\n if (disabled || !titleText) return <>{children}</>\n return (\n <span className={className} title={titleText} style={{ display: 'inline-flex' }}>\n {children}\n </span>\n )\n}\nTooltip.displayName = 'Tooltip'\n\n// ---------------------------------------------------------------------------\n// Spinner\n// ---------------------------------------------------------------------------\n\nexport type SpinnerSize = 'sm' | 'md' | 'lg'\n\nexport interface SpinnerProps {\n size?: SpinnerSize\n className?: string\n label?: string\n}\n\nconst spinnerDiameter: Record<SpinnerSize, number> = { sm: 16, md: 24, lg: 32 }\n\n/** Spinner — delegates to the platform's real Spinner at render time. */\nexport const Spinner: React.FC<SpinnerProps> = (props) => {\n const HostSpinner = getHostUi<React.FC<SpinnerProps>>('Spinner')\n if (HostSpinner) return <HostSpinner {...props} />\n\n const { size = 'md', className, label } = props\n const diameter = spinnerDiameter[size]\n return (\n <div className={className} role=\"status\" aria-live=\"polite\" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}>\n <div\n aria-hidden=\"true\"\n style={{\n width: diameter,\n height: diameter,\n borderRadius: '50%',\n border: '2px solid currentColor',\n borderTopColor: 'transparent',\n animation: 'vx-sdk-spin 0.8s linear infinite',\n }}\n />\n {label && <p style={{ marginTop: 8, fontSize: 12, color: '#6b7280' }}>{label}</p>}\n <span style={{ position: 'absolute', width: 1, height: 1, overflow: 'hidden', clip: 'rect(0 0 0 0)' }}>{label || 'Loading'}</span>\n <style>{'@keyframes vx-sdk-spin { to { transform: rotate(360deg) } }'}</style>\n </div>\n )\n}\nSpinner.displayName = 'Spinner'\n\n// ---------------------------------------------------------------------------\n// DataTable (generic)\n// ---------------------------------------------------------------------------\n\nexport type DataTableAlign = 'left' | 'center' | 'right'\nexport type DataTableSortOrder = 'asc' | 'desc'\n\nexport interface DataTableSort {\n field: string\n order: DataTableSortOrder\n}\n\nexport interface DataTableColumn<T> {\n key: string\n header: React.ReactNode\n render?: (row: T) => React.ReactNode\n sortable?: boolean\n align?: DataTableAlign\n width?: string\n className?: string\n}\n\nexport interface DataTableEmptyState {\n icon?: React.ReactNode\n title: string\n description?: string\n action?: React.ReactNode\n}\n\nexport interface DataTablePaginationState {\n page: number\n pageSize: number\n total: number\n}\n\nexport interface DataTableProps<T> {\n columns: DataTableColumn<T>[]\n data: T[]\n rowKey: (row: T) => string\n isLoading?: boolean\n emptyState?: DataTableEmptyState\n sort?: DataTableSort\n onSortChange?: (sort: DataTableSort) => void\n pagination?: DataTablePaginationState\n onPageChange?: (page: number) => void\n onRowClick?: (row: T) => void\n rowActions?: (row: T) => React.ReactNode\n className?: string\n}\n\ntype DataTableComponent = (<T>(props: DataTableProps<T>) => React.ReactElement) & { displayName?: string }\n\nfunction FallbackDataTable<T>(props: DataTableProps<T>): React.ReactElement {\n const { columns, data, rowKey, isLoading, emptyState, onRowClick, rowActions, className } = props\n const showEmpty = !isLoading && data.length === 0\n\n return (\n <div className={className} style={fallbackNote}>\n <table style={{ width: '100%', borderCollapse: 'collapse' }}>\n <thead>\n <tr>\n {columns.map((column) => (\n <th key={column.key} style={{ textAlign: column.align ?? 'left', padding: '8px 10px', borderBottom: '1px solid #d1d5db' }}>\n {column.header}\n </th>\n ))}\n {rowActions && <th style={{ padding: '8px 10px', borderBottom: '1px solid #d1d5db' }} />}\n </tr>\n </thead>\n <tbody>\n {isLoading && (\n <tr>\n <td colSpan={Math.max(columns.length + (rowActions ? 1 : 0), 1)} style={{ padding: '12px 10px' }}>\n Loading…\n </td>\n </tr>\n )}\n {showEmpty && (\n <tr>\n <td colSpan={Math.max(columns.length + (rowActions ? 1 : 0), 1)}>\n <EmptyState title={emptyState?.title ?? 'No data'} description={emptyState?.description} icon={emptyState?.icon} action={emptyState?.action} />\n </td>\n </tr>\n )}\n {!isLoading &&\n !showEmpty &&\n data.map((row) => (\n <tr\n key={rowKey(row)}\n onClick={onRowClick ? () => onRowClick(row) : undefined}\n style={{ cursor: onRowClick ? 'pointer' : undefined, borderBottom: '1px solid #e5e7eb' }}\n >\n {columns.map((column) => (\n <td key={column.key} style={{ textAlign: column.align ?? 'left', padding: '8px 10px' }}>\n {column.render ? column.render(row) : String((row as Record<string, unknown>)[column.key] ?? '')}\n </td>\n ))}\n {rowActions && (\n <td style={{ padding: '8px 10px' }} onClick={(event) => event.stopPropagation()}>\n {rowActions(row)}\n </td>\n )}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\n/**\n * DataTable — delegates to the platform's real, server-driven DataTable at render time.\n *\n * @example\n * <DataTable\n * columns={[{ key: 'name', header: 'Name' }, { key: 'deployState', header: 'Status', render: (r) => <Badge>{r.deployState}</Badge> }]}\n * data={indexes}\n * rowKey={(row) => row.id}\n * />\n */\nexport function DataTable<T>(props: DataTableProps<T>): React.ReactElement {\n const HostDataTable = getHostUi<DataTableComponent>('DataTable')\n if (HostDataTable) return <HostDataTable {...props} />\n return <FallbackDataTable {...props} />\n}\n\n// ---------------------------------------------------------------------------\n// StatsCard\n// ---------------------------------------------------------------------------\n\nexport type StatsCardVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n\nexport interface StatsCardDelta {\n value: string\n direction: 'up' | 'down' | 'neutral'\n label?: string\n}\n\nexport interface StatsCardProps {\n label: string\n value: React.ReactNode\n icon?: React.ReactNode\n delta?: StatsCardDelta\n variant?: StatsCardVariant\n isLoading?: boolean\n onClick?: () => void\n className?: string\n}\n\nconst DELTA_FALLBACK_COLOR: Record<StatsCardDelta['direction'], string> = {\n up: '#16a34a',\n down: '#dc2626',\n neutral: '#6b7280',\n}\n\n/**\n * StatsCard — delegates to the platform's real StatsCard at render time.\n *\n * @example\n * <StatsCard label=\"Indexes\" value={indexes.length} delta={{ value: '+2', direction: 'up' }} />\n */\nexport const StatsCard: React.FC<StatsCardProps> = (props) => {\n const HostStatsCard = getHostUi<React.FC<StatsCardProps>>('StatsCard')\n if (HostStatsCard) return <HostStatsCard {...props} />\n\n const { label, value, icon, delta, isLoading, onClick, className } = props\n const isClickable = Boolean(onClick)\n\n return (\n <div\n role={isClickable ? 'button' : undefined}\n tabIndex={isClickable ? 0 : undefined}\n onClick={onClick}\n onKeyDown={\n isClickable\n ? (event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onClick?.()\n }\n }\n : undefined\n }\n className={className}\n style={{\n ...fallbackNote,\n border: '1px solid #d1d5db',\n borderRadius: 8,\n padding: 16,\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n gap: 12,\n cursor: isClickable ? 'pointer' : undefined,\n }}\n >\n <div style={{ minWidth: 0, flex: 1 }}>\n <p style={{ fontSize: 13, color: '#6b7280', margin: 0 }}>{label}</p>\n <p style={{ fontSize: 28, fontWeight: 700, margin: '4px 0 0' }}>{isLoading ? '…' : value}</p>\n {delta && !isLoading && (\n <p style={{ fontSize: 13, color: DELTA_FALLBACK_COLOR[delta.direction], margin: '4px 0 0' }}>\n {delta.value} {delta.label}\n </p>\n )}\n </div>\n {icon && <div aria-hidden=\"true\">{icon}</div>}\n </div>\n )\n}\nStatsCard.displayName = 'StatsCard'\n\n// ---------------------------------------------------------------------------\n// FormDialog\n// ---------------------------------------------------------------------------\n\nexport type FormDialogSize = 'sm' | 'md' | 'lg'\n\nexport interface FormDialogProps {\n isOpen: boolean\n onClose: () => void\n title: string\n description?: string\n children: React.ReactNode\n onSubmit: () => void | Promise<void>\n submitText?: string\n cancelText?: string\n isSubmitting?: boolean\n error?: string | null\n size?: FormDialogSize\n disableBackdropClose?: boolean\n submitDisabled?: boolean\n}\n\nconst FORM_DIALOG_MAX_WIDTH: Record<FormDialogSize, number> = { sm: 420, md: 520, lg: 680 }\n\n/**\n * FormDialog — delegates to the platform's real FormDialog at render time. The fallback is\n * a minimal, accessible modal shell (role=\"dialog\", Escape-to-close, backdrop click) without\n * the host's focus-trap polish.\n *\n * @example\n * <FormDialog isOpen={isOpen} onClose={close} title=\"Add index\" onSubmit={handleSubmit}>\n * <Input label=\"Name\" value={name} onChange={(e) => setName(e.target.value)} />\n * </FormDialog>\n */\nexport const FormDialog: React.FC<FormDialogProps> = (props) => {\n const HostFormDialog = getHostUi<React.FC<FormDialogProps>>('FormDialog')\n if (HostFormDialog) return <HostFormDialog {...props} />\n\n const {\n isOpen,\n onClose,\n title,\n description,\n children,\n onSubmit,\n submitText = 'Save',\n cancelText = 'Cancel',\n isSubmitting = false,\n error = null,\n size = 'md',\n disableBackdropClose = false,\n submitDisabled = false,\n } = props\n\n React.useEffect(() => {\n if (!isOpen) return\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && !isSubmitting) onClose()\n }\n document.addEventListener('keydown', handleKeyDown)\n return () => document.removeEventListener('keydown', handleKeyDown)\n }, [isOpen, isSubmitting, onClose])\n\n if (!isOpen) return null\n\n const requestClose = () => {\n if (!isSubmitting) onClose()\n }\n\n return (\n <div\n style={{ position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.5)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 50 }}\n onClick={disableBackdropClose ? undefined : requestClose}\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={title}\n style={{ background: 'white', color: 'black', borderRadius: 8, width: '100%', maxWidth: FORM_DIALOG_MAX_WIDTH[size], maxHeight: '80vh', overflow: 'auto', ...fallbackNote }}\n onClick={(event) => event.stopPropagation()}\n >\n <form\n onSubmit={(event) => {\n event.preventDefault()\n void onSubmit()\n }}\n >\n <div style={{ padding: 16, borderBottom: '1px solid #d1d5db' }}>\n <h3 style={{ margin: 0, fontSize: 16, fontWeight: 600 }}>{title}</h3>\n {description && <p style={{ margin: '4px 0 0', fontSize: 13, color: '#6b7280' }}>{description}</p>}\n </div>\n <div style={{ padding: 16, display: 'flex', flexDirection: 'column', gap: 12 }}>\n {error && (\n <p role=\"alert\" style={{ margin: 0, fontSize: 13, color: '#dc2626' }}>\n {error}\n </p>\n )}\n {children}\n </div>\n <div style={{ padding: 16, borderTop: '1px solid #d1d5db', display: 'flex', justifyContent: 'flex-end', gap: 8 }}>\n <Button type=\"button\" variant=\"secondary\" onClick={requestClose} disabled={isSubmitting}>\n {cancelText}\n </Button>\n <Button type=\"submit\" variant=\"primary\" isLoading={isSubmitting} disabled={submitDisabled}>\n {submitText}\n </Button>\n </div>\n </form>\n </div>\n </div>\n )\n}\nFormDialog.displayName = 'FormDialog'\n\n// ---------------------------------------------------------------------------\n// useToast / useConfirmDialog\n//\n// Unlike the components above, these are HOOKS the host backs with real React\n// context (ToastContext / ConfirmationDialogContext), whose providers the\n// platform's root App.tsx mounts around the entire tree — including app\n// pages, since they render inside the host's own React instance. So inside\n// Veltrix these resolve to the real, working implementation with no extra\n// wiring. Outside the platform (no host, or an older host) they degrade to a\n// safe, non-throwing fallback instead of crashing: `toast()` logs to the\n// console and `confirm()` resolves to `false` (fails closed — no destructive\n// action proceeds without an explicit user confirmation the fallback cannot\n// provide).\n// ---------------------------------------------------------------------------\n\nexport type ToastVariant = 'success' | 'error' | 'warning' | 'info'\n\nexport interface ToastOptions {\n variant?: ToastVariant\n duration?: number\n action?: { label: string; onClick: () => void }\n}\n\nexport interface Toast {\n id: string\n message: string\n variant: ToastVariant\n duration?: number\n action?: { label: string; onClick: () => void }\n}\n\nexport interface ToastContextValue {\n toasts: Toast[]\n toast: (message: string, options?: ToastOptions) => string\n success: (message: string, duration?: number) => string\n error: (message: string, duration?: number) => string\n warning: (message: string, duration?: number) => string\n info: (message: string, duration?: number) => string\n promise: <T>(\n promise: Promise<T>,\n messages: { loading: string; success: string | ((data: T) => string); error: string | ((error: unknown) => string) },\n ) => Promise<T>\n dismiss: (id: string) => void\n dismissAll: () => void\n}\n\nfunction fallbackToast(message: string, options?: ToastOptions): string {\n // eslint-disable-next-line no-console -- deliberate: this IS the fallback surface.\n console.warn(`[@veltrixsecops/app-sdk/ui] Toast (${options?.variant ?? 'info'}): ${message}`)\n return 'fallback-toast'\n}\n\nconst fallbackToastContext: ToastContextValue = {\n toasts: [],\n toast: fallbackToast,\n success: (message) => fallbackToast(message, { variant: 'success' }),\n error: (message) => fallbackToast(message, { variant: 'error' }),\n warning: (message) => fallbackToast(message, { variant: 'warning' }),\n info: (message) => fallbackToast(message, { variant: 'info' }),\n promise: (promise) => promise,\n dismiss: () => {},\n dismissAll: () => {},\n}\n\n/**\n * useToast — delegates to the platform's real toast system when running inside Veltrix.\n * Outside it, `toast()`/`success()`/etc. log to the console instead of throwing.\n *\n * @example\n * const toast = useToast()\n * toast.success('Index saved')\n */\nexport function useToast(): ToastContextValue {\n const hostUseToast = getHostUi<() => ToastContextValue>('useToast')\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `hostUseToast` IS the real hook;\n // its presence is fixed for the app's lifetime (the host runtime installs once at boot),\n // so this never actually violates the \"same hooks every render\" invariant in practice.\n if (hostUseToast) return hostUseToast()\n return fallbackToastContext\n}\n\nexport type ConfirmationVariant = 'danger' | 'warning' | 'info'\n\nexport interface ConfirmationOptions {\n title: string\n message: string\n confirmText?: string\n cancelText?: string\n variant?: ConfirmationVariant\n}\n\nexport interface ConfirmationDialogContextValue {\n confirm: (options: ConfirmationOptions) => Promise<boolean>\n}\n\nconst fallbackConfirmationContext: ConfirmationDialogContextValue = {\n confirm: (options) => {\n // eslint-disable-next-line no-console -- deliberate: this IS the fallback surface.\n console.warn(\n `[@veltrixsecops/app-sdk/ui] ConfirmationDialog is only available inside the Veltrix platform — ` +\n `\"${options.title}\" auto-resolved to \"not confirmed\" (fail closed).`,\n )\n return Promise.resolve(false)\n },\n}\n\n/**\n * useConfirmDialog — delegates to the platform's real confirmation dialog when running\n * inside Veltrix. Outside it, `confirm()` resolves to `false` (fails closed) rather than\n * throwing, so a guarded destructive action simply never proceeds instead of crashing.\n *\n * @example\n * const { confirm } = useConfirmDialog()\n * if (await confirm({ title: 'Delete index', message: 'This cannot be undone.', variant: 'danger' })) {\n * await deleteIndex(id)\n * }\n */\nexport function useConfirmDialog(): ConfirmationDialogContextValue {\n const hostUseConfirmDialog = getHostUi<() => ConfirmationDialogContextValue>('useConfirmDialog')\n // eslint-disable-next-line react-hooks/rules-of-hooks -- see useToast's note above.\n if (hostUseConfirmDialog) return hostUseConfirmDialog()\n return fallbackConfirmationContext\n}\n"],"mappings":";;;;;AAkDA,YAAY,WAAW;AAqCE,SAg9BY,UAh9BZ,KAkBrB,YAlBqB;AAjCzB,SAAS,UAAa,MAA6B;AACjD,SAAO,eAAe,GAAG,KAAK,IAAI;AACpC;AAEA,IAAM,eAAoC,EAAE,YAAY,UAAU;AA2B3D,IAAM,SAAe,iBAA2C,CAAC,OAAO,QAAQ;AACrF,QAAM,aAAa,UAA2B,QAAQ;AAC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F,MAAI,qBAAsB,QAAO,qBAAqB;AACtD,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -24,6 +24,20 @@ interface AppManifest {
|
|
|
24
24
|
database?: {
|
|
25
25
|
migrations: string;
|
|
26
26
|
tablePrefix: string;
|
|
27
|
+
/**
|
|
28
|
+
* How the app's tables are namespaced in Postgres.
|
|
29
|
+
* - 'shared' (default): prefixed tables in the shared `public` schema.
|
|
30
|
+
* Reserved for trusted first-party apps whose SQL the platform ships.
|
|
31
|
+
* - 'schema': the app gets its own Postgres schema (+ least-privilege
|
|
32
|
+
* role); its migrations run with search_path pinned to it.
|
|
33
|
+
* - 'database': the app gets its own Postgres database — hard,
|
|
34
|
+
* cross-database-query-proof isolation.
|
|
35
|
+
* - 'external': the app owns its datastore entirely; the platform manages
|
|
36
|
+
* no schema for it (connection supplied at runtime via app settings).
|
|
37
|
+
* The platform forces at least 'schema' for marketplace and customer-
|
|
38
|
+
* authored (self-managed) apps, which may opt up to 'database'/'external'.
|
|
39
|
+
*/
|
|
40
|
+
isolation?: 'shared' | 'schema' | 'database' | 'external';
|
|
27
41
|
};
|
|
28
42
|
pipeline: {
|
|
29
43
|
configurationTypes: AppConfigurationTypeManifest[];
|
|
@@ -61,10 +75,101 @@ interface AppManifest {
|
|
|
61
75
|
onEnable?: string;
|
|
62
76
|
onDisable?: string;
|
|
63
77
|
onUpgrade?: string;
|
|
78
|
+
/** Handler the platform invokes for inbound webhooks routed to this app. */
|
|
79
|
+
onWebhook?: string;
|
|
80
|
+
/** Handler the platform invokes for inbound message-bus events routed to this app. */
|
|
81
|
+
onEvent?: string;
|
|
64
82
|
};
|
|
65
83
|
events?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Connection-level connectivity testing. `testHandler` is an extensionless path
|
|
86
|
+
* to a module whose default export is a `testConnection` handler — the platform
|
|
87
|
+
* runs it in-process (with the decrypted credential) to verify a Connection's
|
|
88
|
+
* endpoint + credentials. Optional: apps without it report "test not supported".
|
|
89
|
+
*/
|
|
90
|
+
connectivity?: {
|
|
91
|
+
testHandler?: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Connection lifecycle declarations. `onboarding` opts the app into the
|
|
95
|
+
* platform's one-click connection onboarding: the app declares what it needs
|
|
96
|
+
* (a named onboarding adapter + parameters) and the platform drives it.
|
|
97
|
+
* Microsoft Entra admin-consent (`provider: 'entra-admin-consent'`) is the
|
|
98
|
+
* first adapter; nothing here is provider-specific to the platform core.
|
|
99
|
+
*/
|
|
100
|
+
connection?: AppConnectionDeclaration;
|
|
66
101
|
settings?: AppSettingDeclaration[];
|
|
67
102
|
}
|
|
103
|
+
/** App-declared connection lifecycle capabilities. */
|
|
104
|
+
interface AppConnectionDeclaration {
|
|
105
|
+
onboarding?: ConnectionOnboardingDescriptor;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Declarative "one-click connect" descriptor. The platform reads it to render a
|
|
109
|
+
* "Connect …" button and to drive a named onboarding adapter; the app supplies
|
|
110
|
+
* only data, never platform code.
|
|
111
|
+
*/
|
|
112
|
+
interface ConnectionOnboardingDescriptor {
|
|
113
|
+
/** Names a platform onboarding adapter (e.g. `entra-admin-consent`). */
|
|
114
|
+
provider: string;
|
|
115
|
+
/** Button label in the Connections UI (e.g. "Connect Microsoft Defender"). */
|
|
116
|
+
label: string;
|
|
117
|
+
params?: ConnectionOnboardingParams;
|
|
118
|
+
/**
|
|
119
|
+
* Optional app-provided finalize hook (extensionless path). Run in-process
|
|
120
|
+
* after a successful onboarding, exactly like `connectivity.testHandler`.
|
|
121
|
+
*/
|
|
122
|
+
onboardingHandler?: string;
|
|
123
|
+
}
|
|
124
|
+
interface ConnectionOnboardingParams {
|
|
125
|
+
/** App-setting key whose value selects the sovereign cloud (e.g. `azure_cloud`). */
|
|
126
|
+
cloudSetting?: string;
|
|
127
|
+
/**
|
|
128
|
+
* App permissions this connection needs — for display + audience selection.
|
|
129
|
+
* The effective grant is fixed on the connector app registration, not here.
|
|
130
|
+
*/
|
|
131
|
+
requiredResourceAccess?: OnboardingRequiredResource[];
|
|
132
|
+
/** What the flow captures and where it maps back onto the connection. */
|
|
133
|
+
capture?: OnboardingCapture;
|
|
134
|
+
/** True → the connection uses the platform token broker and stores NO secret. */
|
|
135
|
+
brokered?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* App settings the admin must supply BEFORE the consent click (they cannot be
|
|
138
|
+
* derived from consent), e.g. Sentinel's subscription/resource-group/workspace.
|
|
139
|
+
*/
|
|
140
|
+
requiredSettings?: string[];
|
|
141
|
+
/** Post-consent provisioning steps the adapter runs (e.g. Sentinel ARM RBAC). */
|
|
142
|
+
provisioning?: OnboardingProvisioningStep[];
|
|
143
|
+
}
|
|
144
|
+
interface OnboardingRequiredResource {
|
|
145
|
+
/** Well-known resource name or appId (e.g. `WindowsDefenderATP`, `Graph`). */
|
|
146
|
+
resource: string;
|
|
147
|
+
/** Application permissions requested on that resource (display only). */
|
|
148
|
+
appPermissions: string[];
|
|
149
|
+
}
|
|
150
|
+
interface OnboardingCapture {
|
|
151
|
+
/**
|
|
152
|
+
* Where to write the consented tenant id. `setting:<key>` writes it into the
|
|
153
|
+
* named app setting (the app libs read it as their `tenant_id`).
|
|
154
|
+
*/
|
|
155
|
+
tenantId?: string;
|
|
156
|
+
}
|
|
157
|
+
/** A post-consent provisioning step. Only ARM role assignment exists today. */
|
|
158
|
+
interface OnboardingProvisioningStep {
|
|
159
|
+
type: 'arm-role-assignment';
|
|
160
|
+
/** Well-known built-in role name (resolved to a role-definition id by the adapter). */
|
|
161
|
+
role: string;
|
|
162
|
+
/** ARM scope granularity for the assignment. */
|
|
163
|
+
scope: 'resourceGroup' | 'subscription';
|
|
164
|
+
/**
|
|
165
|
+
* How the ARM token for the assignment is obtained:
|
|
166
|
+
* - `manual` (default): show a portal deep-link/CLI + a verify probe. No
|
|
167
|
+
* extra platform privilege — consent does not grant ARM RBAC.
|
|
168
|
+
* - `delegated`: opt-in second delegated-ARM leg (requires the admin to hold
|
|
169
|
+
* Owner / User Access Administrator). Not implemented in the first cut.
|
|
170
|
+
*/
|
|
171
|
+
armToken?: 'manual' | 'delegated';
|
|
172
|
+
}
|
|
68
173
|
/**
|
|
69
174
|
* App brand identity. The platform renders it in a per-app navbar above the
|
|
70
175
|
* app's pages and exposes the colors to app pages as scoped CSS variables
|
|
@@ -76,9 +181,10 @@ interface AppBrandingDeclaration {
|
|
|
76
181
|
/** Optional secondary color as #RGB or #RRGGBB hex. */
|
|
77
182
|
accentColor?: string;
|
|
78
183
|
/**
|
|
79
|
-
* Vendor logo shown in the app navbar
|
|
80
|
-
* .png
|
|
81
|
-
*
|
|
184
|
+
* Vendor logo shown in the app navbar and on the marketplace card. Either a
|
|
185
|
+
* repo-relative .svg (preferred) or .png at most 128 KB, OR an absolute
|
|
186
|
+
* https:// URL to an externally hosted asset. Rendered at ~28px height, so
|
|
187
|
+
* use a wide/landscape mark with a transparent background.
|
|
82
188
|
*/
|
|
83
189
|
logo?: string;
|
|
84
190
|
/** Optional logo variant for dark backgrounds; same constraints as logo. */
|
|
@@ -97,6 +203,12 @@ interface AppConfigurationTypeManifest {
|
|
|
97
203
|
healthCheck: string;
|
|
98
204
|
driftDetect?: string | null;
|
|
99
205
|
getStatus: string;
|
|
206
|
+
/**
|
|
207
|
+
* Optional options provider — powers live `remote-multiselect` config fields
|
|
208
|
+
* (returns {value,label} options fetched from the target system). Loaded like
|
|
209
|
+
* driftDetect (optional); omit when the config type has no live-option fields.
|
|
210
|
+
*/
|
|
211
|
+
options?: string | null;
|
|
100
212
|
};
|
|
101
213
|
targets: {
|
|
102
214
|
componentTypes: string[];
|
|
@@ -232,6 +344,12 @@ interface InventoryItem {
|
|
|
232
344
|
hostname: string;
|
|
233
345
|
/** Management/API port, as a string (e.g. "8089"). */
|
|
234
346
|
port?: string;
|
|
347
|
+
/** Optional secondary service port, e.g. a web UI (Splunk Web "8000"). */
|
|
348
|
+
webPort?: string | null;
|
|
349
|
+
/** Optional OS login user for SSH to this target (e.g. "root", "ubuntu"). */
|
|
350
|
+
sshUser?: string | null;
|
|
351
|
+
/** Optional $SPLUNK_HOME on the target (e.g. "/opt/splunk", "/opt/splunkforwarder"). */
|
|
352
|
+
splunkHome?: string | null;
|
|
235
353
|
/** Component type tags (e.g. ["server"]) that classify the target. */
|
|
236
354
|
type?: string[];
|
|
237
355
|
/** DNS names this target is reachable at. */
|
|
@@ -258,6 +376,12 @@ interface InventoryItem {
|
|
|
258
376
|
interface InventoryItemInput {
|
|
259
377
|
hostname: string;
|
|
260
378
|
port?: string;
|
|
379
|
+
/** Optional secondary service port, e.g. a web UI (Splunk Web "8000"). */
|
|
380
|
+
webPort?: string | null;
|
|
381
|
+
/** Optional OS login user for SSH to this target (e.g. "root", "ubuntu"). */
|
|
382
|
+
sshUser?: string | null;
|
|
383
|
+
/** Optional $SPLUNK_HOME on the target. */
|
|
384
|
+
splunkHome?: string | null;
|
|
261
385
|
type?: string[];
|
|
262
386
|
domains?: string[];
|
|
263
387
|
ipRanges?: string[];
|
|
@@ -309,6 +433,8 @@ interface CredentialSummary {
|
|
|
309
433
|
type: string | null;
|
|
310
434
|
/** API base URL / endpoint this connection authenticates to, or null. */
|
|
311
435
|
endpoint: string | null;
|
|
436
|
+
/** Environment type these creds apply to (from the env's types), or null = any. */
|
|
437
|
+
environmentType: string | null;
|
|
312
438
|
/** The tool this credential belongs to. */
|
|
313
439
|
toolId: string;
|
|
314
440
|
/** True when a write-only secret (apiToken or password) is stored. */
|
|
@@ -334,6 +460,8 @@ interface CredentialInput {
|
|
|
334
460
|
type?: string;
|
|
335
461
|
/** API base URL / endpoint this connection authenticates to. Not a secret. */
|
|
336
462
|
endpoint?: string;
|
|
463
|
+
/** Environment type these creds apply to (from the env's environmentTypes); null = any. */
|
|
464
|
+
environmentType?: string | null;
|
|
337
465
|
/** The tool this credential belongs to. Required by the platform on create. */
|
|
338
466
|
toolId?: string;
|
|
339
467
|
/** IDs of existing platform tags to attach to the credential. */
|
|
@@ -416,6 +544,67 @@ interface AppHookContext {
|
|
|
416
544
|
appId: string;
|
|
417
545
|
customerId?: string;
|
|
418
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* Context passed to an app's `onWebhook` hook when the platform receives an
|
|
549
|
+
* inbound webhook. The platform stays ignorant of the app's semantics — the
|
|
550
|
+
* app inspects `source`/`event` and decides whether and how to act (e.g. update
|
|
551
|
+
* its own tables via `db`).
|
|
552
|
+
*/
|
|
553
|
+
interface AppWebhookContext {
|
|
554
|
+
db: PlatformDatabaseClient;
|
|
555
|
+
appId: string;
|
|
556
|
+
/** Origin of the webhook, e.g. 'github'. */
|
|
557
|
+
source: string;
|
|
558
|
+
/** Event name within the source, e.g. 'deployment'. */
|
|
559
|
+
event: string;
|
|
560
|
+
/** Normalized webhook payload. */
|
|
561
|
+
payload: any;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Context passed to an app's `onEvent` hook when the platform routes a message-
|
|
565
|
+
* bus event to it. Symmetric with `events.publish` (outbound): the app inspects
|
|
566
|
+
* `topic` and acts on its own data.
|
|
567
|
+
*/
|
|
568
|
+
interface AppEventContext {
|
|
569
|
+
db: PlatformDatabaseClient;
|
|
570
|
+
appId: string;
|
|
571
|
+
/** Event topic, e.g. 'deployment.status'. */
|
|
572
|
+
topic: string;
|
|
573
|
+
/** Event payload. */
|
|
574
|
+
payload: any;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Publish an event/message from an app to the platform's message bus. The
|
|
578
|
+
* platform routes it on a topic exchange keyed by `<appId>.<topic>`; consumers
|
|
579
|
+
* (provisioning workers, other apps) subscribe by routing key. The platform is
|
|
580
|
+
* ignorant of the payload's meaning — the app owns the message shape.
|
|
581
|
+
*/
|
|
582
|
+
interface AppEventPublisher {
|
|
583
|
+
publish(topic: string, payload: unknown): Promise<void>;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* A tenant Connection (a stored {@link Credential}) resolved to its DECRYPTED
|
|
587
|
+
* secret + endpoint, returned by {@link AppRouteContext.resolveConnection}.
|
|
588
|
+
*
|
|
589
|
+
* SERVER-SIDE ONLY. The secret fields (`password` / `apiToken` / `certificate`)
|
|
590
|
+
* are in the clear — use them to reach the connected system from a route, and
|
|
591
|
+
* NEVER return them to the client or log them.
|
|
592
|
+
*/
|
|
593
|
+
interface ResolvedConnection {
|
|
594
|
+
id: string;
|
|
595
|
+
/** Human-readable connection label. */
|
|
596
|
+
name: string;
|
|
597
|
+
/** API base URL / management endpoint (non-secret), or null. */
|
|
598
|
+
endpoint: string | null;
|
|
599
|
+
/** Account / client id the credential authenticates as. */
|
|
600
|
+
username: string;
|
|
601
|
+
/** Decrypted password (empty string for token-only connections). */
|
|
602
|
+
password: string;
|
|
603
|
+
/** Decrypted API token, or null. */
|
|
604
|
+
apiToken: string | null;
|
|
605
|
+
/** Decrypted client certificate, or null. */
|
|
606
|
+
certificate: string | null;
|
|
607
|
+
}
|
|
419
608
|
/**
|
|
420
609
|
* Context passed to an app's server route module (the `server.entry`
|
|
421
610
|
* declared in manifest.yaml). The platform mounts the module as a Fastify
|
|
@@ -427,12 +616,25 @@ interface AppRouteContext {
|
|
|
427
616
|
appDir: string;
|
|
428
617
|
manifest: AppManifest;
|
|
429
618
|
db: PlatformDatabaseClient;
|
|
619
|
+
/** Publish events/messages from this app to the platform message bus. */
|
|
620
|
+
events: AppEventPublisher;
|
|
430
621
|
/**
|
|
431
622
|
* Returns a Fastify preHandler enforcing an app-scoped permission.
|
|
432
623
|
* Typed `any` so the SDK does not depend on Fastify's hook types —
|
|
433
624
|
* pass it straight into a route's `preHandler` array.
|
|
434
625
|
*/
|
|
435
626
|
hasPermission: (resource: string, action: string) => any;
|
|
627
|
+
/**
|
|
628
|
+
* Resolve one of the tenant's Connections (a stored Credential, by id) to its
|
|
629
|
+
* DECRYPTED secret + endpoint, so a route can reach the connected system
|
|
630
|
+
* WITHOUT re-implementing the platform's credential decryption or querying
|
|
631
|
+
* platform tables directly. Scoped to `customerId` (the tenant boundary);
|
|
632
|
+
* returns null when no matching connection exists. The decrypted secret stays
|
|
633
|
+
* server-side — never send it to the client. Pass a `credentialId` the app
|
|
634
|
+
* obtained from its own connections list (e.g. the SDK `listCredentials`
|
|
635
|
+
* helper), mirroring the platform's own "test connection" resolution.
|
|
636
|
+
*/
|
|
637
|
+
resolveConnection: (customerId: string, credentialId: string) => Promise<ResolvedConnection | null>;
|
|
436
638
|
}
|
|
437
639
|
|
|
438
640
|
interface AppContextValue {
|
|
@@ -470,4 +672,4 @@ declare const AppContext: Context<AppContextValue | null>;
|
|
|
470
672
|
*/
|
|
471
673
|
declare function useAppContext(): AppContextValue;
|
|
472
674
|
|
|
473
|
-
export { APP_PAGE_LAYOUTS as A, type
|
|
675
|
+
export { APP_PAGE_LAYOUTS as A, type CredentialInput as B, type Component as C, type CredentialSummary as D, type Customer as E, type InventoryItemInput as F, type PermissionEntry as G, type PlatformDatabaseClient as H, type InventoryItem as I, AppContext as J, useAppContext as K, type PermissionCheckOptions as P, type Tag as T, type User as U, APP_PAGE_NAV as a, type AppBrandingDeclaration as b, type AppConfigurationTypeManifest as c, type AppContextValue as d, type AppDetail as e, type AppEventContext as f, type AppEventPublisher as g, type AppHookContext as h, type AppInstallationDetail as i, type AppInstallationStatus as j, type AppListItem as k, type AppManifest as l, type AppPageDeclaration as m, type AppPageLayout as n, type AppPageNav as o, type AppPagePermission as p, type AppPermissionDeclaration as q, type AppPermissionsApi as r, type AppRouteContext as s, type AppSettingDeclaration as t, type AppSource as u, type AppStatusType as v, type AppWebhookContext as w, type Connectivity as x, type ConnectivityProviderRef as y, type Credential as z };
|