Skip to main content

TypeAlias.ImportMapperDestinationField

type ImportMapperDestinationField = {
description?: string;
enumValues?: readonly string[];
example?: unknown;
field: string;
isArray?: boolean;
required: boolean;
};

A field an import-mapper row can write to, as a dot-path into the passport-creation input (e.g. product.name). required marks fields the input schema makes mandatory — the mapper form seeds a locked row for each. enumValues is set for fields tagged enumSelect on the schema: their value is constrained to a closed set, so the form renders a const-only select of these literals instead of a free-text path input.

Properties

PropertyTypeDescription
description?stringThe field's own .describe(...) from the passport schema — the same text that documents it in the public OpenAPI spec. Surfaced in the mapper UI so an integrator can tell what a destination actually expects without leaving the import screen.
enumValues?readonly string[]-
example?unknownThe field's own .meta({ example }) from the passport schema, when documented. A string/number for a leaf, a plain object/array for a whole-array (isArray) destination. Surfaced next to description in the mapper UI, and forwarded to the AI mapping suggestion so the model can recognize a match by shape/format, not only by name.
fieldstring-
isArray?booleantrue for an array field exposed as a whole-array copy destination: a single path rule writes the source array verbatim (its element shape must already match this schema). Such destinations are JSON-only — a CSV cell is a string, not an array — so the builder hides them for CSV mappers.
requiredboolean-