Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions proto/spaceone/api/opsflow/comment.proto
Original file line number Diff line number Diff line change
@@ -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;
}
78 changes: 78 additions & 0 deletions proto/spaceone/api/opsflow/event.proto
Original file line number Diff line number Diff line change
@@ -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;
}
172 changes: 172 additions & 0 deletions proto/spaceone/api/opsflow/task.proto
Original file line number Diff line number Diff line change
@@ -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;
}
Loading