TabularField | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Type Alias TabularField

    TabularField: {
        header: string;
        optional?: boolean;
        type?: "string" | "number" | "boolean";
    } & (
        | {
            allowedValues?: readonly string[];
            maxLength?: number;
            type?: "string"
            | never;
        }
        | { allowedValues?: readonly number[]; type: "number" }
        | { type: "boolean" }
    )

    Configuration for a single output property.

    • header: expected column header text (case-insensitive exact match).
    • optional: when true the column may be absent; otherwise a missing column produces a "missing-column" error.
    • type: one of "string", "number" or "boolean". Defaults to "string" when omitted.

    For string fields you may provide maxLength and allowedValues (use as const to narrow TypeScript types). For number fields you may provide allowedValues (use as const).

    Type Declaration

    • header: string

      Header we expect this field to have

    • Optionaloptional?: boolean

      Set if this field doesn't need to appear as on of the columns in the import

    • Optionaltype?: "string" | "number" | "boolean"

      Expected data type. Defaults to string

    • {
          allowedValues?: readonly string[];
          maxLength?: number;
          type?: "string" | never;
      }
      • OptionalallowedValues?: readonly string[]

        Limit allowed values for the field. Pass these 'as const' to reflect these limited values in the output type

      • OptionalmaxLength?: number

        Maximum length for string fields

      • Optionaltype?: "string" | never
    • { allowedValues?: readonly number[]; type: "number" }
      • OptionalallowedValues?: readonly number[]

        Limit allowed values for the field. Pass these 'as const' to reflect these limited values in the output type

      • type: "number"
    • { type: "boolean" }