syntax = "proto3";

package com.wixpress.appservice.api;

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

// Wix Users can choose to create a "Function" component according to predefined recipes for smoother user experience
message FunctionRecipe {
  // "Function" component that this recipe is about
  reserved 1; // name removed because components have to be  referenced as extensions in functions
  // Name of the function recipe
  reserved 2; // display_name removed because is same as name in Component
  // Description of the function recipe
  string display_description = 3 [(wix.api.maxLength) = 300, (.wix.api.translatable) = {
    type: LONG_TEXT
    name: "Template function display description"
  }];
  // Meta site from which template function was taken to create a recipe
  string origin_meta_site_id = 4 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.metasite.api.v1.meta_site"];
  // Function in the meta site which was used as a template to create a recipe
  string origin_function_id = 5 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.functions.v1.function"];
  // "Function" component/extension that this recipe is about
  string function_extension_id = 6 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.devcenter.components.v1.component"];
  // Created function id
  .google.protobuf.StringValue function_id = 7 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.functions.v1.function"];
  // Builderless flow form template id
  .google.protobuf.StringValue form_template_extension_id = 8 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.devcenter.components.v1.component"];
}
