syntax = "proto3";

package com.wixpress.appservice.api.upstream.com.wixpress.comm.channels.entities.v1.channel;

import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/accepted_message_types.proto";
import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/sms/sms_message_config.proto";
import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/email/email_message_config.proto";
import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/dm/direct_message_config.proto";
import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/conversation_limitations.proto";
import "components_catalog_data/communication_channel/com/wixpress/appservice/api/upstream/com/wixpress/comm/channels/entities/v1/channel/channel_branding.proto";
import "wix/api/annotations.proto";

message ChannelConfiguration {
    option (.wix.api.decomposite_of) = "com.wixpress.comm.channels.entities.v1.channel.ChannelConfiguration";

  // The type of the communication channel
  ChannelType type = 1;

  oneof messaging_config {
    dm.DirectMessageConfig direct_message_config = 2;
    email.EmailMessageConfig email_message_config = 3;
    sms.SmsMessageConfig sms_message_config = 4;
  }

  // Specific provider branding parameters for the channel
  com.wixpress.comm.channels.entities.v1.channel.ChannelBranding branding = 5;

  // Conversation initiation definition
  com.wixpress.comm.channels.entities.v1.channel.ConversationLimitations conversation_limitations = 6;

  // todo: add use case here
//  ChannelUrls urls = 6;
}

// The type of the communication channel
enum ChannelType {
  UNKNOWN_CHANNEL_TYPE = 0;
  DIRECT_MESSAGING = 1;
  EMAIL = 2;
  SMS = 3;
}
