syntax = "proto3";
// flynt-disable package-matches-structure
package com.wixpress.appservice.api.upstream.wix.segments.spi.v2;

import "google/api/annotations.proto";
import "wix/api/annotations.proto";
import "wix/common/spi.proto";
import "wix/spi/definitions.proto";
import "wix/api/validations.proto";
import "components_catalog_data/contacts_segments_v2_filter_provider/com/wixpress/appservice/api/upstream/wix/segments/spi/v2/predicate.proto";
import "components_catalog_data/contacts_segments_v2_filter_provider/com/wixpress/appservice/api/upstream/wix/segments/spi/v2/filtering_capability.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

message ImplementedMethods {
    option (.wix.api.decomposite_of) = "wix.segments.spi.v2.ImplementedMethods";
  // whether or not the provider supports dynamic capabilities.
  // If true, ListFilteringCapabilities will be called to fetch dynamic capabilities.
  // if both dynamic and static capabilities are declared, the list of capabilities will be merged.
  bool list_filtering_capabilities = 1;
}

message ProviderConfigMessage {
    option (.wix.api.decomposite_of) = "wix.segments.spi.v2.ProviderConfigMessage";
  // Base URI for the provider
  .wix.common.spi.SpiBaseUri base_uri = 1;

  // Specifies which optional SPI methods this provider implements.
  ImplementedMethods implemented_methods = 2;

  // A list of capabilities supported by the provider.
  // Can be used in conjunction with ListFilteringCapabilities.
  // When a provider first integrates with segments, we allow to pass empty filtering_capabilities, and to gradually add capabilities.
  // a provider with 0 capabilities will not be shown in the UI.
  repeated FilteringCapability filtering_capabilities = 3 [(.wix.api.maxSize) = 20];

  // Human-readable name of the provider for UI display (e.g., "Wix eCommerce", "Customer Reviews")
  string name = 4 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
    type: SHORT_TEXT
    name:"Name"
  }];

  // description explaining what this provider offers
  string description = 5 [(.wix.api.maxLength) = 500, (.wix.api.translatable) = {
    type: LONG_TEXT
    name: "Description"
  }];
}