syntax = "proto3";

package com.wixpress.appservice.api.upstream.com.wix.ecom.shipping_rates.v1;

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

message ShippingRatesConfig {
    option (.wix.api.decomposite_of) = "com.wix.ecom.shipping_rates.v1.ShippingRatesConfig";
  // Base URI where the endpoints are called.
  // Wix eCommerce appends the endpoint path to the base URI.
  // For example, to call the Get Shipping Rates endpoint at `https://my-shipping-provider.com/v1/getRates`,
  // the base URI you provide here is `https://my-shipping-provider.com/`.
  string deployment_uri = 1 [(.wix.api.minLength) = 1, (.wix.spi.base_uri) = true];

  // Human-readable name of the shipping provider.
  string name = 2 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 64];

  // Description of the shipping provider.
  google.protobuf.StringValue description = 3 [(.wix.api.maxLength) = 200];

  // URL to more info about the shipping provider.
  google.protobuf.StringValue learn_more_url = 4 [(.wix.api.maxLength) = 200];

  // URL to reach the shipping provider app's dashboard.
  google.protobuf.StringValue dashboard_url = 5 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 2048, (.wix.api.format) = WEB_URL];

  // Whether to require the site owner to define a fallback/default rate. Set to `true` if you do not provide rates as part of the integration.
  bool fallback_definition_mandatory = 6;

  // Thumbnail image of the shipping rates provider. Displayed in the shipping settings section in the Dashboard.
  // The URL must be of an image uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager).
  google.protobuf.StringValue thumbnail_url = 7 [(.wix.api.format) = WEB_URL];

  // feature toggle initialized with default value = false. should be true if implemented by spi provider
  //flynt-disable renamed-field-breaking-change
  bool toggle_get_dashboard_table_enabled = 8 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.field_maturity) = ALPHA];

  // Feature toggle initialized with default value = false. should be true if implemented by spi provider
  // This flag controls if the spi provider supports the update status api.
  bool toggle_update_active_status_enabled = 9 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.field_maturity) = ALPHA];
}
