Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor: consolidate duplicate protobuf enum definitions (#17748)

Danny Xu729ffe383d9c
diff --git a/action/command/rollout.go b/action/command/rollout.go
index 034e23b77f..cd76350ffe 100644
--- a/action/command/rollout.go
+++ b/action/command/rollout.go
@@ -177,9 +177,9 @@ func runAndWaitForPlanChecks(ctx context.Context, w *world.World, client *Client
case v1pb.PlanCheckRun_DONE:
for _, result := range run.Results {
switch result.Status {
- case v1pb.PlanCheckRun_Result_ERROR:
+ case v1pb.Advice_ERROR:
errorCount++
- case v1pb.PlanCheckRun_Result_WARNING:
+ case v1pb.Advice_WARNING:
warningCount++
default:
// Other result statuses don't affect counts
diff --git a/action/github/github.go b/action/github/github.go
index 240ee0f5c3..839c083cf1 100644
--- a/action/github/github.go
+++ b/action/github/github.go
@@ -108,7 +108,7 @@ func buildCommentMessage(resp *v1pb.CheckReleaseResponse) string {
warningCount++
case v1pb.Advice_ERROR:
errorCount++
- case v1pb.Advice_STATUS_UNSPECIFIED, v1pb.Advice_SUCCESS:
+ case v1pb.Advice_ADVICE_LEVEL_UNSPECIFIED, v1pb.Advice_SUCCESS:
// No action needed
default:
// Ignore unknown advice statuses
@@ -146,7 +146,7 @@ func buildCommentMessage(resp *v1pb.CheckReleaseResponse) string {
warningCount++
case v1pb.Advice_ERROR:
errorCount++
- case v1pb.Advice_STATUS_UNSPECIFIED, v1pb.Advice_SUCCESS:
+ case v1pb.Advice_ADVICE_LEVEL_UNSPECIFIED, v1pb.Advice_SUCCESS:
// No action needed
default:
// Ignore unknown advice statuses
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.go
index a88f6b473f..eeff10c2c5 100644
--- a/backend/api/v1/plan_service.go
+++ b/backend/api/v1/plan_service.go
@@ -871,11 +871,11 @@ func (*PlanService) parsePlanCheckRunFilter(filter string, find *store.FindPlanC
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("result_status value must be a string"))
}
// Convert v1pb result status to store result status
- v1ResultStatus := v1pb.PlanCheckRun_Result_Status_value[resultStatusStr]
+ v1ResultStatus := v1pb.Advice_Level_value[resultStatusStr]
if v1ResultStatus == 0 && resultStatusStr != "STATUS_UNSPECIFIED" {
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid result_status value: %s", resultStatusStr))
}
- storeResultStatus := convertToStoreResultStatus(v1pb.PlanCheckRun_Result_Status(v1ResultStatus))
+ storeResultStatus := convertToStoreResultStatus(v1pb.Advice_Level(v1ResultStatus))
if find.ResultStatus == nil {
find.ResultStatus = &[]storepb.Advice_Status{}
}
@@ -927,11 +927,11 @@ func (*PlanService) parsePlanCheckRunFilter(filter string, find *store.FindPlanC
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("result_status value must be a string"))
}
// Convert v1pb result status to store result status
- v1ResultStatus := v1pb.PlanCheckRun_Result_Status_value[resultStatusStr]
+ v1ResultStatus := v1pb.Advice_Level_value[resultStatusStr]
if v1ResultStatus == 0 && resultStatusStr != "STATUS_UNSPECIFIED" {
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid result_status value: %s", resultStatusStr))
}
- storeResultStatus := convertToStoreResultStatus(v1pb.PlanCheckRun_Result_Status(v1ResultStatus))
+ storeResultStatus := convertToStoreResultStatus(v1pb.Advice_Level(v1ResultStatus))
*find.ResultStatus = append(*find.ResultStatus, storeResultStatus)
}
default:
@@ -965,14 +965,14 @@ func convertToStorePlanCheckRunStatus(status v1pb.PlanCheckRun_Status) store.Pla
}
}
-// convertToStoreResultStatus converts v1pb.PlanCheckRun_Result_Status to storepb.Advice_Status.
-func convertToStoreResultStatus(status v1pb.PlanCheckRun_Result_Status) storepb.Advice_Status {
+// convertToStoreResultStatus converts v1pb.Advice_Status to storepb.Advice_Status.
+func convertToStoreResultStatus(status v1pb.Advice_Level) storepb.Advice_Status {
switch status {
- case v1pb.PlanCheckRun_Result_ERROR:
+ case v1pb.Advice_ERROR:
return storepb.Advice_ERROR
- case v1pb.PlanCheckRun_Result_WARNING:
+ case v1pb.Advice_WARNING:
return storepb.Advice_WARNING
- case v1pb.PlanCheckRun_Result_SUCCESS:
+ case v1pb.Advice_SUCCESS:
return storepb.Advice_SUCCESS
default:
return storepb.Advice_STATUS_UNSPECIFIED
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index a2d3592c74..b3819ff183 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -431,18 +431,18 @@ func convertToPlanCheckRunResult(result *storepb.PlanCheckRunResult_Result) *v1p
return resultV1
}
-func convertToPlanCheckRunResultStatus(status storepb.Advice_Status) v1pb.PlanCheckRun_Result_Status {
+func convertToPlanCheckRunResultStatus(status storepb.Advice_Status) v1pb.Advice_Level {
switch status {
case storepb.Advice_STATUS_UNSPECIFIED:
- return v1pb.PlanCheckRun_Result_STATUS_UNSPECIFIED
+ return v1pb.Advice_ADVICE_LEVEL_UNSPECIFIED
case storepb.Advice_SUCCESS:
- return v1pb.PlanCheckRun_Result_SUCCESS
+ return v1pb.Advice_SUCCESS
case storepb.Advice_WARNING:
- return v1pb.PlanCheckRun_Result_WARNING
+ return v1pb.Advice_WARNING
case storepb.Advice_ERROR:
- return v1pb.PlanCheckRun_Result_ERROR
+ return v1pb.Advice_ERROR
default:
- return v1pb.PlanCheckRun_Result_STATUS_UNSPECIFIED
+ return v1pb.Advice_ADVICE_LEVEL_UNSPECIFIED
}
}
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 06b6dae9a8..ec96df4d5b 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -254,7 +254,7 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryR
Code: int32(advisor.StatementSyntaxError),
Content: syntaxErr.Message,
Title: "Syntax error",
- Status: v1pb.PlanCheckRun_Result_ERROR,
+ Status: v1pb.Advice_ERROR,
Report: &v1pb.PlanCheckRun_Result_SqlReviewReport_{
SqlReviewReport: &v1pb.PlanCheckRun_Result_SqlReviewReport{
Line: int32(syntaxErr.Position.GetLine()),
@@ -1569,7 +1569,7 @@ func validateQueryRequest(instance *store.InstanceMessage, statement string) err
Code: int32(advisor.StatementSyntaxError),
Content: syntaxErr.Message,
Title: "Syntax error",
- Status: v1pb.PlanCheckRun_Result_ERROR,
+ Status: v1pb.Advice_ERROR,
Report: &v1pb.PlanCheckRun_Result_SqlReviewReport_{
SqlReviewReport: &v1pb.PlanCheckRun_Result_SqlReviewReport{
Line: int32(syntaxErr.Position.GetLine()),
@@ -1827,7 +1827,7 @@ func convertToV1Advice(advice *storepb.Advice) *v1pb.Advice {
}
}
-func convertAdviceStatus(status storepb.Advice_Status) v1pb.Advice_Status {
+func convertAdviceStatus(status storepb.Advice_Status) v1pb.Advice_Level {
switch status {
case storepb.Advice_SUCCESS:
return v1pb.Advice_SUCCESS
@@ -1836,7 +1836,7 @@ func convertAdviceStatus(status storepb.Advice_Status) v1pb.Advice_Status {
case storepb.Advice_ERROR:
return v1pb.Advice_ERROR
default:
- return v1pb.Advice_STATUS_UNSPECIFIED
+ return v1pb.Advice_ADVICE_LEVEL_UNSPECIFIED
}
}
diff --git a/backend/generated-go/v1/plan_service.pb.go b/backend/generated-go/v1/plan_service.pb.go
index 0374223fd0..ffee550a2a 100644
--- a/backend/generated-go/v1/plan_service.pb.go
+++ b/backend/generated-go/v1/plan_service.pb.go
@@ -143,58 +143,6 @@ func (PlanCheckRun_Status) EnumDescriptor() ([]byte, []int) {
return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 1}
}
-type PlanCheckRun_Result_Status int32
-
-const (
- PlanCheckRun_Result_STATUS_UNSPECIFIED PlanCheckRun_Result_Status = 0
- PlanCheckRun_Result_ERROR PlanCheckRun_Result_Status = 1
- PlanCheckRun_Result_WARNING PlanCheckRun_Result_Status = 2
- PlanCheckRun_Result_SUCCESS PlanCheckRun_Result_Status = 3
-)
-
-// Enum value maps for PlanCheckRun_Result_Status.
-var (
- PlanCheckRun_Result_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
- 1: "ERROR",
- 2: "WARNING",
- 3: "SUCCESS",
- }
- PlanCheckRun_Result_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "ERROR": 1,
- "WARNING": 2,
- "SUCCESS": 3,
- }
-)
-
-func (x PlanCheckRun_Result_Status) Enum() *PlanCheckRun_Result_Status {
- p := new(PlanCheckRun_Result_Status)
- *p = x
- return p
-}
-
-func (x PlanCheckRun_Result_Status) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (PlanCheckRun_Result_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_plan_service_proto_enumTypes[2].Descriptor()
-}
-
-func (PlanCheckRun_Result_Status) Type() protoreflect.EnumType {
- return &file_v1_plan_service_proto_enumTypes[2]
-}
-
-func (x PlanCheckRun_Result_Status) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use PlanCheckRun_Result_Status.Descriptor instead.
-func (PlanCheckRun_Result_Status) EnumDescriptor() ([]byte, []int) {
- return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0, 0}
-}
-
type GetPlanRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the plan to retrieve.
@@ -1749,11 +1697,11 @@ func (x *Plan_Deployment_DatabaseGroupMapping) GetDatabases() []string {
}
type PlanCheckRun_Result struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Status PlanCheckRun_Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.PlanCheckRun_Result_Status" json:"status,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
- Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status Advice_Level `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Advice_Level" json:"status,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
// Types that are valid to be assigned to Report:
//
// *PlanCheckRun_Result_SqlSummaryReport_
@@ -1793,11 +1741,11 @@ func (*PlanCheckRun_Result) Descriptor() ([]byte, []int) {
return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0}
}
-func (x *PlanCheckRun_Result) GetStatus() PlanCheckRun_Result_Status {
+func (x *PlanCheckRun_Result) GetStatus() Advice_Level {
if x != nil {
return x.Status
}
- return PlanCheckRun_Result_STATUS_UNSPECIFIED
+ return Advice_ADVICE_LEVEL_UNSPECIFIED
}
func (x *PlanCheckRun_Result) GetTitle() string {
@@ -1997,7 +1945,7 @@ var File_v1_plan_service_proto protoreflect.FileDescriptor
const file_v1_plan_service_proto_rawDesc = "" +
"\n" +
- "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x19v1/database_service.proto\"?\n" +
+ "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x19v1/database_service.proto\x1a\x14v1/sql_service.proto\"?\n" +
"\x0eGetPlanRequest\x12-\n" +
"\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +
"\x11bytebase.com/PlanR\x04name\"\x84\x01\n" +
@@ -2115,7 +2063,8 @@ const file_v1_plan_service_proto_rawDesc = "" +
"\x06parent\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +
"\x11bytebase.com/PlanR\x06parent\x12&\n" +
"\x0fplan_check_runs\x18\x02 \x03(\tR\rplanCheckRuns\"\"\n" +
- " BatchCancelPlanCheckRunsResponse\"\x80\v\n" +
+ " BatchCancelPlanCheckRunsResponse\"\xab\n" +
+ "\n" +
"\fPlanCheckRun\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x122\n" +
"\x04type\x18\x03 \x01(\x0e2\x1e.bytebase.v1.PlanCheckRun.TypeR\x04type\x128\n" +
@@ -2125,9 +2074,9 @@ const file_v1_plan_service_proto_rawDesc = "" +
"\aresults\x18\a \x03(\v2 .bytebase.v1.PlanCheckRun.ResultR\aresults\x12\x14\n" +
"\x05error\x18\b \x01(\tR\x05error\x12@\n" +
"\vcreate_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
- "createTime\x1a\x9a\x06\n" +
- "\x06Result\x12?\n" +
- "\x06status\x18\x01 \x01(\x0e2'.bytebase.v1.PlanCheckRun.Result.StatusR\x06status\x12\x14\n" +
+ "createTime\x1a\xc5\x05\n" +
+ "\x06Result\x121\n" +
+ "\x06status\x18\x01 \x01(\x0e2\x19.bytebase.v1.Advice.LevelR\x06status\x12\x14\n" +
"\x05title\x18\x02 \x01(\tR\x05title\x12\x18\n" +
"\acontent\x18\x03 \x01(\tR\acontent\x12\x12\n" +
"\x04code\x18\x04 \x01(\x05R\x04code\x12a\n" +
@@ -2141,12 +2090,7 @@ const file_v1_plan_service_proto_rawDesc = "" +
"\x04line\x18\x01 \x01(\x05R\x04line\x12\x16\n" +
"\x06column\x18\x02 \x01(\x05R\x06column\x12<\n" +
"\x0estart_position\x18\x05 \x01(\v2\x15.bytebase.v1.PositionR\rstartPosition\x128\n" +
- "\fend_position\x18\x06 \x01(\v2\x15.bytebase.v1.PositionR\vendPositionJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05\"E\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\t\n" +
- "\x05ERROR\x10\x01\x12\v\n" +
- "\aWARNING\x10\x02\x12\v\n" +
- "\aSUCCESS\x10\x03B\b\n" +
+ "\fend_position\x18\x06 \x01(\v2\x15.bytebase.v1.PositionR\vendPositionJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05B\b\n" +
"\x06report\"\xb5\x01\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\"\n" +
@@ -2187,94 +2131,94 @@ func file_v1_plan_service_proto_rawDescGZIP() []byte {
return file_v1_plan_service_proto_rawDescData
}
-var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_v1_plan_service_proto_goTypes = []any{
(PlanCheckRun_Type)(0), // 0: bytebase.v1.PlanCheckRun.Type
(PlanCheckRun_Status)(0), // 1: bytebase.v1.PlanCheckRun.Status
- (PlanCheckRun_Result_Status)(0), // 2: bytebase.v1.PlanCheckRun.Result.Status
- (*GetPlanRequest)(nil), // 3: bytebase.v1.GetPlanRequest
- (*ListPlansRequest)(nil), // 4: bytebase.v1.ListPlansRequest
- (*ListPlansResponse)(nil), // 5: bytebase.v1.ListPlansResponse
- (*SearchPlansRequest)(nil), // 6: bytebase.v1.SearchPlansRequest
- (*SearchPlansResponse)(nil), // 7: bytebase.v1.SearchPlansResponse
- (*CreatePlanRequest)(nil), // 8: bytebase.v1.CreatePlanRequest
- (*UpdatePlanRequest)(nil), // 9: bytebase.v1.UpdatePlanRequest
- (*Plan)(nil), // 10: bytebase.v1.Plan
- (*ListPlanCheckRunsRequest)(nil), // 11: bytebase.v1.ListPlanCheckRunsRequest
- (*ListPlanCheckRunsResponse)(nil), // 12: bytebase.v1.ListPlanCheckRunsResponse
- (*RunPlanChecksRequest)(nil), // 13: bytebase.v1.RunPlanChecksRequest
- (*RunPlanChecksResponse)(nil), // 14: bytebase.v1.RunPlanChecksResponse
- (*BatchCancelPlanCheckRunsRequest)(nil), // 15: bytebase.v1.BatchCancelPlanCheckRunsRequest
- (*BatchCancelPlanCheckRunsResponse)(nil), // 16: bytebase.v1.BatchCancelPlanCheckRunsResponse
- (*PlanCheckRun)(nil), // 17: bytebase.v1.PlanCheckRun
- (*Plan_Spec)(nil), // 18: bytebase.v1.Plan.Spec
- nil, // 19: bytebase.v1.Plan.PlanCheckRunStatusCountEntry
- (*Plan_CreateDatabaseConfig)(nil), // 20: bytebase.v1.Plan.CreateDatabaseConfig
- (*Plan_ChangeDatabaseConfig)(nil), // 21: bytebase.v1.Plan.ChangeDatabaseConfig
- (*Plan_ExportDataConfig)(nil), // 22: bytebase.v1.Plan.ExportDataConfig
- (*Plan_Deployment)(nil), // 23: bytebase.v1.Plan.Deployment
- nil, // 24: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry
- (*Plan_Deployment_DatabaseGroupMapping)(nil), // 25: bytebase.v1.Plan.Deployment.DatabaseGroupMapping
- (*PlanCheckRun_Result)(nil), // 26: bytebase.v1.PlanCheckRun.Result
- (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 27: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport
- (*PlanCheckRun_Result_SqlReviewReport)(nil), // 28: bytebase.v1.PlanCheckRun.Result.SqlReviewReport
- (*fieldmaskpb.FieldMask)(nil), // 29: google.protobuf.FieldMask
- (State)(0), // 30: bytebase.v1.State
- (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp
- (DatabaseChangeType)(0), // 32: bytebase.v1.DatabaseChangeType
- (MigrationType)(0), // 33: bytebase.v1.MigrationType
- (ExportFormat)(0), // 34: bytebase.v1.ExportFormat
+ (*GetPlanRequest)(nil), // 2: bytebase.v1.GetPlanRequest
+ (*ListPlansRequest)(nil), // 3: bytebase.v1.ListPlansRequest
+ (*ListPlansResponse)(nil), // 4: bytebase.v1.ListPlansResponse
+ (*SearchPlansRequest)(nil), // 5: bytebase.v1.SearchPlansRequest
+ (*SearchPlansResponse)(nil), // 6: bytebase.v1.SearchPlansResponse
+ (*CreatePlanRequest)(nil), // 7: bytebase.v1.CreatePlanRequest
+ (*UpdatePlanRequest)(nil), // 8: bytebase.v1.UpdatePlanRequest
+ (*Plan)(nil), // 9: bytebase.v1.Plan
+ (*ListPlanCheckRunsRequest)(nil), // 10: bytebase.v1.ListPlanCheckRunsRequest
+ (*ListPlanCheckRunsResponse)(nil), // 11: bytebase.v1.ListPlanCheckRunsResponse
+ (*RunPlanChecksRequest)(nil), // 12: bytebase.v1.RunPlanChecksRequest
+ (*RunPlanChecksResponse)(nil), // 13: bytebase.v1.RunPlanChecksResponse
+ (*BatchCancelPlanCheckRunsRequest)(nil), // 14: bytebase.v1.BatchCancelPlanCheckRunsRequest
+ (*BatchCancelPlanCheckRunsResponse)(nil), // 15: bytebase.v1.BatchCancelPlanCheckRunsResponse
+ (*PlanCheckRun)(nil), // 16: bytebase.v1.PlanCheckRun
+ (*Plan_Spec)(nil), // 17: bytebase.v1.Plan.Spec
+ nil, // 18: bytebase.v1.Plan.PlanCheckRunStatusCountEntry
+ (*Plan_CreateDatabaseConfig)(nil), // 19: bytebase.v1.Plan.CreateDatabaseConfig
+ (*Plan_ChangeDatabaseConfig)(nil), // 20: bytebase.v1.Plan.ChangeDatabaseConfig
+ (*Plan_ExportDataConfig)(nil), // 21: bytebase.v1.Plan.ExportDataConfig
+ (*Plan_Deployment)(nil), // 22: bytebase.v1.Plan.Deployment
+ nil, // 23: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry
+ (*Plan_Deployment_DatabaseGroupMapping)(nil), // 24: bytebase.v1.Plan.Deployment.DatabaseGroupMapping
+ (*PlanCheckRun_Result)(nil), // 25: bytebase.v1.PlanCheckRun.Result
+ (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 26: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport
+ (*PlanCheckRun_Result_SqlReviewReport)(nil), // 27: bytebase.v1.PlanCheckRun.Result.SqlReviewReport
+ (*fieldmaskpb.FieldMask)(nil), // 28: google.protobuf.FieldMask
+ (State)(0), // 29: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp
+ (DatabaseChangeType)(0), // 31: bytebase.v1.DatabaseChangeType
+ (MigrationType)(0), // 32: bytebase.v1.MigrationType
+ (ExportFormat)(0), // 33: bytebase.v1.ExportFormat
+ (Advice_Level)(0), // 34: bytebase.v1.Advice.Level
(*ChangedResources)(nil), // 35: bytebase.v1.ChangedResources
(*Position)(nil), // 36: bytebase.v1.Position
}
var file_v1_plan_service_proto_depIdxs = []int32{
- 10, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan
- 10, // 1: bytebase.v1.SearchPlansResponse.plans:type_name -> bytebase.v1.Plan
- 10, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan
- 10, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan
- 29, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask
- 30, // 5: bytebase.v1.Plan.state:type_name -> bytebase.v1.State
- 18, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec
- 31, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp
- 31, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp
- 19, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry
- 23, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment
- 17, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun
+ 9, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan
+ 9, // 1: bytebase.v1.SearchPlansResponse.plans:type_name -> bytebase.v1.Plan
+ 9, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan
+ 9, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan
+ 28, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 29, // 5: bytebase.v1.Plan.state:type_name -> bytebase.v1.State
+ 17, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec
+ 30, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp
+ 30, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp
+ 18, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry
+ 22, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment
+ 16, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun
0, // 12: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type
1, // 13: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status
- 26, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result
- 31, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp
- 20, // 16: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig
- 21, // 17: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig
- 22, // 18: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig
- 32, // 19: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.DatabaseChangeType
- 33, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.migration_type:type_name -> bytebase.v1.MigrationType
- 24, // 21: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry
- 34, // 22: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat
- 25, // 23: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping
- 2, // 24: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status
- 27, // 25: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport
- 28, // 26: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport
+ 25, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result
+ 30, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp
+ 19, // 16: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig
+ 20, // 17: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig
+ 21, // 18: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig
+ 31, // 19: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.DatabaseChangeType
+ 32, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.migration_type:type_name -> bytebase.v1.MigrationType
+ 23, // 21: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry
+ 33, // 22: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat
+ 24, // 23: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping
+ 34, // 24: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.Advice.Level
+ 26, // 25: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport
+ 27, // 26: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport
35, // 27: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources
36, // 28: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position
36, // 29: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position
- 3, // 30: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest
- 4, // 31: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest
- 6, // 32: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest
- 8, // 33: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest
- 9, // 34: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest
- 11, // 35: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest
- 13, // 36: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest
- 15, // 37: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest
- 10, // 38: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan
- 5, // 39: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse
- 7, // 40: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse
- 10, // 41: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan
- 10, // 42: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan
- 12, // 43: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse
- 14, // 44: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse
- 16, // 45: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse
+ 2, // 30: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest
+ 3, // 31: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest
+ 5, // 32: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest
+ 7, // 33: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest
+ 8, // 34: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest
+ 10, // 35: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest
+ 12, // 36: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest
+ 14, // 37: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest
+ 9, // 38: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan
+ 4, // 39: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse
+ 6, // 40: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse
+ 9, // 41: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan
+ 9, // 42: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan
+ 11, // 43: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse
+ 13, // 44: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse
+ 15, // 45: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse
38, // [38:46] is the sub-list for method output_type
30, // [30:38] is the sub-list for method input_type
30, // [30:30] is the sub-list for extension type_name
@@ -2290,6 +2234,7 @@ func file_v1_plan_service_proto_init() {
file_v1_annotation_proto_init()
file_v1_common_proto_init()
file_v1_database_service_proto_init()
+ file_v1_sql_service_proto_init()
file_v1_plan_service_proto_msgTypes[10].OneofWrappers = []any{}
file_v1_plan_service_proto_msgTypes[15].OneofWrappers = []any{
(*Plan_Spec_CreateDatabaseConfig)(nil),
@@ -2306,7 +2251,7 @@ func file_v1_plan_service_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_plan_service_proto_rawDesc), len(file_v1_plan_service_proto_rawDesc)),
- NumEnums: 3,
+ NumEnums: 2,
NumMessages: 26,
NumExtensions: 0,
NumServices: 1,
diff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.go
index 419aaa4e34..f6d9a6c297 100644
--- a/backend/generated-go/v1/sql_service.pb.go
+++ b/backend/generated-go/v1/sql_service.pb.go
@@ -145,56 +145,60 @@ func (QueryResult_Message_Level) EnumDescriptor() ([]byte, []int) {
return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 1, 0}
}
-type Advice_Status int32
+// Level represents the severity level of the advice.
+type Advice_Level int32
const (
- // Unspecified.
- Advice_STATUS_UNSPECIFIED Advice_Status = 0
- Advice_SUCCESS Advice_Status = 1
- Advice_WARNING Advice_Status = 2
- Advice_ERROR Advice_Status = 3
+ // Unspecified advice level.
+ Advice_ADVICE_LEVEL_UNSPECIFIED Advice_Level = 0
+ // Success status indicating the check passed without issues.
+ Advice_SUCCESS Advice_Level = 1
+ // Warning status indicating potential issues that should be reviewed.
+ Advice_WARNING Advice_Level = 2
+ // Error status indicating critical issues that must be addressed.
+ Advice_ERROR Advice_Level = 3
)
-// Enum value maps for Advice_Status.
+// Enum value maps for Advice_Level.
var (
- Advice_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
+ Advice_Level_name = map[int32]string{
+ 0: "ADVICE_LEVEL_UNSPECIFIED",
1: "SUCCESS",
2: "WARNING",
3: "ERROR",
}
- Advice_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "SUCCESS": 1,
- "WARNING": 2,
- "ERROR": 3,
+ Advice_Level_value = map[string]int32{
+ "ADVICE_LEVEL_UNSPECIFIED": 0,
+ "SUCCESS": 1,
+ "WARNING": 2,
+ "ERROR": 3,
}
)
-func (x Advice_Status) Enum() *Advice_Status {
- p := new(Advice_Status)
+func (x Advice_Level) Enum() *Advice_Level {
+ p := new(Advice_Level)
*p = x
return p
}
-func (x Advice_Status) String() string {
+func (x Advice_Level) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
-func (Advice_Status) Descriptor() protoreflect.EnumDescriptor {
+func (Advice_Level) Descriptor() protoreflect.EnumDescriptor {
return file_v1_sql_service_proto_enumTypes[2].Descriptor()
}
-func (Advice_Status) Type() protoreflect.EnumType {
+func (Advice_Level) Type() protoreflect.EnumType {
return &file_v1_sql_service_proto_enumTypes[2]
}
-func (x Advice_Status) Number() protoreflect.EnumNumber {
+func (x Advice_Level) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
-// Deprecated: Use Advice_Status.Descriptor instead.
-func (Advice_Status) EnumDescriptor() ([]byte, []int) {
+// Deprecated: Use Advice_Level.Descriptor instead.
+func (Advice_Level) EnumDescriptor() ([]byte, []int) {
return file_v1_sql_service_proto_rawDescGZIP(), []int{9, 0}
}
@@ -1204,8 +1208,8 @@ func (*RowValue_TimestampTzValue) isRowValue_Kind() {}
type Advice struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // The advice status.
- Status Advice_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Advice_Status" json:"status,omitempty"`
+ // The advice level.
+ Status Advice_Level `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Advice_Level" json:"status,omitempty"`
// The advice code.
Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
// The advice title.
@@ -1250,11 +1254,11 @@ func (*Advice) Descriptor() ([]byte, []int) {
return file_v1_sql_service_proto_rawDescGZIP(), []int{9}
}
-func (x *Advice) GetStatus() Advice_Status {
+func (x *Advice) GetStatus() Advice_Level {
if x != nil {
return x.Status
}
- return Advice_STATUS_UNSPECIFIED
+ return Advice_ADVICE_LEVEL_UNSPECIFIED
}
func (x *Advice) GetCode() int32 {
@@ -2823,16 +2827,16 @@ const file_v1_sql_service_proto_rawDesc = "" +
"\x04zone\x18\x02 \x01(\tR\x04zone\x12\x16\n" +
"\x06offset\x18\x03 \x01(\x05R\x06offset\x12\x1a\n" +
"\baccuracy\x18\x04 \x01(\x05R\baccuracyB\x06\n" +
- "\x04kind\"\xd1\x02\n" +
- "\x06Advice\x122\n" +
- "\x06status\x18\x01 \x01(\x0e2\x1a.bytebase.v1.Advice.StatusR\x06status\x12\x12\n" +
+ "\x04kind\"\xd5\x02\n" +
+ "\x06Advice\x121\n" +
+ "\x06status\x18\x01 \x01(\x0e2\x19.bytebase.v1.Advice.LevelR\x06status\x12\x12\n" +
"\x04code\x18\x02 \x01(\x05R\x04code\x12\x14\n" +
"\x05title\x18\x03 \x01(\tR\x05title\x12\x18\n" +
"\acontent\x18\x04 \x01(\tR\acontent\x12<\n" +
"\x0estart_position\x18\b \x01(\v2\x15.bytebase.v1.PositionR\rstartPosition\x128\n" +
- "\fend_position\x18\t \x01(\v2\x15.bytebase.v1.PositionR\vendPosition\"E\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +
+ "\fend_position\x18\t \x01(\v2\x15.bytebase.v1.PositionR\vendPosition\"J\n" +
+ "\x05Level\x12\x1c\n" +
+ "\x18ADVICE_LEVEL_UNSPECIFIED\x10\x00\x12\v\n" +
"\aSUCCESS\x10\x01\x12\v\n" +
"\aWARNING\x10\x02\x12\t\n" +
"\x05ERROR\x10\x03J\x04\b\a\x10\bJ\x04\b\x05\x10\x06J\x04\b\x06\x10\a\"\xaf\x02\n" +
@@ -2949,7 +2953,7 @@ var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
var file_v1_sql_service_proto_goTypes = []any{
(QueryOption_RedisRunCommandsOn)(0), // 0: bytebase.v1.QueryOption.RedisRunCommandsOn
(QueryResult_Message_Level)(0), // 1: bytebase.v1.QueryResult.Message.Level
- (Advice_Status)(0), // 2: bytebase.v1.Advice.Status
+ (Advice_Level)(0), // 2: bytebase.v1.Advice.Level
(CheckRequest_ChangeType)(0), // 3: bytebase.v1.CheckRequest.ChangeType
(QueryHistory_Type)(0), // 4: bytebase.v1.QueryHistory.Type
(*AdminExecuteRequest)(nil), // 5: bytebase.v1.AdminExecuteRequest
@@ -3008,7 +3012,7 @@ var file_v1_sql_service_proto_depIdxs = []int32{
38, // 11: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
30, // 12: bytebase.v1.RowValue.timestamp_value:type_name -> bytebase.v1.RowValue.Timestamp
31, // 13: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
- 2, // 14: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status
+ 2, // 14: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Level
39, // 15: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
39, // 16: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
40, // 17: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
diff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.go
index 7d9cb777ea..2eb7ca4430 100644
--- a/backend/tests/sql_review_test.go
+++ b/backend/tests/sql_review_test.go
@@ -31,7 +31,7 @@ import (
var (
noSQLReviewPolicy = []*v1pb.PlanCheckRun_Result{
{
- Status: v1pb.PlanCheckRun_Result_SUCCESS,
+ Status: v1pb.Advice_SUCCESS,
Title: "OK",
},
}
@@ -495,7 +495,7 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.Asserti
if wait {
a.NotNil(result)
a.Len(result.Results, 1)
- a.Equal(v1pb.PlanCheckRun_Result_SUCCESS, result.Results[0].Status)
+ a.Equal(v1pb.Advice_SUCCESS, result.Results[0].Status)
issue, err := ctl.issueServiceClient.CreateIssue(ctx, connect.NewRequest(&v1pb.CreateIssueRequest{
Parent: project.Name,
Issue: &v1pb.Issue{
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
index 9f19cf59b5..8272abd974 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
@@ -86,7 +86,7 @@ import {
} from "@/types/proto-es/v1/release_service_pb";
import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";
import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { databaseForTask } from "@/utils";
import {
defer,
@@ -322,7 +322,7 @@ const runSQLCheckForIssue = async () => {
for (const checkResult of Object.values(checkResultMap.value)) {
const hasErrors = checkResult.advices.some((advice) => {
- return advice.status === Advice_Status.ERROR;
+ return advice.status === Advice_Level.ERROR;
});
// Focus on the first task with error.
if (hasErrors) {
diff --git a/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/FailedTasksView.vue b/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/FailedTasksView.vue
index f1e847c7af..d9d2d4cf51 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/FailedTasksView.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/FailedTasksView.vue
@@ -34,11 +34,9 @@
import { NTag, NPopover } from "naive-ui";
import { computed } from "vue";
import { useIssueContext, projectOfIssue } from "@/components/IssueV1";
-import {
- PlanCheckRun_Result_Status,
- type PlanCheckRun,
-} from "@/types/proto-es/v1/plan_service_pb";
+import type { PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";
import type { Task } from "@/types/proto-es/v1/rollout_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { databaseForTask } from "@/utils";
import { flattenTaskV1List } from "@/utils";
@@ -54,7 +52,7 @@ const failedTasks = computed(() => {
const tempList: Task[] = [];
props.taskSummaryReportMap.forEach((planCheckRun, taskId) => {
for (const result of planCheckRun.results) {
- if (result.status === PlanCheckRun_Result_Status.ERROR) {
+ if (result.status === Advice_Level.ERROR) {
tempList.push(tasks.value.find((task) => task.name === taskId) as Task);
break;
}
@@ -69,7 +67,7 @@ const failedMessageOfTask = (task: string) => {
const taskSummaryReport = props.taskSummaryReportMap.get(task);
if (!taskSummaryReport) return "";
const failedResults = taskSummaryReport.results.filter(
- (result) => result.status === PlanCheckRun_Result_Status.ERROR
+ (result) => result.status === Advice_Level.ERROR
);
return failedResults.map((result) => result.content).join("\n");
};
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
index 2728f175d1..1cf74b3282 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
@@ -44,8 +44,8 @@
<NTooltip
v-if="
!isCreating &&
- (planCheckStatus === PlanCheckRun_Result_Status.ERROR ||
- planCheckStatus === PlanCheckRun_Result_Status.WARNING)
+ (planCheckStatus === Advice_Level.ERROR ||
+ planCheckStatus === Advice_Level.WARNING)
"
trigger="hover"
placement="top"
@@ -54,7 +54,7 @@
<heroicons:exclamation-circle-solid
class="w-6 h-6 ml-2"
:class="[
- planCheckStatus === PlanCheckRun_Result_Status.ERROR
+ planCheckStatus === Advice_Level.ERROR
? 'text-error hover:text-error-hover'
: 'text-warning hover:text-warning-hover',
]"
@@ -82,9 +82,9 @@ import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/co
import { EnvironmentV1Name } from "@/components/v2";
import { useEnvironmentV1Store } from "@/store";
import { EMPTY_TASK_NAME } from "@/types";
-import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { activeTaskInStageV1 } from "@/utils";
import TaskStatusIcon from "../TaskStatusIcon.vue";
import StageSummary from "./StageSummary.vue";
@@ -150,20 +150,20 @@ const environment = computed(() =>
environmentStore.getEnvironmentByName(props.stage.environment)
);
-const planCheckStatus = computed((): PlanCheckRun_Result_Status => {
- if (isCreating.value) return PlanCheckRun_Result_Status.STATUS_UNSPECIFIED;
+const planCheckStatus = computed((): Advice_Level => {
+ if (isCreating.value) return Advice_Level.ADVICE_LEVEL_UNSPECIFIED;
const planCheckList = uniqBy(
props.stage.tasks.flatMap(getPlanCheckRunsForTask),
(checkRun) => checkRun.name
);
const summary = planCheckRunSummaryForCheckRunList(planCheckList);
if (summary.errorCount > 0) {
- return PlanCheckRun_Result_Status.ERROR;
+ return Advice_Level.ERROR;
}
if (summary.warnCount > 0) {
- return PlanCheckRun_Result_Status.WARNING;
+ return Advice_Level.WARNING;
}
- return PlanCheckRun_Result_Status.SUCCESS;
+ return Advice_Level.SUCCESS;
});
const activeOrFirstTaskInStage = (stage: Stage) => {
diff --git a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
index 31fe5b3b88..3146fa75d9 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
+++ b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
@@ -2,11 +2,8 @@ import { maxBy } from "lodash-es";
import { computed, type Ref } from "vue";
import type { AdviceOption } from "@/components/MonacoEditor";
import type { PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";
-import {
- PlanCheckRun_Result_Status,
- PlanCheckRun_Type,
-} from "@/types/proto-es/v1/plan_service_pb";
-import { Advice_Status, type Advice } from "@/types/proto-es/v1/sql_service_pb";
+import { PlanCheckRun_Type } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import { extractPlanCheckRunUID } from "@/utils";
import { type IssueContext } from "../../logic";
@@ -24,7 +21,7 @@ export const useSQLAdviceMarkers = (
const column = advice.startPosition?.column ?? Number.MAX_SAFE_INTEGER;
const code = advice.code;
return {
- severity: advice.status === Advice_Status.ERROR ? "ERROR" : "WARNING",
+ severity: advice.status === Advice_Level.ERROR ? "ERROR" : "WARNING",
message: advice.content,
source: `${advice.title} (${code}) L${line}:C${column}`,
startLineNumber: line,
@@ -61,8 +58,8 @@ const getLatestAdviceOptions = (planCheckRunList: PlanCheckRun[]) => {
return resultList
.filter(
(result) =>
- result.status === PlanCheckRun_Result_Status.ERROR ||
- result.status === PlanCheckRun_Result_Status.WARNING
+ result.status === Advice_Level.ERROR ||
+ result.status === Advice_Level.WARNING
)
.filter(
(result) =>
@@ -76,10 +73,7 @@ const getLatestAdviceOptions = (planCheckRunList: PlanCheckRun[]) => {
const column = sqlReviewReport?.column ?? Number.MAX_SAFE_INTEGER;
const code = result.code;
return {
- severity:
- result.status === PlanCheckRun_Result_Status.ERROR
- ? "ERROR"
- : "WARNING",
+ severity: result.status === Advice_Level.ERROR ? "ERROR" : "WARNING",
message: result.content,
source: `${result.title} (${code}) L${line}:C${column}`,
startLineNumber: line,
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskFilter.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskFilter.vue
index 676cd0aafe..c0e5b238ac 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskFilter.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskFilter.vue
@@ -85,7 +85,7 @@ import AdviceStatusIcon from "@/components/Plan/components/SQLCheckSection/Advic
import { usePlanSQLCheckContext } from "@/components/Plan/components/SQLCheckSection/context";
import { TASK_STATUS_FILTERS } from "@/components/Plan/constants/task";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { useIssueContext } from "../../logic";
import TaskStatusIconV1 from "../TaskStatusIconV1.vue";
import { filterTask } from "./filter";
@@ -93,20 +93,20 @@ import { filterTask } from "./filter";
defineProps<{
disabled: boolean;
taskStatusList: Task_Status[];
- adviceStatusList: Advice_Status[];
+ adviceStatusList: Advice_Level[];
}>();
const emit = defineEmits<{
(event: "update:taskStatusList", taskStatusList: Task_Status[]): void;
- (event: "update:adviceStatusList", adviceStatusList: Advice_Status[]): void;
+ (event: "update:adviceStatusList", adviceStatusList: Advice_Level[]): void;
}>();
// Using unified task status filters from constants
-const ADVICE_STATUS_FILTERS: Advice_Status[] = [
- Advice_Status.STATUS_UNSPECIFIED,
- Advice_Status.SUCCESS,
- Advice_Status.WARNING,
- Advice_Status.ERROR,
+const ADVICE_STATUS_FILTERS: Advice_Level[] = [
+ Advice_Level.ADVICE_LEVEL_UNSPECIFIED,
+ Advice_Level.SUCCESS,
+ Advice_Level.WARNING,
+ Advice_Level.ERROR,
];
const issueContext = useIssueContext();
@@ -116,7 +116,7 @@ const { isCreating, selectedStage } = issueContext;
const taskList = computed(() => selectedStage.value.tasks);
-const getTaskCount = (status?: Task_Status, adviceStatus?: Advice_Status) => {
+const getTaskCount = (status?: Task_Status, adviceStatus?: Advice_Level) => {
return taskList.value.filter((task) =>
filterTask(issueContext, resultMap.value, task, { status, adviceStatus })
).length;
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
index 950496b772..42e4ea4039 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
@@ -69,7 +69,7 @@ import { useVerticalScrollState } from "@/composables/useScrollState";
import { batchGetOrFetchDatabases, useCurrentProjectV1 } from "@/store";
import { DEBOUNCE_SEARCH_DELAY } from "@/types";
import type { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import type { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import type { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { databaseForTask } from "@/utils";
import { isDev } from "@/utils";
import { useIssueContext } from "../../logic";
@@ -83,7 +83,7 @@ interface StageState {
index: number;
initialized: boolean;
taskStatusFilters: Task_Status[];
- adviceStatusFilters: Advice_Status[];
+ adviceStatusFilters: Advice_Level[];
isRequesting: boolean;
}
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/filter.ts b/frontend/src/components/IssueV1/components/TaskListSection/filter.ts
index ae82f7407f..bbd1794a46 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/filter.ts
+++ b/frontend/src/components/IssueV1/components/TaskListSection/filter.ts
@@ -1,7 +1,7 @@
import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/common";
import type { CheckReleaseResponse_CheckResult } from "@/types/proto-es/v1/release_service_pb";
import type { Task, Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import type { IssueContext } from "../../logic";
export const filterTask = (
@@ -13,7 +13,7 @@ export const filterTask = (
adviceStatus,
}: {
status?: Task_Status;
- adviceStatus?: Advice_Status;
+ adviceStatus?: Advice_Level;
}
): boolean => {
const { isCreating, getPlanCheckRunsForTask } = issueContext;
@@ -23,10 +23,10 @@ export const filterTask = (
if (adviceStatus !== undefined) {
if (isCreating.value) {
const result = sqlCheckResultMap[task.target];
- if (adviceStatus === Advice_Status.STATUS_UNSPECIFIED) {
+ if (adviceStatus === Advice_Level.ADVICE_LEVEL_UNSPECIFIED) {
return !Boolean(result);
}
- if (adviceStatus === Advice_Status.SUCCESS) {
+ if (adviceStatus === Advice_Level.SUCCESS) {
return result && result.advices.length === 0;
}
return (
@@ -37,11 +37,11 @@ export const filterTask = (
const checkRuns = getPlanCheckRunsForTask(task);
const summary = planCheckRunSummaryForCheckRunList(checkRuns);
if (summary.errorCount > 0) {
- return adviceStatus === Advice_Status.ERROR;
+ return adviceStatus === Advice_Level.ERROR;
} else if (summary.warnCount > 0) {
- return adviceStatus === Advice_Status.WARNING;
+ return adviceStatus === Advice_Level.WARNING;
} else {
- return adviceStatus === Advice_Status.SUCCESS;
+ return adviceStatus === Advice_Level.SUCCESS;
}
}
}
diff --git a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue b/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
index 8ef8cb1885..43e9b3a549 100644
--- a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
+++ b/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
@@ -3,10 +3,10 @@
class="relative flex flex-shrink-0 items-center justify-center select-none w-6 h-6 overflow-hidden"
:class="classes"
>
- <template v-if="checkStatus === PlanCheckRun_Result_Status.ERROR">
+ <template v-if="checkStatus === Advice_Level.ERROR">
<CircleAlertIcon class="text-error" />
</template>
- <template v-else-if="checkStatus === PlanCheckRun_Result_Status.WARNING">
+ <template v-else-if="checkStatus === Advice_Level.WARNING">
<TriangleAlertIcon class="text-warning" />
</template>
<template
@@ -60,10 +60,9 @@ import { computed } from "vue";
import { SkipIcon } from "@/components/Icon";
import { usePlanSQLCheckContext } from "@/components/Plan/components/SQLCheckSection/context";
import { useCurrentProjectV1 } from "@/store";
-import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
import type { Task } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { databaseForTask } from "@/utils";
import { planCheckStatusForTask, useIssueContext } from "../logic";
@@ -86,17 +85,15 @@ const checkStatus = computed(() => {
if (!checkResult) return undefined;
if (
- checkResult.advices.some(
- (advice) => advice.status === Advice_Status.ERROR
- )
+ checkResult.advices.some((advice) => advice.status === Advice_Level.ERROR)
) {
- return PlanCheckRun_Result_Status.ERROR;
+ return Advice_Level.ERROR;
} else if (
checkResult.advices.some(
- (advice) => advice.status === Advice_Status.WARNING
+ (advice) => advice.status === Advice_Level.WARNING
)
) {
- return PlanCheckRun_Result_Status.WARNING;
+ return Advice_Level.WARNING;
}
return undefined;
}
diff --git a/frontend/src/components/IssueV1/logic/plan-check.ts b/frontend/src/components/IssueV1/logic/plan-check.ts
index 4de4454d5e..8a5c2086f2 100644
--- a/frontend/src/components/IssueV1/logic/plan-check.ts
+++ b/frontend/src/components/IssueV1/logic/plan-check.ts
@@ -1,12 +1,10 @@
import { sheetNameForSpec } from "@/components/Plan";
import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/common";
import type { ComposedIssue } from "@/types";
-import {
- PlanCheckRun_Result_Status,
- type Plan_Spec,
-} from "@/types/proto-es/v1/plan_service_pb";
+import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";
import type { Task } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { databaseForTask } from "@/utils";
import { specForTask, useIssueContext, projectOfIssue } from ".";
@@ -41,8 +39,8 @@ export const planCheckStatusForTask = (task: Task) => {
const summary = planCheckRunSummaryForCheckRunList(
getPlanCheckRunsForTask(task)
);
- if (summary.errorCount > 0) return PlanCheckRun_Result_Status.ERROR;
- if (summary.warnCount > 0) return PlanCheckRun_Result_Status.WARNING;
+ if (summary.errorCount > 0) return Advice_Level.ERROR;
+ if (summary.warnCount > 0) return Advice_Level.WARNING;
}
return undefined;
};
diff --git a/frontend/src/components/Plan/components/ChecksView/ChecksDrawer.vue b/frontend/src/components/Plan/components/ChecksView/ChecksDrawer.vue
index efb7b5c4ba..a0e7ba2079 100644
--- a/frontend/src/components/Plan/components/ChecksView/ChecksDrawer.vue
+++ b/frontend/src/components/Plan/components/ChecksView/ChecksDrawer.vue
@@ -16,13 +16,13 @@
<script setup lang="ts">
import { ref } from "vue";
import { Drawer, DrawerContent } from "@/components/v2";
-import type { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
+import type { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { usePlanContext } from "../../logic";
import { useResourcePoller } from "../../logic/poller";
import ChecksView from "./ChecksView.vue";
defineProps<{
- status: PlanCheckRun_Result_Status;
+ status: Advice_Level;
}>();
const { planCheckRuns } = usePlanContext();
diff --git a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue b/frontend/src/components/Plan/components/ChecksView/ChecksView.vue
index bbda194b44..4ef147802e 100644
--- a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue
+++ b/frontend/src/components/Plan/components/ChecksView/ChecksView.vue
@@ -7,8 +7,8 @@
<div
v-if="statusSummary.error > 0"
class="flex items-center gap-1 text-error cursor-pointer"
- :class="getItemClass(PlanCheckRun_Result_Status.ERROR)"
- @click="toggleSelectedStatus(PlanCheckRun_Result_Status.ERROR)"
+ :class="getItemClass(Advice_Level.ERROR)"
+ @click="toggleSelectedStatus(Advice_Level.ERROR)"
>
<XCircleIcon class="w-5 h-5" />
<span>{{ $t("common.error") }}</span>
@@ -17,8 +17,8 @@
<div
v-if="statusSummary.warning > 0"
class="flex items-center gap-1 text-warning cursor-pointer"
- :class="getItemClass(PlanCheckRun_Result_Status.WARNING)"
- @click="toggleSelectedStatus(PlanCheckRun_Result_Status.WARNING)"
+ :class="getItemClass(Advice_Level.WARNING)"
+ @click="toggleSelectedStatus(Advice_Level.WARNING)"
>
<AlertCircleIcon class="w-5 h-5" />
<span>{{ $t("common.warning") }}</span>
@@ -27,8 +27,8 @@
<div
v-if="statusSummary.success > 0"
class="flex items-center gap-1 text-success cursor-pointer"
- :class="getItemClass(PlanCheckRun_Result_Status.SUCCESS)"
- @click="toggleSelectedStatus(PlanCheckRun_Result_Status.SUCCESS)"
+ :class="getItemClass(Advice_Level.SUCCESS)"
+ @click="toggleSelectedStatus(Advice_Level.SUCCESS)"
>
<CheckCircleIcon class="w-5 h-5" />
<span>{{ $t("common.success") }}</span>
@@ -142,27 +142,25 @@ import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
import { BBSpin } from "@/bbkit";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_Type,
type PlanCheckRun,
PlanCheckRun_ResultSchema,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { humanizeTs } from "@/utils";
import CheckResultItem from "../common/CheckResultItem.vue";
import DatabaseDisplay from "../common/DatabaseDisplay.vue";
const props = defineProps<{
- defaultStatus?: PlanCheckRun_Result_Status;
+ defaultStatus?: Advice_Level;
planCheckRuns: PlanCheckRun[];
isLoading?: boolean;
}>();
const { t } = useI18n();
-const selectedStatus = ref<PlanCheckRun_Result_Status | undefined>(
- props.defaultStatus
-);
+const selectedStatus = ref<Advice_Level | undefined>(props.defaultStatus);
const hasFilters = computed(() => {
return selectedStatus.value !== undefined;
@@ -179,11 +177,11 @@ const statusSummary = computed(() => {
}
for (const result of checkRun.results) {
- if (result.status === PlanCheckRun_Result_Status.ERROR) {
+ if (result.status === Advice_Level.ERROR) {
summary.error++;
- } else if (result.status === PlanCheckRun_Result_Status.WARNING) {
+ } else if (result.status === Advice_Level.WARNING) {
summary.warning++;
- } else if (result.status === PlanCheckRun_Result_Status.SUCCESS) {
+ } else if (result.status === Advice_Level.SUCCESS) {
summary.success++;
}
}
@@ -200,7 +198,7 @@ const hasAnyStatus = computed(() => {
);
});
-const toggleSelectedStatus = (status: PlanCheckRun_Result_Status) => {
+const toggleSelectedStatus = (status: Advice_Level) => {
if (selectedStatus.value === status) {
selectedStatus.value = undefined; // Deselect if already selected
} else {
@@ -208,7 +206,7 @@ const toggleSelectedStatus = (status: PlanCheckRun_Result_Status) => {
}
};
-const getItemClass = (status: PlanCheckRun_Result_Status) => {
+const getItemClass = (status: Advice_Level) => {
const classes: string[] = [];
if (selectedStatus.value === status) {
@@ -227,7 +225,7 @@ const filteredCheckRuns = computed(() => {
if (selectedStatus.value !== undefined) {
// If filtering for errors, include failed check runs
if (
- selectedStatus.value === PlanCheckRun_Result_Status.ERROR &&
+ selectedStatus.value === Advice_Level.ERROR &&
checkRun.status === PlanCheckRun_Status.FAILED
) {
return true;
@@ -256,11 +254,11 @@ const getFilteredResults = (checkRun: PlanCheckRun) => {
if (
checkRun.status === PlanCheckRun_Status.FAILED &&
(selectedStatus.value === undefined ||
- selectedStatus.value === PlanCheckRun_Result_Status.ERROR)
+ selectedStatus.value === Advice_Level.ERROR)
) {
// Create a synthetic error result for the failed check run
const syntheticResult = create(PlanCheckRun_ResultSchema, {
- status: PlanCheckRun_Result_Status.ERROR,
+ status: Advice_Level.ERROR,
title: "Check Failed",
content: checkRun.error || "Plan check run failed",
code: 0,
@@ -318,14 +316,14 @@ const formatTime = (timestamp: Timestamp | undefined): string => {
};
const getCheckResultStatus = (
- status: PlanCheckRun_Result_Status
+ status: Advice_Level
): "SUCCESS" | "WARNING" | "ERROR" => {
switch (status) {
- case PlanCheckRun_Result_Status.ERROR:
+ case Advice_Level.ERROR:
return "ERROR";
- case PlanCheckRun_Result_Status.WARNING:
+ case Advice_Level.WARNING:
return "WARNING";
- case PlanCheckRun_Result_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
return "SUCCESS";
default:
return "SUCCESS";
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
index 977bafc804..3a37fea136 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
@@ -74,9 +74,9 @@ import {
Issue_Type,
} from "@/types/proto-es/v1/issue_service_pb";
import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";
-import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Type, Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import {
isUserIncludedInList,
hasProjectPermissionV2,
@@ -337,7 +337,7 @@ const primaryAction = computed((): ActionConfig | undefined => {
// Check plan check status and policy restrictions
const planChecksFailed =
- planCheckSummaryStatus.value === PlanCheckRun_Result_Status.ERROR;
+ planCheckSummaryStatus.value === Advice_Level.ERROR;
const isRestrictedByPolicy =
planChecksFailed && (project.value.enforceSqlReview || false);
const hasRunningChecks = hasRunningPlanChecks.value;
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DatabaseChangeView.vue b/frontend/src/components/Plan/components/IssueReviewView/DatabaseChangeView.vue
index e0179e9ad0..229d638d24 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DatabaseChangeView.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DatabaseChangeView.vue
@@ -74,7 +74,7 @@ import { EnvironmentV1Name } from "@/components/v2";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentProjectV1, useEnvironmentV1Store } from "@/store";
import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";
-import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractProjectResourceName, getStageStatus } from "@/utils";
import { usePlanContext, usePlanCheckStatus } from "../../logic";
import ChecksDrawer from "../ChecksView/ChecksDrawer.vue";
@@ -88,9 +88,7 @@ const router = useRouter();
const { project } = useCurrentProjectV1();
const { hasAnyStatus: hasAnyChecks } = usePlanCheckStatus(plan);
-const selectedResultStatus = ref<PlanCheckRun_Result_Status | undefined>(
- undefined
-);
+const selectedResultStatus = ref<Advice_Level | undefined>(undefined);
const shouldShowOverview = computed(() => {
return issue.value?.type === Issue_Type.DATABASE_CHANGE || rollout?.value;
diff --git a/frontend/src/components/Plan/components/IssueReviewView/OverviewSection.vue b/frontend/src/components/Plan/components/IssueReviewView/OverviewSection.vue
index 61df4e8938..e10ab7986e 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/OverviewSection.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/OverviewSection.vue
@@ -73,7 +73,7 @@ import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import { EnvironmentV1Name } from "@/components/v2";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentProjectV1, useEnvironmentV1Store } from "@/store";
-import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractProjectResourceName, getStageStatus } from "@/utils";
import { usePlanContext, usePlanCheckStatus } from "../../logic";
import ChecksDrawer from "../ChecksView/ChecksDrawer.vue";
@@ -85,9 +85,7 @@ const router = useRouter();
const { project } = useCurrentProjectV1();
const { hasAnyStatus: hasAnyChecks } = usePlanCheckStatus(plan);
-const selectedResultStatus = ref<PlanCheckRun_Result_Status | undefined>(
- undefined
-);
+const selectedResultStatus = ref<Advice_Level | undefined>(undefined);
const getEnvironmentEntity = (environmentName: string) => {
return environmentStore.getEnvironmentByName(environmentName);
diff --git a/frontend/src/components/Plan/components/PlanCheckRunStatusIcon.vue b/frontend/src/components/Plan/components/PlanCheckRunStatusIcon.vue
index e9eeb78040..0b89926061 100644
--- a/frontend/src/components/Plan/components/PlanCheckRunStatusIcon.vue
+++ b/frontend/src/components/Plan/components/PlanCheckRunStatusIcon.vue
@@ -4,17 +4,13 @@
class="flex items-center justify-center select-none flex-shrink-0"
:class="iconClass()"
>
- <template v-if="planCheckRunStatus === PlanCheckRun_Result_Status.ERROR">
+ <template v-if="planCheckRunStatus === Advice_Level.ERROR">
<XIcon />
</template>
- <template
- v-else-if="planCheckRunStatus === PlanCheckRun_Result_Status.WARNING"
- >
+ <template v-else-if="planCheckRunStatus === Advice_Level.WARNING">
<span class="text-xs font-bold" aria-hidden="true">!</span>
</template>
- <template
- v-else-if="planCheckRunStatus === PlanCheckRun_Result_Status.SUCCESS"
- >
+ <template v-else-if="planCheckRunStatus === Advice_Level.SUCCESS">
<CheckIcon />
</template>
<template v-else-if="hasRunningChecks">
@@ -31,10 +27,8 @@ import type { PropType } from "vue";
import { computed } from "vue";
import CheckIcon from "~icons/heroicons-solid/check";
import XIcon from "~icons/heroicons-solid/x";
-import {
- PlanCheckRun_Result_Status,
- type Plan,
-} from "@/types/proto-es/v1/plan_service_pb";
+import type { Plan } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { usePlanCheckStatus } from "../logic";
export type SizeType = "small" | "normal";
@@ -59,11 +53,11 @@ const {
const iconClass = () => {
const sizeClass = props.size === "normal" ? "w-4 h-4" : "w-3.5 h-3.5";
switch (planCheckRunStatus.value) {
- case PlanCheckRun_Result_Status.ERROR:
+ case Advice_Level.ERROR:
return `${sizeClass} text-error`;
- case PlanCheckRun_Result_Status.WARNING:
+ case Advice_Level.WARNING:
return `${sizeClass} text-warning`;
- case PlanCheckRun_Result_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
return `${sizeClass} text-success`;
default:
return `${sizeClass} text-warning`;
diff --git a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue
index 7e3647bc7a..044ff2fa3b 100644
--- a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue
+++ b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue
@@ -80,10 +80,8 @@ import {
pushNotification,
extractUserId,
} from "@/store";
-import {
- PlanCheckRun_Result_Status,
- RunPlanChecksRequestSchema,
-} from "@/types/proto-es/v1/plan_service_pb";
+import { RunPlanChecksRequestSchema } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { hasProjectPermissionV2 } from "@/utils";
import {
planCheckRunListForSpec,
@@ -107,9 +105,7 @@ const { sheet } = useSpecSheet(selectedSpec);
const isRunningChecks = ref(false);
const showChecksDrawer = ref(false);
-const selectedResultStatus = ref<PlanCheckRun_Result_Status>(
- PlanCheckRun_Result_Status.SUCCESS
-);
+const selectedResultStatus = ref<Advice_Level>(Advice_Level.SUCCESS);
const shouldShow = computed(() => {
return planSpecHasPlanChecks(selectedSpec.value);
@@ -181,7 +177,7 @@ const runChecks = async () => {
}
};
-const openChecksDrawer = (status: PlanCheckRun_Result_Status) => {
+const openChecksDrawer = (status: Advice_Level) => {
selectedResultStatus.value = status;
showChecksDrawer.value = true;
};
diff --git a/frontend/src/components/Plan/components/PlanCheckStatusCount.vue b/frontend/src/components/Plan/components/PlanCheckStatusCount.vue
index 7bb7a97960..4285457c79 100644
--- a/frontend/src/components/Plan/components/PlanCheckStatusCount.vue
+++ b/frontend/src/components/Plan/components/PlanCheckStatusCount.vue
@@ -17,7 +17,7 @@
<div
v-if="statusSummary.error > 0"
class="flex items-center gap-1 text-error"
- :class="getItemClass(PlanCheckRun_Result_Status.ERROR)"
+ :class="getItemClass(Advice_Level.ERROR)"
@click="handleClick('error')"
>
<XCircleIcon :class="iconSizeClass" />
@@ -27,7 +27,7 @@
<div
v-if="statusSummary.warning > 0"
class="flex items-center gap-1 text-warning"
- :class="getItemClass(PlanCheckRun_Result_Status.WARNING)"
+ :class="getItemClass(Advice_Level.WARNING)"
@click="handleClick('warning')"
>
<AlertCircleIcon :class="iconSizeClass" />
@@ -37,7 +37,7 @@
<div
v-if="statusSummary.success > 0"
class="flex items-center gap-1 text-success"
- :class="getItemClass(PlanCheckRun_Result_Status.SUCCESS)"
+ :class="getItemClass(Advice_Level.SUCCESS)"
@click="handleClick('success')"
>
<CheckCircleIcon :class="iconSizeClass" />
@@ -57,10 +57,8 @@ import {
LoaderIcon,
} from "lucide-vue-next";
import { computed, type PropType } from "vue";
-import {
- PlanCheckRun_Result_Status,
- type Plan,
-} from "@/types/proto-es/v1/plan_service_pb";
+import type { Plan } from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { usePlanCheckStatus } from "../logic";
import PlanCheckRunStatusIcon from "./PlanCheckRunStatusIcon.vue";
@@ -89,13 +87,13 @@ const props = defineProps({
default: false,
},
selectedStatus: {
- type: Number as PropType<PlanCheckRun_Result_Status | undefined>,
+ type: Number as PropType<Advice_Level | undefined>,
default: undefined,
},
});
const emit = defineEmits<{
- click: [status: PlanCheckRun_Result_Status];
+ click: [status: Advice_Level];
}>();
const { statusSummary, hasAnyStatus } = usePlanCheckStatus(
@@ -110,15 +108,15 @@ const handleClick = (statusType: "error" | "warning" | "success") => {
if (!props.clickable) return;
const statusMap = {
- error: PlanCheckRun_Result_Status.ERROR,
- warning: PlanCheckRun_Result_Status.WARNING,
- success: PlanCheckRun_Result_Status.SUCCESS,
+ error: Advice_Level.ERROR,
+ warning: Advice_Level.WARNING,
+ success: Advice_Level.SUCCESS,
};
emit("click", statusMap[statusType]);
};
-const getItemClass = (status: PlanCheckRun_Result_Status) => {
+const getItemClass = (status: Advice_Level) => {
const classes: string[] = [];
if (props.clickable) {
diff --git a/frontend/src/components/Plan/components/SQLCheckSection/AdviceStatusIcon.vue b/frontend/src/components/Plan/components/SQLCheckSection/AdviceStatusIcon.vue
index 55a64ef9a0..f17e0efe84 100644
--- a/frontend/src/components/Plan/components/SQLCheckSection/AdviceStatusIcon.vue
+++ b/frontend/src/components/Plan/components/SQLCheckSection/AdviceStatusIcon.vue
@@ -1,13 +1,13 @@
<template>
<NTooltip>
<template #trigger>
- <template v-if="status === Advice_Status.SUCCESS">
+ <template v-if="status === Advice_Level.SUCCESS">
<CheckIcon :size="16" class="text-success" />
</template>
- <template v-else-if="status === Advice_Status.WARNING">
+ <template v-else-if="status === Advice_Level.WARNING">
<TriangleAlertIcon :size="16" class="text-warning" />
</template>
- <template v-else-if="status === Advice_Status.ERROR">
+ <template v-else-if="status === Advice_Level.ERROR">
<CircleAlertIcon :size="16" class="text-error" />
</template>
<template v-else>
@@ -28,21 +28,21 @@ import {
import { NTooltip } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
const props = defineProps<{
- status: Advice_Status;
+ status: Advice_Level;
}>();
const { t } = useI18n();
const statusMessage = computed(() => {
switch (props.status) {
- case Advice_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
return "Success";
- case Advice_Status.WARNING:
+ case Advice_Level.WARNING:
return "Warning";
- case Advice_Status.ERROR:
+ case Advice_Level.ERROR:
return "Error";
default:
return t("issue.sql-check.not-executed-yet");
diff --git a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckBadge.vue b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckBadge.vue
index a43cfe4f39..12cb2f1233 100644
--- a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckBadge.vue
+++ b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckBadge.vue
@@ -38,7 +38,7 @@ import { computed, ref } from "vue";
import { TaskSpinner } from "@/components/IssueV1/components/common";
import { SQLCheckPanel } from "@/components/SQLCheck";
import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { usePlanSQLCheckContext } from "./context";
const props = defineProps<{
@@ -58,10 +58,10 @@ const status = computed(() => {
if (isRunning) {
return "RUNNING";
}
- if (advices.some((adv) => adv.status === Advice_Status.ERROR)) {
+ if (advices.some((adv) => adv.status === Advice_Level.ERROR)) {
return "ERROR";
}
- if (advices.some((adv) => adv.status === Advice_Status.WARNING)) {
+ if (advices.some((adv) => adv.status === Advice_Level.WARNING)) {
return "WARNING";
}
return "SUCCESS";
diff --git a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
index e48ab59535..bafe17d0ca 100644
--- a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
+++ b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
@@ -66,9 +66,9 @@ import {
} from "@/types/proto-es/v1/release_service_pb";
import {
AdviceSchema,
- Advice_Status as ProtoESAdvice_Status,
+ Advice_Level as ProtoESAdvice_Level,
} from "@/types/proto-es/v1/sql_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import type { Defer, VueStyle } from "@/utils";
import { defer } from "@/utils";
import { useSpecSheet } from "../StatementSection/useSpecSheet";
@@ -157,7 +157,7 @@ const runChecks = async () => {
advices: errors.map((err) =>
create(AdviceSchema, {
title: "Pre check",
- status: ProtoESAdvice_Status.WARNING,
+ status: ProtoESAdvice_Level.WARNING,
content: err,
})
),
@@ -191,8 +191,8 @@ const onPanelClose = () => {
const hasError = computed(() => {
return advices.value?.some(
(advice) =>
- advice.status === Advice_Status.ERROR ||
- advice.status === Advice_Status.WARNING
+ advice.status === Advice_Level.ERROR ||
+ advice.status === Advice_Level.WARNING
);
});
</script>
diff --git a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
index 7956a1b12a..dc0ac4a30b 100644
--- a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
+++ b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
@@ -103,7 +103,6 @@ import {
import {
PlanCheckRun_Type,
PlanCheckRun_Status,
- PlanCheckRun_Result_Status,
type PlanCheckRun,
type PlanCheckRun_Result,
PlanCheckRunSchema,
@@ -117,7 +116,7 @@ import {
Release_File_MigrationType,
type CheckReleaseResponse_CheckResult,
} from "@/types/proto-es/v1/release_service_pb";
-import { Advice_Status, type Advice } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import {
extractProjectResourceName,
getSheetStatement,
@@ -182,11 +181,11 @@ const summary = computed(() => {
const result = { success: 0, warning: 0, error: 0 };
for (const advice of allAdvices.value) {
- if (advice.status === Advice_Status.ERROR) {
+ if (advice.status === Advice_Level.ERROR) {
result.error++;
- } else if (advice.status === Advice_Status.WARNING) {
+ } else if (advice.status === Advice_Level.WARNING) {
result.warning++;
- } else if (advice.status === Advice_Status.SUCCESS) {
+ } else if (advice.status === Advice_Level.SUCCESS) {
result.success++;
}
}
@@ -252,15 +251,15 @@ const openDrawer = (status: "ERROR" | "WARNING" | "SUCCESS") => {
drawerVisible.value = true;
};
-// Convert string status to PlanCheckRun_Result_Status
-const getDefaultStatus = (): PlanCheckRun_Result_Status | undefined => {
+// Convert string status to Advice_Level
+const getDefaultStatus = (): Advice_Level | undefined => {
switch (selectedStatus.value) {
case "ERROR":
- return PlanCheckRun_Result_Status.ERROR;
+ return Advice_Level.ERROR;
case "WARNING":
- return PlanCheckRun_Result_Status.WARNING;
+ return Advice_Level.WARNING;
case "SUCCESS":
- return PlanCheckRun_Result_Status.SUCCESS;
+ return Advice_Level.SUCCESS;
default:
return undefined;
}
@@ -287,11 +286,11 @@ const transformToFormattedCheckRuns = (
(advice) => {
return create(PlanCheckRun_ResultSchema, {
status:
- advice.status === Advice_Status.ERROR
- ? PlanCheckRun_Result_Status.ERROR
- : advice.status === Advice_Status.WARNING
- ? PlanCheckRun_Result_Status.WARNING
- : PlanCheckRun_Result_Status.SUCCESS,
+ advice.status === Advice_Level.ERROR
+ ? Advice_Level.ERROR
+ : advice.status === Advice_Level.WARNING
+ ? Advice_Level.WARNING
+ : Advice_Level.SUCCESS,
title: advice.title,
content: advice.content,
code: advice.code,
diff --git a/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts b/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts
index 8f6c8f90bf..59918bbf79 100644
--- a/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts
+++ b/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts
@@ -1,12 +1,9 @@
import { maxBy } from "lodash-es";
import { computed, type Ref } from "vue";
import type { AdviceOption } from "@/components/MonacoEditor";
-import {
- PlanCheckRun_Result_Status,
- PlanCheckRun_Type,
-} from "@/types/proto-es/v1/plan_service_pb";
+import { PlanCheckRun_Type } from "@/types/proto-es/v1/plan_service_pb";
import type { PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";
-import { Advice_Status, type Advice } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import { extractPlanCheckRunUID } from "@/utils";
export const useSQLAdviceMarkers = (
@@ -23,7 +20,7 @@ export const useSQLAdviceMarkers = (
const column = advice.startPosition?.column ?? Number.MAX_SAFE_INTEGER;
const code = advice.code;
return {
- severity: advice.status === Advice_Status.ERROR ? "ERROR" : "WARNING",
+ severity: advice.status === Advice_Level.ERROR ? "ERROR" : "WARNING",
message: advice.content,
source: `${advice.title} (${code}) L${line}:C${column}`,
startLineNumber: line,
@@ -59,8 +56,8 @@ const getLatestAdviceOptions = (planCheckRuns: PlanCheckRun[]) => {
return resultList
.filter(
(result) =>
- result.status === PlanCheckRun_Result_Status.ERROR ||
- result.status === PlanCheckRun_Result_Status.WARNING
+ result.status === Advice_Level.ERROR ||
+ result.status === Advice_Level.WARNING
)
.filter(
(result) =>
@@ -77,10 +74,7 @@ const getLatestAdviceOptions = (planCheckRuns: PlanCheckRun[]) => {
sqlReviewReport?.startPosition?.column ?? Number.MAX_SAFE_INTEGER;
const code = result.code;
return {
- severity:
- result.status === PlanCheckRun_Result_Status.ERROR
- ? "ERROR"
- : "WARNING",
+ severity: result.status === Advice_Level.ERROR ? "ERROR" : "WARNING",
message: result.content,
source: `${result.title} (${code}) L${line}:C${column}`,
startLineNumber: line,
diff --git a/frontend/src/components/Plan/logic/usePlanCheckStatus.ts b/frontend/src/components/Plan/logic/usePlanCheckStatus.ts
index 74257d6e98..fa3ba11495 100644
--- a/frontend/src/components/Plan/logic/usePlanCheckStatus.ts
+++ b/frontend/src/components/Plan/logic/usePlanCheckStatus.ts
@@ -1,9 +1,9 @@
import { computed, type ComputedRef, type Ref } from "vue";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Status,
type Plan,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
export interface PlanCheckStatusSummary {
running: number;
@@ -16,27 +16,27 @@ export interface PlanCheckStatusSummary {
export const usePlanCheckStatus = (
plan: ComputedRef<Plan | undefined> | Ref<Plan | undefined>
) => {
- const getCheckCount = (status: PlanCheckRun_Result_Status): number => {
+ const getCheckCount = (status: Advice_Level): number => {
if (!plan.value) return 0;
- const statusKey = PlanCheckRun_Result_Status[status];
+ const statusKey = Advice_Level[status];
return plan.value.planCheckRunStatusCount?.[statusKey] || 0;
};
const getOverallStatus = computed(() => {
- if (!plan.value) return PlanCheckRun_Result_Status.STATUS_UNSPECIFIED;
+ if (!plan.value) return Advice_Level.ADVICE_LEVEL_UNSPECIFIED;
const statusCount = plan.value.planCheckRunStatusCount || {};
if (statusCount["ERROR"] > 0 || statusCount["FAILED"] > 0) {
- return PlanCheckRun_Result_Status.ERROR;
+ return Advice_Level.ERROR;
} else if (statusCount["WARNING"] > 0) {
- return PlanCheckRun_Result_Status.WARNING;
+ return Advice_Level.WARNING;
} else if (statusCount["SUCCESS"] > 0) {
- return PlanCheckRun_Result_Status.SUCCESS;
+ return Advice_Level.SUCCESS;
}
// Default to SUCCESS if no errors or warnings.
- return PlanCheckRun_Result_Status.SUCCESS;
+ return Advice_Level.SUCCESS;
});
const statusSummary = computed<PlanCheckStatusSummary>(() => {
@@ -47,18 +47,9 @@ export const usePlanCheckStatus = (
const statusCount = plan.value.planCheckRunStatusCount || {};
const running =
statusCount[PlanCheckRun_Status[PlanCheckRun_Status.RUNNING]] || 0;
- const success =
- statusCount[
- PlanCheckRun_Result_Status[PlanCheckRun_Result_Status.SUCCESS]
- ] || 0;
- const warning =
- statusCount[
- PlanCheckRun_Result_Status[PlanCheckRun_Result_Status.WARNING]
- ] || 0;
- const error =
- statusCount[
- PlanCheckRun_Result_Status[PlanCheckRun_Result_Status.ERROR]
- ] || 0;
+ const success = statusCount[Advice_Level[Advice_Level.SUCCESS]] || 0;
+ const warning = statusCount[Advice_Level[Advice_Level.WARNING]] || 0;
+ const error = statusCount[Advice_Level[Advice_Level.ERROR]] || 0;
// Also count FAILED plan check runs as errors
const failed =
statusCount[PlanCheckRun_Status[PlanCheckRun_Status.FAILED]] || 0;
diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunBadge.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunBadge.vue
index df7ca3dcc1..1e2977b3de 100644
--- a/frontend/src/components/PlanCheckRun/PlanCheckRunBadge.vue
+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunBadge.vue
@@ -12,16 +12,16 @@
</template>
<template v-else-if="status === PlanCheckRun_Status.DONE">
<CheckIcon
- v-if="resultStatus === PlanCheckRun_Result_Status.SUCCESS"
+ v-if="resultStatus === Advice_Level.SUCCESS"
class="text-success"
:size="16"
/>
<TriangleAlertIcon
- v-else-if="resultStatus === PlanCheckRun_Result_Status.WARNING"
+ v-else-if="resultStatus === Advice_Level.WARNING"
:size="16"
/>
<CircleAlertIcon
- v-else-if="resultStatus === PlanCheckRun_Result_Status.ERROR"
+ v-else-if="resultStatus === Advice_Level.ERROR"
:size="16"
/>
</template>
@@ -45,10 +45,10 @@ import { useI18n } from "vue-i18n";
import { TaskSpinner } from "@/components/IssueV1/components/common";
import type { PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_Type,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractPlanCheckRunUID } from "@/utils";
import { planCheckRunResultStatus } from "./common";
@@ -92,11 +92,11 @@ const tagType = computed(() => {
}
switch (planCheckRunResultStatus(latestPlanCheckRun.value)) {
- case PlanCheckRun_Result_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
return "default";
- case PlanCheckRun_Result_Status.WARNING:
+ case Advice_Level.WARNING:
return "warning";
- case PlanCheckRun_Result_Status.ERROR:
+ case Advice_Level.ERROR:
return "error";
}
// Should not reach here.
diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
index 48f588d773..bb9797feb3 100644
--- a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
@@ -14,9 +14,9 @@
:key="i"
:class="[
'py-2 px-2 space-y-2',
- row.checkResult.status === PlanCheckRun_Result_Status.ERROR &&
+ row.checkResult.status === Advice_Level.ERROR &&
'border-error border rounded',
- row.checkResult.status === PlanCheckRun_Result_Status.WARNING &&
+ row.checkResult.status === Advice_Level.WARNING &&
'border-warning border rounded',
]"
>
@@ -25,21 +25,13 @@
class="relative w-5 h-5 flex flex-shrink-0 items-center justify-center rounded-full select-none"
:class="statusIconClass(row.checkResult.status)"
>
- <template
- v-if="row.checkResult.status === PlanCheckRun_Result_Status.SUCCESS"
- >
+ <template v-if="row.checkResult.status === Advice_Level.SUCCESS">
<heroicons-solid:check class="w-4 h-4" />
</template>
- <template
- v-if="row.checkResult.status === PlanCheckRun_Result_Status.WARNING"
- >
+ <template v-if="row.checkResult.status === Advice_Level.WARNING">
<heroicons-outline:exclamation class="h-4 w-4" />
</template>
- <template
- v-else-if="
- row.checkResult.status === PlanCheckRun_Result_Status.ERROR
- "
- >
+ <template v-else-if="row.checkResult.status === Advice_Level.ERROR">
<span class="text-white font-medium text-base" aria-hidden="true">
!
</span>
@@ -136,21 +128,13 @@
class="relative w-5 h-5 flex flex-shrink-0 items-center justify-center rounded-full select-none"
:class="statusIconClass(row.checkResult.status)"
>
- <template
- v-if="row.checkResult.status === PlanCheckRun_Result_Status.SUCCESS"
- >
+ <template v-if="row.checkResult.status === Advice_Level.SUCCESS">
<heroicons-solid:check class="w-4 h-4" />
</template>
- <template
- v-if="row.checkResult.status === PlanCheckRun_Result_Status.WARNING"
- >
+ <template v-if="row.checkResult.status === Advice_Level.WARNING">
<heroicons-outline:exclamation class="h-4 w-4" />
</template>
- <template
- v-else-if="
- row.checkResult.status === PlanCheckRun_Result_Status.ERROR
- "
- >
+ <template v-else-if="row.checkResult.status === Advice_Level.ERROR">
<span class="text-white font-medium text-base" aria-hidden="true">
!
</span>
@@ -221,7 +205,7 @@
<div class="flex items-center space-x-3">
<div
class="relative w-5 h-5 flex flex-shrink-0 items-center justify-center rounded-full select-none"
- :class="statusIconClass(PlanCheckRun_Result_Status.SUCCESS)"
+ :class="statusIconClass(Advice_Level.SUCCESS)"
>
<heroicons-solid:check class="w-4 h-4" />
</div>
@@ -274,10 +258,10 @@ import type {
PlanCheckRun_Result,
} from "@/types/proto-es/v1/plan_service_pb";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_ResultSchema,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { convertPositionLineToMonacoLine } from "@/utils/v1/position";
import { usePlanCheckRunContext } from "./context";
import { OnlineMigrationDetail } from "./detail";
@@ -311,13 +295,13 @@ const state = reactive<LocalState>({
activeRule: undefined,
});
-const statusIconClass = (status: PlanCheckRun_Result_Status) => {
+const statusIconClass = (status: Advice_Level) => {
switch (status) {
- case PlanCheckRun_Result_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
return "bg-success text-white";
- case PlanCheckRun_Result_Status.WARNING:
+ case Advice_Level.WARNING:
return "bg-warning text-white";
- case PlanCheckRun_Result_Status.ERROR:
+ case Advice_Level.ERROR:
return "bg-error text-white";
}
};
@@ -328,7 +312,7 @@ const checkResultList = computed((): PlanCheckRun_Result[] => {
} else if (props.planCheckRun.status === PlanCheckRun_Status.FAILED) {
return [
create(PlanCheckRun_ResultSchema, {
- status: PlanCheckRun_Result_Status.ERROR,
+ status: Advice_Level.ERROR,
title: t("common.error"),
content: props.planCheckRun.error,
}),
@@ -336,7 +320,7 @@ const checkResultList = computed((): PlanCheckRun_Result[] => {
} else if (props.planCheckRun.status === PlanCheckRun_Status.CANCELED) {
return [
create(PlanCheckRun_ResultSchema, {
- status: PlanCheckRun_Result_Status.WARNING,
+ status: Advice_Level.WARNING,
title: t("common.canceled"),
content: props.planCheckRun.error,
}),
diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue
index b5a5b24e28..a042045a6a 100644
--- a/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue
+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue
@@ -29,10 +29,10 @@ import type { TabFilterItem } from "@/components/v2";
import { TabFilter } from "@/components/v2";
import { getDateForPbTimestampProtoEs, type ComposedDatabase } from "@/types";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Type,
type PlanCheckRun,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractPlanCheckRunUID, humanizeDate } from "@/utils";
import PlanCheckRunBadgeBar from "./PlanCheckRunBadgeBar.vue";
import PlanCheckRunDetail from "./PlanCheckRunDetail.vue";
@@ -50,9 +50,8 @@ const getInitialSelectedType = () => {
// Find the first plan check run with error or warning.
const planCheck = props.planCheckRunList.find((checkRun) =>
- [PlanCheckRun_Result_Status.ERROR, PlanCheckRun_Result_Status.WARNING].some(
- (status) =>
- checkRun.results.map((result) => result.status).includes(status)
+ [Advice_Level.ERROR, Advice_Level.WARNING].some((status) =>
+ checkRun.results.map((result) => result.status).includes(status)
)
);
if (planCheck) {
diff --git a/frontend/src/components/PlanCheckRun/common.ts b/frontend/src/components/PlanCheckRun/common.ts
index 31611180e7..5048075776 100644
--- a/frontend/src/components/PlanCheckRun/common.ts
+++ b/frontend/src/components/PlanCheckRun/common.ts
@@ -1,21 +1,21 @@
import { maxBy } from "lodash-es";
import {
- PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_Type,
type PlanCheckRun,
} from "@/types/proto-es/v1/plan_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractPlanCheckRunUID } from "@/utils";
export const planCheckRunResultStatus = (checkRun: PlanCheckRun) => {
- let status = PlanCheckRun_Result_Status.SUCCESS;
+ let status = Advice_Level.SUCCESS;
for (const result of checkRun.results) {
- if (result.status === PlanCheckRun_Result_Status.ERROR) {
- return PlanCheckRun_Result_Status.ERROR;
+ if (result.status === Advice_Level.ERROR) {
+ return Advice_Level.ERROR;
}
- if (result.status === PlanCheckRun_Result_Status.WARNING) {
- status = PlanCheckRun_Result_Status.WARNING;
+ if (result.status === Advice_Level.WARNING) {
+ status = Advice_Level.WARNING;
}
}
return status;
@@ -81,13 +81,13 @@ export const planCheckRunSummaryForCheckRunList = (
break;
case PlanCheckRun_Status.DONE:
switch (planCheckRunResultStatus(checkRun)) {
- case PlanCheckRun_Result_Status.SUCCESS:
+ case Advice_Level.SUCCESS:
summary.successCount++;
break;
- case PlanCheckRun_Result_Status.WARNING:
+ case Advice_Level.WARNING:
summary.warnCount++;
break;
- case PlanCheckRun_Result_Status.ERROR:
+ case Advice_Level.ERROR:
summary.errorCount++;
}
}
diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vue
index 872f11dce3..4b1f432cd4 100644
--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue
@@ -85,10 +85,7 @@ import {
Release_File_MigrationType,
} from "@/types/proto-es/v1/release_service_pb";
import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
-import {
- AdviceSchema,
- Advice_Status,
-} from "@/types/proto-es/v1/sql_service_pb";
+import { AdviceSchema, Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import type { Defer, VueStyle } from "@/utils";
import { defer } from "@/utils";
import ErrorList from "../misc/ErrorList.vue";
@@ -205,7 +202,7 @@ const runChecks = async () => {
advices: errors.map((err) =>
create(AdviceSchema, {
title: "Pre check",
- status: Advice_Status.WARNING,
+ status: Advice_Level.WARNING,
content: err,
})
),
@@ -239,8 +236,8 @@ const onPanelClose = () => {
const hasError = computed(() => {
return filteredAdvices.value?.some(
(advice) =>
- advice.status === Advice_Status.ERROR ||
- advice.status === Advice_Status.WARNING
+ advice.status === Advice_Level.ERROR ||
+ advice.status === Advice_Level.WARNING
);
});
diff --git a/frontend/src/components/SQLCheck/SQLCheckPanel.vue b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
index cf030906e8..23f98f5926 100644
--- a/frontend/src/components/SQLCheck/SQLCheckPanel.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
@@ -66,13 +66,11 @@ import { RiskLevel } from "@/types/proto-es/v1/common_pb";
import {
PlanCheckRunSchema,
PlanCheckRun_ResultSchema,
- PlanCheckRun_Result_Status,
PlanCheckRun_Result_SqlReviewReportSchema,
PlanCheckRun_Status,
} from "@/types/proto-es/v1/plan_service_pb";
import type { PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";
-import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import type { Defer } from "@/utils";
const props = withDefaults(
@@ -107,7 +105,7 @@ const restrictIssueCreationForSQLReview = computed((): boolean => {
const project = projectStore.getProjectByName(props.project);
return (
(project?.enforceSqlReview || false) &&
- props.advices.some((advice) => advice.status === Advice_Status.ERROR)
+ props.advices.some((advice) => advice.status === Advice_Level.ERROR)
);
});
@@ -127,16 +125,16 @@ const planCheckRun = computed((): PlanCheckRun => {
return createProto(PlanCheckRunSchema, {
status: PlanCheckRun_Status.DONE,
results: props.advices.map((advice) => {
- let status = PlanCheckRun_Result_Status.STATUS_UNSPECIFIED;
+ let status = Advice_Level.ADVICE_LEVEL_UNSPECIFIED;
switch (advice.status) {
- case Advice_Status.SUCCESS:
- status = PlanCheckRun_Result_Status.SUCCESS;
+ case Advice_Level.SUCCESS:
+ status = Advice_Level.SUCCESS;
break;
- case Advice_Status.WARNING:
- status = PlanCheckRun_Result_Status.WARNING;
+ case Advice_Level.WARNING:
+ status = Advice_Level.WARNING;
break;
- case Advice_Status.ERROR:
- status = PlanCheckRun_Result_Status.ERROR;
+ case Advice_Level.ERROR:
+ status = Advice_Level.ERROR;
break;
}
return createProto(PlanCheckRun_ResultSchema, {
diff --git a/frontend/src/components/SQLCheck/SQLCheckSummary.vue b/frontend/src/components/SQLCheck/SQLCheckSummary.vue
index 10ff3a4f70..1c8a17dbde 100644
--- a/frontend/src/components/SQLCheck/SQLCheckSummary.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckSummary.vue
@@ -17,7 +17,7 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import type { ComposedDatabase } from "@/types";
import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
type Summary = {
successCount: number;
@@ -41,13 +41,13 @@ const summary = computed(() => {
errorCount: 0,
};
props.advices.forEach((advice) => {
- if (advice.status === Advice_Status.SUCCESS) {
+ if (advice.status === Advice_Level.SUCCESS) {
summary.successCount++;
}
- if (advice.status === Advice_Status.WARNING) {
+ if (advice.status === Advice_Level.WARNING) {
summary.warningCount++;
}
- if (advice.status === Advice_Status.ERROR) {
+ if (advice.status === Advice_Level.ERROR) {
summary.errorCount++;
}
});
diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.ts
index 491c9b2757..4f0ad140b5 100644
--- a/frontend/src/composables/useExecuteSQL.ts
+++ b/frontend/src/composables/useExecuteSQL.ts
@@ -42,7 +42,7 @@ import {
} from "@/types/proto-es/v1/sql_service_pb";
import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
import {
- Advice_Status,
+ Advice_Level,
QueryOptionSchema,
} from "@/types/proto-es/v1/sql_service_pb";
import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
@@ -149,17 +149,17 @@ const useExecuteSQL = () => {
let adviceStatus: "SUCCESS" | "ERROR" | "WARNING" = "SUCCESS";
let adviceNotifyMessage = "";
for (const advice of advices) {
- if (advice.status === Advice_Status.SUCCESS) {
+ if (advice.status === Advice_Level.SUCCESS) {
continue;
}
- if (advice.status === Advice_Status.ERROR) {
+ if (advice.status === Advice_Level.ERROR) {
adviceStatus = "ERROR";
} else if (adviceStatus !== "ERROR") {
adviceStatus = "WARNING";
}
- adviceNotifyMessage += `${Advice_Status[advice.status]}: ${
+ adviceNotifyMessage += `${Advice_Level[advice.status]}: ${
advice.title
}\n`;
if (advice.content) {
@@ -389,7 +389,7 @@ const useExecuteSQL = () => {
) {
const { advices } = checkResult;
const errorAdvice = advices.find(
- (advice) => advice.status === Advice_Status.ERROR
+ (advice) => advice.status === Advice_Level.ERROR
);
if (errorAdvice) {
notifyAdvices(advices);
diff --git a/frontend/src/store/modules/v1/sql.ts b/frontend/src/store/modules/v1/sql.ts
index 60d19f58a2..0c0e944c06 100644
--- a/frontend/src/store/modules/v1/sql.ts
+++ b/frontend/src/store/modules/v1/sql.ts
@@ -15,7 +15,7 @@ import type {
import {
type Advice,
AdviceSchema,
- Advice_Status,
+ Advice_Level,
} from "@/types/proto-es/v1/sql_service_pb";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
@@ -32,7 +32,7 @@ export const getSqlReviewReports = (err: unknown): Advice[] => {
: undefined;
advices.push(
createProto(AdviceSchema, {
- status: Advice_Status.ERROR,
+ status: Advice_Level.ERROR,
code: report.code,
title: report.title || "SQL Review Failed",
content: report.content,
diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts b/frontend/src/types/proto-es/v1/plan_service_pb.d.ts
index 41a75d76ea..079586c283 100644
--- a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/plan_service_pb.d.ts
@@ -6,6 +6,7 @@ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobu
import type { Message } from "@bufbuild/protobuf";
import type { FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";
import type { DatabaseChangeType, ExportFormat, MigrationType, Position, State } from "./common_pb";
+import type { Advice_Level } from "./sql_service_pb";
import type { ChangedResources } from "./database_service_pb";
/**
@@ -857,9 +858,9 @@ export declare const PlanCheckRunSchema: GenMessage<PlanCheckRun>;
*/
export declare type PlanCheckRun_Result = Message<"bytebase.v1.PlanCheckRun.Result"> & {
/**
- * @generated from field: bytebase.v1.PlanCheckRun.Result.Status status = 1;
+ * @generated from field: bytebase.v1.Advice.Level status = 1;
*/
- status: PlanCheckRun_Result_Status;
+ status: Advice_Level;
/**
* @generated from field: string title = 2;
@@ -962,36 +963,6 @@ export declare type PlanCheckRun_Result_SqlReviewReport = Message<"bytebase.v1.P
*/
export declare const PlanCheckRun_Result_SqlReviewReportSchema: GenMessage<PlanCheckRun_Result_SqlReviewReport>;
-/**
- * @generated from enum bytebase.v1.PlanCheckRun.Result.Status
- */
-export enum PlanCheckRun_Result_Status {
- /**
- * @generated from enum value: STATUS_UNSPECIFIED = 0;
- */
- STATUS_UNSPECIFIED = 0,
-
- /**
- * @generated from enum value: ERROR = 1;
- */
- ERROR = 1,
-
- /**
- * @generated from enum value: WARNING = 2;
- */
- WARNING = 2,
-
- /**
- * @generated from enum value: SUCCESS = 3;
- */
- SUCCESS = 3,
-}
-
-/**
- * Describes the enum bytebase.v1.PlanCheckRun.Result.Status.
- */
-export declare const PlanCheckRun_Result_StatusSchema: GenEnum<PlanCheckRun_Result_Status>;
-
/**
* @generated from enum bytebase.v1.PlanCheckRun.Type
*/
diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.js b/frontend/src/types/proto-es/v1/plan_service_pb.js
index 0a9a108416..3aaa281d66 100644
--- a/frontend/src/types/proto-es/v1/plan_service_pb.js
+++ b/frontend/src/types/proto-es/v1/plan_service_pb.js
@@ -11,12 +11,13 @@ import { file_google_protobuf_field_mask, file_google_protobuf_timestamp } from
import { file_v1_annotation } from "./annotation_pb";
import { file_v1_common } from "./common_pb";
import { file_v1_database_service } from "./database_service_pb";
+import { file_v1_sql_service } from "./sql_service_pb";
/**
* Describes the file v1/plan_service.proto.
*/
export const file_v1_plan_service = /*@__PURE__*/
- fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4iZwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YA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LnBsYW5DaGVja1J1bnMubGlzdJDqMAGC0+STAi8SLS92MS97cGFyZW50PXByb2plY3RzLyovcGxhbnMvKn0vcGxhbkNoZWNrUnVucxKxAQoNUnVuUGxhbkNoZWNrcxIhLmJ5dGViYXNlLnYxLlJ1blBsYW5DaGVja3NSZXF1ZXN0GiIuYnl0ZWJhc2UudjEuUnVuUGxhbkNoZWNrc1Jlc3BvbnNlIlnaQQRuYW1liuowFGJiLnBsYW5DaGVja1J1bnMucnVukOowAYLT5JMCMDoBKiIrL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKn06cnVuUGxhbkNoZWNrcxLiAQoYQmF0Y2hDYW5jZWxQbGFuQ2hlY2tSdW5zEiwuYnl0ZWJhc2UudjEuQmF0Y2hDYW5jZWxQbGFuQ2hlY2tSdW5zUmVxdWVzdBotLmJ5dGViYXNlLnYxLkJhdGNoQ2FuY2VsUGxhbkNoZWNrUnVuc1Jlc3BvbnNlImnaQQZwYXJlbnSK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwI+OgEqIjkvdjEve3BhcmVudD1wcm9qZWN0cy8qL3BsYW5zLyp9L3BsYW5DaGVja1J1bnM6YmF0Y2hDYW5jZWxCNlo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service]);
+ fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4iZwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSE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Q9cHJvamVjdHMvKi9wbGFucy8qfS9wbGFuQ2hlY2tSdW5zErEBCg1SdW5QbGFuQ2hlY2tzEiEuYnl0ZWJhc2UudjEuUnVuUGxhbkNoZWNrc1JlcXVlc3QaIi5ieXRlYmFzZS52MS5SdW5QbGFuQ2hlY2tzUmVzcG9uc2UiWdpBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwIwOgEqIisvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qfTpydW5QbGFuQ2hlY2tzEuIBChhCYXRjaENhbmNlbFBsYW5DaGVja1J1bnMSLC5ieXRlYmFzZS52MS5CYXRjaENhbmNlbFBsYW5DaGVja1J1bnNSZXF1ZXN0Gi0uYnl0ZWJhc2UudjEuQmF0Y2hDYW5jZWxQbGFuQ2hlY2tSdW5zUmVzcG9uc2UiadpBBnBhcmVudIrqMBRiYi5wbGFuQ2hlY2tSdW5zLnJ1bpDqMAGC0+STAj46ASoiOS92MS97cGFyZW50PXByb2plY3RzLyovcGxhbnMvKn0vcGxhbkNoZWNrUnVuczpiYXRjaENhbmNlbEI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service, file_v1_sql_service]);
/**
* Describes the message bytebase.v1.GetPlanRequest.
@@ -186,18 +187,6 @@ export const PlanCheckRun_Result_SqlSummaryReportSchema = /*@__PURE__*/
export const PlanCheckRun_Result_SqlReviewReportSchema = /*@__PURE__*/
messageDesc(file_v1_plan_service, 14, 0, 1);
-/**
- * Describes the enum bytebase.v1.PlanCheckRun.Result.Status.
- */
-export const PlanCheckRun_Result_StatusSchema = /*@__PURE__*/
- enumDesc(file_v1_plan_service, 14, 0, 0);
-
-/**
- * @generated from enum bytebase.v1.PlanCheckRun.Result.Status
- */
-export const PlanCheckRun_Result_Status = /*@__PURE__*/
- tsEnum(PlanCheckRun_Result_StatusSchema);
-
/**
* Describes the enum bytebase.v1.PlanCheckRun.Type.
*/
diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
index 5f051e0a5e..25624b034d 100644
--- a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
@@ -738,11 +738,11 @@ export declare const RowValue_TimestampTZSchema: GenMessage<RowValue_TimestampTZ
*/
export declare type Advice = Message<"bytebase.v1.Advice"> & {
/**
- * The advice status.
+ * The advice level.
*
- * @generated from field: bytebase.v1.Advice.Status status = 1;
+ * @generated from field: bytebase.v1.Advice.Level status = 1;
*/
- status: Advice_Status;
+ status: Advice_Level;
/**
* The advice code.
@@ -786,36 +786,44 @@ export declare type Advice = Message<"bytebase.v1.Advice"> & {
export declare const AdviceSchema: GenMessage<Advice>;
/**
- * @generated from enum bytebase.v1.Advice.Status
+ * Level represents the severity level of the advice.
+ *
+ * @generated from enum bytebase.v1.Advice.Level
*/
-export enum Advice_Status {
+export enum Advice_Level {
/**
- * Unspecified.
+ * Unspecified advice level.
*
- * @generated from enum value: STATUS_UNSPECIFIED = 0;
+ * @generated from enum value: ADVICE_LEVEL_UNSPECIFIED = 0;
*/
- STATUS_UNSPECIFIED = 0,
+ ADVICE_LEVEL_UNSPECIFIED = 0,
/**
+ * Success status indicating the check passed without issues.
+ *
* @generated from enum value: SUCCESS = 1;
*/
SUCCESS = 1,
/**
+ * Warning status indicating potential issues that should be reviewed.
+ *
* @generated from enum value: WARNING = 2;
*/
WARNING = 2,
/**
+ * Error status indicating critical issues that must be addressed.
+ *
* @generated from enum value: ERROR = 3;
*/
ERROR = 3,
}
/**
- * Describes the enum bytebase.v1.Advice.Status.
+ * Describes the enum bytebase.v1.Advice.Level.
*/
-export declare const Advice_StatusSchema: GenEnum<Advice_Status>;
+export declare const Advice_LevelSchema: GenEnum<Advice_Level>;
/**
* @generated from message bytebase.v1.ExportRequest
diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.js b/frontend/src/types/proto-es/v1/sql_service_pb.js
index 912219956d..3490d6d96e 100644
--- a/frontend/src/types/proto-es/v1/sql_service_pb.js
+++ b/frontend/src/types/proto-es/v1/sql_service_pb.js
@@ -16,7 +16,7 @@ import { file_v1_database_service } from "./database_service_pb";
* Describes the file v1/sql_service.proto.
*/
export const file_v1_sql_service = /*@__PURE__*/
- fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEisAEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAMgASgJEg0KBWxpbWl0GAQgASgFEhMKBnNjaGVtYRgGIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgHIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lckoECAIQAyJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQihwIKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAyABKAkSDQoFbGltaXQYBCABKAUSGwoOZGF0YV9zb3VyY2VfaWQYBiABKAlCA+BBAhIPCgdleHBsYWluGAcgASgIEhMKBnNjaGVtYRgIIAEoCUgAiAEBEi4KDHF1ZXJ5X29wdGlvbhgJIAEoCzIYLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uEhYKCWNvbnRhaW5lchgKIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lckoECAIQAyJACg1RdWVyeVJlc3BvbnNlEikKB3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S9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MWIGcHJvdG8z", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service]);
+ fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEisAEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAMgASgJEg0KBWxpbWl0GAQgASgFEhMKBnNjaGVtYRgGIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgHIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lckoECAIQAyJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQihwIKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAyABKAkSDQoFbGltaXQYBCABKAUSGwoOZGF0YV9zb3VyY2VfaWQYBiABKAlCA+BBAhIPCgdleHBsYWluGAcgASgIEhMKBnNjaGVtYRgIIAEoCUgAiAEBEi4KDHF1ZXJ5X29wdGlvbhgJIAEoCzIYLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uEhYKCWNvbnRhaW5lchgKIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lckoECAIQAyJACg1RdWVyeVJlc3BvbnNlEikKB3Jlc3VsdHMYASADKAsyGC5ieXRlYmFzZS52MS5RdWVyeVJlc3VsdEoECAIQAyK2AQoLUXVlcnlPcHRpb24SSgoVcmVkaXNfcnVuX2NvbW1hbmRzX29uGAEgASgOMisuYnl0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ieXRlYmFzZS52MS5FeHBvcnRSZXNwb25zZSK2AYrqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAZjqMAGC0+STApMBOgEqWiw6ASoiJy92MS97bmFtZT1wcm9qZWN0cy8qL3JvbGxvdXRzLyp9OmV4cG9ydFo1OgEqIjAvdjEve25hbWU9cHJvamVjdHMvKi9yb2xsb3V0cy8qL3N0YWdlcy8qfTpleHBvcnQiKS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06ZXhwb3J0EnIKBUNoZWNrEhkuYnl0ZWJhc2UudjEuQ2hlY2tSZXF1ZXN0GhouYnl0ZWJhc2UudjEuQ2hlY2tSZXNwb25zZSIyiuowEmJiLmRhdGFiYXNlcy5jaGVja5DqMAGC0+STAhI6ASoiDS92MS9zcWwvY2hlY2sSYAoGUHJldHR5EhouYnl0ZWJhc2UudjEuUHJldHR5UmVxdWVzdBobLmJ5dGViYXNlLnYxLlByZXR0eVJlc3BvbnNlIh2A6jABgtPkkwITOgEqIg4vdjEvc3FsL3ByZXR0eRKBAQoMRGlmZk1ldGFkYXRhEiAuYnl0ZWJhc2UudjEuRGlmZk1ldGFkYXRhUmVxdWVzdBohLmJ5dGViYXNlLnYxLkRpZmZNZXRhZGF0YVJlc3BvbnNlIiyA6jABgtPkkwIiOgEqIh0vdjEvc2NoZW1hRGVzaWduOmRpZmZNZXRhZGF0YRJ4CgxBSUNvbXBsZXRpb24SIC5ieXRlYmFzZS52MS5BSUNvbXBsZXRpb25SZXF1ZXN0GiEuYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVzcG9uc2UiI5DqMAKC0+STAhk6ASoiFC92MS9zcWwvYWlDb21wbGV0aW9uQjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service]);
/**
* Describes the message bytebase.v1.AdminExecuteRequest.
@@ -141,16 +141,18 @@ export const AdviceSchema = /*@__PURE__*/
messageDesc(file_v1_sql_service, 9);
/**
- * Describes the enum bytebase.v1.Advice.Status.
+ * Describes the enum bytebase.v1.Advice.Level.
*/
-export const Advice_StatusSchema = /*@__PURE__*/
+export const Advice_LevelSchema = /*@__PURE__*/
enumDesc(file_v1_sql_service, 9, 0);
/**
- * @generated from enum bytebase.v1.Advice.Status
+ * Level represents the severity level of the advice.
+ *
+ * @generated from enum bytebase.v1.Advice.Level
*/
-export const Advice_Status = /*@__PURE__*/
- tsEnum(Advice_StatusSchema);
+export const Advice_Level = /*@__PURE__*/
+ tsEnum(Advice_LevelSchema);
/**
* Describes the message bytebase.v1.ExportRequest.
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/AdviceItem.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/AdviceItem.vue
index 497a1a96ef..70ffcf1119 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/AdviceItem.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/AdviceItem.vue
@@ -5,11 +5,11 @@
>
<div class="shrink-0 flex items-center h-5">
<CircleAlertIcon
- v-if="advice.status === Advice_Status.ERROR"
+ v-if="advice.status === Advice_Level.ERROR"
class="w-5 h-5 text-error"
/>
<CircleAlertIcon
- v-if="advice.status === Advice_Status.WARNING"
+ v-if="advice.status === Advice_Level.WARNING"
class="w-5 h-5 text-warning"
/>
</div>
@@ -32,7 +32,7 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import { positionWithOffset } from "@/components/MonacoEditor/utils";
import type { SQLEditorQueryParams } from "@/types";
-import { Advice_Status, type Advice } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import { useSQLEditorContext } from "@/views/sql-editor/context";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue
index b23e84b3c8..e55e7c265e 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue
@@ -35,7 +35,7 @@ import { BBAttention } from "@/bbkit";
import { useAppFeature, useSQLEditorTabStore } from "@/store";
import type { SQLEditorQueryParams, SQLResultSetV1 } from "@/types";
import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";
-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { useSQLResultViewContext } from "../context";
import AdviceItem from "./AdviceItem.vue";
import PostgresError from "./PostgresError.vue";
@@ -66,7 +66,7 @@ const showRunAnywayButton = computed(() => {
if (resultSet.status === Code.PermissionDenied) return false;
if (resultSet.error.includes("resource not found")) return false;
return resultSet.advices.some(
- (advice) => advice.status === Advice_Status.WARNING
+ (advice) => advice.status === Advice_Level.WARNING
);
});
diff --git a/frontend/src/views/sql-editor/EditorPanel/StandardPanel/SQLEditor.vue b/frontend/src/views/sql-editor/EditorPanel/StandardPanel/SQLEditor.vue
index 9b9557880e..13226dba6c 100644
--- a/frontend/src/views/sql-editor/EditorPanel/StandardPanel/SQLEditor.vue
+++ b/frontend/src/views/sql-editor/EditorPanel/StandardPanel/SQLEditor.vue
@@ -62,7 +62,7 @@ import {
} from "@/store";
import type { SQLDialect, SQLEditorQueryParams, SQLEditorTab } from "@/types";
import { dialectOfEngineV1 } from "@/types";
-import { Advice_Status, type Advice } from "@/types/proto-es/v1/sql_service_pb";
+import { Advice_Level, type Advice } from "@/types/proto-es/v1/sql_service_pb";
import {
nextAnimationFrame,
useInstanceV1EditorLanguage,
@@ -351,7 +351,7 @@ const updateAdvices = (
source.unshift(advice.title);
}
return {
- severity: advice.status === Advice_Status.ERROR ? "ERROR" : "WARNING",
+ severity: advice.status === Advice_Level.ERROR ? "ERROR" : "WARNING",
message: advice.content,
source: source.join(" "),
startLineNumber: startLine,
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 56135829a7..11b3152b89 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -12303,10 +12303,10 @@ components:
properties:
status:
enum:
- - STATUS_UNSPECIFIED
- - ERROR
- - WARNING
+ - ADVICE_LEVEL_UNSPECIFIED
- SUCCESS
+ - WARNING
+ - ERROR
type: string
format: enum
title:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 2dee340697..7f3975b5e2 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -428,6 +428,47 @@
- [OrgPolicyService](#bytebase-v1-OrgPolicyService)
+- [v1/sql_service.proto](#v1_sql_service-proto)
+ - [AICompletionRequest](#bytebase-v1-AICompletionRequest)
+ - [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message)
+ - [AICompletionResponse](#bytebase-v1-AICompletionResponse)
+ - [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate)
+ - [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content)
+ - [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part)
+ - [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest)
+ - [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse)
+ - [Advice](#bytebase-v1-Advice)
+ - [CheckRequest](#bytebase-v1-CheckRequest)
+ - [CheckResponse](#bytebase-v1-CheckResponse)
+ - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
+ - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
+ - [ExportRequest](#bytebase-v1-ExportRequest)
+ - [ExportResponse](#bytebase-v1-ExportResponse)
+ - [MaskingReason](#bytebase-v1-MaskingReason)
+ - [PrettyRequest](#bytebase-v1-PrettyRequest)
+ - [PrettyResponse](#bytebase-v1-PrettyResponse)
+ - [QueryHistory](#bytebase-v1-QueryHistory)
+ - [QueryOption](#bytebase-v1-QueryOption)
+ - [QueryRequest](#bytebase-v1-QueryRequest)
+ - [QueryResponse](#bytebase-v1-QueryResponse)
+ - [QueryResult](#bytebase-v1-QueryResult)
+ - [QueryResult.Message](#bytebase-v1-QueryResult-Message)
+ - [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError)
+ - [QueryRow](#bytebase-v1-QueryRow)
+ - [RowValue](#bytebase-v1-RowValue)
+ - [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp)
+ - [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ)
+ - [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest)
+ - [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse)
+
+ - [Advice.Level](#bytebase-v1-Advice-Level)
+ - [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType)
+ - [QueryHistory.Type](#bytebase-v1-QueryHistory-Type)
+ - [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn)
+ - [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level)
+
+ - [SQLService](#bytebase-v1-SQLService)
+
- [v1/plan_service.proto](#v1_plan_service-proto)
- [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest)
- [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse)
@@ -456,7 +497,6 @@
- [SearchPlansResponse](#bytebase-v1-SearchPlansResponse)
- [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest)
- - [PlanCheckRun.Result.Status](#bytebase-v1-PlanCheckRun-Result-Status)
- [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status)
- [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type)
@@ -493,47 +533,6 @@
- [ProjectService](#bytebase-v1-ProjectService)
-- [v1/sql_service.proto](#v1_sql_service-proto)
- - [AICompletionRequest](#bytebase-v1-AICompletionRequest)
- - [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message)
- - [AICompletionResponse](#bytebase-v1-AICompletionResponse)
- - [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate)
- - [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content)
- - [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part)
- - [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest)
- - [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse)
- - [Advice](#bytebase-v1-Advice)
- - [CheckRequest](#bytebase-v1-CheckRequest)
- - [CheckResponse](#bytebase-v1-CheckResponse)
- - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
- - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
- - [ExportRequest](#bytebase-v1-ExportRequest)
- - [ExportResponse](#bytebase-v1-ExportResponse)
- - [MaskingReason](#bytebase-v1-MaskingReason)
- - [PrettyRequest](#bytebase-v1-PrettyRequest)
- - [PrettyResponse](#bytebase-v1-PrettyResponse)
- - [QueryHistory](#bytebase-v1-QueryHistory)
- - [QueryOption](#bytebase-v1-QueryOption)
- - [QueryRequest](#bytebase-v1-QueryRequest)
- - [QueryResponse](#bytebase-v1-QueryResponse)
- - [QueryResult](#bytebase-v1-QueryResult)
- - [QueryResult.Message](#bytebase-v1-QueryResult-Message)
- - [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError)
- - [QueryRow](#bytebase-v1-QueryRow)
- - [RowValue](#bytebase-v1-RowValue)
- - [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp)
- - [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ)
- - [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest)
- - [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse)
-
- - [Advice.Status](#bytebase-v1-Advice-Status)
- - [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType)
- - [QueryHistory.Type](#bytebase-v1-QueryHistory-Type)
- - [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn)
- - [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level)
-
- - [SQLService](#bytebase-v1-SQLService)
-
- [v1/release_service.proto](#v1_release_service-proto)
- [CheckReleaseRequest](#bytebase-v1-CheckReleaseRequest)
- [CheckReleaseResponse](#bytebase-v1-CheckReleaseResponse)
@@ -7159,741 +7158,773 @@ OrgPolicyService manages organizational policies at various resource levels.
-<a name="v1_plan_service-proto"></a>
+<a name="v1_sql_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/plan_service.proto
+## v1/sql_service.proto
-<a name="bytebase-v1-BatchCancelPlanCheckRunsRequest"></a>
+<a name="bytebase-v1-AICompletionRequest"></a>
-### BatchCancelPlanCheckRunsRequest
+### AICompletionRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The name of the parent of the planChecks. Format: projects/{project}/plans/{plan} |
-| plan_check_runs | [string](#string) | repeated | TODO(d): update this API. The planCheckRuns to cancel. Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
+| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
-<a name="bytebase-v1-BatchCancelPlanCheckRunsResponse"></a>
+<a name="bytebase-v1-AICompletionRequest-Message"></a>
+
+### AICompletionRequest.Message
-### BatchCancelPlanCheckRunsResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| role | [string](#string) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-CreatePlanRequest"></a>
-### CreatePlanRequest
+<a name="bytebase-v1-AICompletionResponse"></a>
+
+### AICompletionResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
+| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
-<a name="bytebase-v1-GetPlanRequest"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
-### GetPlanRequest
+### AICompletionResponse.Candidate
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
+| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
-<a name="bytebase-v1-ListPlanCheckRunsRequest"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
-### ListPlanCheckRunsRequest
+### AICompletionResponse.Candidate.Content
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plan check runs. Format: projects/{project}/plans/{plan} |
-| page_size | [int32](#int32) | | Pagination is not currently implemented. This field is reserved for future use. The maximum number of plan check runs to return. The service may return fewer than this value. If unspecified, at most 10 plan check runs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | Pagination is not currently implemented. This field is reserved for future use. A page token, received from a previous `ListPlanCheckRuns` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlanCheckRuns` must match the call that provided the page token. |
-| latest_only | [bool](#bool) | | If set to true, only the latest plan check run will be returned. |
-| filter | [string](#string) | | Filter is used to filter plan check runs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters: - status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values. - result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
-
-For example: status in [&#34;DONE&#34;, &#34;FAILED&#34;] status == &#34;RUNNING&#34; result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;] result_status == &#34;WARNING&#34; |
+| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
-<a name="bytebase-v1-ListPlanCheckRunsResponse"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
-### ListPlanCheckRunsResponse
+### AICompletionResponse.Candidate.Content.Part
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plan_check_runs | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | repeated | The plan check runs from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| text | [string](#string) | | |
-<a name="bytebase-v1-ListPlansRequest"></a>
+<a name="bytebase-v1-AdminExecuteRequest"></a>
-### ListPlansRequest
+### AdminExecuteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-ListPlansResponse"></a>
+<a name="bytebase-v1-AdminExecuteResponse"></a>
-### ListPlansResponse
+### AdminExecuteResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-Plan"></a>
+<a name="bytebase-v1-Advice"></a>
-### Plan
+### Advice
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
-| state | [State](#bytebase-v1-State) | | The state of the plan. |
-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
-| rollout | [string](#string) | | The rollout associated with the plan. Can be empty. Format: projects/{project}/rollouts/{rollout} |
-| title | [string](#string) | | The title of the plan. |
-| description | [string](#string) | | The description of the plan. |
-| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
-| deployment | [Plan.Deployment](#bytebase-v1-Plan-Deployment) | | |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
+| code | [int32](#int32) | | The advice code. |
+| title | [string](#string) | | The advice title. |
+| content | [string](#string) | | The advice content. |
+| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
+<a name="bytebase-v1-CheckRequest"></a>
-### Plan.ChangeDatabaseConfig
+### CheckRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
-| type | [DatabaseChangeType](#bytebase-v1-DatabaseChangeType) | | Type is the database change type. |
-| migration_type | [MigrationType](#bytebase-v1-MigrationType) | | migration_type is the migration type for imperative schema migration. It is only set when type is MIGRATE. |
-| ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |
-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
+| name | [string](#string) | | The database name to check against. Format: instances/{instance}/databases/{database} |
+| statement | [string](#string) | | |
+| change_type | [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType) | | |
-<a name="bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry"></a>
+<a name="bytebase-v1-CheckResponse"></a>
-### Plan.ChangeDatabaseConfig.GhostFlagsEntry
+### CheckResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| advices | [Advice](#bytebase-v1-Advice) | repeated | |
+| affected_rows | [int64](#int64) | | The count of affected rows of the statement on the target database. |
-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
+<a name="bytebase-v1-DiffMetadataRequest"></a>
-### Plan.CreateDatabaseConfig
+### DiffMetadataRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
-| database | [string](#string) | | The name of the database to create. |
-| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
-| character_set | [string](#string) | | character_set is the character set of the database. |
-| collation | [string](#string) | | collation is the collation of the database. |
-| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
+| source_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
+| target_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
+| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
-<a name="bytebase-v1-Plan-Deployment"></a>
+<a name="bytebase-v1-DiffMetadataResponse"></a>
-### Plan.Deployment
+### DiffMetadataResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| environments | [string](#string) | repeated | The environments deploy order. |
-| database_group_mappings | [Plan.Deployment.DatabaseGroupMapping](#bytebase-v1-Plan-Deployment-DatabaseGroupMapping) | repeated | The database group mapping. |
+| diff | [string](#string) | | The diff of the metadata. |
-<a name="bytebase-v1-Plan-Deployment-DatabaseGroupMapping"></a>
+<a name="bytebase-v1-ExportRequest"></a>
-### Plan.Deployment.DatabaseGroupMapping
+### ExportRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_group | [string](#string) | | Format: projects/{project}/databaseGroups/{databaseGroup}. |
-| databases | [string](#string) | repeated | Format: instances/{instance-id}/databases/{database-name}. |
+| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/rollouts/{rollout} Format: projects/{project}/rollouts/{rollout}/stages/{stage} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
+| password | [string](#string) | | The zip password provide by users. |
+| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-<a name="bytebase-v1-Plan-ExportDataConfig"></a>
+<a name="bytebase-v1-ExportResponse"></a>
-### Plan.ExportDataConfig
+### ExportResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
-| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
+| content | [bytes](#bytes) | | The export file content. |
-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+<a name="bytebase-v1-MaskingReason"></a>
-### Plan.PlanCheckRunStatusCountEntry
+### MaskingReason
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [int32](#int32) | | |
-
+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
+| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
+| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
+| algorithm | [string](#string) | | The masking algorithm used. |
+| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
+| classification_level | [string](#string) | | Whether masking was due to classification level. |
+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-<a name="bytebase-v1-Plan-Spec"></a>
-### Plan.Spec
+<a name="bytebase-v1-PrettyRequest"></a>
+
+### PrettyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
-| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
-| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
-| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | |
+| current_schema | [string](#string) | | The SDL format SQL schema information that was dumped from a database engine. This information will be sorted to match the order of statements in the userSchema. |
+| expected_schema | [string](#string) | | The expected SDL schema. This schema will be checked for correctness and normalized. |
-<a name="bytebase-v1-PlanCheckRun"></a>
+<a name="bytebase-v1-PrettyResponse"></a>
-### PlanCheckRun
+### PrettyResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
-| type | [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type) | | |
-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
-| target | [string](#string) | | Format: instances/{instance}/databases/{database} |
-| sheet | [string](#string) | | Format: project/{project}/sheets/{sheet} |
-| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
-| error | [string](#string) | | error is set if the Status is FAILED. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| current_schema | [string](#string) | | The pretty-formatted version of current schema. |
+| expected_schema | [string](#string) | | The expected SDL schema after normalizing. |
-<a name="bytebase-v1-PlanCheckRun-Result"></a>
+<a name="bytebase-v1-QueryHistory"></a>
-### PlanCheckRun.Result
+### QueryHistory
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [PlanCheckRun.Result.Status](#bytebase-v1-PlanCheckRun-Result-Status) | | |
-| title | [string](#string) | | |
-| content | [string](#string) | | |
-| code | [int32](#int32) | | |
-| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
-| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
+| name | [string](#string) | | The name for the query history. Format: queryHistories/{uid} |
+| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
+| creator | [string](#string) | | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| statement | [string](#string) | | |
+| error | [string](#string) | optional | |
+| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
+| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
+<a name="bytebase-v1-QueryOption"></a>
-### PlanCheckRun.Result.SqlReviewReport
+### QueryOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| line | [int32](#int32) | | |
-| column | [int32](#int32) | | |
-| start_position | [Position](#bytebase-v1-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |
-| end_position | [Position](#bytebase-v1-Position) | | |
+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
+<a name="bytebase-v1-QueryRequest"></a>
-### PlanCheckRun.Result.SqlSummaryReport
+### QueryRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
-| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
+| explain | [bool](#bool) | | Explain the statement. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-RunPlanChecksRequest"></a>
+<a name="bytebase-v1-QueryResponse"></a>
-### RunPlanChecksRequest
+### QueryResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
-| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |
-
-
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-RunPlanChecksResponse"></a>
-### RunPlanChecksResponse
+<a name="bytebase-v1-QueryResult"></a>
+### QueryResult
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| column_names | [string](#string) | repeated | Column names of the query result. |
+| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
+| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
+| rows_count | [int64](#int64) | | |
+| error | [string](#string) | | The error message if the query failed. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
+| statement | [string](#string) | | The query statement for the result. |
+| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
+| allow_export | [bool](#bool) | | The query result is allowed to be exported or not. |
+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
+| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
-<a name="bytebase-v1-SearchPlansRequest"></a>
-### SearchPlansRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchPlans` call. Provide this to retrieve the subsequent page.
+<a name="bytebase-v1-QueryResult-Message"></a>
-When paginating, all other parameters provided to `SearchPlans` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+### QueryResult.Message
-Supported filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; has_pipeline == false &amp;&amp; has_issue == true title == &#34;My Plan&#34; title.matches(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-SearchPlansResponse"></a>
-### SearchPlansResponse
+<a name="bytebase-v1-QueryResult-PostgresError"></a>
+### QueryResult.PostgresError
+refer https://www.postgresql.org/docs/11/protocol-error-fields.html
+for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| severity | [string](#string) | | |
+| code | [string](#string) | | |
+| message | [string](#string) | | |
+| detail | [string](#string) | | |
+| hint | [string](#string) | | |
+| position | [int32](#int32) | | |
+| internal_position | [int32](#int32) | | |
+| internal_query | [string](#string) | | |
+| where | [string](#string) | | |
+| schema_name | [string](#string) | | |
+| table_name | [string](#string) | | |
+| column_name | [string](#string) | | |
+| data_type_name | [string](#string) | | |
+| constraint_name | [string](#string) | | |
+| file | [string](#string) | | |
+| line | [int32](#int32) | | |
+| routine | [string](#string) | | |
-<a name="bytebase-v1-UpdatePlanRequest"></a>
+<a name="bytebase-v1-QueryRow"></a>
-### UpdatePlanRequest
+### QueryRow
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
-The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
-
+<a name="bytebase-v1-RowValue"></a>
+### RowValue
-<a name="bytebase-v1-PlanCheckRun-Result-Status"></a>
-### PlanCheckRun.Result.Status
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
+| bool_value | [bool](#bool) | | |
+| bytes_value | [bytes](#bytes) | | |
+| double_value | [double](#double) | | |
+| float_value | [float](#float) | | |
+| int32_value | [int32](#int32) | | |
+| int64_value | [int64](#int64) | | |
+| string_value | [string](#string) | | |
+| uint32_value | [uint32](#uint32) | | |
+| uint64_value | [uint64](#uint64) | | |
+| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
+| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |
+| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| ERROR | 1 | |
-| WARNING | 2 | |
-| SUCCESS | 3 | |
-<a name="bytebase-v1-PlanCheckRun-Status"></a>
-### PlanCheckRun.Status
+<a name="bytebase-v1-RowValue-Timestamp"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| RUNNING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
-| CANCELED | 4 | |
+### RowValue.Timestamp
-<a name="bytebase-v1-PlanCheckRun-Type"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
-### PlanCheckRun.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified check type. |
-| DATABASE_STATEMENT_FAKE_ADVISE | 1 | Fake advise check for testing purposes without executing against database. |
-| DATABASE_STATEMENT_ADVISE | 3 | SQL review check that analyzes statements against configured SQL review rules. |
-| DATABASE_STATEMENT_SUMMARY_REPORT | 5 | Summary report check that generates impact analysis for the statements. |
-| DATABASE_CONNECT | 6 | Connection check that verifies database connectivity. |
-| DATABASE_GHOST_SYNC | 7 | Ghost sync check that validates gh-ost online schema change compatibility. |
-
-
+<a name="bytebase-v1-RowValue-TimestampTZ"></a>
+### RowValue.TimestampTZ
-<a name="bytebase-v1-PlanService"></a>
-### PlanService
-PlanService manages deployment plans for database changes.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
-| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
-| SearchPlans | [SearchPlansRequest](#bytebase-v1-SearchPlansRequest) | [SearchPlansResponse](#bytebase-v1-SearchPlansResponse) | Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.plans.get |
-| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
-| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
-| ListPlanCheckRuns | [ListPlanCheckRunsRequest](#bytebase-v1-ListPlanCheckRunsRequest) | [ListPlanCheckRunsResponse](#bytebase-v1-ListPlanCheckRunsResponse) | Lists plan check runs for a deployment plan. Permissions required: bb.planCheckRuns.list |
-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
-| BatchCancelPlanCheckRuns | [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest) | [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse) | Cancels multiple plan check runs. Permissions required: bb.planCheckRuns.run |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
+| offset | [int32](#int32) | | The offset is in seconds east of UTC |
+| accuracy | [int32](#int32) | | |
-
-<a name="v1_project_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/project_service.proto
+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
+### SearchQueryHistoriesRequest
-<a name="bytebase-v1-Activity"></a>
-### Activity
-Activity types for webhook notifications.
-TODO(zp): move to activity later.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
+| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.matches()&#34; operator.
+For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.matches(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) |
-<a name="bytebase-v1-AddWebhookRequest"></a>
-### AddWebhookRequest
+
+
+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
+
+### SearchQueryHistoriesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |
+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
+| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |
+
-<a name="bytebase-v1-BatchDeleteProjectsRequest"></a>
-### BatchDeleteProjectsRequest
+<a name="bytebase-v1-Advice-Level"></a>
+### Advice.Level
+Level represents the severity level of the advice.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
+| SUCCESS | 1 | Success status indicating the check passed without issues. |
+| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
+| ERROR | 3 | Error status indicating critical issues that must be addressed. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
+<a name="bytebase-v1-CheckRequest-ChangeType"></a>
+### CheckRequest.ChangeType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGE_TYPE_UNSPECIFIED | 0 | |
+| DDL | 1 | |
+| DDL_GHOST | 2 | |
+| DML | 3 | |
+| SQL_EDITOR | 4 | |
-<a name="bytebase-v1-BatchGetIamPolicyRequest"></a>
-### BatchGetIamPolicyRequest
+<a name="bytebase-v1-QueryHistory-Type"></a>
+### QueryHistory.Type
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| scope | [string](#string) | | The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. |
-| names | [string](#string) | repeated | |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
+| QUERY | 1 | Query execution for data retrieval. |
+| EXPORT | 2 | Data export operation to file. |
+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
+### QueryOption.RedisRunCommandsOn
-<a name="bytebase-v1-BatchGetIamPolicyResponse"></a>
-### BatchGetIamPolicyResponse
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
+| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
+| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| policy_results | [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult) | repeated | The policy results for each requested project. |
+<a name="bytebase-v1-QueryResult-Message-Level"></a>
+### QueryResult.Message.Level
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
+| INFO | 1 | Informational message. |
+| WARNING | 2 | Warning message indicating potential issues. |
+| DEBUG | 3 | Debug message for development and troubleshooting. |
+| LOG | 4 | General log message. |
+| NOTICE | 5 | Notice message for important information. |
+| EXCEPTION | 6 | Exception message indicating error conditions. |
+
-<a name="bytebase-v1-BatchGetIamPolicyResponse-PolicyResult"></a>
+
-### BatchGetIamPolicyResponse.PolicyResult
-Result for a single project&#39;s IAM policy.
+<a name="bytebase-v1-SQLService"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The project resource name. |
-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | The IAM policy for the project. |
+### SQLService
+SQLService executes SQL queries and manages query operations.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
+| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
+| Check | [CheckRequest](#bytebase-v1-CheckRequest) | [CheckResponse](#bytebase-v1-CheckResponse) | Validates SQL statements against review rules. Permissions required: bb.databases.check |
+| Pretty | [PrettyRequest](#bytebase-v1-PrettyRequest) | [PrettyResponse](#bytebase-v1-PrettyResponse) | Formats and normalizes SQL schema definitions. Permissions required: None |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |
+| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
+
+<a name="v1_plan_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
-<a name="bytebase-v1-CreateProjectRequest"></a>
+## v1/plan_service.proto
-### CreateProjectRequest
+<a name="bytebase-v1-BatchCancelPlanCheckRunsRequest"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| project | [Project](#bytebase-v1-Project) | | The project to create. |
-| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project&#39;s resource name.
+### BatchCancelPlanCheckRunsRequest
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The name of the parent of the planChecks. Format: projects/{project}/plans/{plan} |
+| plan_check_runs | [string](#string) | repeated | TODO(d): update this API. The planCheckRuns to cancel. Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
-<a name="bytebase-v1-DeleteProjectRequest"></a>
-### DeleteProjectRequest
+<a name="bytebase-v1-BatchCancelPlanCheckRunsResponse"></a>
+### BatchCancelPlanCheckRunsResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. |
-<a name="bytebase-v1-GetProjectRequest"></a>
+<a name="bytebase-v1-CreatePlanRequest"></a>
-### GetProjectRequest
+### CreatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |
+| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
-<a name="bytebase-v1-Label"></a>
+<a name="bytebase-v1-GetPlanRequest"></a>
+
+### GetPlanRequest
-### Label
-A label for categorizing and organizing issues.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| value | [string](#string) | | The label value/name. |
-| color | [string](#string) | | The color code for the label (e.g., hex color). |
-| group | [string](#string) | | The group this label belongs to. |
+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
-<a name="bytebase-v1-ListProjectsRequest"></a>
+<a name="bytebase-v1-ListPlanCheckRunsRequest"></a>
-### ListProjectsRequest
+### ListPlanCheckRunsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.
+| parent | [string](#string) | | The parent, which owns this collection of plan check runs. Format: projects/{project}/plans/{plan} |
+| page_size | [int32](#int32) | | Pagination is not currently implemented. This field is reserved for future use. The maximum number of plan check runs to return. The service may return fewer than this value. If unspecified, at most 10 plan check runs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | Pagination is not currently implemented. This field is reserved for future use. A page token, received from a previous `ListPlanCheckRuns` call. Provide this to retrieve the subsequent page.
-When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
-| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). |
+When paginating, all other parameters provided to `ListPlanCheckRuns` must match the call that provided the page token. |
+| latest_only | [bool](#bool) | | If set to true, only the latest plan check run will be returned. |
+| filter | [string](#string) | | Filter is used to filter plan check runs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters: - status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values. - result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+For example: status in [&#34;DONE&#34;, &#34;FAILED&#34;] status == &#34;RUNNING&#34; result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;] result_status == &#34;WARNING&#34; |
-<a name="bytebase-v1-ListProjectsResponse"></a>
-### ListProjectsResponse
+<a name="bytebase-v1-ListPlanCheckRunsResponse"></a>
+
+### ListPlanCheckRunsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
+| plan_check_runs | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | repeated | The plan check runs from the specified request. |
| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
@@ -7901,944 +7932,891 @@ When paginating, all other parameters provided to `ListProjects` must match the
-<a name="bytebase-v1-Project"></a>
+<a name="bytebase-v1-ListPlansRequest"></a>
-### Project
+### ListPlansRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project. Format: projects/{project} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |
-| title | [string](#string) | | The title or name of a project. It&#39;s not unique within the workspace. |
-| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |
-| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |
-| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |
-| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |
-| allow_modify_statement | [bool](#bool) | | Allow modifying SQL statements after issue is created. |
-| auto_resolve_issue | [bool](#bool) | | Enable automatic issue resolution when tasks complete. |
-| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |
-| auto_enable_backup | [bool](#bool) | | Whether to automatically enable backup for database changes. |
-| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue with data migration. |
-| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. |
-| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |
-| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |
-| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |
-| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |
-| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } |
-| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
-<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>
-### Project.ExecutionRetryPolicy
-Execution retry policy configuration.
+<a name="bytebase-v1-ListPlansResponse"></a>
+
+### ListPlansResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |
+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-Project-LabelsEntry"></a>
+<a name="bytebase-v1-Plan"></a>
-### Project.LabelsEntry
+### Plan
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
+| state | [State](#bytebase-v1-State) | | The state of the plan. |
+| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
+| rollout | [string](#string) | | The rollout associated with the plan. Can be empty. Format: projects/{project}/rollouts/{rollout} |
+| title | [string](#string) | | The title of the plan. |
+| description | [string](#string) | | The description of the plan. |
+| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
+| deployment | [Plan.Deployment](#bytebase-v1-Plan-Deployment) | | |
-<a name="bytebase-v1-RemoveWebhookRequest"></a>
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
-### RemoveWebhookRequest
+### Plan.ChangeDatabaseConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
+| type | [DatabaseChangeType](#bytebase-v1-DatabaseChangeType) | | Type is the database change type. |
+| migration_type | [MigrationType](#bytebase-v1-MigrationType) | | migration_type is the migration type for imperative schema migration. It is only set when type is MIGRATE. |
+| ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |
+| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
-<a name="bytebase-v1-SearchProjectsRequest"></a>
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry"></a>
-### SearchProjectsRequest
+### Plan.ChangeDatabaseConfig.GhostFlagsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
-| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters: - name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example: name = &#34;project name&#34; name.matches(&#34;project name&#34;) resource_id = &#34;project id&#34; resource_id.matches(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name = &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;) name.matches(&#34;project name&#34;) || resource_id = &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-SearchProjectsResponse"></a>
+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
-### SearchProjectsResponse
+### Plan.CreateDatabaseConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
+| database | [string](#string) | | The name of the database to create. |
+| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
+| character_set | [string](#string) | | character_set is the character set of the database. |
+| collation | [string](#string) | | collation is the collation of the database. |
+| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-<a name="bytebase-v1-TestWebhookRequest"></a>
+<a name="bytebase-v1-Plan-Deployment"></a>
-### TestWebhookRequest
+### Plan.Deployment
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |
+| environments | [string](#string) | repeated | The environments deploy order. |
+| database_group_mappings | [Plan.Deployment.DatabaseGroupMapping](#bytebase-v1-Plan-Deployment-DatabaseGroupMapping) | repeated | The database group mapping. |
-<a name="bytebase-v1-TestWebhookResponse"></a>
+<a name="bytebase-v1-Plan-Deployment-DatabaseGroupMapping"></a>
-### TestWebhookResponse
+### Plan.Deployment.DatabaseGroupMapping
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| error | [string](#string) | | The result of the test, empty if the test is successful. |
+| database_group | [string](#string) | | Format: projects/{project}/databaseGroups/{databaseGroup}. |
+| databases | [string](#string) | repeated | Format: instances/{instance-id}/databases/{database-name}. |
-<a name="bytebase-v1-UndeleteProjectRequest"></a>
+<a name="bytebase-v1-Plan-ExportDataConfig"></a>
-### UndeleteProjectRequest
+### Plan.ExportDataConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |
-
-
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
+| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
-<a name="bytebase-v1-UpdateProjectRequest"></a>
-### UpdateProjectRequest
+
+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+
+### Plan.PlanCheckRunStatusCountEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [Project](#bytebase-v1-Project) | | The project to update.
-
-The project&#39;s `name` field is used to identify the project to update. Format: projects/{project} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |
+| key | [string](#string) | | |
+| value | [int32](#int32) | | |
-<a name="bytebase-v1-UpdateWebhookRequest"></a>
+<a name="bytebase-v1-Plan-Spec"></a>
-### UpdateWebhookRequest
+### Plan.Spec
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |
+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
+| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
+| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
+| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
-<a name="bytebase-v1-Webhook"></a>
+<a name="bytebase-v1-PlanCheckRun"></a>
-### Webhook
+### PlanCheckRun
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |
-| type | [Webhook.Type](#bytebase-v1-Webhook-Type) | | type is the type of the webhook. |
-| title | [string](#string) | | title is the title of the webhook. |
-| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |
-| direct_message | [bool](#bool) | | if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work. |
-| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - TYPE_ISSUE_CREATED - TYPE_ISSUE_STATUS_UPDATE - TYPE_ISSUE_PIPELINE_STAGE_UPDATE - TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE - TYPE_ISSUE_FIELD_UPDATE - TYPE_ISSUE_COMMENT_CREATE |
-
-
-
-
-
-
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
+| type | [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type) | | |
+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
+| target | [string](#string) | | Format: instances/{instance}/databases/{database} |
+| sheet | [string](#string) | | Format: project/{project}/sheets/{sheet} |
+| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
+| error | [string](#string) | | error is set if the Status is FAILED. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-<a name="bytebase-v1-Activity-Type"></a>
-### Activity.Type
-Activity type enumeration.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| NOTIFY_ISSUE_APPROVED | 23 | Notifications via webhooks.
-NOTIFY_ISSUE_APPROVED represents the issue approved notification. |
-| NOTIFY_PIPELINE_ROLLOUT | 24 | NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification. |
-| ISSUE_CREATE | 1 | Issue related activity types.
-ISSUE_CREATE represents creating an issue. |
-| ISSUE_COMMENT_CREATE | 2 | ISSUE_COMMENT_CREATE represents commenting on an issue. |
-| ISSUE_FIELD_UPDATE | 3 | ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc. |
-| ISSUE_STATUS_UPDATE | 4 | ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now. |
-| ISSUE_APPROVAL_NOTIFY | 21 | ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. |
-| ISSUE_PIPELINE_STAGE_STATUS_UPDATE | 5 | ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. |
-| ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE | 22 | ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. |
+<a name="bytebase-v1-PlanCheckRun-Result"></a>
+### PlanCheckRun.Result
-<a name="bytebase-v1-Webhook-Type"></a>
-### Webhook.Type
-Webhook integration type.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
+| title | [string](#string) | | |
+| content | [string](#string) | | |
+| code | [int32](#int32) | | |
+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| SLACK | 1 | Slack integration. |
-| DISCORD | 2 | Discord integration. |
-| TEAMS | 3 | Microsoft Teams integration. |
-| DINGTALK | 4 | DingTalk integration. |
-| FEISHU | 5 | Feishu integration. |
-| WECOM | 6 | WeCom (WeChat Work) integration. |
-| LARK | 8 | Lark integration. |
-
-
-<a name="bytebase-v1-ProjectService"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
-### ProjectService
-ProjectService manages projects that group databases and changes.
+### PlanCheckRun.Result.SqlReviewReport
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |
-| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |
-| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |
-| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |
-| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project&#39;s properties. Permissions required: bb.projects.update |
-| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |
-| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |
-| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |
-| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |
-| BatchGetIamPolicy | [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest) | [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse) | Deprecated. No permission check implemented. Permissions required: None |
-| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |
-| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |
-| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |
-| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |
-| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| line | [int32](#int32) | | |
+| column | [int32](#int32) | | |
+| start_position | [Position](#bytebase-v1-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="v1_sql_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/sql_service.proto
-<a name="bytebase-v1-AICompletionRequest"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
-### AICompletionRequest
+### PlanCheckRun.Result.SqlSummaryReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
+| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
+| affected_rows | [int64](#int64) | | |
+| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
-<a name="bytebase-v1-AICompletionRequest-Message"></a>
+<a name="bytebase-v1-RunPlanChecksRequest"></a>
-### AICompletionRequest.Message
+### RunPlanChecksRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | |
-| content | [string](#string) | | |
-
-
+| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
+| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |
-<a name="bytebase-v1-AICompletionResponse"></a>
-### AICompletionResponse
+<a name="bytebase-v1-RunPlanChecksResponse"></a>
+### RunPlanChecksResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
-<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
+<a name="bytebase-v1-SearchPlansRequest"></a>
-### AICompletionResponse.Candidate
+### SearchPlansRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchPlans` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchPlans` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; has_pipeline == false &amp;&amp; has_issue == true title == &#34;My Plan&#34; title.matches(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
-### AICompletionResponse.Candidate.Content
+
+<a name="bytebase-v1-SearchPlansResponse"></a>
+
+### SearchPlansResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
+<a name="bytebase-v1-UpdatePlanRequest"></a>
-### AICompletionResponse.Candidate.Content.Part
+### UpdatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| text | [string](#string) | | |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-AdminExecuteRequest"></a>
+
-### AdminExecuteRequest
+<a name="bytebase-v1-PlanCheckRun-Status"></a>
+### PlanCheckRun.Status
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| RUNNING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+| CANCELED | 4 | |
+<a name="bytebase-v1-PlanCheckRun-Type"></a>
+### PlanCheckRun.Type
-<a name="bytebase-v1-AdminExecuteResponse"></a>
-### AdminExecuteResponse
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified check type. |
+| DATABASE_STATEMENT_FAKE_ADVISE | 1 | Fake advise check for testing purposes without executing against database. |
+| DATABASE_STATEMENT_ADVISE | 3 | SQL review check that analyzes statements against configured SQL review rules. |
+| DATABASE_STATEMENT_SUMMARY_REPORT | 5 | Summary report check that generates impact analysis for the statements. |
+| DATABASE_CONNECT | 6 | Connection check that verifies database connectivity. |
+| DATABASE_GHOST_SYNC | 7 | Ghost sync check that validates gh-ost online schema change compatibility. |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
+
+<a name="bytebase-v1-PlanService"></a>
+### PlanService
+PlanService manages deployment plans for database changes.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
+| SearchPlans | [SearchPlansRequest](#bytebase-v1-SearchPlansRequest) | [SearchPlansResponse](#bytebase-v1-SearchPlansResponse) | Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.plans.get |
+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
+| ListPlanCheckRuns | [ListPlanCheckRunsRequest](#bytebase-v1-ListPlanCheckRunsRequest) | [ListPlanCheckRunsResponse](#bytebase-v1-ListPlanCheckRunsResponse) | Lists plan check runs for a deployment plan. Permissions required: bb.planCheckRuns.list |
+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
+| BatchCancelPlanCheckRuns | [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest) | [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse) | Cancels multiple plan check runs. Permissions required: bb.planCheckRuns.run |
+
-<a name="bytebase-v1-Advice"></a>
-### Advice
+<a name="v1_project_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/project_service.proto
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| status | [Advice.Status](#bytebase-v1-Advice-Status) | | The advice status. |
-| code | [int32](#int32) | | The advice code. |
-| title | [string](#string) | | The advice title. |
-| content | [string](#string) | | The advice content. |
-| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
-| end_position | [Position](#bytebase-v1-Position) | | |
+<a name="bytebase-v1-Activity"></a>
+### Activity
+Activity types for webhook notifications.
+TODO(zp): move to activity later.
-<a name="bytebase-v1-CheckRequest"></a>
-### CheckRequest
+<a name="bytebase-v1-AddWebhookRequest"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The database name to check against. Format: instances/{instance}/databases/{database} |
-| statement | [string](#string) | | |
-| change_type | [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-CheckResponse"></a>
-
-### CheckResponse
+### AddWebhookRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| advices | [Advice](#bytebase-v1-Advice) | repeated | |
-| affected_rows | [int64](#int64) | | The count of affected rows of the statement on the target database. |
+| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |
-<a name="bytebase-v1-DiffMetadataRequest"></a>
+<a name="bytebase-v1-BatchDeleteProjectsRequest"></a>
-### DiffMetadataRequest
+### BatchDeleteProjectsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
-| source_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
-| target_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
-| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
+| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |
+| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
-<a name="bytebase-v1-DiffMetadataResponse"></a>
+<a name="bytebase-v1-BatchGetIamPolicyRequest"></a>
-### DiffMetadataResponse
+### BatchGetIamPolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The diff of the metadata. |
+| scope | [string](#string) | | The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. |
+| names | [string](#string) | repeated | |
-<a name="bytebase-v1-ExportRequest"></a>
+<a name="bytebase-v1-BatchGetIamPolicyResponse"></a>
-### ExportRequest
+### BatchGetIamPolicyResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/rollouts/{rollout} Format: projects/{project}/rollouts/{rollout}/stages/{stage} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
-| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
-| password | [string](#string) | | The zip password provide by users. |
-| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-
+| policy_results | [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult) | repeated | The policy results for each requested project. |
-<a name="bytebase-v1-ExportResponse"></a>
-### ExportResponse
+<a name="bytebase-v1-BatchGetIamPolicyResponse-PolicyResult"></a>
+### BatchGetIamPolicyResponse.PolicyResult
+Result for a single project&#39;s IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [bytes](#bytes) | | The export file content. |
+| project | [string](#string) | | The project resource name. |
+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | The IAM policy for the project. |
-<a name="bytebase-v1-MaskingReason"></a>
+<a name="bytebase-v1-CreateProjectRequest"></a>
-### MaskingReason
+### CreateProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
-| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
-| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
-| algorithm | [string](#string) | | The masking algorithm used. |
-| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
-| classification_level | [string](#string) | | Whether masking was due to classification level. |
-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
+| project | [Project](#bytebase-v1-Project) | | The project to create. |
+| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-<a name="bytebase-v1-PrettyRequest"></a>
-### PrettyRequest
+<a name="bytebase-v1-DeleteProjectRequest"></a>
+
+### DeleteProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| engine | [Engine](#bytebase-v1-Engine) | | |
-| current_schema | [string](#string) | | The SDL format SQL schema information that was dumped from a database engine. This information will be sorted to match the order of statements in the userSchema. |
-| expected_schema | [string](#string) | | The expected SDL schema. This schema will be checked for correctness and normalized. |
+| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |
+| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. |
-<a name="bytebase-v1-PrettyResponse"></a>
+<a name="bytebase-v1-GetProjectRequest"></a>
-### PrettyResponse
+### GetProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| current_schema | [string](#string) | | The pretty-formatted version of current schema. |
-| expected_schema | [string](#string) | | The expected SDL schema after normalizing. |
-
+| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |
-<a name="bytebase-v1-QueryHistory"></a>
-### QueryHistory
+<a name="bytebase-v1-Label"></a>
+### Label
+A label for categorizing and organizing issues.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name for the query history. Format: queryHistories/{uid} |
-| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
-| creator | [string](#string) | | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| statement | [string](#string) | | |
-| error | [string](#string) | optional | |
-| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
-| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
+| value | [string](#string) | | The label value/name. |
+| color | [string](#string) | | The color code for the label (e.g., hex color). |
+| group | [string](#string) | | The group this label belongs to. |
-<a name="bytebase-v1-QueryOption"></a>
+<a name="bytebase-v1-ListProjectsRequest"></a>
-### QueryOption
+### ListProjectsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
+| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). |
-<a name="bytebase-v1-QueryRequest"></a>
-### QueryRequest
+<a name="bytebase-v1-ListProjectsResponse"></a>
+
+### ListProjectsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
-| explain | [bool](#bool) | | Explain the statement. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-QueryResponse"></a>
+<a name="bytebase-v1-Project"></a>
-### QueryResponse
+### Project
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-
+| name | [string](#string) | | The name of the project. Format: projects/{project} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |
+| title | [string](#string) | | The title or name of a project. It&#39;s not unique within the workspace. |
+| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |
+| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |
+| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |
+| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |
+| allow_modify_statement | [bool](#bool) | | Allow modifying SQL statements after issue is created. |
+| auto_resolve_issue | [bool](#bool) | | Enable automatic issue resolution when tasks complete. |
+| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |
+| auto_enable_backup | [bool](#bool) | | Whether to automatically enable backup for database changes. |
+| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue with data migration. |
+| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. |
+| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |
+| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |
+| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |
+| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |
+| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } |
+| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |
-<a name="bytebase-v1-QueryResult"></a>
-### QueryResult
+<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>
+### Project.ExecutionRetryPolicy
+Execution retry policy configuration.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| column_names | [string](#string) | repeated | Column names of the query result. |
-| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
-| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
-| rows_count | [int64](#int64) | | |
-| error | [string](#string) | | The error message if the query failed. |
-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
-| statement | [string](#string) | | The query statement for the result. |
-| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
-| allow_export | [bool](#bool) | | The query result is allowed to be exported or not. |
-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
+| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |
-<a name="bytebase-v1-QueryResult-Message"></a>
+<a name="bytebase-v1-Project-LabelsEntry"></a>
-### QueryResult.Message
+### Project.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
-| content | [string](#string) | | |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-QueryResult-PostgresError"></a>
+<a name="bytebase-v1-RemoveWebhookRequest"></a>
+
+### RemoveWebhookRequest
-### QueryResult.PostgresError
-refer https://www.postgresql.org/docs/11/protocol-error-fields.html
-for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| severity | [string](#string) | | |
-| code | [string](#string) | | |
-| message | [string](#string) | | |
-| detail | [string](#string) | | |
-| hint | [string](#string) | | |
-| position | [int32](#int32) | | |
-| internal_position | [int32](#int32) | | |
-| internal_query | [string](#string) | | |
-| where | [string](#string) | | |
-| schema_name | [string](#string) | | |
-| table_name | [string](#string) | | |
-| column_name | [string](#string) | | |
-| data_type_name | [string](#string) | | |
-| constraint_name | [string](#string) | | |
-| file | [string](#string) | | |
-| line | [int32](#int32) | | |
-| routine | [string](#string) | | |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |
-<a name="bytebase-v1-QueryRow"></a>
+<a name="bytebase-v1-SearchProjectsRequest"></a>
-### QueryRow
+### SearchProjectsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
+| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
+For example: name = &#34;project name&#34; name.matches(&#34;project name&#34;) resource_id = &#34;project id&#34; resource_id.matches(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name = &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;) name.matches(&#34;project name&#34;) || resource_id = &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |
-<a name="bytebase-v1-RowValue"></a>
-### RowValue
+
+
+<a name="bytebase-v1-SearchProjectsResponse"></a>
+
+### SearchProjectsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
-| bool_value | [bool](#bool) | | |
-| bytes_value | [bytes](#bytes) | | |
-| double_value | [double](#double) | | |
-| float_value | [float](#float) | | |
-| int32_value | [int32](#int32) | | |
-| int64_value | [int64](#int64) | | |
-| string_value | [string](#string) | | |
-| uint32_value | [uint32](#uint32) | | |
-| uint64_value | [uint64](#uint64) | | |
-| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
-| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |
-| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-RowValue-Timestamp"></a>
+<a name="bytebase-v1-TestWebhookRequest"></a>
-### RowValue.Timestamp
+### TestWebhookRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
+| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |
-<a name="bytebase-v1-RowValue-TimestampTZ"></a>
+<a name="bytebase-v1-TestWebhookResponse"></a>
-### RowValue.TimestampTZ
+### TestWebhookResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
-| offset | [int32](#int32) | | The offset is in seconds east of UTC |
-| accuracy | [int32](#int32) | | |
+| error | [string](#string) | | The result of the test, empty if the test is successful. |
-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
+<a name="bytebase-v1-UndeleteProjectRequest"></a>
-### SearchQueryHistoriesRequest
+### UndeleteProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.matches()&#34; operator.
-
-For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.matches(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) |
+| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |
-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
+<a name="bytebase-v1-UpdateProjectRequest"></a>
-### SearchQueryHistoriesResponse
+### UpdateProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
-| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |
+| project | [Project](#bytebase-v1-Project) | | The project to update.
+The project&#39;s `name` field is used to identify the project to update. Format: projects/{project} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |
-
-<a name="bytebase-v1-Advice-Status"></a>
+<a name="bytebase-v1-UpdateWebhookRequest"></a>
-### Advice.Status
+### UpdateWebhookRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified. |
-| SUCCESS | 1 | |
-| WARNING | 2 | |
-| ERROR | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-CheckRequest-ChangeType"></a>
-### CheckRequest.ChangeType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CHANGE_TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | |
-| DDL_GHOST | 2 | |
-| DML | 3 | |
-| SQL_EDITOR | 4 | |
+<a name="bytebase-v1-Webhook"></a>
+### Webhook
-<a name="bytebase-v1-QueryHistory-Type"></a>
-### QueryHistory.Type
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |
+| type | [Webhook.Type](#bytebase-v1-Webhook-Type) | | type is the type of the webhook. |
+| title | [string](#string) | | title is the title of the webhook. |
+| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |
+| direct_message | [bool](#bool) | | if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work. |
+| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - TYPE_ISSUE_CREATED - TYPE_ISSUE_STATUS_UPDATE - TYPE_ISSUE_PIPELINE_STAGE_UPDATE - TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE - TYPE_ISSUE_FIELD_UPDATE - TYPE_ISSUE_COMMENT_CREATE |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
-| QUERY | 1 | Query execution for data retrieval. |
-| EXPORT | 2 | Data export operation to file. |
-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
-### QueryOption.RedisRunCommandsOn
+
+
+<a name="bytebase-v1-Activity-Type"></a>
+
+### Activity.Type
+Activity type enumeration.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
-| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
-| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| NOTIFY_ISSUE_APPROVED | 23 | Notifications via webhooks.
+NOTIFY_ISSUE_APPROVED represents the issue approved notification. |
+| NOTIFY_PIPELINE_ROLLOUT | 24 | NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification. |
+| ISSUE_CREATE | 1 | Issue related activity types.
+ISSUE_CREATE represents creating an issue. |
+| ISSUE_COMMENT_CREATE | 2 | ISSUE_COMMENT_CREATE represents commenting on an issue. |
+| ISSUE_FIELD_UPDATE | 3 | ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc. |
+| ISSUE_STATUS_UPDATE | 4 | ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now. |
+| ISSUE_APPROVAL_NOTIFY | 21 | ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. |
+| ISSUE_PIPELINE_STAGE_STATUS_UPDATE | 5 | ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. |
+| ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE | 22 | ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. |
-<a name="bytebase-v1-QueryResult-Message-Level"></a>
-### QueryResult.Message.Level
+<a name="bytebase-v1-Webhook-Type"></a>
+
+### Webhook.Type
+Webhook integration type.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
-| INFO | 1 | Informational message. |
-| WARNING | 2 | Warning message indicating potential issues. |
-| DEBUG | 3 | Debug message for development and troubleshooting. |
-| LOG | 4 | General log message. |
-| NOTICE | 5 | Notice message for important information. |
-| EXCEPTION | 6 | Exception message indicating error conditions. |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| SLACK | 1 | Slack integration. |
+| DISCORD | 2 | Discord integration. |
+| TEAMS | 3 | Microsoft Teams integration. |
+| DINGTALK | 4 | DingTalk integration. |
+| FEISHU | 5 | Feishu integration. |
+| WECOM | 6 | WeCom (WeChat Work) integration. |
+| LARK | 8 | Lark integration. |
@@ -8846,21 +8824,28 @@ For example: project == &#34;projects/{project}&#34; database == &#34;instances/
-<a name="bytebase-v1-SQLService"></a>
+<a name="bytebase-v1-ProjectService"></a>
-### SQLService
-SQLService executes SQL queries and manages query operations.
+### ProjectService
+ProjectService manages projects that group databases and changes.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
-| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
-| Check | [CheckRequest](#bytebase-v1-CheckRequest) | [CheckResponse](#bytebase-v1-CheckResponse) | Validates SQL statements against review rules. Permissions required: bb.databases.check |
-| Pretty | [PrettyRequest](#bytebase-v1-PrettyRequest) | [PrettyResponse](#bytebase-v1-PrettyResponse) | Formats and normalizes SQL schema definitions. Permissions required: None |
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |
-| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
+| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |
+| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |
+| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |
+| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |
+| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project&#39;s properties. Permissions required: bb.projects.update |
+| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |
+| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |
+| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |
+| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |
+| BatchGetIamPolicy | [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest) | [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse) | Deprecated. No permission check implemented. Permissions required: None |
+| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |
+| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |
+| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |
+| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |
+| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index ee8d90cc43..b07a4021a2 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -1812,408 +1812,404 @@
<li>
- <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>
+ <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest"><span class="badge">M</span>BatchCancelPlanCheckRunsRequest</a>
+ <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse"><span class="badge">M</span>BatchCancelPlanCheckRunsResponse</a>
+ <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a>
</li>
<li>
- <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a>
+ <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a>
</li>
<li>
- <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlanCheckRunsRequest"><span class="badge">M</span>ListPlanCheckRunsRequest</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlanCheckRunsResponse"><span class="badge">M</span>ListPlanCheckRunsResponse</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part"><span class="badge">M</span>AICompletionResponse.Candidate.Content.Part</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a>
+ <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a>
+ <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a>
+ <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a>
+ <a href="#bytebase.v1.CheckRequest"><span class="badge">M</span>CheckRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry"><span class="badge">M</span>Plan.ChangeDatabaseConfig.GhostFlagsEntry</a>
+ <a href="#bytebase.v1.CheckResponse"><span class="badge">M</span>CheckResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a>
+ <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.Deployment"><span class="badge">M</span>Plan.Deployment</a>
+ <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping"><span class="badge">M</span>Plan.Deployment.DatabaseGroupMapping</a>
+ <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a>
+ <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a>
+ <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a>
+ <a href="#bytebase.v1.PrettyRequest"><span class="badge">M</span>PrettyRequest</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a>
+ <a href="#bytebase.v1.PrettyResponse"><span class="badge">M</span>PrettyResponse</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a>
+ <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a>
+ <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a>
+ <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a>
+ <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a>
</li>
<li>
- <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a>
+ <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a>
</li>
<li>
- <a href="#bytebase.v1.SearchPlansRequest"><span class="badge">M</span>SearchPlansRequest</a>
+ <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a>
</li>
<li>
- <a href="#bytebase.v1.SearchPlansResponse"><span class="badge">M</span>SearchPlansResponse</a>
+ <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a>
</li>
<li>
- <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a>
+ <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a>
</li>
-
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.Status"><span class="badge">E</span>PlanCheckRun.Result.Status</a>
+ <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a>
+ <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Type"><span class="badge">E</span>PlanCheckRun.Type</a>
+ <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a>
</li>
-
-
<li>
- <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a>
+ <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fproject_service.proto">v1/project_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.Activity"><span class="badge">M</span>Activity</a>
+ <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a>
</li>
- <li>
- <a href="#bytebase.v1.AddWebhookRequest"><span class="badge">M</span>AddWebhookRequest</a>
- </li>
<li>
- <a href="#bytebase.v1.BatchDeleteProjectsRequest"><span class="badge">M</span>BatchDeleteProjectsRequest</a>
+ <a href="#bytebase.v1.Advice.Level"><span class="badge">E</span>Advice.Level</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyRequest"><span class="badge">M</span>BatchGetIamPolicyRequest</a>
+ <a href="#bytebase.v1.CheckRequest.ChangeType"><span class="badge">E</span>CheckRequest.ChangeType</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyResponse"><span class="badge">M</span>BatchGetIamPolicyResponse</a>
+ <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult"><span class="badge">M</span>BatchGetIamPolicyResponse.PolicyResult</a>
+ <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a>
</li>
<li>
- <a href="#bytebase.v1.CreateProjectRequest"><span class="badge">M</span>CreateProjectRequest</a>
+ <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.DeleteProjectRequest"><span class="badge">M</span>DeleteProjectRequest</a>
+ <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.GetProjectRequest"><span class="badge">M</span>GetProjectRequest</a>
+ <a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest"><span class="badge">M</span>BatchCancelPlanCheckRunsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Label"><span class="badge">M</span>Label</a>
+ <a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse"><span class="badge">M</span>BatchCancelPlanCheckRunsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.ListProjectsRequest"><span class="badge">M</span>ListProjectsRequest</a>
+ <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListProjectsResponse"><span class="badge">M</span>ListProjectsResponse</a>
+ <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Project"><span class="badge">M</span>Project</a>
+ <a href="#bytebase.v1.ListPlanCheckRunsRequest"><span class="badge">M</span>ListPlanCheckRunsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
+ <a href="#bytebase.v1.ListPlanCheckRunsResponse"><span class="badge">M</span>ListPlanCheckRunsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Project.LabelsEntry"><span class="badge">M</span>Project.LabelsEntry</a>
+ <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RemoveWebhookRequest"><span class="badge">M</span>RemoveWebhookRequest</a>
+ <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a>
</li>
<li>
- <a href="#bytebase.v1.SearchProjectsRequest"><span class="badge">M</span>SearchProjectsRequest</a>
+ <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a>
</li>
<li>
- <a href="#bytebase.v1.SearchProjectsResponse"><span class="badge">M</span>SearchProjectsResponse</a>
+ <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a>
</li>
<li>
- <a href="#bytebase.v1.TestWebhookRequest"><span class="badge">M</span>TestWebhookRequest</a>
+ <a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry"><span class="badge">M</span>Plan.ChangeDatabaseConfig.GhostFlagsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.TestWebhookResponse"><span class="badge">M</span>TestWebhookResponse</a>
+ <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a>
</li>
<li>
- <a href="#bytebase.v1.UndeleteProjectRequest"><span class="badge">M</span>UndeleteProjectRequest</a>
+ <a href="#bytebase.v1.Plan.Deployment"><span class="badge">M</span>Plan.Deployment</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateProjectRequest"><span class="badge">M</span>UpdateProjectRequest</a>
+ <a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping"><span class="badge">M</span>Plan.Deployment.DatabaseGroupMapping</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateWebhookRequest"><span class="badge">M</span>UpdateWebhookRequest</a>
+ <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a>
</li>
<li>
- <a href="#bytebase.v1.Webhook"><span class="badge">M</span>Webhook</a>
+ <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a>
</li>
-
<li>
- <a href="#bytebase.v1.Activity.Type"><span class="badge">E</span>Activity.Type</a>
+ <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a>
</li>
<li>
- <a href="#bytebase.v1.Webhook.Type"><span class="badge">E</span>Webhook.Type</a>
+ <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a>
</li>
-
-
<li>
- <a href="#bytebase.v1.ProjectService"><span class="badge">S</span>ProjectService</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a>
+ <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a>
+ <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a>
+ <a href="#bytebase.v1.SearchPlansRequest"><span class="badge">M</span>SearchPlansRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part"><span class="badge">M</span>AICompletionResponse.Candidate.Content.Part</a>
+ <a href="#bytebase.v1.SearchPlansResponse"><span class="badge">M</span>SearchPlansResponse</a>
</li>
<li>
- <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a>
+ <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a>
</li>
+
<li>
- <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a>
+ <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a>
</li>
<li>
- <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a>
+ <a href="#bytebase.v1.PlanCheckRun.Type"><span class="badge">E</span>PlanCheckRun.Type</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.CheckRequest"><span class="badge">M</span>CheckRequest</a>
+ <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fproject_service.proto">v1/project_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.CheckResponse"><span class="badge">M</span>CheckResponse</a>
+ <a href="#bytebase.v1.Activity"><span class="badge">M</span>Activity</a>
</li>
<li>
- <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
+ <a href="#bytebase.v1.AddWebhookRequest"><span class="badge">M</span>AddWebhookRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
+ <a href="#bytebase.v1.BatchDeleteProjectsRequest"><span class="badge">M</span>BatchDeleteProjectsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>
+ <a href="#bytebase.v1.BatchGetIamPolicyRequest"><span class="badge">M</span>BatchGetIamPolicyRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a>
+ <a href="#bytebase.v1.BatchGetIamPolicyResponse"><span class="badge">M</span>BatchGetIamPolicyResponse</a>
</li>
<li>
- <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a>
+ <a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult"><span class="badge">M</span>BatchGetIamPolicyResponse.PolicyResult</a>
</li>
<li>
- <a href="#bytebase.v1.PrettyRequest"><span class="badge">M</span>PrettyRequest</a>
+ <a href="#bytebase.v1.CreateProjectRequest"><span class="badge">M</span>CreateProjectRequest</a>
</li>
<li>
- <a href="#bytebase.v1.PrettyResponse"><span class="badge">M</span>PrettyResponse</a>
+ <a href="#bytebase.v1.DeleteProjectRequest"><span class="badge">M</span>DeleteProjectRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a>
+ <a href="#bytebase.v1.GetProjectRequest"><span class="badge">M</span>GetProjectRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a>
+ <a href="#bytebase.v1.Label"><span class="badge">M</span>Label</a>
</li>
<li>
- <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a>
+ <a href="#bytebase.v1.ListProjectsRequest"><span class="badge">M</span>ListProjectsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a>
+ <a href="#bytebase.v1.ListProjectsResponse"><span class="badge">M</span>ListProjectsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a>
+ <a href="#bytebase.v1.Project"><span class="badge">M</span>Project</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a>
+ <a href="#bytebase.v1.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a>
+ <a href="#bytebase.v1.Project.LabelsEntry"><span class="badge">M</span>Project.LabelsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a>
+ <a href="#bytebase.v1.RemoveWebhookRequest"><span class="badge">M</span>RemoveWebhookRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>
+ <a href="#bytebase.v1.SearchProjectsRequest"><span class="badge">M</span>SearchProjectsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a>
+ <a href="#bytebase.v1.SearchProjectsResponse"><span class="badge">M</span>SearchProjectsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a>
+ <a href="#bytebase.v1.TestWebhookRequest"><span class="badge">M</span>TestWebhookRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a>
+ <a href="#bytebase.v1.TestWebhookResponse"><span class="badge">M</span>TestWebhookResponse</a>
</li>
<li>
- <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a>
+ <a href="#bytebase.v1.UndeleteProjectRequest"><span class="badge">M</span>UndeleteProjectRequest</a>
</li>
-
<li>
- <a href="#bytebase.v1.Advice.Status"><span class="badge">E</span>Advice.Status</a>
+ <a href="#bytebase.v1.UpdateProjectRequest"><span class="badge">M</span>UpdateProjectRequest</a>
</li>
<li>
- <a href="#bytebase.v1.CheckRequest.ChangeType"><span class="badge">E</span>CheckRequest.ChangeType</a>
+ <a href="#bytebase.v1.UpdateWebhookRequest"><span class="badge">M</span>UpdateWebhookRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a>
+ <a href="#bytebase.v1.Webhook"><span class="badge">M</span>Webhook</a>
</li>
+
<li>
- <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a>
+ <a href="#bytebase.v1.Activity.Type"><span class="badge">E</span>Activity.Type</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a>
+ <a href="#bytebase.v1.Webhook.Type"><span class="badge">E</span>Webhook.Type</a>
</li>
<li>
- <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a>
+ <a href="#bytebase.v1.ProjectService"><span class="badge">S</span>ProjectService</a>
</li>
</ul>
@@ -20376,12 +20372,12 @@ Permissions required: bb.policies.delete</p></td>
<div class="file-heading">
- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</h3>
+ <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>
<p></p>
@@ -20392,20 +20388,10 @@ Permissions required: bb.policies.delete</p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the parent of the planChecks.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>plan_check_runs</td>
- <td><a href="#string">string</a></td>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
<td>repeated</td>
- <td><p>TODO(d): update this API.
-The planCheckRuns to cancel.
-Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20415,14 +20401,7 @@ Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
- <h3 id="bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
+ <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
<p></p>
@@ -20433,18 +20412,17 @@ Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>role</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project where this plan will be created.
-Format: projects/{project} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The plan to create. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20454,7 +20432,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
+ <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
<p></p>
@@ -20465,11 +20443,11 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the plan to retrieve.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td>candidates</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
+ <td>repeated</td>
+ <td><p>candidates is used for results with multiple choices and candidates. Used
+for OpenAI and Gemini. </p></td>
</tr>
</tbody>
@@ -20479,7 +20457,7 @@ Format: projects/{project}/plans/{plan} </p></td>
- <h3 id="bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</h3>
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
<p></p>
@@ -20490,59 +20468,34 @@ Format: projects/{project}/plans/{plan} </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of plan check runs.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>content</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
<td></td>
- <td><p>Pagination is not currently implemented. This field is reserved for future use.
-The maximum number of plan check runs to return. The service may return fewer than
-this value.
-If unspecified, at most 10 plan check runs will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Pagination is not currently implemented. This field is reserved for future use.
-A page token, received from a previous `ListPlanCheckRuns` call.
-Provide this to retrieve the subsequent page.
+ </tbody>
+ </table>
-When paginating, all other parameters provided to `ListPlanCheckRuns` must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>latest_only</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, only the latest plan check run will be returned. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter plan check runs returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
-Supported filters:
-- status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values.
-- result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <p></p>
-For example:
-status in [&#34;DONE&#34;, &#34;FAILED&#34;]
-status == &#34;RUNNING&#34;
-result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;]
-result_status == &#34;WARNING&#34; </p></td>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parts</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
+ <td>repeated</td>
+ <td><p>parts is used for a result content with multiple parts. </p></td>
</tr>
</tbody>
@@ -20552,7 +20505,7 @@ result_status == &#34;WARNING&#34; </p></td>
- <h3 id="bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</h3>
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
<p></p>
@@ -20563,18 +20516,10 @@ result_status == &#34;WARNING&#34; </p></td>
<tbody>
<tr>
- <td>plan_check_runs</td>
- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
- <td>repeated</td>
- <td><p>The plan check runs from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20584,7 +20529,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
+ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
<p></p>
@@ -20595,33 +20540,41 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>page_size</td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL statement to execute. </p></td>
+ </tr>
+
+ <tr>
+ <td>limit</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of plans to return. The service may return fewer than
-this value.
-If unspecified, at most 10 plans will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListPlans` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlans` must match
-the call that provided the page token. </p></td>
+ <td>optional</td>
+ <td><p>The default schema to execute the statement. Equals to the current schema
+in Oracle and search path in Postgres. </p></td>
+ </tr>
+
+ <tr>
+ <td>container</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
</tbody>
@@ -20631,7 +20584,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
<p></p>
@@ -20642,18 +20595,10 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>plans</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
<td>repeated</td>
- <td><p>The plans from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The query results. </p></td>
</tr>
</tbody>
@@ -20663,7 +20608,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Plan">Plan</h3>
+ <h3 id="bytebase.v1.Advice">Advice</h3>
<p></p>
@@ -20674,96 +20619,44 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the plan.
-`plan` is a system generated ID.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p>The state of the plan. </p></td>
- </tr>
-
- <tr>
- <td>issue</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
<td></td>
- <td><p>The issue associated with the plan.
-Can be empty.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The advice level. </p></td>
</tr>
<tr>
- <td>rollout</td>
- <td><a href="#string">string</a></td>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The rollout associated with the plan.
-Can be empty.
-Format: projects/{project}/rollouts/{rollout} </p></td>
+ <td><p>The advice code. </p></td>
</tr>
<tr>
<td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the plan. </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description of the plan. </p></td>
- </tr>
-
- <tr>
- <td>specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
- <td><p>The deployment specs for the plan. </p></td>
+ <td><p>The advice title. </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The advice content. </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>plan_check_run_status_count</td>
- <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
- <td>repeated</td>
- <td><p>The status count of the latest plan check runs.
-Keys are:
-- SUCCESS
-- WARNING
-- ERROR
-- RUNNING </p></td>
+ <td><p>The start_position is inclusive and the end_position is exclusive.
+TODO: use range instead </p></td>
</tr>
<tr>
- <td>deployment</td>
- <td><a href="#bytebase.v1.Plan.Deployment">Plan.Deployment</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -20775,7 +20668,7 @@ Keys are:
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <h3 id="bytebase.v1.CheckRequest">CheckRequest</h3>
<p></p>
@@ -20786,57 +20679,25 @@ Keys are:
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>The database name to check against.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>release</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the release.
-Format: projects/{project}/releases/{release} </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DatabaseChangeType">DatabaseChangeType</a></td>
- <td></td>
- <td><p>Type is the database change type. </p></td>
- </tr>
-
- <tr>
- <td>migration_type</td>
- <td><a href="#bytebase.v1.MigrationType">MigrationType</a></td>
- <td></td>
- <td><p>migration_type is the migration type for imperative schema migration.
-It is only set when type is MIGRATE. </p></td>
- </tr>
-
- <tr>
- <td>ghost_flags</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
- <td>repeated</td>
<td><p> </p></td>
</tr>
<tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>change_type</td>
+ <td><a href="#bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</a></td>
<td></td>
- <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20846,7 +20707,7 @@ It is only set when type is MIGRATE. </p></td>
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</h3>
+ <h3 id="bytebase.v1.CheckResponse">CheckResponse</h3>
<p></p>
@@ -20857,17 +20718,17 @@ It is only set when type is MIGRATE. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
+ <td>advices</td>
+ <td><a href="#bytebase.v1.Advice">Advice</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The count of affected rows of the statement on the target database. </p></td>
</tr>
</tbody>
@@ -20877,7 +20738,7 @@ It is only set when type is MIGRATE. </p></td>
- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
<p></p>
@@ -20888,62 +20749,46 @@ It is only set when type is MIGRATE. </p></td>
<tbody>
<tr>
- <td>target</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the instance on which the database is created.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to create. </p></td>
- </tr>
-
- <tr>
- <td>table</td>
- <td><a href="#string">string</a></td>
+ <td>source_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
- <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
-For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
+ <td><p>The metadata of the source schema. </p></td>
</tr>
<tr>
- <td>character_set</td>
- <td><a href="#string">string</a></td>
+ <td>target_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
- <td><p>character_set is the character set of the database. </p></td>
+ <td><p>The metadata of the target schema. </p></td>
</tr>
<tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
+ <td>source_catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
<td></td>
- <td><p>collation is the collation of the database. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>cluster</td>
- <td><a href="#string">string</a></td>
+ <td>target_catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
<td></td>
- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
<td></td>
- <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
+ <td><p>The database engine of the schema. </p></td>
</tr>
<tr>
- <td>environment</td>
- <td><a href="#string">string</a></td>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td><p>If false, we will build the raw common by classification in database
+config. </p></td>
</tr>
</tbody>
@@ -20953,7 +20798,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.Deployment">Plan.Deployment</h3>
+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
<p></p>
@@ -20964,17 +20809,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>environments</td>
+ <td>diff</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The environments deploy order. </p></td>
- </tr>
-
- <tr>
- <td>database_group_mappings</td>
- <td><a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</a></td>
- <td>repeated</td>
- <td><p>The database group mapping. </p></td>
+ <td></td>
+ <td><p>The diff of the metadata. </p></td>
</tr>
</tbody>
@@ -20984,7 +20822,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</h3>
+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
<p></p>
@@ -20995,66 +20833,68 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>database_group</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
+ <td><p>The name is the resource name to execute the export against.
+Format: instances/{instance}/databases/{database}
+Format: instances/{instance}
+Format: projects/{project}/rollouts/{rollout}
+Format: projects/{project}/rollouts/{rollout}/stages/{stage} </p></td>
</tr>
<tr>
- <td>databases</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
+ <td></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of rows to return. </p></td>
+ </tr>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>The export format. </p></td>
</tr>
<tr>
- <td>sheet</td>
+ <td>admin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
+Editor Admin mode. The exported data is not masked. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>The zip password provide by users. </p></td>
</tr>
<tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td>data_source_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The format of the exported file. </p></td>
+ <td><p>The id of data source.
+It is used for querying admin data source even if the instance has
+read-only data sources. Or it can be used to query a specific read-only
+data source. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td>optional</td>
- <td><p>The zip password provide by users.
-Leave it empty if no needs to encrypt the zip file. </p></td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
</tr>
</tbody>
@@ -21064,7 +20904,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
<p></p>
@@ -21075,17 +20915,10 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#int32">int32</a></td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The export file content. </p></td>
</tr>
</tbody>
@@ -21095,7 +20928,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
<p></p>
@@ -21106,104 +20939,124 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>semantic_type_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
+ <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
</tr>
<tr>
- <td>create_database_config</td>
- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td>semantic_type_title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Human-readable semantic type title. </p></td>
</tr>
<tr>
- <td>change_database_config</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td>masking_rule_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The masking rule ID that matched (if applicable). </p></td>
</tr>
<tr>
- <td>export_data_config</td>
- <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
+ <td>algorithm</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The masking algorithm used. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>context</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>classification_level</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ <td><p>Whether masking was due to classification level. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</a></td>
+ <td>semantic_type_icon</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Icon associated with the semantic type (if any). </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PrettyRequest">PrettyRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>target</td>
+ <td>current_schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>The SDL format SQL schema information that was dumped from a database
+engine. This information will be sorted to match the order of statements in
+the userSchema. </p></td>
</tr>
<tr>
- <td>sheet</td>
+ <td>expected_schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: project/{project}/sheets/{sheet} </p></td>
+ <td><p>The expected SDL schema. This schema will be checked for correctness and
+normalized. </p></td>
</tr>
- <tr>
- <td>results</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PrettyResponse">PrettyResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>error</td>
+ <td>current_schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>error is set if the Status is FAILED. </p></td>
+ <td><p>The pretty-formatted version of current schema. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>expected_schema</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The expected SDL schema after normalizing. </p></td>
</tr>
</tbody>
@@ -21213,7 +21066,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
<p></p>
@@ -21224,43 +21077,59 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.Status">PlanCheckRun.Result.Status</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name for the query history.
+Format: queryHistories/{uid} </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database name to execute the query.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>creator</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_summary_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_review_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -21272,7 +21141,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
+ <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
<p></p>
@@ -21283,30 +21152,8 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>column</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p>1-based Position of the SQL statement.
-To supersede `line` and `column` above. </p></td>
- </tr>
-
- <tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>redis_run_commands_on</td>
+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -21318,7 +21165,7 @@ To supersede `line` and `column` above. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
<p></p>
@@ -21329,26 +21176,67 @@ To supersede `line` and `column` above. </p></td>
<tbody>
<tr>
- <td>statement_types</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>statement_types are the types of statements that are found in the sql. </p></td>
+ <td></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>changed_resources</td>
- <td><a href="#bytebase.v1.ChangedResources">ChangedResources</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of rows to return. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_source_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The id of data source.
+It is used for querying admin data source even if the instance has
+read-only data sources. Or it can be used to query a specific read-only
+data source. </p></td>
+ </tr>
+
+ <tr>
+ <td>explain</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Explain the statement. </p></td>
+ </tr>
+
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
+ </tr>
+
+ <tr>
+ <td>query_option</td>
+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>container</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -21356,7 +21244,7 @@ To supersede `line` and `column` above. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
<p></p>
@@ -21367,20 +21255,10 @@ To supersede `line` and `column` above. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The plan to run plan checks.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>spec_id</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The UUID of the specific spec to run plan checks for.
-This should match the spec.id field in Plan.Spec.
-If not set, all specs in the plan will be used. </p></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
</tr>
</tbody>
@@ -21390,14 +21268,7 @@ If not set, all specs in the plan will be used. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchPlansRequest">SearchPlansRequest</h3>
+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
<p></p>
@@ -21408,58 +21279,82 @@ If not set, all specs in the plan will be used. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>column_names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ <td>repeated</td>
+ <td><p>Column names of the query result. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of plans to return. The service may return fewer than
-this value.
-If unspecified, at most 10 plans will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td>column_type_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Column types of the query result.
+The types come from the Golang SQL driver. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>rows</td>
+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>repeated</td>
+ <td><p>Rows of the query result. </p></td>
+ </tr>
+
+ <tr>
+ <td>rows_count</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `SearchPlans` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchPlans` must match
-the call that provided the page token. </p></td>
+ <td><p>The error message if the query failed. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The time it takes to execute the query. </p></td>
+ </tr>
+
+ <tr>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter plans returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters:
-- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match.
-- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
-- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-
-For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
-has_pipeline == false &amp;&amp; has_issue == true
-title == &#34;My Plan&#34;
-title.matches(&#34;database migration&#34;)
-spec_type == &#34;change_database_config&#34;
-state == &#34;ACTIVE&#34; </p></td>
+ <td><p>The query statement for the result. </p></td>
+ </tr>
+
+ <tr>
+ <td>postgres_error</td>
+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_export</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The query result is allowed to be exported or not. </p></td>
+ </tr>
+
+ <tr>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
+ <td>repeated</td>
+ <td><p>Informational or debug messages returned by the database engine during query execution.
+Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ </tr>
+
+ <tr>
+ <td>masked</td>
+ <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
+ <td>repeated</td>
+ <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
</tr>
</tbody>
@@ -21469,7 +21364,7 @@ state == &#34;ACTIVE&#34; </p></td>
- <h3 id="bytebase.v1.SearchPlansResponse">SearchPlansResponse</h3>
+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
<p></p>
@@ -21480,18 +21375,17 @@ state == &#34;ACTIVE&#34; </p></td>
<tbody>
<tr>
- <td>plans</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td>repeated</td>
- <td><p>The plans from the specified request. </p></td>
+ <td>level</td>
+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21501,8 +21395,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
+ <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
<table class="field-table">
@@ -21512,28 +21406,122 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>severity</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The plan to update.
-
-The plan&#39;s `name` field is used to identify the plan to update.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>message</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the plan is not found, a new plan will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>detail</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>hint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>internal_position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>internal_query</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>where</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>table_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>column_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>data_type_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>constraint_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>file</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>routine</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21543,864 +21531,32 @@ In this situation, `update_mask` is ignored. </p></td>
+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>values</td>
+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
+ <td>repeated</td>
+ <td><p>Row values of the query result. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.PlanCheckRun.Result.Status">PlanCheckRun.Result.Status</h3>
+ <h3 id="bytebase.v1.RowValue">RowValue</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SUCCESS</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CANCELED</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified check type.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_STATEMENT_FAKE_ADVISE</td>
- <td>1</td>
- <td><p>Fake advise check for testing purposes without executing against database.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_STATEMENT_ADVISE</td>
- <td>3</td>
- <td><p>SQL review check that analyzes statements against configured SQL review rules.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_STATEMENT_SUMMARY_REPORT</td>
- <td>5</td>
- <td><p>Summary report check that generates impact analysis for the statements.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_CONNECT</td>
- <td>6</td>
- <td><p>Connection check that verifies database connectivity.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_GHOST_SYNC</td>
- <td>7</td>
- <td><p>Ghost sync check that validates gh-ost online schema change compatibility.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanService">PlanService</h3>
- <p>PlanService manages deployment plans for database changes.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetPlan</td>
- <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Retrieves a deployment plan by name.
-Permissions required: bb.plans.get</p></td>
- </tr>
-
- <tr>
- <td>ListPlans</td>
- <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
- <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
- <td><p>Lists deployment plans in a project.
-Permissions required: bb.plans.list</p></td>
- </tr>
-
- <tr>
- <td>SearchPlans</td>
- <td><a href="#bytebase.v1.SearchPlansRequest">SearchPlansRequest</a></td>
- <td><a href="#bytebase.v1.SearchPlansResponse">SearchPlansResponse</a></td>
- <td><p>Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query.
-Permissions required: bb.plans.get</p></td>
- </tr>
-
- <tr>
- <td>CreatePlan</td>
- <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Creates a new deployment plan.
-Permissions required: bb.plans.create</p></td>
- </tr>
-
- <tr>
- <td>UpdatePlan</td>
- <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>UpdatePlan updates the plan.
-The plan creator and the user with bb.plans.update permission on the project can update the plan.
-Permissions required: bb.plans.update (or creator)</p></td>
- </tr>
-
- <tr>
- <td>ListPlanCheckRuns</td>
- <td><a href="#bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</a></td>
- <td><a href="#bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</a></td>
- <td><p>Lists plan check runs for a deployment plan.
-Permissions required: bb.planCheckRuns.list</p></td>
- </tr>
-
- <tr>
- <td>RunPlanChecks</td>
- <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
- <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
- <td><p>Executes validation checks on a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
- </tr>
-
- <tr>
- <td>BatchCancelPlanCheckRuns</td>
- <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</a></td>
- <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</a></td>
- <td><p>Cancels multiple plan check runs.
-Permissions required: bb.planCheckRuns.run</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>GetPlan</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/plans/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListPlans</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>SearchPlans</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/plans:search</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>CreatePlan</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td>plan</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdatePlan</td>
- <td>PATCH</td>
- <td>/v1/{plan.name=projects/*/plans/*}</td>
- <td>plan</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListPlanCheckRuns</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/plans/*}/planCheckRuns</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>RunPlanChecks</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchCancelPlanCheckRuns</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancel</td>
- <td>*</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.Activity">Activity</h3>
- <p>Activity types for webhook notifications.</p><p>TODO(zp): move to activity later.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>project</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the project to add the webhook to.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
- <td></td>
- <td><p>The webhook to add. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The names of the projects to delete.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>scope</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. </p></td>
- </tr>
-
- <tr>
- <td>names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>policy_results</td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</a></td>
- <td>repeated</td>
- <td><p>The policy results for each requested project. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</h3>
- <p>Result for a single project's IAM policy.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>project</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The project resource name. </p></td>
- </tr>
-
- <tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
- <td></td>
- <td><p>The IAM policy for the project. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>project</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td></td>
- <td><p>The project to create. </p></td>
- </tr>
-
- <tr>
- <td>project_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the project, which will become the final component of
-the project&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the project to delete.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
- </tr>
-
- <tr>
- <td>purge</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, permanently purge the soft-deleted project and all related resources.
-This operation is irreversible. Following AIP-165, this should only be used for
-administrative cleanup of old soft-deleted projects.
-The project must already be soft-deleted for this to work. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the project to retrieve.
-Format: projects/{project} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Label">Label</h3>
- <p>A label for categorizing and organizing issues.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The label value/name. </p></td>
- </tr>
-
- <tr>
- <td>color</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The color code for the label (e.g., hex color). </p></td>
- </tr>
-
- <tr>
- <td>group</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The group this label belongs to. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of projects to return. The service may return fewer than
-this value.
-If unspecified, at most 10 projects will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListProjects` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListProjects` must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted projects if specified. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter the project.
-Check filter for SearchProjectsRequest for details.
-Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>projects</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td>repeated</td>
- <td><p>The projects from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Project">Project</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the project.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p>The lifecycle state of the project. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The title or name of a project. It&#39;s not unique within the workspace. </p></td>
- </tr>
-
- <tr>
- <td>webhooks</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
- <td>repeated</td>
- <td><p>The list of webhooks configured for the project. </p></td>
- </tr>
-
- <tr>
- <td>data_classification_config_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The data classification configuration ID for the project. </p></td>
- </tr>
-
- <tr>
- <td>issue_labels</td>
- <td><a href="#bytebase.v1.Label">Label</a></td>
- <td>repeated</td>
- <td><p>Labels available for tagging issues in this project. </p></td>
- </tr>
-
- <tr>
- <td>force_issue_labels</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Force issue labels to be used when creating an issue. </p></td>
- </tr>
-
- <tr>
- <td>allow_modify_statement</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Allow modifying SQL statements after issue is created. </p></td>
- </tr>
-
- <tr>
- <td>auto_resolve_issue</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Enable automatic issue resolution when tasks complete. </p></td>
- </tr>
-
- <tr>
- <td>enforce_issue_title</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td>
- </tr>
-
- <tr>
- <td>auto_enable_backup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to automatically enable backup for database changes. </p></td>
- </tr>
-
- <tr>
- <td>skip_backup_errors</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip backup errors and continue with data migration. </p></td>
- </tr>
-
- <tr>
- <td>postgres_database_tenant_mode</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enable database tenant mode for PostgreSQL.
-If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
- </tr>
-
- <tr>
- <td>allow_self_approval</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to allow issue creators to self-approve their own issues. </p></td>
- </tr>
-
- <tr>
- <td>execution_retry_policy</td>
- <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
- <td></td>
- <td><p>Execution retry policy for task runs. </p></td>
- </tr>
-
- <tr>
- <td>ci_sampling_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of database rows to sample during CI data validation.
-Without specification, sampling is disabled, resulting in full validation. </p></td>
- </tr>
-
- <tr>
- <td>parallel_tasks_per_rollout</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of parallel tasks allowed during rollout execution. </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>Labels are key-value pairs that can be attached to the project.
-For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
- </tr>
-
- <tr>
- <td>enforce_sql_review</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enforce SQL review checks to pass before issue creation.
-If enabled, issues cannot be created when SQL review finds errors. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
- <p>Execution retry policy configuration.</p>
<table class="field-table">
@@ -22410,204 +21566,98 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>maximum_retries</td>
- <td><a href="#int32">int32</a></td>
+ <td>null_value</td>
+ <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
<td></td>
- <td><p>The maximum number of retries for lock timeout errors. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>bool_value</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>bytes_value</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>double_value</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The webhook to remove. Identified by its url. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>float_value</td>
+ <td><a href="#float">float</a></td>
<td></td>
- <td><p>Show deleted projects if specified. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>int32_value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Filter the project.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters:
-- name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator.
-- state: check the State enum for the values, support &#34;==&#34; operator.
-- labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-name = &#34;project name&#34;
-name.matches(&#34;project name&#34;)
-resource_id = &#34;project id&#34;
-resource_id.matches(&#34;project id&#34;)
-exclude_default == true
-state == &#34;DELETED&#34;
-labels.environment == &#34;production&#34;
-labels.tier == &#34;critical&#34;
-labels.environment in [&#34;staging&#34;, &#34;prod&#34;]
-You can combine filter conditions like:
-name = &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;)
-name.matches(&#34;project name&#34;) || resource_id = &#34;project id&#34;
-labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>int64_value</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The maximum number of projects to return. The service may return fewer than
-this value.
-If unspecified, at most 10 projects will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>string_value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `SearchProjects` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchProjects` must match
-the call that provided the page token. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>projects</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td>repeated</td>
- <td><p>The projects from the specified request. </p></td>
+ <td>uint32_value</td>
+ <td><a href="#uint32">uint32</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>uint64_value</td>
+ <td><a href="#uint64">uint64</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>value_value</td>
+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td></td>
+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ </tr>
<tr>
- <td>project</td>
- <td><a href="#string">string</a></td>
+ <td>timestamp_value</td>
+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
<td></td>
- <td><p>The name of the project which owns the webhook to test.
-Format: projects/{project} </p></td>
+ <td><p>timestamp_value is used for the timestamp without time zone data type,
+meaning it only includes the timestamp without any time zone or location
+info. Although it may be expressed as a UTC value, it should be seen as a
+timestamp missing location context. </p></td>
</tr>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>timestamp_tz_value</td>
+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
<td></td>
- <td><p>The webhook to test. Identified by its url. </p></td>
+ <td><p>timestamp_tz_value is used for the timestamptz data type, which
+accurately represents the timestamp with location information. </p></td>
</tr>
</tbody>
@@ -22617,7 +21667,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3>
+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
<p></p>
@@ -22628,35 +21678,17 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The result of the test, empty if the test is successful. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The name of the deleted project.
-Format: projects/{project} </p></td>
+ <td><p>The accuracy is the number of digits after the decimal point. </p></td>
</tr>
</tbody>
@@ -22666,7 +21698,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</h3>
+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
<p></p>
@@ -22677,28 +21709,36 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>project</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The project to update.
-
-The project&#39;s `name` field is used to identify the project to update.
-Format: projects/{project} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>zone</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
+&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
+retrieve the time zone information from the timestamptz field in the
+database. A timestamp is in UTC or epoch time, and with zone info, we can
+convert it to a local time string. Zone and offset are returned by
+time.Time.Zone() </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>offset</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>If set to true, and the project is not found, a new project will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>The offset is in seconds east of UTC </p></td>
+ </tr>
+
+ <tr>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -22708,7 +21748,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
<p></p>
@@ -22719,25 +21759,45 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The webhook to modify. </p></td>
+ <td><p>The maximum number of histories to return.
+The service may return fewer than this value.
+If unspecified, at most 10 history entries will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>A page token, received from a previous `ListQueryHistory` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the webhook is not found, a new webhook will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>Filter is the filter to apply on the search query history
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
+- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
+- statement: the SQL statement, support &#34;.matches()&#34; operator.
+
+For example:
+project == &#34;projects/{project}&#34;
+database == &#34;instances/{instance}/databases/{database}&#34;
+instance == &#34;instances/{instance}&#34;
+type == &#34;QUERY&#34;
+type == &#34;EXPORT&#34;
+statement.matches(&#34;select&#34;)
+type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
</tr>
</tbody>
@@ -22747,7 +21807,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.Webhook">Webhook</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
<p></p>
@@ -22758,56 +21818,19 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>name is the name of the webhook, generated by the server.
-format: projects/{project}/webhooks/{webhook} </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Webhook.Type">Webhook.Type</a></td>
- <td></td>
- <td><p>type is the type of the webhook. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>title is the title of the webhook. </p></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>repeated</td>
+ <td><p>The list of history. </p></td>
</tr>
<tr>
- <td>url</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>url is the url of the webhook, should be unique within the project. </p></td>
- </tr>
-
- <tr>
- <td>direct_message</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>if direct_message is set, the notification is sent directly
-to the persons and url will be ignored.
-IM integration setting should be set for this function to work. </p></td>
- </tr>
-
- <tr>
- <td>notification_types</td>
- <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>
- <td>repeated</td>
- <td><p>notification_types is the list of activities types that the webhook is interested in.
-Bytebase will only send notifications to the webhook if the activity type is in the list.
-It should not be empty, and should be a subset of the following:
-- TYPE_ISSUE_CREATED
-- TYPE_ISSUE_STATUS_UPDATE
-- TYPE_ISSUE_PIPELINE_STAGE_UPDATE
-- TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE
-- TYPE_ISSUE_FIELD_UPDATE
-- TYPE_ISSUE_COMMENT_CREATE </p></td>
+ <td><p>A token to retrieve next page of history.
+Pass this value in the page_token field in the subsequent call to
+`ListQueryHistory` method to retrieve the next page of history. </p></td>
</tr>
</tbody>
@@ -22819,8 +21842,84 @@ It should not be empty, and should be a subset of the following:
- <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>
- <p>Activity type enumeration.</p>
+ <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
+ <p>Level represents the severity level of the advice.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ADVICE_LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified advice level.</p></td>
+ </tr>
+
+ <tr>
+ <td>SUCCESS</td>
+ <td>1</td>
+ <td><p>Success status indicating the check passed without issues.</p></td>
+ </tr>
+
+ <tr>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR</td>
+ <td>3</td>
+ <td><p>Error status indicating critical issues that must be addressed.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CHANGE_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL_GHOST</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DML</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SQL_EDITOR</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -22830,72 +21929,55 @@ It should not be empty, and should be a subset of the following:
<tr>
<td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified type.</p></td>
- </tr>
-
- <tr>
- <td>NOTIFY_ISSUE_APPROVED</td>
- <td>23</td>
- <td><p>Notifications via webhooks.
-
-NOTIFY_ISSUE_APPROVED represents the issue approved notification.</p></td>
- </tr>
-
- <tr>
- <td>NOTIFY_PIPELINE_ROLLOUT</td>
- <td>24</td>
- <td><p>NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification.</p></td>
+ <td><p>Unspecified query history type.</p></td>
</tr>
<tr>
- <td>ISSUE_CREATE</td>
+ <td>QUERY</td>
<td>1</td>
- <td><p>Issue related activity types.
-
-ISSUE_CREATE represents creating an issue.</p></td>
+ <td><p>Query execution for data retrieval.</p></td>
</tr>
<tr>
- <td>ISSUE_COMMENT_CREATE</td>
+ <td>EXPORT</td>
<td>2</td>
- <td><p>ISSUE_COMMENT_CREATE represents commenting on an issue.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_FIELD_UPDATE</td>
- <td>3</td>
- <td><p>ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc.</p></td>
+ <td><p>Data export operation to file.</p></td>
</tr>
- <tr>
- <td>ISSUE_STATUS_UPDATE</td>
- <td>4</td>
- <td><p>ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now.</p></td>
- </tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ISSUE_APPROVAL_NOTIFY</td>
- <td>21</td>
- <td><p>ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.</p></td>
+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
</tr>
<tr>
- <td>ISSUE_PIPELINE_STAGE_STATUS_UPDATE</td>
- <td>5</td>
- <td><p>ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.</p></td>
+ <td>SINGLE_NODE</td>
+ <td>1</td>
+ <td><p>Execute Redis commands on a single node in the cluster.</p></td>
</tr>
<tr>
- <td>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE</td>
- <td>22</td>
- <td><p>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.</p></td>
+ <td>ALL_NODES</td>
+ <td>2</td>
+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.Webhook.Type">Webhook.Type</h3>
- <p>Webhook integration type.</p>
+ <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -22903,51 +21985,45 @@ ISSUE_CREATE represents creating an issue.</p></td>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>LEVEL_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified type.</p></td>
+ <td><p>Unspecified message level.</p></td>
</tr>
<tr>
- <td>SLACK</td>
+ <td>INFO</td>
<td>1</td>
- <td><p>Slack integration.</p></td>
+ <td><p>Informational message.</p></td>
</tr>
<tr>
- <td>DISCORD</td>
+ <td>WARNING</td>
<td>2</td>
- <td><p>Discord integration.</p></td>
+ <td><p>Warning message indicating potential issues.</p></td>
</tr>
<tr>
- <td>TEAMS</td>
+ <td>DEBUG</td>
<td>3</td>
- <td><p>Microsoft Teams integration.</p></td>
+ <td><p>Debug message for development and troubleshooting.</p></td>
</tr>
<tr>
- <td>DINGTALK</td>
+ <td>LOG</td>
<td>4</td>
- <td><p>DingTalk integration.</p></td>
+ <td><p>General log message.</p></td>
</tr>
<tr>
- <td>FEISHU</td>
+ <td>NOTICE</td>
<td>5</td>
- <td><p>Feishu integration.</p></td>
+ <td><p>Notice message for important information.</p></td>
</tr>
<tr>
- <td>WECOM</td>
+ <td>EXCEPTION</td>
<td>6</td>
- <td><p>WeCom (WeChat Work) integration.</p></td>
- </tr>
-
- <tr>
- <td>LARK</td>
- <td>8</td>
- <td><p>Lark integration.</p></td>
+ <td><p>Exception message indicating error conditions.</p></td>
</tr>
</tbody>
@@ -22957,8 +22033,8 @@ ISSUE_CREATE represents creating an issue.</p></td>
- <h3 id="bytebase.v1.ProjectService">ProjectService</h3>
- <p>ProjectService manages projects that group databases and changes.</p>
+ <h3 id="bytebase.v1.SQLService">SQLService</h3>
+ <p>SQLService executes SQL queries and manages query operations.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -22966,307 +22042,828 @@ ISSUE_CREATE represents creating an issue.</p></td>
<tbody>
<tr>
- <td>GetProject</td>
- <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>GetProject retrieves a project by name.
-Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method.
-Permissions required: bb.projects.get</p></td>
+ <td>Query</td>
+ <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
+ <td><p>Executes a read-only SQL query against a database.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>ListProjects</td>
- <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>
- <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>
- <td><p>Lists all projects in the workspace with optional filtering.
-Permissions required: bb.projects.list</p></td>
+ <td>AdminExecute</td>
+ <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
+ <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
+ <td><p>Executes SQL with admin privileges via streaming connection.
+Permissions required: bb.sql.admin</p></td>
</tr>
<tr>
- <td>SearchProjects</td>
- <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>
- <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>
- <td><p>Searches for projects with advanced filtering capabilities.
-Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>SearchQueryHistories searches query histories for the caller.
+Permissions required: None (only returns caller&#39;s own query histories)</p></td>
</tr>
<tr>
- <td>CreateProject</td>
- <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Creates a new project in the workspace.
-Permissions required: bb.projects.create</p></td>
+ <td>Export</td>
+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
+ <td><p>Exports query results to a file format.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>UpdateProject</td>
- <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Updates an existing project&#39;s properties.
-Permissions required: bb.projects.update</p></td>
+ <td>Check</td>
+ <td><a href="#bytebase.v1.CheckRequest">CheckRequest</a></td>
+ <td><a href="#bytebase.v1.CheckResponse">CheckResponse</a></td>
+ <td><p>Validates SQL statements against review rules.
+Permissions required: bb.databases.check</p></td>
</tr>
<tr>
- <td>DeleteProject</td>
- <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes (soft-delete or purge) a project.
-Permissions required: bb.projects.delete</p></td>
+ <td>Pretty</td>
+ <td><a href="#bytebase.v1.PrettyRequest">PrettyRequest</a></td>
+ <td><a href="#bytebase.v1.PrettyResponse">PrettyResponse</a></td>
+ <td><p>Formats and normalizes SQL schema definitions.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>UndeleteProject</td>
- <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Restores a soft-deleted project.
-Permissions required: bb.projects.undelete</p></td>
+ <td>DiffMetadata</td>
+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
+ <td><p>Computes schema differences between two database metadata.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>BatchDeleteProjects</td>
- <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes multiple projects in a single operation.
-Permissions required: bb.projects.delete</p></td>
+ <td>AICompletion</td>
+ <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
+ <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
+ <td><p>Provides AI-powered SQL completion and generation.
+Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<tr>
- <td>GetIamPolicy</td>
- <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
- <td><p>Retrieves the IAM policy for a project.
-Permissions required: bb.projects.getIamPolicy</p></td>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:query</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>BatchGetIamPolicy</td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</a></td>
- <td><p>Deprecated. No permission check implemented.
-Permissions required: None</p></td>
+ <td>AdminExecute</td>
+ <td>GET</td>
+ <td>/v1:adminExecute</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td>POST</td>
+ <td>/v1/queryHistories:search</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/rollouts/*}:export</td>
+ <td>*</td>
</tr>
-
+
<tr>
- <td>SetIamPolicy</td>
- <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
- <td><p>Sets the IAM policy for a project.
-Permissions required: bb.projects.setIamPolicy</p></td>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/rollouts/*/stages/*}:export</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>AddWebhook</td>
- <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Adds a webhook to a project for notifications.
-Permissions required: bb.projects.update</p></td>
+ <td>Check</td>
+ <td>POST</td>
+ <td>/v1/sql/check</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>UpdateWebhook</td>
- <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Updates an existing webhook configuration.
-Permissions required: bb.projects.update</p></td>
+ <td>Pretty</td>
+ <td>POST</td>
+ <td>/v1/sql/pretty</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>RemoveWebhook</td>
- <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Removes a webhook from a project.
-Permissions required: bb.projects.update</p></td>
+ <td>DiffMetadata</td>
+ <td>POST</td>
+ <td>/v1/schemaDesign:diffMetadata</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>TestWebhook</td>
- <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>
- <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>
- <td><p>Tests a webhook by sending a test notification.
-Permissions required: bb.projects.update</p></td>
+ <td>AICompletion</td>
+ <td>POST</td>
+ <td>/v1/sql/aiCompletion</td>
+ <td>*</td>
</tr>
+
- </tbody>
- </table>
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the parent of the planChecks.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_check_runs</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>TODO(d): update this API.
+The planCheckRuns to cancel.
+Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
+ <p></p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent project where this plan will be created.
+Format: projects/{project} </p></td>
+ </tr>
+
+ <tr>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td></td>
+ <td><p>The plan to create. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the plan to retrieve.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
- <h4>Methods with HTTP bindings</h4>
- <table>
+
+
+
+ <h3 id="bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent, which owns this collection of plan check runs.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Pagination is not currently implemented. This field is reserved for future use.
+The maximum number of plan check runs to return. The service may return fewer than
+this value.
+If unspecified, at most 10 plan check runs will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Pagination is not currently implemented. This field is reserved for future use.
+A page token, received from a previous `ListPlanCheckRuns` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListPlanCheckRuns` must match
+the call that provided the page token. </p></td>
+ </tr>
+
+ <tr>
+ <td>latest_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, only the latest plan check run will be returned. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is used to filter plan check runs returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values.
+- result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+
+For example:
+status in [&#34;DONE&#34;, &#34;FAILED&#34;]
+status == &#34;RUNNING&#34;
+result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;]
+result_status == &#34;WARNING&#34; </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>plan_check_runs</td>
+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
+ <td>repeated</td>
+ <td><p>The plan check runs from the specified request. </p></td>
+ </tr>
- <tr>
- <td>GetProject</td>
- <td>GET</td>
- <td>/v1/{name=projects/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ </tr>
- <tr>
- <td>ListProjects</td>
- <td>GET</td>
- <td>/v1/projects</td>
- <td></td>
- </tr>
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of plans to return. The service may return fewer than
+this value.
+If unspecified, at most 10 plans will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
-
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListPlans` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListPlans` must match
+the call that provided the page token. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>SearchProjects</td>
- <td>POST</td>
- <td>/v1/projects:search</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>plans</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>repeated</td>
+ <td><p>The plans from the specified request. </p></td>
+ </tr>
-
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan">Plan</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>CreateProject</td>
- <td>POST</td>
- <td>/v1/projects</td>
- <td>project</td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the plan.
+`plan` is a system generated ID.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
-
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p>The state of the plan. </p></td>
+ </tr>
+ <tr>
+ <td>issue</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The issue associated with the plan.
+Can be empty.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
- <tr>
- <td>UpdateProject</td>
- <td>PATCH</td>
- <td>/v1/{project.name=projects/*}</td>
- <td>project</td>
- </tr>
+ <tr>
+ <td>rollout</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The rollout associated with the plan.
+Can be empty.
+Format: projects/{project}/rollouts/{rollout} </p></td>
+ </tr>
-
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The title of the plan. </p></td>
+ </tr>
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The description of the plan. </p></td>
+ </tr>
- <tr>
- <td>DeleteProject</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
+ <td>repeated</td>
+ <td><p>The deployment specs for the plan. </p></td>
+ </tr>
-
+ <tr>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>UndeleteProject</td>
- <td>POST</td>
- <td>/v1/{name=projects/*}:undelete</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>plan_check_run_status_count</td>
+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
+ <td>repeated</td>
+ <td><p>The status count of the latest plan check runs.
+Keys are:
+- SUCCESS
+- WARNING
+- ERROR
+- RUNNING </p></td>
+ </tr>
+ <tr>
+ <td>deployment</td>
+ <td><a href="#bytebase.v1.Plan.Deployment">Plan.Deployment</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>BatchDeleteProjects</td>
- <td>POST</td>
- <td>/v1/projects:batchDelete</td>
- <td>*</td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
-
+ <tr>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
+ </tr>
- <tr>
- <td>GetIamPolicy</td>
- <td>GET</td>
- <td>/v1/{resource=projects/*}:getIamPolicy</td>
- <td></td>
- </tr>
+ <tr>
+ <td>release</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the release.
+Format: projects/{project}/releases/{release} </p></td>
+ </tr>
-
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DatabaseChangeType">DatabaseChangeType</a></td>
+ <td></td>
+ <td><p>Type is the database change type. </p></td>
+ </tr>
+ <tr>
+ <td>migration_type</td>
+ <td><a href="#bytebase.v1.MigrationType">MigrationType</a></td>
+ <td></td>
+ <td><p>migration_type is the migration type for imperative schema migration.
+It is only set when type is MIGRATE. </p></td>
+ </tr>
- <tr>
- <td>BatchGetIamPolicy</td>
- <td>GET</td>
- <td>/v1/{scope=*/*}/iamPolicies:batchGet</td>
- <td></td>
- </tr>
+ <tr>
+ <td>ghost_flags</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>enable_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>SetIamPolicy</td>
- <td>POST</td>
- <td>/v1/{resource=projects/*}:setIamPolicy</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>AddWebhook</td>
- <td>POST</td>
- <td>/v1/{project=projects/*}:addWebhook</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>target</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the instance on which the database is created.
+Format: instances/{instance} </p></td>
+ </tr>
-
+ <tr>
+ <td>database</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database to create. </p></td>
+ </tr>
+ <tr>
+ <td>table</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
+For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
+ </tr>
- <tr>
- <td>UpdateWebhook</td>
- <td>PATCH</td>
- <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>
- <td>webhook</td>
- </tr>
+ <tr>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>character_set is the character set of the database. </p></td>
+ </tr>
-
+ <tr>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>collation is the collation of the database. </p></td>
+ </tr>
+ <tr>
+ <td>cluster</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
+ </tr>
- <tr>
- <td>RemoveWebhook</td>
- <td>POST</td>
- <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
+ </tr>
-
+ <tr>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.Deployment">Plan.Deployment</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>environments</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The environments deploy order. </p></td>
+ </tr>
- <tr>
- <td>TestWebhook</td>
- <td>POST</td>
- <td>/v1/{project=projects/*}:testWebhook</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>database_group_mappings</td>
+ <td><a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</a></td>
+ <td>repeated</td>
+ <td><p>The database group mapping. </p></td>
+ </tr>
-
</tbody>
</table>
+
+
-
- <div class="file-heading">
- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ <h3 id="bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>database_group</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
+ </tr>
+
+ <tr>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>
+ <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
<p></p>
@@ -23277,10 +22874,35 @@ Permissions required: bb.projects.update</p></td>
<tbody>
<tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>The format of the exported file. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The zip password provide by users.
+Leave it empty if no needs to encrypt the zip file. </p></td>
</tr>
</tbody>
@@ -23290,7 +22912,7 @@ Permissions required: bb.projects.update</p></td>
- <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
<p></p>
@@ -23301,15 +22923,15 @@ Permissions required: bb.projects.update</p></td>
<tbody>
<tr>
- <td>role</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
+ <td>value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -23321,7 +22943,7 @@ Permissions required: bb.projects.update</p></td>
- <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
<p></p>
@@ -23332,11 +22954,31 @@ Permissions required: bb.projects.update</p></td>
<tbody>
<tr>
- <td>candidates</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
- <td>repeated</td>
- <td><p>candidates is used for results with multiple choices and candidates. Used
-for OpenAI and Gemini. </p></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_database_config</td>
+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>change_database_config</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>export_data_config</td>
+ <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23346,7 +22988,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
<p></p>
@@ -23357,8 +22999,57 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>target</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: project/{project}/sheets/{sheet} </p></td>
+ </tr>
+
+ <tr>
+ <td>results</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>error is set if the Status is FAILED. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -23370,7 +23061,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
<p></p>
@@ -23381,10 +23072,45 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>parts</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
- <td>repeated</td>
- <td><p>parts is used for a result content with multiple parts. </p></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_summary_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_review_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23394,7 +23120,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
<p></p>
@@ -23405,8 +23131,30 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>text</td>
- <td><a href="#string">string</a></td>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>column</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></td>
+ <td><p>1-based Position of the SQL statement.
+To supersede `line` and `column` above. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -23418,7 +23166,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
<p></p>
@@ -23429,41 +23177,58 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>statement_types</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} </p></td>
+ <td>repeated</td>
+ <td><p>statement_types are the types of statements that are found in the sql. </p></td>
</tr>
<tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The SQL statement to execute. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>changed_resources</td>
+ <td><a href="#bytebase.v1.ChangedResources">ChangedResources</a></td>
<td></td>
- <td><p>The maximum number of rows to return. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>schema</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to execute the statement. Equals to the current schema
-in Oracle and search path in Postgres. </p></td>
+ <td></td>
+ <td><p>The plan to run plan checks.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>container</td>
+ <td>spec_id</td>
<td><a href="#string">string</a></td>
<td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
+ <td><p>The UUID of the specific spec to run plan checks for.
+This should match the spec.id field in Plan.Spec.
+If not set, all specs in the plan will be used. </p></td>
</tr>
</tbody>
@@ -23473,31 +23238,14 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
<p></p>
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h3 id="bytebase.v1.Advice">Advice</h3>
+ <h3 id="bytebase.v1.SearchPlansRequest">SearchPlansRequest</h3>
<p></p>
@@ -23508,46 +23256,90 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Status">Advice.Status</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The advice status. </p></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
</tr>
<tr>
- <td>code</td>
+ <td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The advice code. </p></td>
+ <td><p>The maximum number of plans to return. The service may return fewer than
+this value.
+If unspecified, at most 10 plans will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The advice title. </p></td>
+ <td><p>A page token, received from a previous `SearchPlans` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchPlans` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The advice content. </p></td>
+ <td><p>Filter is used to filter plans returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match.
+- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
+- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
+has_pipeline == false &amp;&amp; has_issue == true
+title == &#34;My Plan&#34;
+title.matches(&#34;database migration&#34;)
+spec_type == &#34;change_database_config&#34;
+state == &#34;ACTIVE&#34; </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchPlansResponse">SearchPlansResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p>The start_position is inclusive and the end_position is exclusive.
-TODO: use range instead </p></td>
+ <td>plans</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>repeated</td>
+ <td><p>The plans from the specified request. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -23557,7 +23349,7 @@ TODO: use range instead </p></td>
- <h3 id="bytebase.v1.CheckRequest">CheckRequest</h3>
+ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
<p></p>
@@ -23568,25 +23360,28 @@ TODO: use range instead </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>The database name to check against.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>The plan to update.
+
+The plan&#39;s `name` field is used to identify the plan to update.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>change_type</td>
- <td><a href="#bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, and the plan is not found, a new plan will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -23596,228 +23391,291 @@ Format: instances/{instance}/databases/{database} </p></td>
- <h3 id="bytebase.v1.CheckResponse">CheckResponse</h3>
+
+
+ <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>RUNNING</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CANCELED</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</h3>
<p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified check type.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_STATEMENT_FAKE_ADVISE</td>
+ <td>1</td>
+ <td><p>Fake advise check for testing purposes without executing against database.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_STATEMENT_ADVISE</td>
+ <td>3</td>
+ <td><p>SQL review check that analyzes statements against configured SQL review rules.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_STATEMENT_SUMMARY_REPORT</td>
+ <td>5</td>
+ <td><p>Summary report check that generates impact analysis for the statements.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_CONNECT</td>
+ <td>6</td>
+ <td><p>Connection check that verifies database connectivity.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_GHOST_SYNC</td>
+ <td>7</td>
+ <td><p>Ghost sync check that validates gh-ost online schema change compatibility.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PlanService">PlanService</h3>
+ <p>PlanService manages deployment plans for database changes.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetPlan</td>
+ <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Retrieves a deployment plan by name.
+Permissions required: bb.plans.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListPlans</td>
+ <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
+ <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
+ <td><p>Lists deployment plans in a project.
+Permissions required: bb.plans.list</p></td>
+ </tr>
+
+ <tr>
+ <td>SearchPlans</td>
+ <td><a href="#bytebase.v1.SearchPlansRequest">SearchPlansRequest</a></td>
+ <td><a href="#bytebase.v1.SearchPlansResponse">SearchPlansResponse</a></td>
+ <td><p>Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query.
+Permissions required: bb.plans.get</p></td>
+ </tr>
+
+ <tr>
+ <td>CreatePlan</td>
+ <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Creates a new deployment plan.
+Permissions required: bb.plans.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdatePlan</td>
+ <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>UpdatePlan updates the plan.
+The plan creator and the user with bb.plans.update permission on the project can update the plan.
+Permissions required: bb.plans.update (or creator)</p></td>
+ </tr>
+
+ <tr>
+ <td>ListPlanCheckRuns</td>
+ <td><a href="#bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</a></td>
+ <td><a href="#bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</a></td>
+ <td><p>Lists plan check runs for a deployment plan.
+Permissions required: bb.planCheckRuns.list</p></td>
+ </tr>
+
+ <tr>
+ <td>RunPlanChecks</td>
+ <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
+ <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
+ <td><p>Executes validation checks on a deployment plan.
+Permissions required: bb.planCheckRuns.run</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchCancelPlanCheckRuns</td>
+ <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</a></td>
+ <td><p>Cancels multiple plan check runs.
+Permissions required: bb.planCheckRuns.run</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>advices</td>
- <td><a href="#bytebase.v1.Advice">Advice</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The count of affected rows of the statement on the target database. </p></td>
- </tr>
+ <tr>
+ <td>GetPlan</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/plans/*}</td>
+ <td></td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>source_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the source schema. </p></td>
- </tr>
- <tr>
- <td>target_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the target schema. </p></td>
- </tr>
+ <tr>
+ <td>ListPlans</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td></td>
+ </tr>
- <tr>
- <td>source_catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>target_catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine of the schema. </p></td>
- </tr>
+ <tr>
+ <td>SearchPlans</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/plans:search</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If false, we will build the raw common by classification in database
-config. </p></td>
- </tr>
+
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The diff of the metadata. </p></td>
- </tr>
+ <tr>
+ <td>CreatePlan</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td>plan</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the resource name to execute the export against.
-Format: instances/{instance}/databases/{database}
-Format: instances/{instance}
-Format: projects/{project}/rollouts/{rollout}
-Format: projects/{project}/rollouts/{rollout}/stages/{stage} </p></td>
- </tr>
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
+ <tr>
+ <td>UpdatePlan</td>
+ <td>PATCH</td>
+ <td>/v1/{plan.name=projects/*/plans/*}</td>
+ <td>plan</td>
+ </tr>
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
- </tr>
+
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The export format. </p></td>
- </tr>
- <tr>
- <td>admin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
-Editor Admin mode. The exported data is not masked. </p></td>
- </tr>
+ <tr>
+ <td>ListPlanCheckRuns</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/plans/*}/planCheckRuns</td>
+ <td></td>
+ </tr>
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The zip password provide by users. </p></td>
- </tr>
+
- <tr>
- <td>data_source_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The id of data source.
-It is used for querying admin data source even if the instance has
-read-only data sources. Or it can be used to query a specific read-only
-data source. </p></td>
- </tr>
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
- </tr>
+ <tr>
+ <td>RunPlanChecks</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
+ <td>*</td>
+ </tr>
+
+
+
+ <tr>
+ <td>BatchCancelPlanCheckRuns</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancel</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>content</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>The export file content. </p></td>
- </tr>
-
- </tbody>
- </table>
+
+ <h3 id="bytebase.v1.Activity">Activity</h3>
+ <p>Activity types for webhook notifications.</p><p>TODO(zp): move to activity later.</p>
-
+
- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
+ <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>
<p></p>
@@ -23828,52 +23686,18 @@ Oracle and search path in Postgres. </p></td>
<tbody>
<tr>
- <td>semantic_type_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Human-readable semantic type title. </p></td>
- </tr>
-
- <tr>
- <td>masking_rule_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking rule ID that matched (if applicable). </p></td>
- </tr>
-
- <tr>
- <td>algorithm</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking algorithm used. </p></td>
- </tr>
-
- <tr>
- <td>context</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
- </tr>
-
- <tr>
- <td>classification_level</td>
+ <td>project</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether masking was due to classification level. </p></td>
+ <td><p>The name of the project to add the webhook to.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>semantic_type_icon</td>
- <td><a href="#string">string</a></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p>Icon associated with the semantic type (if any). </p></td>
+ <td><p>The webhook to add. </p></td>
</tr>
</tbody>
@@ -23883,7 +23707,7 @@ Oracle and search path in Postgres. </p></td>
- <h3 id="bytebase.v1.PrettyRequest">PrettyRequest</h3>
+ <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</h3>
<p></p>
@@ -23894,27 +23718,21 @@ Oracle and search path in Postgres. </p></td>
<tbody>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>current_schema</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SDL format SQL schema information that was dumped from a database
-engine. This information will be sorted to match the order of statements in
-the userSchema. </p></td>
+ <td>repeated</td>
+ <td><p>The names of the projects to delete.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>expected_schema</td>
- <td><a href="#string">string</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The expected SDL schema. This schema will be checked for correctness and
-normalized. </p></td>
+ <td><p>If set to true, any databases from this project will be moved to default project.
+Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+Open issues will remain open but associated with the deleted project.
+If set to false, the operation will fail if the project has databases or open issues. </p></td>
</tr>
</tbody>
@@ -23924,7 +23742,7 @@ normalized. </p></td>
- <h3 id="bytebase.v1.PrettyResponse">PrettyResponse</h3>
+ <h3 id="bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</h3>
<p></p>
@@ -23935,17 +23753,17 @@ normalized. </p></td>
<tbody>
<tr>
- <td>current_schema</td>
+ <td>scope</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The pretty-formatted version of current schema. </p></td>
+ <td><p>The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. </p></td>
</tr>
<tr>
- <td>expected_schema</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The expected SDL schema after normalizing. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23955,7 +23773,7 @@ normalized. </p></td>
- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
+ <h3 id="bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</h3>
<p></p>
@@ -23966,61 +23784,10 @@ normalized. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name for the query history.
-Format: queryHistories/{uid} </p></td>
- </tr>
-
- <tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The database name to execute the query.
-Format: instances/{instance}/databases/{databaseName} </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>policy_results</td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</a></td>
+ <td>repeated</td>
+ <td><p>The policy results for each requested project. </p></td>
</tr>
</tbody>
@@ -24030,8 +23797,8 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</h3>
+ <p>Result for a single project's IAM policy.</p>
<table class="field-table">
@@ -24041,10 +23808,17 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
<tbody>
<tr>
- <td>redis_run_commands_on</td>
- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
+ <td>project</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project resource name. </p></td>
+ </tr>
+
+ <tr>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td></td>
+ <td><p>The IAM policy for the project. </p></td>
</tr>
</tbody>
@@ -24054,7 +23828,7 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
+ <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</h3>
<p></p>
@@ -24065,65 +23839,66 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
-
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>project</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
<td></td>
- <td><p>The maximum number of rows to return. </p></td>
+ <td><p>The project to create. </p></td>
</tr>
<tr>
- <td>data_source_id</td>
+ <td>project_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The id of data source.
-It is used for querying admin data source even if the instance has
-read-only data sources. Or it can be used to query a specific read-only
-data source. </p></td>
+ <td><p>The ID to use for the project, which will become the final component of
+the project&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
- <tr>
- <td>explain</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Explain the statement. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>schema</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
+ <td></td>
+ <td><p>The name of the project to delete.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>query_option</td>
- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, any databases from this project will be moved to default project.
+Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+Open issues will remain open but associated with the deleted project.
+If set to false, the operation will fail if the project has databases or open issues. </p></td>
</tr>
<tr>
- <td>container</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
+ <td>purge</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, permanently purge the soft-deleted project and all related resources.
+This operation is irreversible. Following AIP-165, this should only be used for
+administrative cleanup of old soft-deleted projects.
+The project must already be soft-deleted for this to work. </p></td>
</tr>
</tbody>
@@ -24133,7 +23908,7 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
+ <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>
<p></p>
@@ -24144,10 +23919,11 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the project to retrieve.
+Format: projects/{project} </p></td>
</tr>
</tbody>
@@ -24157,8 +23933,8 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
- <p></p>
+ <h3 id="bytebase.v1.Label">Label</h3>
+ <p>A label for categorizing and organizing issues.</p>
<table class="field-table">
@@ -24168,82 +23944,78 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>column_names</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column names of the query result. </p></td>
+ <td></td>
+ <td><p>The label value/name. </p></td>
</tr>
<tr>
- <td>column_type_names</td>
+ <td>color</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column types of the query result.
-The types come from the Golang SQL driver. </p></td>
- </tr>
-
- <tr>
- <td>rows</td>
- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
- <td>repeated</td>
- <td><p>Rows of the query result. </p></td>
- </tr>
-
- <tr>
- <td>rows_count</td>
- <td><a href="#int64">int64</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The color code for the label (e.g., hex color). </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>group</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The error message if the query failed. </p></td>
+ <td><p>The group this label belongs to. </p></td>
</tr>
- <tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The time it takes to execute the query. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The query statement for the result. </p></td>
+ <td><p>The maximum number of projects to return. The service may return fewer than
+this value.
+If unspecified, at most 10 projects will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>postgres_error</td>
- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `ListProjects` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListProjects` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>allow_export</td>
+ <td>show_deleted</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The query result is allowed to be exported or not. </p></td>
- </tr>
-
- <tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
- <td>repeated</td>
- <td><p>Informational or debug messages returned by the database engine during query execution.
-Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ <td><p>Show deleted projects if specified. </p></td>
</tr>
<tr>
- <td>masked</td>
- <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
- <td>repeated</td>
- <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter the project.
+Check filter for SearchProjectsRequest for details.
+Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). </p></td>
</tr>
</tbody>
@@ -24253,7 +24025,7 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
+ <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3>
<p></p>
@@ -24264,17 +24036,18 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>level</td>
- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>projects</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>repeated</td>
+ <td><p>The projects from the specified request. </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -24284,8 +24057,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
- <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
+ <h3 id="bytebase.v1.Project">Project</h3>
+ <p></p>
<table class="field-table">
@@ -24295,122 +24068,141 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>severity</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the project.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The lifecycle state of the project. </p></td>
</tr>
<tr>
- <td>message</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The title or name of a project. It&#39;s not unique within the workspace. </p></td>
</tr>
<tr>
- <td>detail</td>
+ <td>webhooks</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>repeated</td>
+ <td><p>The list of webhooks configured for the project. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_classification_config_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The data classification configuration ID for the project. </p></td>
</tr>
<tr>
- <td>hint</td>
- <td><a href="#string">string</a></td>
+ <td>issue_labels</td>
+ <td><a href="#bytebase.v1.Label">Label</a></td>
+ <td>repeated</td>
+ <td><p>Labels available for tagging issues in this project. </p></td>
+ </tr>
+
+ <tr>
+ <td>force_issue_labels</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Force issue labels to be used when creating an issue. </p></td>
</tr>
<tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
+ <td>allow_modify_statement</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Allow modifying SQL statements after issue is created. </p></td>
</tr>
<tr>
- <td>internal_position</td>
- <td><a href="#int32">int32</a></td>
+ <td>auto_resolve_issue</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Enable automatic issue resolution when tasks complete. </p></td>
</tr>
<tr>
- <td>internal_query</td>
- <td><a href="#string">string</a></td>
+ <td>enforce_issue_title</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td>
</tr>
<tr>
- <td>where</td>
- <td><a href="#string">string</a></td>
+ <td>auto_enable_backup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to automatically enable backup for database changes. </p></td>
</tr>
<tr>
- <td>schema_name</td>
- <td><a href="#string">string</a></td>
+ <td>skip_backup_errors</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to skip backup errors and continue with data migration. </p></td>
</tr>
<tr>
- <td>table_name</td>
- <td><a href="#string">string</a></td>
+ <td>postgres_database_tenant_mode</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to enable database tenant mode for PostgreSQL.
+If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
</tr>
<tr>
- <td>column_name</td>
- <td><a href="#string">string</a></td>
+ <td>allow_self_approval</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to allow issue creators to self-approve their own issues. </p></td>
</tr>
<tr>
- <td>data_type_name</td>
- <td><a href="#string">string</a></td>
+ <td>execution_retry_policy</td>
+ <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Execution retry policy for task runs. </p></td>
</tr>
<tr>
- <td>constraint_name</td>
- <td><a href="#string">string</a></td>
+ <td>ci_sampling_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of database rows to sample during CI data validation.
+Without specification, sampling is disabled, resulting in full validation. </p></td>
</tr>
<tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
+ <td>parallel_tasks_per_rollout</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of parallel tasks allowed during rollout execution. </p></td>
</tr>
<tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels are key-value pairs that can be attached to the project.
+For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
</tr>
<tr>
- <td>routine</td>
- <td><a href="#string">string</a></td>
+ <td>enforce_sql_review</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to enforce SQL review checks to pass before issue creation.
+If enabled, issues cannot be created when SQL review finds errors. </p></td>
</tr>
</tbody>
@@ -24420,8 +24212,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
- <p></p>
+ <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
+ <p>Execution retry policy configuration.</p>
<table class="field-table">
@@ -24431,10 +24223,10 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>values</td>
- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
- <td>repeated</td>
- <td><p>Row values of the query result. </p></td>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of retries for lock timeout errors. </p></td>
</tr>
</tbody>
@@ -24444,7 +24236,7 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.RowValue">RowValue</h3>
+ <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3>
<p></p>
@@ -24455,98 +24247,180 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>null_value</td>
- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>bool_value</td>
- <td><a href="#bool">bool</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>bytes_value</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>double_value</td>
- <td><a href="#double">double</a></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The webhook to remove. Identified by its url. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>float_value</td>
- <td><a href="#float">float</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Show deleted projects if specified. </p></td>
</tr>
<tr>
- <td>int32_value</td>
- <td><a href="#int32">int32</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Filter the project.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator.
+- state: check the State enum for the values, support &#34;==&#34; operator.
+- labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+name = &#34;project name&#34;
+name.matches(&#34;project name&#34;)
+resource_id = &#34;project id&#34;
+resource_id.matches(&#34;project id&#34;)
+exclude_default == true
+state == &#34;DELETED&#34;
+labels.environment == &#34;production&#34;
+labels.tier == &#34;critical&#34;
+labels.environment in [&#34;staging&#34;, &#34;prod&#34;]
+You can combine filter conditions like:
+name = &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;)
+name.matches(&#34;project name&#34;) || resource_id = &#34;project id&#34;
+labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; </p></td>
</tr>
<tr>
- <td>int64_value</td>
- <td><a href="#int64">int64</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of projects to return. The service may return fewer than
+this value.
+If unspecified, at most 10 projects will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>string_value</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `SearchProjects` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchProjects` must match
+the call that provided the page token. </p></td>
</tr>
- <tr>
- <td>uint32_value</td>
- <td><a href="#uint32">uint32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>uint64_value</td>
- <td><a href="#uint64">uint64</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>projects</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>repeated</td>
+ <td><p>The projects from the specified request. </p></td>
</tr>
<tr>
- <td>value_value</td>
- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>timestamp_value</td>
- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
+ <td>project</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>timestamp_value is used for the timestamp without time zone data type,
-meaning it only includes the timestamp without any time zone or location
-info. Although it may be expressed as a UTC value, it should be seen as a
-timestamp missing location context. </p></td>
+ <td><p>The name of the project which owns the webhook to test.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>timestamp_tz_value</td>
- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p>timestamp_tz_value is used for the timestamptz data type, which
-accurately represents the timestamp with location information. </p></td>
+ <td><p>The webhook to test. Identified by its url. </p></td>
</tr>
</tbody>
@@ -24556,7 +24430,7 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
+ <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3>
<p></p>
@@ -24567,17 +24441,10 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The accuracy is the number of digits after the decimal point. </p></td>
+ <td><p>The result of the test, empty if the test is successful. </p></td>
</tr>
</tbody>
@@ -24587,7 +24454,7 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
+ <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3>
<p></p>
@@ -24598,36 +24465,53 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the deleted project.
+Format: projects/{project} </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>zone</td>
- <td><a href="#string">string</a></td>
+ <td>project</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
<td></td>
- <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
-&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
-retrieve the time zone information from the timestamptz field in the
-database. A timestamp is in UTC or epoch time, and with zone info, we can
-convert it to a local time string. Zone and offset are returned by
-time.Time.Zone() </p></td>
+ <td><p>The project to update.
+
+The project&#39;s `name` field is used to identify the project to update.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>offset</td>
- <td><a href="#int32">int32</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The offset is in seconds east of UTC </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, and the project is not found, a new project will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -24637,7 +24521,7 @@ time.Time.Zone() </p></td>
- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
+ <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</h3>
<p></p>
@@ -24648,45 +24532,25 @@ time.Time.Zone() </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p>The maximum number of histories to return.
-The service may return fewer than this value.
-If unspecified, at most 10 history entries will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The webhook to modify. </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListQueryHistory` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Filter is the filter to apply on the search query history
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
-- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
-- statement: the SQL statement, support &#34;.matches()&#34; operator.
-
-For example:
-project == &#34;projects/{project}&#34;
-database == &#34;instances/{instance}/databases/{database}&#34;
-instance == &#34;instances/{instance}&#34;
-type == &#34;QUERY&#34;
-type == &#34;EXPORT&#34;
-statement.matches(&#34;select&#34;)
-type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
+ <td><p>If set to true, and the webhook is not found, a new webhook will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -24696,7 +24560,7 @@ type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
+ <h3 id="bytebase.v1.Webhook">Webhook</h3>
<p></p>
@@ -24707,19 +24571,56 @@ type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td>repeated</td>
- <td><p>The list of history. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>name is the name of the webhook, generated by the server.
+format: projects/{project}/webhooks/{webhook} </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Webhook.Type">Webhook.Type</a></td>
+ <td></td>
+ <td><p>type is the type of the webhook. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token to retrieve next page of history.
-Pass this value in the page_token field in the subsequent call to
-`ListQueryHistory` method to retrieve the next page of history. </p></td>
+ <td><p>title is the title of the webhook. </p></td>
+ </tr>
+
+ <tr>
+ <td>url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>url is the url of the webhook, should be unique within the project. </p></td>
+ </tr>
+
+ <tr>
+ <td>direct_message</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>if direct_message is set, the notification is sent directly
+to the persons and url will be ignored.
+IM integration setting should be set for this function to work. </p></td>
+ </tr>
+
+ <tr>
+ <td>notification_types</td>
+ <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>
+ <td>repeated</td>
+ <td><p>notification_types is the list of activities types that the webhook is interested in.
+Bytebase will only send notifications to the webhook if the activity type is in the list.
+It should not be empty, and should be a subset of the following:
+- TYPE_ISSUE_CREATED
+- TYPE_ISSUE_STATUS_UPDATE
+- TYPE_ISSUE_PIPELINE_STAGE_UPDATE
+- TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE
+- TYPE_ISSUE_FIELD_UPDATE
+- TYPE_ISSUE_COMMENT_CREATE </p></td>
</tr>
</tbody>
@@ -24731,8 +24632,8 @@ Pass this value in the page_token field in the subsequent call to
- <h3 id="bytebase.v1.Advice.Status">Advice.Status</h3>
- <p></p>
+ <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>
+ <p>Activity type enumeration.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -24740,75 +24641,74 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>STATUS_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified.</p></td>
+ <td><p>Unspecified type.</p></td>
</tr>
<tr>
- <td>SUCCESS</td>
- <td>1</td>
- <td><p></p></td>
+ <td>NOTIFY_ISSUE_APPROVED</td>
+ <td>23</td>
+ <td><p>Notifications via webhooks.
+
+NOTIFY_ISSUE_APPROVED represents the issue approved notification.</p></td>
</tr>
<tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p></p></td>
+ <td>NOTIFY_PIPELINE_ROLLOUT</td>
+ <td>24</td>
+ <td><p>NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification.</p></td>
</tr>
<tr>
- <td>ERROR</td>
- <td>3</td>
- <td><p></p></td>
+ <td>ISSUE_CREATE</td>
+ <td>1</td>
+ <td><p>Issue related activity types.
+
+ISSUE_CREATE represents creating an issue.</p></td>
</tr>
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>ISSUE_COMMENT_CREATE</td>
+ <td>2</td>
+ <td><p>ISSUE_COMMENT_CREATE represents commenting on an issue.</p></td>
+ </tr>
<tr>
- <td>CHANGE_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
+ <td>ISSUE_FIELD_UPDATE</td>
+ <td>3</td>
+ <td><p>ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc.</p></td>
</tr>
<tr>
- <td>DDL</td>
- <td>1</td>
- <td><p></p></td>
+ <td>ISSUE_STATUS_UPDATE</td>
+ <td>4</td>
+ <td><p>ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now.</p></td>
</tr>
<tr>
- <td>DDL_GHOST</td>
- <td>2</td>
- <td><p></p></td>
+ <td>ISSUE_APPROVAL_NOTIFY</td>
+ <td>21</td>
+ <td><p>ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.</p></td>
</tr>
<tr>
- <td>DML</td>
- <td>3</td>
- <td><p></p></td>
+ <td>ISSUE_PIPELINE_STAGE_STATUS_UPDATE</td>
+ <td>5</td>
+ <td><p>ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.</p></td>
</tr>
<tr>
- <td>SQL_EDITOR</td>
- <td>4</td>
- <td><p></p></td>
+ <td>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE</td>
+ <td>22</td>
+ <td><p>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
- <p></p>
+ <h3 id="bytebase.v1.Webhook.Type">Webhook.Type</h3>
+ <p>Webhook integration type.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -24818,180 +24718,185 @@ Pass this value in the page_token field in the subsequent call to
<tr>
<td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified query history type.</p></td>
+ <td><p>Unspecified type.</p></td>
</tr>
<tr>
- <td>QUERY</td>
+ <td>SLACK</td>
<td>1</td>
- <td><p>Query execution for data retrieval.</p></td>
+ <td><p>Slack integration.</p></td>
</tr>
<tr>
- <td>EXPORT</td>
+ <td>DISCORD</td>
<td>2</td>
- <td><p>Data export operation to file.</p></td>
+ <td><p>Discord integration.</p></td>
</tr>
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>TEAMS</td>
+ <td>3</td>
+ <td><p>Microsoft Teams integration.</p></td>
+ </tr>
<tr>
- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
- <td>0</td>
- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
+ <td>DINGTALK</td>
+ <td>4</td>
+ <td><p>DingTalk integration.</p></td>
</tr>
<tr>
- <td>SINGLE_NODE</td>
- <td>1</td>
- <td><p>Execute Redis commands on a single node in the cluster.</p></td>
+ <td>FEISHU</td>
+ <td>5</td>
+ <td><p>Feishu integration.</p></td>
</tr>
<tr>
- <td>ALL_NODES</td>
- <td>2</td>
- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
+ <td>WECOM</td>
+ <td>6</td>
+ <td><p>WeCom (WeChat Work) integration.</p></td>
+ </tr>
+
+ <tr>
+ <td>LARK</td>
+ <td>8</td>
+ <td><p>Lark integration.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
- <p></p>
+
+
+
+
+ <h3 id="bytebase.v1.ProjectService">ProjectService</h3>
+ <p>ProjectService manages projects that group databases and changes.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified message level.</p></td>
+ <td>GetProject</td>
+ <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>GetProject retrieves a project by name.
+Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method.
+Permissions required: bb.projects.get</p></td>
</tr>
<tr>
- <td>INFO</td>
- <td>1</td>
- <td><p>Informational message.</p></td>
+ <td>ListProjects</td>
+ <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>
+ <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>
+ <td><p>Lists all projects in the workspace with optional filtering.
+Permissions required: bb.projects.list</p></td>
</tr>
<tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p>Warning message indicating potential issues.</p></td>
+ <td>SearchProjects</td>
+ <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>
+ <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>
+ <td><p>Searches for projects with advanced filtering capabilities.
+Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td>
</tr>
<tr>
- <td>DEBUG</td>
- <td>3</td>
- <td><p>Debug message for development and troubleshooting.</p></td>
+ <td>CreateProject</td>
+ <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Creates a new project in the workspace.
+Permissions required: bb.projects.create</p></td>
</tr>
<tr>
- <td>LOG</td>
- <td>4</td>
- <td><p>General log message.</p></td>
+ <td>UpdateProject</td>
+ <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Updates an existing project&#39;s properties.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>NOTICE</td>
- <td>5</td>
- <td><p>Notice message for important information.</p></td>
+ <td>DeleteProject</td>
+ <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes (soft-delete or purge) a project.
+Permissions required: bb.projects.delete</p></td>
</tr>
<tr>
- <td>EXCEPTION</td>
- <td>6</td>
- <td><p>Exception message indicating error conditions.</p></td>
+ <td>UndeleteProject</td>
+ <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Restores a soft-deleted project.
+Permissions required: bb.projects.undelete</p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SQLService">SQLService</h3>
- <p>SQLService executes SQL queries and manages query operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>Query</td>
- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
- <td><p>Executes a read-only SQL query against a database.
-Permissions required: bb.databases.get</p></td>
+ <td>BatchDeleteProjects</td>
+ <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes multiple projects in a single operation.
+Permissions required: bb.projects.delete</p></td>
</tr>
<tr>
- <td>AdminExecute</td>
- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
- <td><p>Executes SQL with admin privileges via streaming connection.
-Permissions required: bb.sql.admin</p></td>
+ <td>GetIamPolicy</td>
+ <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td><p>Retrieves the IAM policy for a project.
+Permissions required: bb.projects.getIamPolicy</p></td>
</tr>
<tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>SearchQueryHistories searches query histories for the caller.
-Permissions required: None (only returns caller&#39;s own query histories)</p></td>
+ <td>BatchGetIamPolicy</td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</a></td>
+ <td><p>Deprecated. No permission check implemented.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>Export</td>
- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
- <td><p>Exports query results to a file format.
-Permissions required: bb.databases.get</p></td>
+ <td>SetIamPolicy</td>
+ <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td><p>Sets the IAM policy for a project.
+Permissions required: bb.projects.setIamPolicy</p></td>
</tr>
<tr>
- <td>Check</td>
- <td><a href="#bytebase.v1.CheckRequest">CheckRequest</a></td>
- <td><a href="#bytebase.v1.CheckResponse">CheckResponse</a></td>
- <td><p>Validates SQL statements against review rules.
-Permissions required: bb.databases.check</p></td>
+ <td>AddWebhook</td>
+ <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Adds a webhook to a project for notifications.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>Pretty</td>
- <td><a href="#bytebase.v1.PrettyRequest">PrettyRequest</a></td>
- <td><a href="#bytebase.v1.PrettyResponse">PrettyResponse</a></td>
- <td><p>Formats and normalizes SQL schema definitions.
-Permissions required: None</p></td>
+ <td>UpdateWebhook</td>
+ <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Updates an existing webhook configuration.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>DiffMetadata</td>
- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
- <td><p>Computes schema differences between two database metadata.
-Permissions required: None</p></td>
+ <td>RemoveWebhook</td>
+ <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Removes a webhook from a project.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>AICompletion</td>
- <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
- <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
- <td><p>Provides AI-powered SQL completion and generation.
-Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
+ <td>TestWebhook</td>
+ <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>
+ <td><p>Tests a webhook by sending a test notification.
+Permissions required: bb.projects.update</p></td>
</tr>
</tbody>
@@ -25015,19 +24920,19 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:query</td>
- <td>*</td>
+ <td>GetProject</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*}</td>
+ <td></td>
</tr>
<tr>
- <td>AdminExecute</td>
+ <td>ListProjects</td>
<td>GET</td>
- <td>/v1:adminExecute</td>
+ <td>/v1/projects</td>
<td></td>
</tr>
@@ -25035,9 +24940,9 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>SearchQueryHistories</td>
+ <td>SearchProjects</td>
<td>POST</td>
- <td>/v1/queryHistories:search</td>
+ <td>/v1/projects:search</td>
<td>*</td>
</tr>
@@ -25045,23 +24950,49 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>Export</td>
+ <td>CreateProject</td>
<td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:export</td>
- <td>*</td>
+ <td>/v1/projects</td>
+ <td>project</td>
</tr>
+
+
+
<tr>
- <td>Export</td>
+ <td>UpdateProject</td>
+ <td>PATCH</td>
+ <td>/v1/{project.name=projects/*}</td>
+ <td>project</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteProject</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteProject</td>
<td>POST</td>
- <td>/v1/{name=projects/*/rollouts/*}:export</td>
+ <td>/v1/{name=projects/*}:undelete</td>
<td>*</td>
</tr>
+
+
+
<tr>
- <td>Export</td>
+ <td>BatchDeleteProjects</td>
<td>POST</td>
- <td>/v1/{name=projects/*/rollouts/*/stages/*}:export</td>
+ <td>/v1/projects:batchDelete</td>
<td>*</td>
</tr>
@@ -25069,9 +25000,29 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>Check</td>
+ <td>GetIamPolicy</td>
+ <td>GET</td>
+ <td>/v1/{resource=projects/*}:getIamPolicy</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchGetIamPolicy</td>
+ <td>GET</td>
+ <td>/v1/{scope=*/*}/iamPolicies:batchGet</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SetIamPolicy</td>
<td>POST</td>
- <td>/v1/sql/check</td>
+ <td>/v1/{resource=projects/*}:setIamPolicy</td>
<td>*</td>
</tr>
@@ -25079,9 +25030,9 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>Pretty</td>
+ <td>AddWebhook</td>
<td>POST</td>
- <td>/v1/sql/pretty</td>
+ <td>/v1/{project=projects/*}:addWebhook</td>
<td>*</td>
</tr>
@@ -25089,9 +25040,19 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>DiffMetadata</td>
+ <td>UpdateWebhook</td>
+ <td>PATCH</td>
+ <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>
+ <td>webhook</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RemoveWebhook</td>
<td>POST</td>
- <td>/v1/schemaDesign:diffMetadata</td>
+ <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>
<td>*</td>
</tr>
@@ -25099,9 +25060,9 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>AICompletion</td>
+ <td>TestWebhook</td>
<td>POST</td>
- <td>/v1/sql/aiCompletion</td>
+ <td>/v1/{project=projects/*}:testWebhook</td>
<td>*</td>
</tr>
diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.proto
index 4d499b28d5..3bcbb0ec8f 100644
--- a/proto/v1/v1/plan_service.proto
+++ b/proto/v1/v1/plan_service.proto
@@ -11,6 +11,7 @@ import "google/protobuf/timestamp.proto";
import "v1/annotation.proto";
import "v1/common.proto";
import "v1/database_service.proto";
+import "v1/sql_service.proto";
option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
@@ -490,13 +491,7 @@ message PlanCheckRun {
google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
message Result {
- enum Status {
- STATUS_UNSPECIFIED = 0;
- ERROR = 1;
- WARNING = 2;
- SUCCESS = 3;
- }
- Status status = 1;
+ Advice.Level status = 1;
string title = 2;
string content = 3;
int32 code = 4;
diff --git a/proto/v1/v1/sql_service.proto b/proto/v1/v1/sql_service.proto
index c6c08e6050..0e661c0af1 100644
--- a/proto/v1/v1/sql_service.proto
+++ b/proto/v1/v1/sql_service.proto
@@ -355,15 +355,19 @@ message RowValue {
message Advice {
reserved 7;
- enum Status {
- // Unspecified.
- STATUS_UNSPECIFIED = 0;
+ // Level represents the severity level of the advice.
+ enum Level {
+ // Unspecified advice level.
+ ADVICE_LEVEL_UNSPECIFIED = 0;
+ // Success status indicating the check passed without issues.
SUCCESS = 1;
+ // Warning status indicating potential issues that should be reviewed.
WARNING = 2;
+ // Error status indicating critical issues that must be addressed.
ERROR = 3;
}
- // The advice status.
- Status status = 1;
+ // The advice level.
+ Level status = 1;
// The advice code.
int32 code = 2;