syntax = "proto3"; package pipeline.v1beta; import "google/api/field_behavior.proto"; // Role describes the permissions a user has over a resource. enum Role { // Unspecified, equivalent to VIEWER. ROLE_UNSPECIFIED = 0; // Viewers can see the resource properties. ROLE_VIEWER = 1; // Executors can execute the resource (e.g. trigger a pipeline). ROLE_EXECUTOR = 2; } // Sharing contains the information to share a resource with other users. // // For more information, see [Share Pipelines](https://instill-ai.dev/docs/pipeline/share-pipeline). message Sharing { // Describes the sharing configuration with a given user. message User { // Defines whether the sharing option with this user is enabled. bool enabled = 1; // Defines the role the user will have over the resource. Role role = 4; } // ShareCode describes a sharing configuration through a link. message ShareCode { // Defines which users will be able to access the resource through the // code. This is a pattern that will be checked against user names. // // For now, the only accepted value is `*/*`. string user = 1; // The public URL that allows users to access the resource. string code = 2; // Defines whether the sharing option via link is enabled. bool enabled = 3; // Defines the role users will have over the resource. Role role = 4; } // Defines sharing rules for a set of user resource names. // // Each key in this object should contain a pattern that can be matched // against user names. // // Each value is a user sharing configuration. // // **NOTE**: For now, the only accepted key is `*/*`. map users = 1; // Defines the configuration to share a resource via link. ShareCode share_code = 2; } // Permission defines how a pipeline can be used. message Permission { // Defines whether the pipeline can be modified. bool can_edit = 1; // Defines whether the pipeline can be executed. bool can_trigger = 2; // Defines whether the pipeline can be released. bool can_release = 3; } // ComponentTask contains information about a task that a component can // perform. message ComponentTask { // The task name, e.g. `TASK_TEXT_GENERATION`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Title is the task name in a human-friendly format. string title = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Description contains information about the task. string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ComponentEvent contains information about an event that a component can // produce. message ComponentEvent { // The event name, e.g. `EVENT_NEW`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Title is the event name in a human-friendly format. string title = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Description contains information about the event. string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ComponentType defines the component type based on its task features. enum ComponentType { // Unspecified. COMPONENT_TYPE_UNSPECIFIED = 0; // Connect with an AI model. COMPONENT_TYPE_AI = 1; // Connect with a remote data source. COMPONENT_TYPE_DATA = 2; // 3 Is reserved for the connector blockchain type, deprecated by // COMPONENT_TYPE_CONNECTOR_APPLICATION. reserved 3; // Manipulate data. COMPONENT_TYPE_OPERATOR = 4; // Connect with an external application. COMPONENT_TYPE_APPLICATION = 5; // Generic. COMPONENT_TYPE_GENERIC = 6; } // View defines how a resource is presented. Most resources can share this view // definition, the particular meaning of each value should be defined in the // resource itself. Certain resources might have their own View definition if // they need to implement more than 2 (basic / full) views. enum View { // Unspecified, equivalent to BASIC. VIEW_UNSPECIFIED = 0; // Default view. VIEW_BASIC = 1; // Full representation. VIEW_FULL = 2; }