Defines a Custom Field and its meta-information. This FieldDefinition is similar to an AttributeDefinition of Product Types.

interface FieldDefinition {
    inputHint?: string;
    label: LocalizedString;
    name: string;
    required: boolean;
    type: FieldType;
}

Properties

inputHint?: string

Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

A human-readable label for the field.

name: string

Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

required: boolean

Defines whether the field is required to have a value.

type: FieldType

Data type of the Custom Field to define.

Generated using TypeDoc