syntax = "proto3";

package com.wixpress.appservice.api;

import "wix/api/validations.proto";

// An extension to platform used by Wix Blocks UI
// The main component in the Wix Blocks.
// no manual adding. auto-created only from Wix Blocks
message StudioComponentData {
    // Path to a Javascript file that Editor runs on app install
    string editor_script_url = 1;
    // Path to a Javascript file that viewer runs for page components / widgets and applicative business logic
    string viewer_script_url = 2;
    // If true, components of the app wont be added to the editor (only run editor scripts)
    bool platform_only = 3;
    // If the viewer script should run in the Editor
    bool enable_in_editor = 4;
    // URL to get complex routing decisions at runtime from a platform app. Some spec can be seen here: https://docs.google.com/document/d/1t_3bl9vVMoPVm_I9Sx59LsVUPXi07gihGIg3-F7z8Q0/edit?ts=595512f6#heading=h.9ca9859ng5d
    string router_service_url = 5; // todo: WEB_URL
    // Path to a Javascript file that viewer runs for page components / widgets and applicative business logic. Includes verbose logs for Wix runtime.
    string viewer_verbose_script_url = 6; // todo: WEB_URL
    // Instance id of wixCode in the original dev site. used in order to access the widgets code
    string wix_code_instance_id = 7 [(wix.api.format) = GUID];
    // Id of the grid in wixCode FS where the widgets code is located. used in order to access the widgets code
    string wix_code_grid_id = 8 [(wix.api.format) = GUID];
    // Path to a json which contains metaData of the devSite
    string site_header_url = 9; // todo: WEB_URL
    // A map of string descriptor the app understands to a versioned URL topology value, can be an API or statics data. This may have some values which are NOT URL since Studio computes some values on the fly.
    map<string, string> base_urls = 10;
    // If true, not shown in add panel and apps panel when it is installed
    bool hide_in_add_panel = 11;
    // if true, this studio component enforce permissions
    bool permissions_enforced = 12;
}
