@gradientedge/commercetools-utils
    Preparing search index...

    Interface FieldDefinition

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

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

    Properties

    inputHint?: TypeTextInputHint

    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.