syntax = "proto3";

package com.wixpress.appservice.api;
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";

// Describes topic of a notification
message NotificationTopic {
  // the description of the topic
  google.protobuf.StringValue description = 1;
  // the default state of the topic
  State state = 2;
  // the type of the topic
  Type type = 3;
  // Set to true if this topic supports multi location.
  bool multilocation_supported = 4 [(.wix.api.field_exposure) = INTERNAL];

  // The recipients' types indicate that this topic is relevant.
  repeated RecipientType supported_recipient_types = 5 [(.wix.api.maxSize) = 10];
  
  enum State {
    UNKNOWN_STATE = 0;
    DEFAULT_ON = 1;
    DEFAULT_OFF = 2;
    ALWAYS_ON = 3 [(.wix.api.enum_exposure) = PRIVATE];
  }

  enum Type {
    UNKNOWN_TYPE = 0;
    PROMOTIONAL = 1;
    TRANSACTIONAL = 2;
  }

  // Recipient type
  enum RecipientType {
    UNKNOWN_RECIPIENT_TYPE = 0 [(.wix.api.enum_exposure) = PRIVATE, (.wix.api.enum_maturity) = NOT_IMPLEMENTED];
    WIX_USER = 1; // Wix User
    CONTACT = 2; // Contact
  }
}
