syntax = "proto3";
// flynt-disable missing-string-validations
// flynt-disable package-matches-structure
package com.wixpress.appservice.api;

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

// A service to be used by components and apps in the viewer and editor 
message ViewerService {
    // A unique package name of the service,@wix/site-environment, to be used when calling the `getService` API
    string package_name = 1[(wix.api.minLength) = 7, (wix.api.maxLength) = 80];
    // The viewer implemenation of this service, *bundle* is required
    ViewerServiceAssets viewer = 2;
    // The optional editor implementation of this service, optional (if you need a different version for the editor)  
    ViewerServiceAssets editor = 3;  
    // A short description of this service 
    google.protobuf.StringValue description = 4 [(wix.api.maxLength) = 50];
    // A link to documentation by the article Id, example: "https://dev.wix.com/docs/editor/components/viewer-service"
    google.protobuf.StringValue doc_link = 5 [(wix.api.format) = WEB_URL];
 }
 
 message ViewerServiceAssets {
     // The bundle of this javascript resource in production, example: "https://static.parastorage.com/services/wix-site-environment/1.0.0/bundle.min.js"
     string bundle = 1 [(wix.api.format) = WEB_URL];
     // The package names of other *Wix* services this service may depend on based on their unique package name, example: ["@wix/site-environment", "@wix/site-language"] 
     repeated string dependencies = 2[(wix.api.maxSize) = 20, (wix.api.maxLength) = 80];
 }
 
