syntax = "proto3";

package com.wixpress.appservice.api;

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

// A component that enables extending Wix dashboard functionality.
message BackOfficeExtensionWidget {
  // Platform that hosts the widget.
  //
  // Must be `"BUSINESS_MANAGER"`.
  BackOfficeHostingPlatforms hosting_platform = 1;

  // Slot ID for the plugin's container.
  string extends = 2 [(wix.api.format) = GUID];

  // Extension description.
  google.protobuf.StringValue description = 3;

  // Extension title.
  string title = 4 [(wix.api.translatable) = {
    type: SHORT_TEXT
    grouping: "title"
  }];


  // Required permission to view the extension.
  string required_permission = 5 [(wix.api.field_exposure) = INTERNAL];

  // Sentry error reporting DSN (internal)
  ErrorReporting error_reporting = 6 [(wix.api.field_exposure) = INTERNAL];

  // Initial width of the widget while loading, in pixels.
  // Width may be adjusted dynamically based on the content of the widget or limited by the size of the widget's container.
  google.protobuf.Int32Value width = 7 [(wix.api.min) = 0, (wix.api.max) = 9999, (wix.api.field_exposure) = INTERNAL];

  // Initial height of the widget while loading, in pixels.
  // Height may be adjusted dynamically based on the content of the widget or limited by the size of the widget's container.
  google.protobuf.Int32Value height = 8 [(wix.api.min) = 0, (wix.api.max) = 9999];

  oneof asset {
    // Iframe URL that hosts the widget's content.
    string iframe_url = 9 [(wix.api.format) = WEB_URL];

    // Wix script asset to use in this widget
    BackOfficeScriptAsset script_asset = 10 [(wix.api.field_exposure) = INTERNAL];
  }

  // The list of slot ids available
  repeated string slot_ids = 11 [(wix.api.field_exposure) = INTERNAL, (wix.api.format) = GUID, (.wix.api.maxSize) = 100, (.wix.api.referenced_entity) = "wix.devcenter.components.v1.component"];
 
  // Specifying the visibility level and maturity stage
  // flynt-disable renamed-field-breaking-change
  ExtensionExposure exposure_and_maturity = 12 [(.wix.api.field_exposure) = INTERNAL];
   
}