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";
import "components_catalog_data/slot.proto";

// Out Of Iframes additional info
message OutOfIframeData {
    // The setting URLs for the app
    repeated SettingsUrl settings_urls = 1;
    // Automatically installed on app installation
    bool auto_install = 2;
    // The info about how to report errors for the App
    ErrorReporting error_reporting = 3;
    // The list of slots available
    repeated Slot slots = 4;
    // if true, ssr will not cache pages that contain this widget
    bool ssr_cache_excluded = 5;
    // Should use loadable-components
    bool is_loadable = 6;
    // The list of slot ids available
    repeated string slot_ids = 7 [(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
    ExtensionExposure exposure_and_maturity = 8 [(.wix.api.field_exposure) = INTERNAL];
    // if true, when site member is logged in and this widget is in the page - ssr will not cache it
    bool site_members_ssr_cache_excluded = 9 [deprecated = true, (.wix.api.field_deprecated) = {
        replaced_by: "site_members_ssr_caching"
        target_removal_date: "2025-12-31"
    }];
    // Controls SSR caching behavior when site members are logged in
    SiteMembersSsrCaching site_members_ssr_caching = 10;
    // Controls MPA Navigation behavior for this out-of-iframe component
    MpaNavigation mpa_navigation = 11 [(wix.api.field_exposure) = INTERNAL];
}

// An editor settings configuration
message SettingsUrl {
    // The URL for the setting panel
    string url = 1 [(wix.api.format) = WEB_URL];
    // What type of editor this is
    string editor_type = 2;
    // How this view is rendered (mobile, tablet, etc)
    string view_type = 3;
    // should be <%=serviceUrl('your_artifact_id', '<resource-path>')%>, this field will later be used to trasform the settings url field in both the component and the **derived widget**
    google.protobuf.StringValue url_template = 4;
}
