Skip to content

Commit

Permalink
fix: add scope, resource_group parameter to opsflow
Browse files Browse the repository at this point in the history
Signed-off-by: jcj <[email protected]>
  • Loading branch information
ggildong committed Jan 2, 2025
1 parent d3119a0 commit 78f56d9
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
6 changes: 6 additions & 0 deletions proto/spaceone/api/opsflow/v1/comment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ message CommentInfo {
TASK_DESCRIPTION = 1;
COMMENT = 2;
}
enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
}

string comment_id = 1;
string comment = 2;
Expand All @@ -110,6 +115,7 @@ message CommentInfo {
Mentions mentions = 5;
google.protobuf.Struct source = 7;
string reference_id = 8;
ResourceGroup resource_group = 9;

string domain_id = 21;
string workspace_id = 22;
Expand Down
8 changes: 4 additions & 4 deletions proto/spaceone/api/opsflow/v1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ message EventSearchQuery {
// +optional
EventInfo.EventType event_type = 3;
// +optional
string user_type = 4;
string created_type = 4;
// +optional
string event_id = 5;
// +optional
string user_id = 6;
string created_by = 6;
// +optional
string workspace_id = 7;
// +optional
Expand All @@ -55,8 +55,8 @@ message EventInfo {
EventType event_type = 2;
string name = 3;
string description = 4;
string user_type = 5;
string user_id = 6;
string created_type = 5;
string created_by = 6;
google.protobuf.Struct additional_info = 7;

string domain_id = 21;
Expand Down
20 changes: 20 additions & 0 deletions proto/spaceone/api/opsflow/v1/task.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ enum TaskPriority {
}

message TaskCreateRequest {
enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
}

string name = 1;
string status_id = 2;
// +optional
Expand All @@ -93,7 +99,9 @@ message TaskCreateRequest {
google.protobuf.Struct data = 8;
// +optional
string reference_id = 9;
ResourceGroup resource_group = 10;

// +optional
string project_id = 21;
string task_type_id = 22;
}
Expand Down Expand Up @@ -147,6 +155,10 @@ message TaskSearchQuery {
// +optional
TaskPriority priority = 6;
// +optional
string assignee = 7;
// +optional
string related_asset_id = 8;
// +optional
string workspace_id = 11;
// +optional
string project_id = 12;
Expand All @@ -157,6 +169,12 @@ message TaskSearchQuery {
}

message TaskInfo {
enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
}

string task_id = 1;
string name = 2;
string status_id = 3;
Expand All @@ -168,6 +186,8 @@ message TaskInfo {
string assignee = 9;
string created_by = 10;
string reference_id = 11;
ResourceGroup resource_group = 12;
repeated string related_assets = 13;

string domain_id = 21;
string workspace_id = 22;
Expand Down
1 change: 0 additions & 1 deletion proto/spaceone/api/opsflow/v1/task_category.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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";
Expand Down
31 changes: 26 additions & 5 deletions proto/spaceone/api/opsflow/v1/task_type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ service TaskType {
body: "*"
};
}
rpc delete (TaskTypeRequest) returns (google.protobuf.Empty) {
rpc delete (TaskTypeDeleteRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/opsflow/v1/task-type/delete"
body: "*"
Expand All @@ -57,15 +57,23 @@ service TaskType {
}

message TaskTypeCreateRequest {
enum Scope {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
}

string name = 1;
// +optional
string description = 2;
// +optional
repeated TaskField fields = 3;
// +optional
repeated string assignee_pool = 4;
Scope scope = 4;
// +optional
google.protobuf.Struct vars = 5;
repeated string assignee_pool = 5;
// +optional
google.protobuf.Struct vars = 6;
// +optional
google.protobuf.Struct tags = 11;
string category_id = 21;
Expand Down Expand Up @@ -93,6 +101,12 @@ message TaskTypeUpdateFieldsRequest {
bool force = 3;
}

message TaskTypeDeleteRequest {
string task_type_id = 1;
// +optional
string new_task_type_id = 2;
}

message TaskTypeRequest {
string task_type_id = 1;
// +optional
Expand All @@ -109,12 +123,19 @@ message TaskTypeSearchQuery {
}

message TaskTypeInfo {
enum Scope {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
}

string task_type_id = 1;
string name = 2;
string description = 3;
repeated TaskField fields = 4;
repeated string assignee_pool = 5;
google.protobuf.Struct vars = 6;
Scope scope = 5;
repeated string assignee_pool = 6;
google.protobuf.Struct vars = 7;
google.protobuf.Struct tags = 11;

string domain_id = 21;
Expand Down

0 comments on commit 78f56d9

Please sign in to comment.