syntax = "proto3";

import "wix/api/annotations.proto";
import "wix/api/validations.proto";
import "wix/common/spi.proto";
import "wix/spi/definitions.proto";
import "components_catalog_data/forms_spam_submissions_provider/com/wixpress/appservice/api/upstream/wix/forms/v4/spam_submission_permissions.proto";

package com.wixpress.appservice.api.upstream.wix.forms.v4;

message FormSpamSubmissionSpiConfig {
  option (.wix.api.decomposite_of) = "wix.forms.v4.FormSpamSubmissionSpiConfig";
  // URI where the SPI Implementer is deployed
  .wix.common.spi.SpiBaseUri base_uri = 1;
  // Configuration of namespaces known by implementer
  repeated FormsSpamSubmissionsNamespaceConfig namespace_configs = 2 [(.wix.api.maxSize) = 3];
}

message FormsSpamSubmissionsNamespaceConfig {
  option (.wix.api.decomposite_of) = "wix.forms.v4.FormsSpamSubmissionsNamespaceConfig";
  // Namespace name.
  string namespace = 1 [(.wix.api.minLength) = 10, (.wix.api.maxLength) = 50];
  // Permissions associated with this namespace.
  SpamSubmissionPermissions permissions = 2;
  reserved 3;
  /*
   Disables Wix spam submissions filter.
   Spam submissions are persisted in spam submissions storage to support marking submissions as not spam.
   */
  bool wix_spam_filter_disabled = 4;
}
