syntax = "proto3";

package com.wixpress.appservice.api;

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";

// Contact Labels Extensions
message ContactLabelsComponentData {
    reserved 5, 6;
    // Whether apps can create labels in this namespace.
    google.protobuf.BoolValue allow_app_defined_labels = 2;

    // Required permissions to manage app-defined labels.
    // Only apps with these permission will be able to create labels in this namespace.
    // Relevant if `allow_app_defined_labels` is `true`.
    google.protobuf.StringValue permission = 3;

    // Predefined labels that exist on all sites that install the app.
    repeated PredefinedLabel predefined_labels = 4;
}

message PredefinedLabel {
    // Unique key. Can contain letters, dashes, or underscores.
    // For example, `"secondary-hobby"`.
    string key = 1 [(wix.api.minLength) = 1, (wix.api.maxLength) = 50];

    // Display name.
    // For example, `"Secondary Hobby"`.
    string display_name = 2 [(wix.api.minLength) = 1, (wix.api.maxLength) = 180];
}
