import type { ExampleObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'; import type { TableRow } from '../../../../v2/blocks/request-block/components/RequestTableRow.vue.js'; export declare const stringifyValue: (value: unknown) => string; export type LeafRow = { path: string[]; schema: SchemaObject | undefined; isRequired: boolean; }; /** * Walk a (possibly nested) object schema and collect one entry per leaf property. * * A "leaf" is any property whose resolved schema is not an `{ type: 'object' }` schema * with named `properties` — i.e. primitives, arrays, files, and `additionalProperties` * placeholders all stop the recursion. Object properties recurse, so the widget example * (`file` + `props.{name,description,created_at}`) yields four leaves. */ export declare const collectLeafProperties: (schema: SchemaObject, parentPath?: string[], parentRequired?: boolean) => LeafRow[]; /** * Walk a schema + example together and collect one row per leaf, including example-only * keys that the schema does not declare. Schema-declared properties come first in schema * order; extras present in the example follow in example order at each level. * * Unlike `collectLeafProperties` (which is schema-only and feeds the dotted-name index), * this walker drives what the user actually sees in the form: a row for every leaf the * example contains, even when the schema is partial or out of date. */ export declare const collectExampleRows: (example: unknown, schema: SchemaObject | undefined, parentPath?: string[]) => { path: string[]; value: unknown; }[]; /** Restore array values after text editing without parsing ordinary string fields. */ export declare const getFormBodyValue: (row: TableRow) => string | File | unknown[] | undefined; /** Build the table rows for the form data, optionally enriched with schema (e.g. enum) per property */ export declare const getFormBodyRows: (example: ExampleObject | undefined | null, contentType: string, formBodySchema?: SchemaObject) => TableRow[]; //# sourceMappingURL=get-form-body-rows.d.ts.map