diff --git a/proto/spaceone/api/opsflow/comment.proto b/proto/spaceone/api/opsflow/comment.proto new file mode 100644 index 000000000..496b801b0 --- /dev/null +++ b/proto/spaceone/api/opsflow/comment.proto @@ -0,0 +1,124 @@ +syntax = "proto3"; + +package spaceone.api.opsflow.v1; + +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; +import "spaceone/api/core/v2/query.proto"; + + +service Comment { + rpc create (CommentCreateRequest) returns (CommentInfo) { + option (google.api.http) = { + post: "/opsflow/v1/comment/create" + body: "*" + }; + } + rpc update (CommentUpdateRequest) returns (CommentInfo) { + option (google.api.http) = { + post: "/opsflow/v1/comment/update" + body: "*" + }; + } + rpc delete (CommentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/opsflow/v1/comment/delete" + body: "*" + }; + } + rpc get (CommentRequest) returns (CommentInfo) { + option (google.api.http) = { + post: "/opsflow/v1/comment/get" + body: "*" + }; + } + rpc list (CommentSearchQuery) returns (CommentsInfo) { + option (google.api.http) = { + post: "/opsflow/v1/comment/list" + body: "*" + }; + } + rpc stat (CommentStatQuery) returns (google.protobuf.Struct) { + option (google.api.http) = { + post: "/opsflow/v1/comment/stat" + body: "*" + }; + } +} + +message Mentions { + repeated string USER = 1; + repeated string USER_GROUP = 2; +} + +message CommentCreateRequest { + string task_id = 1; + string comment = 2; + // +optional + Mentions mentions = 3; +} + +message CommentUpdateRequest { + string comment_id = 1; + string comment = 2; + // +optional + Mentions mentions = 3; +} + +message CommentRequest { + string comment_id = 1; +} + +message CommentSearchQuery { + // +optional + spaceone.api.core.v2.Query query = 1; + // +optional + string task_id = 2; + // +optional + string comment_id = 3; + // +optional + CommentInfo.CommentType comment_type = 4; + + // +optional + string workspace_id = 11; + // +optional + string project_id = 12; + // +optional + string user_group_id = 13; + // +optional + string user_id = 14; +} + +message CommentInfo { + enum CommentType { + COMMENT_TYPE_NONE = 0; + TASK_DESCRIPTION = 1; + COMMENT = 2; + } + + string comment_id = 1; + string comment = 2; + CommentType comment_type = 3; + bool is_edited = 4; + Mentions mentions = 5; + + string domain_id = 21; + string workspace_id = 22; + string project_id = 23; + string task_id = 24; + + string created_at = 31; + string updated_at = 32; +} + +message CommentsInfo { + repeated CommentInfo results = 1; + int32 total_count = 2; +} + +message CommentStatQuery { + spaceone.api.core.v2.StatisticsQuery query = 1; +} diff --git a/proto/spaceone/api/opsflow/event.proto b/proto/spaceone/api/opsflow/event.proto new file mode 100644 index 000000000..dc4aff4a6 --- /dev/null +++ b/proto/spaceone/api/opsflow/event.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; + +package spaceone.api.opsflow.v1; + +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; +import "spaceone/api/core/v2/query.proto"; +import "spaceone/api/opsflow/comment.proto"; + + +service Event { + rpc list (EventSearchQuery) returns (EventsInfo) { + option (google.api.http) = { + post: "/opsflow/v1/event/list" + body: "*" + }; + } + rpc stat (EventStatQuery) returns (google.protobuf.Struct) { + option (google.api.http) = { + post: "/opsflow/v1/event/stat" + body: "*" + }; + } +} + +message EventSearchQuery { + // +optional + spaceone.api.core.v2.Query query = 1; + // +optional + string task_id = 2; + // +optional + string event_id = 3; + // +optional + string workspace_id = 4; + // +optional + string project_id = 5; + // +optional + string user_type = 6; + // +optional + string user_id = 7; + // +optional + EventInfo.EventType event_type = 8; +} + +message EventInfo { + enum EventType { + SELECTION_NONE = 0; + CREATED = 1; + UPDATED = 2; + CHANGE_STATUS = 3; + COMMENTED = 4; + } + string event_id = 1; + EventType event_type = 2; + string name = 3; + string description = 4; + string user_type = 5; + string user_id = 6; + + string domain_id = 21; + string workspace_id = 22; + string project_id = 23; + string task_id = 24; + + string created_at = 31; +} + +message EventsInfo { + repeated EventInfo results = 1; + int32 total_count = 2; +} + +message EventStatQuery { + spaceone.api.core.v2.StatisticsQuery query = 1; +} diff --git a/proto/spaceone/api/opsflow/task.proto b/proto/spaceone/api/opsflow/task.proto new file mode 100644 index 000000000..1e7447e22 --- /dev/null +++ b/proto/spaceone/api/opsflow/task.proto @@ -0,0 +1,172 @@ +syntax = "proto3"; + +package spaceone.api.opsflow.v1; + +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; +import "spaceone/api/core/v2/query.proto"; +import "spaceone/api/opsflow/task_category.proto"; +import "spaceone/api/opsflow/comment.proto"; +import "spaceone/api/file_manager/v1/file.proto"; + + +service Task { + rpc create (TaskCreateRequest) returns (TaskInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task/create" + body: "*" + }; + } + rpc update (TaskUpdateRequest) returns (TaskInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task/update" + body: "*" + }; + } + rpc change_status (TaskStatusRequest) returns (TaskInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task/change_status" + body: "*" + }; + } + rpc delete (TaskRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/opsflow/v1/task/delete" + body: "*" + }; + } + rpc get (TaskRequest) returns (TaskInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task/get" + body: "*" + }; + } + rpc list (TaskSearchQuery) returns (TasksInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task/list" + body: "*" + }; + } + rpc stat (TaskStatQuery) returns (google.protobuf.Struct) { + option (google.api.http) = { + post: "/opsflow/v1/task/stat" + body: "*" + }; + } +} + +enum TaskPriority { + TASK_PRIORITY_NONE = 0; + HIGH = 1; + MEDIUM = 2; + LOW = 3; +} + +message TaskCreateRequest { + string name = 1; + string status = 2; + // +optional + TaskPriority priority = 3; + // +optional + string description = 4; + // +optional + repeated string files = 5; + // +optional + Mentions mentions = 6; + // +optional + string assignee = 7; + // +optional + google.protobuf.Struct data = 8; + string project_id = 21; + string task_type_id = 22; +} + +message TaskUpdateRequest { + string task_id = 1; + // +optional + string name = 2; + // +optional + TaskPriority priority = 3; + // +optional + string description = 4; + // +optional + repeated string files = 5; + // +optional + Mentions mentions = 6; + // +optional + string assignee = 7; + // +optional + google.protobuf.Struct data = 8; + // +optional + string project_id = 21; +} + +message TaskStatusRequest { + string task_id = 1; + string status = 2; + // +optional + string assignee = 3; + // +optional + string comment = 4; +} + +message TaskRequest { + string task_id = 1; +} + +message TaskSearchQuery { + // +optional + spaceone.api.core.v2.Query query = 1; + // +optional + string task_id = 2; + // +optional + string name = 3; + // +optional + string status = 4; + // +optional + spaceone.api.opsflow.v1.StatusType status_type = 5; + // +optional + TaskPriority priority = 6; + // +optional + string workspace_id = 11; + // +optional + string project_id = 12; + // +optional + string task_category_id = 13; + // +optional + string task_type_id = 14; +} + +message TaskInfo { + string task_id = 1; + string name = 2; + string status = 3; + spaceone.api.opsflow.v1.StatusType status_type = 4; + TaskPriority priority = 5; + string description = 6; + google.protobuf.Struct data = 7; + repeated spaceone.api.file_manager.v1.FileInfo files = 8; + + string domain_id = 21; + string workspace_id = 22; + string project_id = 23; + string task_category_id = 24; + string task_type_id = 25; + + string created_at = 31; + string started_at = 32; + string updated_at = 33; + string completed_at = 34; +} + +message TasksInfo { + repeated TaskInfo results = 1; + int32 total_count = 2; +} + +message TaskStatQuery { + spaceone.api.core.v2.StatisticsQuery query = 1; +} diff --git a/proto/spaceone/api/workflow/task_category.proto b/proto/spaceone/api/opsflow/task_category.proto similarity index 86% rename from proto/spaceone/api/workflow/task_category.proto rename to proto/spaceone/api/opsflow/task_category.proto index 58cb8672d..18a598532 100644 --- a/proto/spaceone/api/workflow/task_category.proto +++ b/proto/spaceone/api/opsflow/task_category.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package spaceone.api.workflow.v1; +package spaceone.api.opsflow.v1; -option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/workflow/v1"; +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; @@ -13,50 +13,50 @@ import "spaceone/api/core/v2/query.proto"; service TaskCategory { rpc create (TaskCategoryCreateRequest) returns (TaskCategoryInfo) { option (google.api.http) = { - post: "/workflow/v1/task-category/create" + post: "/opsflow/v1/task-category/create" body: "*" }; } rpc update (TaskCategoryUpdateRequest) returns (TaskCategoryInfo) { option (google.api.http) = { - post: "/workflow/v1/task-category/update" + post: "/opsflow/v1/task-category/update" body: "*" }; } rpc delete (TaskCategoryRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/workflow/v1/task-category/delete" + post: "/opsflow/v1/task-category/delete" body: "*" }; } rpc get (TaskCategoryRequest) returns (TaskCategoryInfo) { option (google.api.http) = { - post: "/workflow/v1/task-category/get" + post: "/opsflow/v1/task-category/get" body: "*" }; } rpc list (TaskCategorySearchQuery) returns (TaskCategoriesInfo) { option (google.api.http) = { - post: "/workflow/v1/task-category/list" + post: "/opsflow/v1/task-category/list" body: "*" }; } rpc stat (TaskCategoryStatQuery) returns (google.protobuf.Struct) { option (google.api.http) = { - post: "/workflow/v1/task-category/stat" + post: "/opsflow/v1/task-category/stat" body: "*" }; } } -message StatusOption { - enum StatusType { - STATUS_NONE = 0; - TODO = 1; - IN_PROGRESS = 2; - COMPLETED = 3; - } +enum StatusType { + STATUS_NONE = 0; + TODO = 1; + IN_PROGRESS = 2; + COMPLETED = 3; +} +message StatusOption { string name = 1; string color = 2; StatusType status_type = 3; diff --git a/proto/spaceone/api/opsflow/task_type.proto b/proto/spaceone/api/opsflow/task_type.proto new file mode 100644 index 000000000..81363f246 --- /dev/null +++ b/proto/spaceone/api/opsflow/task_type.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; + +package spaceone.api.opsflow.v1; + +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; +import "spaceone/api/core/v2/query.proto"; +import "spaceone/api/opsflow/task_category.proto"; + + +service TaskType { + rpc create (TaskTypeCreateRequest) returns (TaskTypeInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/create" + body: "*" + }; + } + rpc update (TaskTypeUpdateRequest) returns (TaskTypeInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/update" + body: "*" + }; + } + rpc delete (TaskTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/delete" + body: "*" + }; + } + rpc get (TaskTypeRequest) returns (TaskTypeInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/get" + body: "*" + }; + } + rpc list (TaskTypeSearchQuery) returns (TaskTypesInfo) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/list" + body: "*" + }; + } + rpc stat (TaskTypeStatQuery) returns (google.protobuf.Struct) { + option (google.api.http) = { + post: "/opsflow/v1/task-type/stat" + body: "*" + }; + } +} + +message TaskTypeCreateRequest { + string name = 1; + // +optional + string description = 2; + // +optional + repeated spaceone.api.opsflow.v1.TaskField fields = 3; + // +optional + google.protobuf.Struct tags = 11; + string category_id = 21; +} + +message TaskTypeUpdateRequest { + string task_type_id = 1; + // +optional + string name = 2; + // +optional + string description = 3; + // +optional + repeated spaceone.api.opsflow.v1.TaskField fields = 4; + // +optional + google.protobuf.Struct tags = 11; + // +optional + string category_id = 21; +} + +message TaskTypeRequest { + string task_type_id = 1; +} + +message TaskTypeSearchQuery { + // +optional + spaceone.api.core.v2.Query query = 1; + // +optional + string task_type_id = 2; + // +optional + string name = 3; +} + +message TaskTypeInfo { + string task_type_id = 1; + string name = 2; + string description = 3; + repeated spaceone.api.opsflow.v1.TaskField fields = 4; + google.protobuf.Struct tags = 11; + + string domain_id = 21; + string category_id = 22; + + string created_at = 31; + string updated_at = 32; +} + +message TaskTypesInfo { + repeated TaskTypeInfo results = 1; + int32 total_count = 2; +} + +message TaskTypeStatQuery { + spaceone.api.core.v2.StatisticsQuery query = 1; +}